:root{
  --ink:#263345;
  --muted:#667386;
  --paper:#fffdf9;
  --cream:#fff8ee;
  --blue:#8fdcf4;
  --teal:#73d8c8;
  --mint:#c9f3e6;
  --peach:#ffd8bc;
  --yellow:#ffd36a;
  --lav:#cbbcf6;
  --coral:#ff9691;
  --line:rgba(52,72,95,.11);
  --shadow:0 16px 45px rgba(52,72,95,.10);
  font-family:Inter,ui-rounded,"SF Pro Rounded","Segoe UI",system-ui,-apple-system,sans-serif;
  color:var(--ink);
  background:#fbfaf6;
  line-height:1.5
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at 8% 28%,rgba(143,220,244,.20),transparent 25rem),
    radial-gradient(circle at 92% 48%,rgba(255,216,188,.22),transparent 28rem),
    linear-gradient(180deg,#fffdf9 0%,#f7fbfb 45%,#fffaf4 100%);
}
.wrap{max-width:1180px;margin:auto;padding-left:22px;padding-right:22px}

.hero{
  min-height:520px;
  display:flex;
  align-items:center;
  position:relative;
  overflow:hidden;
  isolation:isolate;
  background-image:url("assets/hero-education.png");
  background-size:cover;
  background-position:center 46%;
  background-repeat:no-repeat;
  margin-bottom:-1px;
}
.hero:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(90deg,rgba(255,253,249,.94) 0%,rgba(255,253,249,.78) 34%,rgba(255,253,249,.24) 58%,rgba(255,253,249,.02) 78%),
    linear-gradient(180deg,rgba(255,255,255,.08) 58%,rgba(255,253,249,.74) 100%);
}
.hero:after{
  content:"";
  position:absolute;
  inset:auto 0 0;
  height:76px;
  z-index:0;
  background:linear-gradient(transparent,rgba(255,253,249,.88));
}
.hero-inner{
  position:relative;
  z-index:1;
  width:100%;
  min-height:520px;
  display:flex;
  align-items:center;
  padding-top:44px;
  padding-bottom:64px;
}
.hero-card{
  width:min(620px,100%);
  padding:32px 36px 30px;
  border:1px solid rgba(255,255,255,.76);
  border-radius:30px;
  background:rgba(255,253,249,.88);
  box-shadow:0 18px 52px rgba(46,75,96,.12);
  backdrop-filter:blur(10px);
}
.eyebrow{
  display:inline-flex;
  margin:0 0 14px;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,211,106,.35);
  color:#66511d;
  font-size:.74rem;
  font-weight:850;
  letter-spacing:.11em;
  text-transform:uppercase
}
h1{
  font-size:clamp(2.45rem,5.2vw,4.1rem);
  line-height:1;
  letter-spacing:-.043em;
  margin:0 0 18px;
  max-width:610px
}
.hero-lead{font-size:clamp(1.03rem,2vw,1.2rem);color:#506073;max-width:640px;margin:0}
.hero-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.hero-chips span{
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.78);
  border:1px solid rgba(72,95,118,.10);
  box-shadow:0 3px 10px rgba(41,65,84,.05);
  font-size:.88rem;
  font-weight:700
}

main{padding-top:24px;padding-bottom:64px}
.controls{
  position:sticky;
  top:12px;
  z-index:5;
  margin:-34px 0 24px;
  padding:15px;
  border:1px solid rgba(255,255,255,.88);
  border-radius:24px;
  background:rgba(255,255,255,.90);
  box-shadow:var(--shadow);
  backdrop-filter:blur(16px)
}
.search-wrap{position:relative}
.search-icon{
  position:absolute;
  left:15px;
  top:50%;
  transform:translateY(-54%);
  font-size:1.45rem;
  color:#7290a3;
  pointer-events:none
}
input{
  width:100%;
  font:inherit;
  font-size:1.04rem;
  border:1px solid rgba(89,111,132,.15);
  outline:none;
  border-radius:16px;
  padding:14px 16px 14px 44px;
  background:#fffdf9;
  transition:.18s ease
}
input:focus{
  border-color:rgba(52,160,190,.46);
  box-shadow:0 0 0 4px rgba(143,220,244,.18)
}
#filters{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
button{
  appearance:none;
  font:inherit;
  color:#485769;
  border:1px solid rgba(84,106,126,.12);
  border-radius:999px;
  background:#fff;
  padding:9px 12px;
  cursor:pointer;
  font-weight:680;
  transition:transform .15s ease,box-shadow .15s ease,background .15s ease
}
button:hover{transform:translateY(-1px);box-shadow:0 5px 14px rgba(52,72,95,.08)}
button.on{
  color:#24313f;
  background:linear-gradient(135deg,#d5f4f0,#dff3ff);
  border-color:rgba(55,145,164,.22);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65)
}
#clear{background:#fff7ef;color:#7b6250}
#count{margin:11px 4px 0;color:#748194;font-size:.9rem}

