/* ============================================================
   SURESH KUMAR — Premium Personal Brand  ·  v2
   Vanilla CSS · dark editorial · badminton-green accent
   ============================================================ */

:root {
  --bg:        #0a0b0c;
  --bg-2:      #0d0f11;
  --panel:     #131619;
  --panel-2:   #181c20;
  --ink:       #f5f6f3;
  --ink-soft:  #d4d8d2;
  --muted:     #8b938f;
  --muted-2:   #656d69;
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.13);
  --accent:    #6fcf97;
  --accent-2:  #8adfaa;
  --accent-dim:#3d7a5b;
  --accent-glow: rgba(111,207,151,0.18);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1200px;
  --pad: clamp(22px, 5vw, 68px);
  --sp:  clamp(90px, 13vh, 180px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.intro-lock { overflow: hidden; height: 100vh; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #06120b; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Scroll progress ---------- */
.scrollbar { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 300; pointer-events: none; }
.scrollbar span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ---------- Shared typography ---------- */
.section-head { max-width: 800px; margin: 0 auto clamp(52px, 7vh, 96px) auto; text-align: center; }
.section-head--left { text-align: left; margin-left: 0; margin-bottom: clamp(40px, 6vh, 70px); }
.section-head__kicker {
  display: inline-block; font-size: 0.7rem; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px; font-weight: 600;
}
.section-head__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.3rem, 5.5vw, 4.1rem); line-height: 1.04; letter-spacing: -0.012em;
}
.section-head__lead {
  margin-top: 24px; color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  font-weight: 300; line-height: 1.6;
}
.muted-note { color: var(--muted-2); font-style: italic; }

/* ---------- Buttons (magnetic + shine) ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 0.92rem; letter-spacing: 0.01em;
  padding: 15px 32px; border-radius: 100px; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.35s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn::before {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg); transition: left 0.75s var(--ease); pointer-events: none;
}
.btn:hover::before { left: 140%; }
.btn > span, .btn { z-index: 0; }
.btn--primary { background: var(--accent); color: #06120b; }
.btn--primary:hover { background: var(--accent-2); box-shadow: 0 16px 42px -14px var(--accent-glow); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--full { width: 100%; }

/* ---------- Cursor-follow glow on cards ---------- */
.glow { position: relative; overflow: hidden; }
.glow::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  transition: opacity 0.45s var(--ease);
  background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%), rgba(111,207,151,0.10), transparent 62%);
}
.glow:hover::after { opacity: 1; }

/* ============================================================
   CINEMATIC INTRO
   ============================================================ */
.intro { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; overflow: hidden; will-change: opacity; }
.intro.is-done { opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease-out), visibility 0s linear 0.6s; }

.intro__spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 42% 46% at 50% 38%, rgba(255,255,255,0.12), transparent 70%);
  opacity: 0; animation: spotFade 1.1s var(--ease-out) 0.1s forwards;
}
@keyframes spotFade { to { opacity: 1; } }

.intro__stage { position: relative; width: min(80vw, 820px); aspect-ratio: 8 / 5; display: grid; place-items: center; }

.intro__shuttle {
  position: absolute; top: -8%; left: 50%; transform: translate(-50%, 0) rotate(0deg);
  filter: drop-shadow(0 10px 34px rgba(0,0,0,0.65)); will-change: transform, opacity;
  animation:
    shuttleSpin 1.5s var(--ease-out) 0.15s 1 both,
    shuttleFall 0.95s cubic-bezier(0.5, 0, 0.7, 0.35) 1.55s 1 forwards;
}
@keyframes shuttleSpin {
  0%   { transform: translate(-50%, -7%) rotate(-16deg) scale(0.86); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translate(-50%, 0) rotate(8deg) scale(1); opacity: 1; }
}
@keyframes shuttleFall {
  0%   { transform: translate(-50%, 0) rotate(8deg) scale(1); opacity: 1; }
  78%  { transform: translate(-50%, 150%) rotate(2deg) scale(0.72); opacity: 1; }
  100% { transform: translate(-50%, 165%) rotate(0deg) scale(0.66); opacity: 0; }
}

