:root {
  --paper: #f6f3ea;
  --paper-2: #ece7d8;
  --ink: #16231c;
  --ink-soft: #4b5a51;
  --court: #1f4d3a;
  --court-2: #2b6a50;
  --ball: #d4ec3c;
  --clay: #c8643b;
  --line: rgba(22, 35, 28, 0.12);
  --radius: 18px;
  --max: 1080px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
strong { font-weight: 600; }
code { font-family: var(--mono); font-size: 0.85em; background: var(--paper-2); padding: 0.1em 0.35em; border-radius: 4px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(246, 243, 234, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; text-decoration: none; display: flex; align-items: center; gap: 4px; }
.nav-logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ball); box-shadow: inset -2px -2px 0 rgba(0,0,0,.12); }
.nav nav { display: flex; gap: clamp(0.75rem, 2vw, 1.75rem); align-items: center; }
.nav nav a { text-decoration: none; font-size: 0.92rem; color: var(--ink-soft); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.nav-cta { background: var(--ink); color: var(--paper); padding: .45rem 1rem; border-radius: 999px; }
.nav nav a.nav-cta:hover { background: var(--court); }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  background: var(--court);
  color: #f3f6ef;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 9vw, 7rem);
}
.hero-court { position: absolute; inset: 0; pointer-events: none; }
.hero-court .line { position: absolute; background: rgba(255,255,255,.14); }
.hero-court .baseline { left: 8%; right: 8%; bottom: 14%; height: 3px; }
.hero-court .service { left: 22%; right: 22%; top: 30%; height: 3px; }
.hero-court .center { left: 50%; top: 30%; bottom: 14%; width: 3px; }
.hero-court::before, .hero-court::after {
  content: ""; position: absolute; top: 0; bottom: 14%; width: 3px; background: rgba(255,255,255,.14);
}
.hero-court::before { left: 22%; }
.hero-court::after { right: 22%; }
.hero-court .ball {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ecfa7a, var(--ball) 55%, #a9c21f);
  box-shadow: 0 18px 30px rgba(0,0,0,.25);
  right: 12%; top: 18%;
  animation: bounce 2.6s cubic-bezier(.5,0,.5,1) infinite;
}
.hero-court .ball::before, .hero-court .ball::after {
  content: ""; position: absolute; top: 4px; bottom: 4px; width: 22px;
  border: 2.5px solid rgba(255,255,255,.85); border-radius: 50%;
}
.hero-court .ball::before { left: -12px; border-left-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
.hero-court .ball::after { right: -12px; border-right-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(160px) scaleY(.92); }
}