.category-nav{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin:5px 0 32px;
  padding:4px
}
.category-nav a{
  color:#405065;
  text-decoration:none;
  border-radius:15px;
  padding:10px 13px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(70,93,114,.10);
  box-shadow:0 4px 15px rgba(54,74,94,.05);
  font-size:.92rem;
  font-weight:720;
  transition:.16s ease
}
.category-nav a:hover{transform:translateY(-2px);background:#fff;box-shadow:0 9px 22px rgba(54,74,94,.09)}

.category{
  --accent:#8fdcf4;
  --accent-soft:#eaf8fd;
  margin:0 0 48px;
  padding:24px;
  border:1px solid rgba(71,92,111,.08);
  border-radius:30px;
  background:rgba(255,255,255,.43);
  box-shadow:0 8px 32px rgba(50,70,90,.035);
  scroll-margin-top:130px
}
#cat-pl{--accent:#73d8c8;--accent-soft:#e8faf5}
#cat-puzzles{--accent:#ffd36a;--accent-soft:#fff7dd}
#cat-en{--accent:#8fdcf4;--accent-soft:#eaf8fd}
#cat-software{--accent:#cbbcf6;--accent-soft:#f3efff}
#cat-github{--accent:#ffaaa1;--accent-soft:#fff0ed}

.category-head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:15px;
  align-items:start;
  margin:0 0 18px
}
.category-icon{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:17px;
  background:var(--accent-soft);
  font-size:1.75rem;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)
}
.category-head h2{
  margin:1px 0 2px;
  font-size:clamp(1.5rem,3vw,1.9rem);
  line-height:1.1;
  letter-spacing:-.025em
}
.category-head p{margin:.42rem 0 0;color:var(--muted);max-width:800px}
.category-count{
  min-width:36px;
  text-align:center;
  border-radius:999px;
  padding:6px 10px;
  background:var(--accent-soft);
  color:#586676;
  font-size:.82rem;
  font-weight:800
}

.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:14px}
.card{
  position:relative;
  overflow:hidden;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(64,87,108,.09);
  border-radius:22px;
  padding:20px;
  min-height:210px;
  display:flex;
  flex-direction:column;
  box-shadow:0 7px 20px rgba(46,67,86,.055);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease
}
.card:before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:4px;
  background:linear-gradient(90deg,var(--accent),transparent 78%)
}
.card:hover{
  transform:translateY(-3px);
  border-color:color-mix(in srgb,var(--accent) 35%,transparent);
  box-shadow:0 16px 34px rgba(46,67,86,.10)
}
.card h3{font-size:1.16rem;line-height:1.25;margin:2px 0 9px;letter-spacing:-.015em}
.card h3 a{color:#263648;text-decoration:none}
.card h3 a:hover{color:#167d8e}
.card p{color:#5e6b7c;margin:.2rem 0 1.15rem;font-size:.94rem}
.badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:auto}
.badge{
  font-size:.76rem;
  font-weight:650;
  color:#536173;
  background:#f4f7f8;
  border:1px solid rgba(72,94,113,.07);
  border-radius:999px;
  padding:4px 7px
}
.badge:first-child{background:var(--accent-soft)}

.empty{
  background:#fff;
  border:1px dashed rgba(75,98,119,.22);
  border-radius:22px;
  padding:28px;
  text-align:center;
  color:var(--muted)
}
.note{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:16px;
  align-items:start;
  margin-top:18px;
  padding:23px 25px;
  background:linear-gradient(135deg,#fff8dc,#fff3e9);
  border:1px solid rgba(221,166,79,.16);
  border-radius:26px;
  box-shadow:0 8px 26px rgba(85,69,40,.055)
}
.note-icon{
  width:48px;height:48px;display:grid;place-items:center;
  border-radius:15px;background:rgba(255,211,106,.42);font-size:1.5rem
}
.note h2{margin:1px 0 6px;font-size:1.25rem}
.note p{margin:0;color:#685f55}

footer{
  padding:34px 20px;
  text-align:center;
  border-top:1px solid rgba(61,83,103,.08);
  background:rgba(255,255,255,.72);
  color:#657285
}
footer a{color:#2b7180;font-weight:700;text-decoration:none}
footer a:hover{text-decoration:underline}

@media(max-width:1100px){
  .hero{
    background-position:58% 44%;
  }
  .hero-card{width:min(590px,100%)}
}
@media(max-width:760px){
  .hero{
    min-height:auto;
    background-size:auto 100%;
    background-position:62% center;
  }
  .hero:before{
    background:
      linear-gradient(180deg,rgba(255,253,249,.90) 0%,rgba(255,253,249,.78) 62%,rgba(255,253,249,.58) 100%);
  }
  .hero-inner{
    min-height:500px;
    align-items:flex-start;
    padding-top:30px;
    padding-bottom:72px;
  }
  .hero-card{
    width:100%;
    padding:24px 22px;
    border-radius:25px;
    background:rgba(255,253,249,.91);
  }
  h1{font-size:clamp(2.2rem,11.5vw,3.5rem)}
  .controls{position:relative;top:auto;margin:-42px 0 22px;border-radius:21px}
  .category{padding:18px;border-radius:24px}
  .category-head{grid-template-columns:auto 1fr}
  .category-count{grid-column:2;justify-self:start}
  .grid{grid-template-columns:1fr}
}
@media(max-width:440px){
  .wrap{padding-left:14px;padding-right:14px}
  .hero{
    background-size:auto 100%;
    background-position:68% center;
  }
  .hero-inner{min-height:510px}
  .hero-chips span{font-size:.8rem}
  button{padding:10px 11px;font-size:.9rem}
  .category-nav{gap:7px}
  .category-nav a{font-size:.86rem;padding:9px 10px}
}