.intro__impact {
  position: absolute; top: 62%; left: 50%; width: 10px; height: 10px; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0); border: 2px solid var(--accent); opacity: 0;
  animation: impactRing 1s var(--ease-out) 2.4s 1 forwards;
}
.intro__impact::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(111,207,151,0.5); animation: impactRing 1.1s var(--ease-out) 2.5s 1 forwards;
}
@keyframes impactRing {
  0%   { transform: translate(-50%,-50%) scale(0.2); opacity: 0.9; }
  100% { transform: translate(-50%,-50%) scale(28); opacity: 0; }
}

.intro__court { position: absolute; width: 100%; height: 100%; opacity: 0; will-change: transform, opacity; }
.intro__court .court__lines path,
.intro__court .court__lines line,
.intro__court .court__lines rect { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
.intro.play-court .intro__court { opacity: 1; }
.intro.play-court .court__lines * { animation: courtDraw 0.55s var(--ease-out) 0.05s forwards; }
@keyframes courtDraw { to { stroke-dashoffset: 0; } }
/* Court recedes toward the viewer as the overlay dissolves into the Hero */
.intro.is-done .intro__court { animation: courtOut 0.6s var(--ease-out) forwards; }
@keyframes courtOut {
  0%   { transform: perspective(1200px) rotateX(2deg) scale(1); opacity: 1; }
  100% { transform: perspective(1500px) rotateX(28deg) scale(1.6) translateY(12%); opacity: 0; }
}

.intro__skip {
  position: absolute; bottom: 30px; right: 30px; z-index: 2; background: none;
  border: 1px solid var(--line-2); color: var(--muted); padding: 9px 18px; border-radius: 100px;
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em; cursor: pointer;
  transition: all 0.3s var(--ease); opacity: 0; animation: skipIn 0.6s ease 0.9s forwards;
}
@keyframes skipIn { to { opacity: 1; } }
.intro__skip:hover { color: var(--ink); border-color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; padding: 22px var(--pad);
  transition: padding 0.4s var(--ease), opacity 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.4s var(--ease);
  opacity: 0; transform: translateY(-16px); pointer-events: none;
}
.nav.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.nav.is-scrolled {
  background: rgba(10,11,12,0.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line); padding-top: 14px; padding-bottom: 14px;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1.1; flex-shrink: 0; }
.nav__brand-name { font-family: var(--serif); font-size: 1.42rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.nav__brand-role { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 36px); }
.nav__links a { font-size: 0.86rem; font-weight: 500; color: var(--ink-soft); transition: color 0.3s var(--ease); position: relative; }
.nav__links a:not(.nav__cta):hover { color: var(--accent); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 1px; background: var(--accent);
  transition: width 0.35s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta { border: 1px solid var(--line-2); padding: 9px 20px; border-radius: 100px; transition: all 0.35s var(--ease); }
.nav__cta:hover { background: var(--accent); color: #06120b; border-color: var(--accent); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); transition: all 0.35s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO (split)
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(124px, 15vh, 150px) var(--pad) clamp(72px, 9vh, 96px); overflow: hidden;
}
.hero__court-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.55; }
.hero__court-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 78% 26%, rgba(111,207,151,0.07), transparent 60%),
    radial-gradient(ellipse 50% 60% at 14% 82%, rgba(255,255,255,0.03), transparent 62%);
}
.hero__court-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 94px 94px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 80% 40%, #000 8%, transparent 70%);
  mask-image: radial-gradient(ellipse 75% 70% at 80% 40%, #000 8%, transparent 70%);
  opacity: 0.55;
}

.hero__grid {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.12fr 0.88fr; gap: clamp(32px, 5vw, 76px); align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 0.73rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 30px; font-weight: 600;
}
.hero__eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--accent); flex-shrink: 0; }
.hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.05rem, 5.6vw, 5.1rem); line-height: 1.06; letter-spacing: -0.02em;
  max-width: 17ch; text-wrap: balance;
}
/* Each sentence owns its own line at every width — no hard <br> that snaps
   in the wrong place once the type scales down. */