.hero-inner { position: relative; max-width: var(--max); margin: 0 auto; }
.eyebrow { font-family: var(--mono); font-size: .9rem; color: var(--ball); margin-bottom: 1.25rem; letter-spacing: .02em; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: 1.08; letter-spacing: -0.02em;
  max-width: 16ch;
}
.hero h1 em { font-style: italic; color: var(--ball); }
.lede { margin-top: 1.5rem; max-width: 58ch; font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(243,246,239,.82); }
.hero-actions { display: flex; gap: .9rem; margin-top: 2rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: .8rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 500; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ball); color: var(--ink); }
.btn-ghost { border: 1.5px solid rgba(243,246,239,.4); color: #f3f6ef; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin-top: 2.75rem; }
.hero-meta li { font-size: .88rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: .4rem .85rem; border-radius: 999px; }
.hero-meta span { margin-right: .3rem; }

/* SECTIONS */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 6.5rem) clamp(1.25rem, 4vw, 3rem) 0; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.25rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.section-num { font-family: var(--mono); font-size: .85rem; color: var(--clay); }
.section h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.015em; }
.section-note { color: var(--ink-soft); margin: -1rem 0 2rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.about-text p { font-size: 1.08rem; margin-bottom: 1.1rem; color: var(--ink); }
.journey { list-style: none; position: relative; padding-left: .5rem; }
.journey::before { content: ""; position: absolute; left: 1.55rem; top: 1rem; bottom: 1rem; border-left: 2px dashed var(--line); }
.journey li { position: relative; display: flex; gap: 1rem; align-items: center; padding: .7rem 0; }
.journey-flag {
  flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 1.05rem; position: relative; z-index: 1;
}
.journey h3 { font-size: 1rem; font-weight: 600; }
.journey p { font-size: .9rem; color: var(--ink-soft); }

/* EXPERIENCE */
.timeline { display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.job:first-child { padding-top: 0; }
.job-meta { display: flex; flex-direction: column; gap: .2rem; font-family: var(--mono); font-size: .8rem; color: var(--ink-soft); }
.job-date { color: var(--ink); }
.job h3 { font-size: 1.2rem; font-weight: 600; }
.job-org { color: var(--court-2); font-weight: 500; margin-bottom: .75rem; }
.job ul { padding-left: 1.1rem; color: var(--ink-soft); }
.job li { margin-bottom: .4rem; }
.job li strong { color: var(--ink); }

.job-demo { margin-top: 1.25rem; }
.job-demo video { display: block; width: 100%; height: auto; aspect-ratio: 1430 / 428; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.job-demo figcaption { margin-top: .5rem; font-size: .82rem; color: var(--ink-soft); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tags span { font-family: var(--mono); font-size: .74rem; padding: .25rem .6rem; border-radius: 6px; background: var(--paper-2); color: var(--ink-soft); }

/* PROJECTS */
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.project { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.project:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(22,35,28,.3); }
.project-art { height: 190px; display: grid; place-items: center; }
.project-body { padding: 1.5rem 1.6rem 1.75rem; }
.project h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; margin-bottom: .6rem; }
.project p { color: var(--ink-soft); font-size: .96rem; }

.project { display: flex; flex-direction: column; }
.project-body { flex: 1; display: flex; flex-direction: column; }
.project-links { display: flex; gap: .6rem; margin-top: auto; padding-top: 1.25rem; flex-wrap: wrap; }
.project-links a { font-size: .88rem; font-weight: 500; text-decoration: none; padding: .5rem 1rem; border-radius: 999px; transition: transform .2s, background .2s; }
.project-links a:hover { transform: translateY(-2px); }
.link-demo { background: var(--ink); color: var(--paper); }
.link-demo:hover { background: var(--court); }
.link-code { border: 1.5px solid var(--line); color: var(--ink); }
.link-code:hover { border-color: var(--ink); }

.art-serve { background: var(--court); }
.art-serve svg { height: 160px; }
.art-skeleton line, .art-skeleton circle { stroke: #f3f6ef; stroke-width: 3; stroke-linecap: round; fill: none; }
.art-joints circle { fill: var(--ball); }
.art-ball { fill: var(--ball); animation: toss 2.4s ease-in-out infinite; }
@keyframes toss { 0%,100% { transform: translateY(20px); } 50% { transform: translateY(-6px); } }

.art-sched { background: var(--clay); }
.cal { display: grid; grid-template-columns: repeat(5, 34px); gap: 8px; }
.cal span { height: 34px; border-radius: 7px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: .9rem; }
.cal span.on { background: var(--paper); }
.cal span.lock { background: var(--ink); }

/* SKILLS */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skill-group { background: var(--paper); padding: 1.5rem 1.6rem; }
.skill-group h3 { font-family: var(--mono); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--clay); margin-bottom: .5rem; }
.skill-group p { color: var(--ink); }

/* BENTO */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--line); background: #fff; }
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; position: relative; }
.card p { color: var(--ink-soft); font-size: .95rem; position: relative; }
.card-big { font-family: var(--serif); font-weight: 700; font-size: clamp(4rem, 9vw, 6.5rem); line-height: 1; letter-spacing: -.04em; margin-bottom: 1rem; }
.card-tennis { grid-column: span 3; background: var(--ball); border: none; }
.card-tennis p { color: var(--ink); }
.card-coach { grid-column: span 3; background: var(--court); color: #f3f6ef; border: none; }
.card-coach .card-big { color: var(--ball); }
.card-coach p { color: rgba(243,246,239,.8); }
.card-gym { grid-column: span 2; }
.card-lang { grid-column: span 2; }
.card-chicken { grid-column: span 2; background: #fff4e2; }
.chickens { display: flex; gap: .25rem; margin-bottom: .75rem; }
.chick { font-size: 2rem; background: none; border: none; cursor: pointer; transition: transform .15s; line-height: 1; }
.chick:hover { transform: rotate(-12deg) scale(1.15); }
.chick.peck { animation: peck .4s ease; }
@keyframes peck { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-25deg) translateY(4px); } 60% { transform: rotate(8deg); } }
.hint { font-size: .85rem; opacity: .7; }

.runner { position: fixed; bottom: 12px; font-size: 2.2rem; z-index: 100; pointer-events: none; animation: run linear forwards; }
@keyframes run { from { left: -60px; } to { left: 105vw; } }
.bawk { position: absolute; font-family: var(--mono); font-size: .8rem; font-weight: 500; color: var(--clay); pointer-events: none; animation: float 1s ease-out forwards; }
@keyframes float { to { transform: translateY(-36px); opacity: 0; } }

/* CONTACT */
.contact { padding-bottom: 5rem; }
.contact-lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; margin-bottom: 1.5rem; }
.contact-email {
  font-family: var(--serif); font-size: clamp(1.6rem, 4.6vw, 3.2rem); text-decoration: none;
  background-image: linear-gradient(var(--ball), var(--ball)); background-size: 100% 30%; background-position: 0 88%; background-repeat: no-repeat;
  transition: background-size .3s;
  word-break: break-all;
}
.contact-email:hover { background-size: 100% 88%; }
.contact-links { display: flex; gap: 1.5rem; margin-top: 2rem; flex-wrap: wrap; }
.contact-links a { font-family: var(--mono); font-size: .9rem; text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.contact-links a:hover { color: var(--court-2); border-color: var(--court-2); }

.footer { text-align: center; padding: 2rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }

/* RESPONSIVE */
@media (max-width: 860px) {
  .about-grid, .projects { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: .75rem; }
  .job-meta { flex-direction: row; gap: 1rem; }
  .bento > .card { grid-column: span 6; }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero-court .ball { width: 32px; height: 32px; right: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* PHOTOS */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-photo { width: clamp(220px, 26vw, 320px); }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 434 / 542; object-fit: cover; border-radius: 24px; border: 4px solid var(--ball); box-shadow: 0 24px 50px -20px rgba(0,0,0,.5); transform: rotate(2deg); }
.hero-court .ball { right: 3%; }
.card-gym, .card-lang { grid-column: span 3; }
.card-chicken { grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem; align-items: center; padding: 0; }
.chicken-photo { display: block; width: 100%; height: 100%; min-height: 260px; max-height: 340px; object-fit: cover; object-position: center 15%; }
.chicken-text { padding: 1.6rem 1.6rem 1.6rem 0; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { order: -1; width: 180px; }
  .card-chicken { grid-template-columns: 1fr; gap: 0; }
  .chicken-photo { max-height: 240px; }
  .chicken-text { padding: 1.6rem; }
}

/* PROJECT SCREENSHOTS */
.project-art { height: auto; aspect-ratio: 1848 / 974; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.project-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