.hero__title span { display: block; }
.hero__title em { color: var(--accent); font-style: italic; }
.hero__subtitle {
  margin-top: 26px; max-width: 46ch; color: var(--ink-soft);
  font-size: clamp(1rem, 1.5vw, 1.24rem); font-weight: 300; line-height: 1.62;
  text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* Curated Hero reveal cascade (plays as the intro dissolves) */
.hero__eyebrow.reveal  { transition-delay: 0.05s; }
.hero__title.reveal    { transition-delay: 0.16s; }
.hero__subtitle.reveal { transition-delay: 0.30s; }
.hero__cta.reveal      { transition-delay: 0.44s; }
.hero__aside.reveal    { transition-delay: 0.36s; }
.hero__stats.reveal    { transition-delay: 0.56s; }

/* Portrait */
.hero__aside { display: flex; justify-content: center; }
.portrait { position: relative; width: 100%; max-width: 400px; animation: floatY 9s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.portrait__media {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line-2); background: linear-gradient(155deg, #171a1d, #0b0d0f 72%);
  display: grid; place-items: center; box-shadow: 0 50px 100px -55px rgba(0,0,0,0.95);
}
.portrait__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(115% 85% at 50% 32%, transparent 46%, rgba(10,11,12,0.5) 100%),
    linear-gradient(to top, rgba(10,11,12,0.66), transparent 44%);
}
/* Source file is cropped to 4:5 — the exact container ratio — so `cover`
   fills it edge to edge without cutting the subject at any width. */
.portrait__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  transition: transform 0.9s var(--ease);
}
.portrait:hover .portrait__media img { transform: scale(1.04); }
.portrait__badge {
  position: absolute; bottom: 18px; left: 18px; display: inline-flex; align-items: center; gap: 9px;
  background: rgba(10,11,12,0.72); backdrop-filter: blur(10px); border: 1px solid var(--line-2);
  border-radius: 100px; padding: 9px 16px; font-size: 0.74rem; letter-spacing: 0.03em; color: var(--ink-soft); z-index: 2;
}
.portrait__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); animation: dotPulse 2.4s ease-in-out infinite; }
@keyframes dotPulse { 50% { opacity: 0.45; } }

/* Stats */
.hero__stats {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
  max-width: var(--maxw); margin: clamp(52px, 7vh, 88px) auto 0;
  padding-top: 42px; border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; }
.stat__num { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 600; color: var(--ink); line-height: 1; }
.stat__num--text { color: var(--accent); }
.stat__label { margin-top: 11px; font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

.hero__scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); width: 26px; height: 42px; border: 1px solid var(--line-2); border-radius: 100px; z-index: 1; }
/* Below this the hero is taller than the viewport anyway, so the cue has
   nothing to point at and would only crowd the stats row. */
@media (max-width: 1023px) { .hero__scroll { display: none; } }
.hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; border-radius: 4px; background: var(--accent); transform: translateX(-50%); animation: scrollDot 1.9s var(--ease) infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 24px; } 100% { opacity: 0; } }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

section { padding: var(--sp) var(--pad); position: relative; }
.journey, .achievements, .students, .certificates, .contact, .timeline, .gallery { max-width: 1280px; margin: 0 auto; }

/* ============================================================
   JOURNEY / CHAPTERS
   ============================================================ */
.chapters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: var(--maxw); margin: 0 auto; }
.chapter {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 42px;
  display: flex; gap: 24px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.chapter:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--panel-2); box-shadow: 0 30px 60px -40px #000; }
.chapter--feature { grid-column: 1 / -1; background: linear-gradient(120deg, var(--panel-2), var(--panel)); }
.chapter__no { font-family: var(--serif); font-size: 1.7rem; color: var(--accent); font-weight: 600; line-height: 1; opacity: 0.85; flex-shrink: 0; }
.chapter__body h3 { font-family: var(--serif); font-size: 1.75rem; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.chapter__body p { color: var(--muted); font-weight: 300; font-size: 1.03rem; }
.chapter__body strong { color: var(--ink-soft); font-weight: 500; }
.chapter__body em { color: var(--accent); font-style: italic; }
.chapter blockquote {
  margin-top: 22px; font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--ink);
  line-height: 1.42; padding-left: 22px; border-left: 2px solid var(--accent);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { max-width: 940px; margin: 0 auto; }
.tl { position: relative; padding-left: 8px; }
.tl__spine { position: absolute; left: 12px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
@media (min-width: 760px) { .tl__spine { left: 50%; transform: translateX(-50%); } }
.tl__fill { position: absolute; top: 0; left: 0; width: 100%; height: 0; background: linear-gradient(var(--accent), var(--accent-dim)); }

.tl__item { position: relative; padding-left: 46px; margin-bottom: 48px; }
.tl__dot { position: absolute; left: 5px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted-2); z-index: 2; transition: all 0.5s var(--ease); }
.tl__item.in .tl__dot { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-glow); }
.tl__dot--accent { background: var(--accent); border-color: var(--accent); }
.tl__card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; transition: border-color 0.4s var(--ease), transform 0.4s var(--ease); }
.tl__card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.tl__card--accent { border-color: var(--accent-dim); background: linear-gradient(120deg, rgba(111,207,151,0.06), var(--panel)); }
.tl__year { font-size: 0.73rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.tl__card h4 { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin: 8px 0; }
.tl__card p { color: var(--muted); font-weight: 300; font-size: 0.99rem; }

@media (min-width: 760px) {
  .tl__item { width: 50%; padding-left: 0; }
  .tl__item:nth-child(odd) { left: 0; padding-right: 48px; text-align: right; }
  .tl__item:nth-child(even) { left: 50%; padding-left: 48px; }
  .tl__item:nth-child(odd) .tl__dot { left: auto; right: -8px; }
  .tl__item:nth-child(even) .tl__dot { left: -8px; }
}

/* ============================================================
   ACHIEVEMENTS / CARDS
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: var(--maxw); margin: 0 auto; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 42px 36px;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--accent-dim); background: var(--panel-2); box-shadow: 0 30px 60px -40px #000; }
.card__metric { display: block; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 3.1rem); font-weight: 600; color: var(--accent); line-height: 1; margin-bottom: 20px; }
.card h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; margin-bottom: 10px; line-height: 1.2; }
.card p { color: var(--muted); font-weight: 300; }

/* ============================================================
   STUDENTS
   ============================================================ */
.badge {
  display: inline-block; max-width: 100%; font-size: 0.68rem; letter-spacing: 0.06em;
  line-height: 1.45; padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge--verified { border-color: var(--accent-dim); color: var(--accent); }
/* Longer qualifying notes read as a line of text, not a stretched pill. */
.badge--note {
  border: none; border-left: 2px solid var(--line-2); border-radius: 0;
  padding: 2px 0 2px 12px; font-size: 0.78rem; font-style: italic; color: var(--muted-2);
}
.students__note { text-align: center; margin-top: clamp(36px, 5vh, 52px); color: var(--muted); font-style: italic; font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.35rem); }

/* ============================================================
   GALLERY
   ============================================================ */
/* Column flow rather than a fixed row grid: every photo keeps its own aspect
   ratio, so tiles pack tight with no leftover cells and nothing is ever
   force-cropped into a shape it doesn't fit. */
.gallery__grid { column-count: 3; column-gap: 18px; max-width: var(--maxw); margin: 0 auto; }
.gallery__item {
  position: relative; break-inside: avoid; margin: 0 0 18px; border-radius: 20px;
  overflow: hidden; background: var(--panel); border: 1px solid var(--line);
  transition: border-color 0.4s var(--ease), transform 0.6s var(--ease), box-shadow 0.5s var(--ease);
}
.gallery__item:hover { border-color: var(--accent-dim); transform: translateY(-3px); box-shadow: 0 30px 60px -44px #000; }
/* Each tile is given the ratio of the file inside it, so `cover` fills
   completely without discarding any of the subject. */
.gallery__item--portrait { aspect-ratio: 4 / 5; }
.gallery__item--doc      { aspect-ratio: 3 / 4; }
.gallery__item--wide     { aspect-ratio: 3 / 2; }
.gallery__item img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%; transition: transform 0.9s var(--ease);
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 34px 18px 16px;
  font-size: 0.78rem; line-height: 1.45; color: var(--ink-soft); letter-spacing: 0.01em;
  background: linear-gradient(to top, rgba(8,9,10,0.92), rgba(8,9,10,0.6) 55%, transparent);
}

/* ============================================================
   CERTIFICATES
   ============================================================ */
.cert__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: var(--maxw); margin: 0 auto; }
.cert { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.cert:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 24px 50px -40px #000; }
.cert__thumb { aspect-ratio: 3 / 4; border-radius: 14px; margin-bottom: 18px; position: relative; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
/* Both documents are cropped to 3:4 — the container ratio — so the full
   certificate is visible with no edge of it trimmed away. */
.cert__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.cert h4 { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; margin-bottom: 4px; line-height: 1.25; }
.cert p { color: var(--muted); font-size: 0.88rem; font-weight: 300; }

/* ============================================================
   PHILOSOPHY
   ============================================================ */
.philosophy { background: var(--bg-2); }
.philosophy__inner { max-width: var(--maxw); margin: 0 auto; }
.philosophy__quote {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.65rem, 4.6vw, 3.5rem); line-height: 1.22; letter-spacing: -0.01em;
  max-width: 20ch; margin: 0 0 clamp(52px, 7vh, 78px); color: var(--ink);
  text-wrap: balance;
}
/* Matched pair — the opening mark alone read as a stray glyph. */
.philosophy__quote::before { content: "\201C"; color: var(--accent); }
.philosophy__quote::after  { content: "\201D"; color: var(--accent); }
.philosophy__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(26px, 3vw, 32px); }
.tenet { border-top: 1px solid var(--line-2); padding-top: 28px; transition: border-color 0.4s var(--ease); }
.tenet:hover { border-color: var(--accent); }
.tenet h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; margin-bottom: 14px; color: var(--accent); }
.tenet p { color: var(--muted); font-weight: 300; font-size: 0.99rem; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact__wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 5vw, 64px); max-width: var(--maxw); margin: 0 auto; align-items: start; }
.contact__details { display: flex; flex-direction: column; }
.contact__line { display: flex; flex-direction: column; gap: 5px; padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding 0.4s var(--ease); }
/* Top-aligns the first detail with the form panel's first field label. */
.contact__line:first-child { padding-top: 0; }
.contact__line:last-of-type { border-bottom: none; }
a.contact__line:hover { padding-left: 10px; }
a.contact__line:hover .contact__value { color: var(--accent); }
.contact__label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact__value { font-family: var(--serif); font-size: clamp(1.25rem, 4.5vw, 1.55rem); font-weight: 500; transition: color 0.3s var(--ease); overflow-wrap: anywhere; }
.contact__micro { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); color: var(--muted); font-weight: 300; font-style: italic; }

.contact__form { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 3vw, 44px); }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 500; }
.field__opt { text-transform: none; letter-spacing: 0; color: var(--muted-2); }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 12px; padding: 15px 16px;
  color: var(--ink); font-family: var(--sans); font-size: 1rem; resize: vertical;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--bg-2); box-shadow: 0 0 0 4px var(--accent-glow); }
.contact__formnote { margin-top: 16px; font-size: 0.9rem; color: var(--accent); min-height: 1.2em; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 84px var(--pad) 42px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__top { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; padding-bottom: 50px; border-bottom: 1px solid var(--line); }
.footer__name { font-family: var(--serif); font-size: 2.1rem; font-weight: 600; display: block; }
.footer__tag { color: var(--accent); font-style: italic; font-family: var(--serif); font-size: 1.12rem; }
.footer__nav { display: flex; gap: 2px 14px; flex-wrap: wrap; margin: 0 -10px; }
/* Padding carries each link to a 44px touch target without changing the
   visual gap between them. */
.footer__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--muted); font-size: 0.9rem; transition: color 0.3s var(--ease);
}
.footer__nav a:hover { color: var(--accent); }
.footer__base { max-width: var(--maxw); margin: 30px auto 0; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted-2); font-size: 0.82rem; font-weight: 300; }

/* ============================================================
   FLOATING WHATSAPP
   ============================================================ */
.wa {
  position: fixed; z-index: 150; width: 56px; height: 56px; border-radius: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));
  right: calc(26px + env(safe-area-inset-right, 0px));
  background: var(--accent); color: #06120b; display: grid; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(111,207,151,0.5);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  animation: waPulse 3s ease-in-out infinite;
}
.wa:hover { transform: scale(1.08) rotate(-4deg); }
/* Below the desktop layout the page has no corner gutter, so a permanently
   parked button would sit on the text you're reading. It steps aside while
   you scroll down and comes back the moment you stop or scroll up. */
.wa.is-tucked {
  opacity: 0; pointer-events: none;
  transform: scale(0.7) translateY(12px);
}
.scrollbar { transition: opacity 0.3s var(--ease); }
@keyframes waPulse { 0%,100% { box-shadow: 0 12px 30px -8px rgba(111,207,151,0.5); } 50% { box-shadow: 0 12px 42px -6px rgba(111,207,151,0.78); } }

section[id] { scroll-margin-top: 92px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; gap: clamp(34px, 5vh, 46px); }
  /* Once the split collapses, the portrait is the only thing on its row —
     centre it so it reads as deliberate at every stacked width. */
  .hero__aside { justify-content: center; }
  .portrait { max-width: min(320px, 78vw); margin-inline: auto; animation: none; }
}
@media (max-width: 900px) {
  .chapters { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cert__grid { grid-template-columns: repeat(2, 1fr); }
  .philosophy__grid { grid-template-columns: repeat(2, 1fr); }
  .contact__wrap { grid-template-columns: 1fr; gap: 44px; }
  .gallery__grid { column-count: 2; }
}
/* ---------- Mobile nav ----------
   Switches at 1023px, not 720px: six links plus the brand and the CTA pill
   need ~780px, so between 760 and 1000px the desktop bar was running the
   menu straight into the logo. */
@media (max-width: 1023px) {
  .nav { padding-top: 16px; padding-bottom: 16px; }

  .nav__toggle { display: flex; position: relative; z-index: 3; }
  .nav__brand  { position: relative; z-index: 3; }

  /* Full-screen overlay. `inset: 0` on a fixed element resolves against the
     visible viewport, so this stays correct when mobile browser chrome
     shows and hides — no 100vh overshoot. */
  .nav__links {
    position: fixed; inset: 0; z-index: 2;
    flex-direction: column; align-items: center; justify-content: center;
    gap: clamp(14px, 2.6vh, 30px);
    background: var(--bg);
    padding: calc(96px + env(safe-area-inset-top, 0px)) 24px calc(56px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .nav__links.is-open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity 0.35s var(--ease), visibility 0s;
  }
  .nav__links a { font-size: clamp(1.25rem, 5.2vw, 1.6rem); font-weight: 500; }
  /* Underline sweep is a desktop affordance — it mis-measures when centred. */
  .nav__links a:not(.nav__cta)::after { display: none; }
  .nav__cta { padding: 13px 34px; margin-top: 10px; font-size: 1.05rem; }

  /* Links settle in one after another once the panel is up. */
  .nav__links.is-open a { animation: navLinkIn 0.45s var(--ease-out) both; }
  .nav__links.is-open a:nth-child(1) { animation-delay: 0.06s; }
  .nav__links.is-open a:nth-child(2) { animation-delay: 0.11s; }
  .nav__links.is-open a:nth-child(3) { animation-delay: 0.16s; }
  .nav__links.is-open a:nth-child(4) { animation-delay: 0.21s; }
  .nav__links.is-open a:nth-child(5) { animation-delay: 0.26s; }
  .nav__links.is-open a:nth-child(6) { animation-delay: 0.31s; }

  /* Nothing from the page may show through or float over the open menu. */
  body.menu-open { overflow: hidden; }
  body.menu-open .wa { opacity: 0; pointer-events: none; }
  body.menu-open .scrollbar { opacity: 0; }
  .nav.is-menu-open { background: transparent; backdrop-filter: none; border-bottom-color: transparent; }
}
@keyframes navLinkIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 720px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 30px 22px; }
  .cards { grid-template-columns: 1fr; }
  .chapter { padding: 32px; flex-direction: column; gap: 14px; }
  .chapter--feature { flex-direction: column; }
  .philosophy__grid { grid-template-columns: 1fr; }
  .cert__grid, .cert__grid--docs { grid-template-columns: 1fr; }
  .gallery__grid { column-count: 1; }
  .footer__top { flex-direction: column; align-items: flex-start; }
  .contact__form { padding: 30px 24px; }
  .wa {
    width: 52px; height: 52px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
  }
  /* Clears the floating WhatsApp button so it never sits over footer text. */
  .footer { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================
   MULTI-PAGE ADDITIONS
   ============================================================ */

/* Active nav link */
.nav__links a.is-active { color: var(--accent); }
.nav__links a.is-active:not(.nav__cta)::after { width: 100%; }

/* Hero portrait — real photo blended into the dark theme.
   Framing now lives in the file itself (cropped to 4:5), so no
   object-position nudge is needed at any breakpoint. */
.portrait__media img { filter: saturate(0.94) contrast(1.03) brightness(0.97); }

/* Interior page header.
   Top padding clears the fixed header (which is ~78px solid on interior
   pages) with breathing room, so a title can never ride up under the logo. */
.page-hero { position: relative; padding: clamp(126px, 15vh, 176px) var(--pad) 0; text-align: center; overflow: hidden; }
.page-hero__inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero .hero__court-bg { opacity: 0.4; }
.page-hero__kicker { display: inline-block; font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; font-weight: 600; }
.page-hero__title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.15rem, 6vw, 4.6rem); line-height: 1.06; letter-spacing: -0.018em;
  text-wrap: balance;
}
.page-hero__lead { margin-top: 24px; color: var(--muted); font-size: clamp(1.02rem, 1.6vw, 1.22rem); font-weight: 300; line-height: 1.6; max-width: 60ch; margin-left: auto; margin-right: auto; text-wrap: pretty; }

/* One rhythm for every page: the section directly after a page header gets a
   single consistent gap, instead of each page inlining its own value. */
.page-hero + section { padding-top: clamp(46px, 6.5vh, 84px); }
/* Two sections that read as one block shouldn't be double-padded. */
section + section.section--tight { padding-top: 0; }

/* "View all" link */
.section-foot { text-align: center; margin-top: clamp(48px, 6vh, 72px); }
.viewall { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; letter-spacing: 0.02em; font-size: 0.95rem; transition: gap 0.3s var(--ease); }
.viewall::after { content: "\2192"; transition: transform 0.3s var(--ease); }
.viewall:hover { gap: 14px; }
.viewall:hover::after { transform: translateX(3px); }

/* Home story preview */
.preview { max-width: 980px; margin: 0 auto; text-align: center; }
.preview__lead { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.42; color: var(--ink); letter-spacing: -0.01em; }
.preview__lead em { color: var(--accent); font-style: italic; }

/* Featured media block (e.g., cash-award achievement) */
.feature { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: clamp(30px, 4vw, 64px); align-items: center; max-width: var(--maxw); margin: 0 auto; }
.feature + .feature { margin-top: clamp(56px, 8vh, 104px); }
.feature__media { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 3 / 2; box-shadow: 0 44px 96px -54px #000; }
.feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.9s var(--ease); }
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__tag { display: inline-block; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; font-weight: 600; }
.feature__title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.015em; margin-bottom: 18px; }
.feature__desc { color: var(--muted); font-weight: 300; font-size: 1.06rem; line-height: 1.65; }
.feature__meta { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 26px; }
.feature__meta span { font-size: 0.82rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.feature__meta strong { color: var(--accent); font-weight: 600; }

/* Student roster — text only (no photo boxes) */
.roster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: var(--maxw); margin: 0 auto; }
.player { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 36px 34px; transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.player:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: 0 28px 56px -42px #000; }
.player__place { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.player h3 { font-family: var(--serif); font-size: 1.85rem; font-weight: 600; margin: 12px 0; letter-spacing: -0.01em; }
.player__result { color: var(--ink-soft); font-weight: 300; font-size: 1.02rem; line-height: 1.55; margin-bottom: 18px; }

/* Certificate card with caption */
.cert__cap { font-size: 0.82rem; color: var(--muted); font-weight: 300; line-height: 1.5; }
.cert__doc { position: relative; }
.cert__thumb img { object-position: 50% 14%; }
.cert__grid--docs { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
.cert__grid--docs .cert__thumb { aspect-ratio: 3 / 4; }

/* Reversed feature (image on the right) */
.feature--reverse .feature__media { order: 2; }

/* Floating WhatsApp clearance — never sits over content */
.footer { padding-bottom: 100px; }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .roster { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .page-hero { padding-top: 132px; }
  .preview__lead { font-size: 1.4rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .portrait { animation: none; }
  .glow::after { display: none; }
}
