/* ===========================================================================
   Sushant Sedhain — portfolio
   Dark-first theme with a light variant. No build step, no dependencies.
   ======================================================================== */

/* ---------- tokens ---------- */
:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 9px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 68px;
}

html[data-theme="dark"] {
  --bg: #0b1017;
  --bg-alt: #0e151f;
  --surface: #131c27;
  --surface-2: #18232f;
  --surface-3: #1e2b39;
  --border: #223140;
  --border-soft: #1a2531;

  --text: #e7eef7;
  --text-dim: #9fb0c4;
  --text-faint: #6d8096;

  --accent: #38e0b0;
  --accent-ink: #062018;
  --accent-soft: rgba(56, 224, 176, .12);
  --accent-line: rgba(56, 224, 176, .32);
  --accent-2: #56cdf3;
  --accent-2-soft: rgba(86, 205, 243, .12);
  --warn: #ffb454;

  --shadow: 0 18px 45px -20px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 70px -28px rgba(0, 0, 0, .9);
  --grid-line: rgba(120, 160, 200, .055);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f8fc;
  --bg-alt: #eceff6;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --surface-3: #e9eef6;
  --border: #d7e0ec;
  --border-soft: #e5ebf3;

  --text: #101a24;
  --text-dim: #4a5b6e;
  --text-faint: #71829a;

  --accent: #0a8f6c;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 143, 108, .10);
  --accent-line: rgba(10, 143, 108, .28);
  --accent-2: #0a7ba6;
  --accent-2-soft: rgba(10, 123, 166, .10);
  --warn: #b5730a;

  --shadow: 0 14px 34px -18px rgba(16, 32, 52, .28);
  --shadow-lg: 0 26px 60px -26px rgba(16, 32, 52, .34);
  --grid-line: rgba(40, 80, 120, .05);
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

body.nav-open { overflow: hidden; }

h1, h2, h3, h4 { line-height: 1.18; margin: 0; font-weight: 700; letter-spacing: -.021em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 200; padding: .6rem 1.1rem; border-radius: 0 0 10px 10px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 2rem); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}
.site-header.is-stuck { border-bottom-color: var(--border-soft); box-shadow: var(--shadow); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 1.4rem;
}

.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-text b { font-size: .95rem; font-weight: 700; letter-spacing: -.015em; }
.brand-text em {
  font-style: normal; font-size: .68rem; font-weight: 500;
  color: var(--text-faint); letter-spacing: .1em; text-transform: uppercase;
}

.site-nav { display: flex; gap: .15rem; margin-left: auto; }
.site-nav a {
  position: relative; padding: .5rem .78rem; border-radius: 8px;
  font-size: .895rem; font-weight: 500; color: var(--text-dim);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.active { color: var(--accent); }
.site-nav a.active::after {
  content: ""; position: absolute; left: .78rem; right: .78rem; bottom: .16rem;
  height: 2px; border-radius: 2px; background: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim);
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
html[data-theme="dark"] .icon-btn .i-sun { display: none; }
html[data-theme="light"] .icon-btn .i-moon { display: none; }

.nav-toggle {
  display: none; width: 38px; height: 38px; padding: 0;
  border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.8px; border-radius: 2px;
  background: var(--text-dim);
  transition: transform .25s var(--ease), opacity .18s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

.scroll-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(3.2rem, 8vw, 5.6rem) 0 clamp(2.4rem, 5vw, 3.4rem); overflow: hidden; }

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.grid-lines {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 90% 62% at 50% 22%, #000 32%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 62% at 50% 22%, #000 32%, transparent 78%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.glow-a { width: 520px; height: 520px; top: -180px; left: -110px; background: var(--accent); opacity: .13; }
.glow-b { width: 460px; height: 460px; top: -80px; right: -130px; background: var(--accent-2); opacity: .11; }

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2rem, 5vw, 3.6rem); align-items: center;
}
.hero-copy { min-width: 0; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .34rem .8rem .34rem .62rem; margin-bottom: 1.25rem;
  border-radius: 999px; border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: .78rem; font-weight: 600; letter-spacing: .01em; color: var(--accent);
}
.pulse { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--accent); animation: ping 2.1s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.15rem);
  font-weight: 800; letter-spacing: -.038em; margin-bottom: .5rem;
}

.hero-role {
  font-family: var(--font-mono); font-size: clamp(1rem, 2.1vw, 1.24rem);
  font-weight: 500; color: var(--accent); margin-bottom: 1.1rem; min-height: 1.6em;
}
.role-rotator::before { content: "› "; color: var(--text-faint); }
.role-rotator::after {
  content: ""; display: inline-block; width: 8px; height: 1.05em;
  margin-left: 3px; vertical-align: -.16em;
  background: var(--accent); animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem); color: var(--text-dim);
  max-width: 52ch; margin-bottom: 1.6rem;
}

.hero-meta { display: flex; flex-wrap: wrap; gap: .55rem 1.4rem; margin-bottom: 1.9rem; }
.hero-meta li {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .865rem; color: var(--text-faint);
}
.hero-meta svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.7rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .74rem 1.3rem; border-radius: 11px; cursor: pointer;
  font-family: inherit; font-size: .925rem; font-weight: 600;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-2px); }
.btn-sm { padding: .52rem .82rem; font-size: .84rem; border-radius: 9px; gap: .38rem; }

.hero-social { display: flex; gap: .55rem; }
.social-link {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim);
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.social-link:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }
.social-link svg { width: 18px; height: 18px; }

/* terminal card */
.terminal {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.terminal-bar {
  display: flex; align-items: center; gap: .42rem;
  padding: .7rem .95rem;
  background: var(--surface-2); border-bottom: 1px solid var(--border-soft);
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.terminal-title {
  margin-left: .55rem; font-family: var(--font-mono);
  font-size: .74rem; color: var(--text-faint); letter-spacing: .02em;
}
.terminal-body {
  margin: 0; padding: 1.15rem 1.25rem 1.35rem;
  font-family: var(--font-mono); font-size: .795rem; line-height: 1.75;
  overflow-x: auto; color: var(--text-dim);
}
.terminal-body .ln { display: block; white-space: pre; }
.c-prompt { color: var(--accent); font-weight: 600; }
.c-out { color: var(--text); }
.c-key { color: var(--accent-2); }
.c-dash { color: var(--text-faint); }
.c-str { color: var(--text-dim); }
.c-ok { color: var(--accent); font-weight: 600; }
.cursor {
  display: inline-block; width: 7px; height: 1em; margin-left: 4px;
  vertical-align: -.16em; background: var(--accent);
  animation: blink 1.05s steps(2, start) infinite;
}

/* stat strip */
.stat-strip {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin-top: clamp(2.4rem, 5vw, 3.4rem);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--border); overflow: hidden;
}
.stat-strip li { padding: 1.25rem 1.35rem; background: var(--surface); }
.stat-value {
  display: block; font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 800;
  letter-spacing: -.03em; color: var(--text); line-height: 1.15;
}
.stat-value span { color: var(--accent); }
.stat-label {
  display: block; margin-top: .18rem; font-size: .765rem; font-weight: 500;
  color: var(--text-faint); letter-spacing: .05em; text-transform: uppercase;
}

/* ---------- sections ---------- */
.section { padding: clamp(3.6rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border-soft); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 2.9rem); }
.section-index {
  display: inline-block; margin-bottom: .5rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 600;
  color: var(--accent); letter-spacing: .16em;
}
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 800; letter-spacing: -.032em;
}
.section-sub { margin-top: .6rem; color: var(--text-dim); font-size: 1.02rem; }

/* ---------- about ---------- */
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem); align-items: start;
}
.about-copy p { color: var(--text-dim); font-size: 1.045rem; }
.about-copy p + p { margin-top: 1.05rem; }
.about-copy strong { color: var(--text); font-weight: 600; }

.about-side { display: grid; gap: 1rem; }

.panel {
  padding: 1.35rem 1.45rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.panel-title {
  margin-bottom: .9rem; font-size: .755rem; font-weight: 700;
  color: var(--text-faint); letter-spacing: .13em; text-transform: uppercase;
}

.check-list { display: grid; gap: .72rem; }
.check-list li {
  position: relative; padding-left: 1.65rem;
  font-size: .925rem; color: var(--text-dim); line-height: 1.55;
}
.check-list strong { color: var(--text); font-weight: 600; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .34em;
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--accent-line); background: var(--accent-soft);
}
.check-list li::after {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 5px; height: 2.5px; border-left: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}

.lang-list { display: grid; gap: .6rem; }
.lang-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.lang-list b { font-weight: 600; color: var(--text); }
.lang-list span { font-size: .8rem; color: var(--text-faint); }

.chip-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-list li, .tag {
  padding: .3rem .68rem; border-radius: 999px;
  font-size: .775rem; font-weight: 500;
  color: var(--text-dim); background: var(--surface-2);
  border: 1px solid var(--border-soft);
}

/* focus cards */
.focus-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.05rem; margin-top: clamp(2rem, 4vw, 2.9rem);
}
.focus-card {
  padding: 1.5rem 1.5rem 1.35rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.focus-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.focus-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  margin-bottom: 1rem; border-radius: 12px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.focus-icon svg { width: 21px; height: 21px; }
.focus-card h3 { font-size: 1.075rem; margin-bottom: .55rem; }
.focus-card p { font-size: .915rem; color: var(--text-dim); margin-bottom: 1rem; }
.focus-tags { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- skills ---------- */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 1.05rem;
}
.skill-card {
  padding: 1.4rem 1.45rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .22s var(--ease), border-color .22s var(--ease);
}
.skill-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.skill-head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.05rem; }
.skill-head-icon {
  width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 10px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.skill-head-icon svg { width: 17px; height: 17px; }
.skill-head h3 { font-size: 1rem; letter-spacing: -.015em; }
.skill-items { display: grid; gap: .5rem; }
.skill-items li {
  position: relative; padding-left: 1.05rem;
  font-size: .89rem; color: var(--text-dim);
}
.skill-items li::before {
  content: ""; position: absolute; left: 0; top: .58em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
  opacity: .65;
}

/* ---------- projects ---------- */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.15rem;
}
.project-card {
  display: flex; flex-direction: column;
  padding: 1.55rem 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.project-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.project-card.is-featured {
  grid-column: 1 / -1;
  background:
    radial-gradient(120% 150% at 100% 0%, var(--accent-soft) 0%, transparent 55%),
    var(--surface);
  border-color: var(--accent-line);
}

.project-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: .8rem;
}
.project-kind {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .715rem; font-weight: 500;
  color: var(--text-faint); letter-spacing: .04em; text-transform: uppercase;
}
.badge-featured {
  padding: .22rem .6rem; border-radius: 999px; flex-shrink: 0;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.project-card h3 { font-size: 1.16rem; margin-bottom: .6rem; letter-spacing: -.022em; }
.project-card.is-featured h3 { font-size: clamp(1.24rem, 2.4vw, 1.5rem); }
.project-summary { font-size: .945rem; color: var(--text-dim); margin-bottom: 1.05rem; }

.project-points { display: grid; gap: .6rem; margin-bottom: 1.25rem; }
.project-points li {
  position: relative; padding-left: 1.4rem;
  font-size: .9rem; color: var(--text-dim); line-height: 1.58;
}
.project-points strong { color: var(--text); font-weight: 600; }
.project-points li::before {
  content: ""; position: absolute; left: .1rem; top: .55em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); opacity: .55; transform: rotate(45deg);
}
.project-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: auto; }
.tag-mono {
  font-family: var(--font-mono); font-size: .735rem; font-weight: 500;
  padding: .26rem .6rem; border-radius: 7px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.note {
  display: flex; align-items: center; gap: .6rem;
  margin-top: 1.5rem; padding: .95rem 1.2rem; border-radius: var(--radius-sm);
  border: 1px dashed var(--border); background: var(--surface-2);
  font-size: .89rem; color: var(--text-faint);
}
.note svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; }

/* ---------- credentials + certificates ---------- */
.credential-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.05rem; margin-bottom: clamp(2.2rem, 4vw, 3rem);
}
.credential-card {
  display: flex; gap: 1.05rem; align-items: flex-start;
  padding: 1.4rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.credential-card.is-live { border-color: var(--accent-line); background:
    radial-gradient(130% 160% at 0% 0%, var(--accent-soft) 0%, transparent 60%), var(--surface); }
.credential-seal {
  width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 13px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.credential-card.is-pending .credential-seal { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.credential-seal svg { width: 23px; height: 23px; }
.credential-body h3 { font-size: 1.03rem; margin-bottom: .3rem; letter-spacing: -.02em; }
.credential-issuer { font-size: .82rem; color: var(--text-faint); margin-bottom: .55rem; }
.credential-note { font-size: .875rem; color: var(--text-dim); }
.credential-status {
  display: inline-block; margin-bottom: .5rem; padding: .2rem .58rem;
  border-radius: 999px; font-size: .68rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.credential-card.is-pending .credential-status {
  color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
}

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.4rem;
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--border-soft);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.filter-chip {
  padding: .45rem .95rem; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: .845rem; font-weight: 500;
  color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border);
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.filter-chip:hover { color: var(--text); border-color: var(--accent-line); }
.filter-chip[aria-pressed="true"] {
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600;
}
.filter-count { font-family: var(--font-mono); font-size: .8rem; color: var(--text-faint); }

.cert-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 1.05rem;
}
.cert-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  border-radius: var(--radius); cursor: pointer; text-align: left;
  border: 1px solid var(--border); background: var(--surface);
  font-family: inherit; color: inherit;
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.cert-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.cert-card.is-hidden { display: none; }

.cert-shot {
  /* matches the source certificates exactly (1600x1235) so nothing is cropped */
  position: relative; aspect-ratio: 320 / 247; overflow: hidden;
  background: var(--surface-3); border-bottom: 1px solid var(--border-soft);
}
.cert-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .4s var(--ease);
}
.cert-card:hover .cert-shot img { transform: scale(1.045); }
.cert-shot::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(0deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%);
  transition: opacity .25s var(--ease);
}
.cert-card:hover .cert-shot::after { opacity: 1; }

.cert-zoom {
  position: absolute; right: .6rem; bottom: .6rem; z-index: 2;
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; opacity: 0; transform: translateY(5px);
  color: var(--accent-ink); background: var(--accent);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.cert-zoom svg { width: 15px; height: 15px; }
.cert-card:hover .cert-zoom, .cert-card:focus-visible .cert-zoom { opacity: 1; transform: translateY(0); }

.cert-shot.is-pdf { display: grid; place-items: center; }
.pdf-face { display: grid; place-items: center; gap: .55rem; color: var(--text-faint); }
.pdf-face svg { width: 38px; height: 38px; color: var(--accent); }
.pdf-face span {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .13em; text-transform: uppercase;
}

.cert-info { padding: .95rem 1.05rem 1.05rem; display: flex; flex-direction: column; flex: 1; }
.cert-info h3 { font-size: .935rem; line-height: 1.4; margin-bottom: .5rem; letter-spacing: -.015em; }
.cert-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; margin-top: auto;
}
.cert-issuer { font-size: .775rem; color: var(--text-faint); }
.cert-year {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  padding: .16rem .48rem; border-radius: 6px;
  color: var(--accent); background: var(--accent-soft);
}

.cert-empty {
  grid-column: 1 / -1; padding: 3rem 1rem; text-align: center;
  color: var(--text-faint); font-size: .95rem;
}

/* ---------- education timeline ---------- */
.timeline { position: relative; padding-left: 2.1rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -2.1rem; top: .35rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.timeline-period {
  display: inline-block; margin-bottom: .45rem;
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500; color: var(--accent);
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: .28rem; letter-spacing: -.022em; }
.timeline-stream { font-size: .95rem; color: var(--accent-2); margin-bottom: .5rem; font-weight: 500; }
.timeline-school { font-size: .93rem; color: var(--text); font-weight: 600; }
.timeline-place { font-size: .865rem; color: var(--text-faint); margin-bottom: .7rem; }
.timeline-note { font-size: .92rem; color: var(--text-dim); max-width: 62ch; }

/* ---------- resume ---------- */
.resume-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.05rem;
}
.resume-card {
  display: flex; flex-direction: column;
  padding: 1.45rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}
.resume-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.resume-icon {
  width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 1rem;
  border-radius: 11px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.resume-icon svg { width: 20px; height: 20px; }
.resume-card h3 { font-size: 1.03rem; margin-bottom: .45rem; letter-spacing: -.02em; }
.resume-card p { font-size: .885rem; color: var(--text-dim); margin-bottom: 1.2rem; }
.resume-actions { display: flex; gap: .45rem; margin-top: auto; }
.resume-actions .btn { flex: 1 1 auto; }

/* ---------- contact ---------- */
.contact-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 2.6rem); align-items: center;
  padding: clamp(1.6rem, 4vw, 2.4rem); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(110% 160% at 100% 0%, var(--accent-soft) 0%, transparent 58%),
    var(--surface);
}
.contact-methods { display: grid; gap: .75rem; min-width: 0; }
.contact-row {
  display: flex; align-items: center; gap: .85rem; min-width: 0;
  padding: .7rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft); background: var(--surface-2);
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.contact-row:hover { border-color: var(--accent-line); transform: translateX(3px); }
.contact-row .c-icon {
  width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 9px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.contact-row .c-icon svg { width: 16px; height: 16px; }
.contact-row .c-text { display: flex; flex-direction: column; min-width: 0; }
.contact-row .c-label {
  font-size: .705rem; font-weight: 600; color: var(--text-faint);
  letter-spacing: .11em; text-transform: uppercase;
}
.contact-row .c-value {
  font-size: .935rem; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
a.contact-row:hover .c-value { color: var(--accent); }
.copy-btn {
  margin-left: auto; padding: .34rem .7rem; border-radius: 8px; cursor: pointer;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  color: var(--text-faint); background: transparent; border: 1px solid var(--border);
  transition: color .18s var(--ease), border-color .18s var(--ease);
  flex-shrink: 0;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-line); }
.copy-btn.is-copied { color: var(--accent); border-color: var(--accent-line); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-alt); }
.footer-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.7rem clamp(1.1rem, 4vw, 2rem);
}
.footer-name { font-weight: 700; font-size: .95rem; letter-spacing: -.015em; }
.footer-note { margin-left: auto; font-size: .82rem; color: var(--text-faint); }
.to-top {
  width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim);
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.to-top:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }
.to-top svg { width: 17px; height: 17px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem);
  background: rgba(4, 8, 12, .92);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-figure {
  margin: 0; max-width: min(1180px, 100%); max-height: 100%;
  display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: #10161f; border: 1px solid rgba(255, 255, 255, .1);
  transform: scale(.965); transition: transform .26s var(--ease);
}
.lightbox.is-open .lb-figure { transform: scale(1); }
.lb-figure img {
  width: 100%; max-height: calc(100vh - 220px);
  object-fit: contain; background: #fff;
}
.lb-caption { padding: 1.05rem 1.3rem 1.15rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.lb-caption h3 { font-size: 1.03rem; color: #f2f6fb; margin-bottom: .28rem; }
.lb-caption p { font-size: .83rem; color: #9aabbf; }
.lb-open {
  display: inline-block; margin-top: .6rem;
  font-family: var(--font-mono); font-size: .765rem; color: #38e0b0;
  border-bottom: 1px solid rgba(56, 224, 176, .4);
}

.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; cursor: pointer;
  border-radius: 50%; color: #e7eef7;
  background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
  transition: background-color .18s var(--ease), transform .18s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .19); }
.lb-close { top: clamp(.8rem, 2.5vw, 1.5rem); right: clamp(.8rem, 2.5vw, 1.5rem); width: 42px; height: 42px; }
.lb-close svg { width: 18px; height: 18px; }
.lb-nav { top: 50%; width: 46px; height: 46px; margin-top: -23px; }
.lb-nav svg { width: 20px; height: 20px; }
.lb-prev { left: clamp(.6rem, 2vw, 1.5rem); }
.lb-next { right: clamp(.6rem, 2vw, 1.5rem); }
.lb-nav:hover { transform: scale(1.07); }

/* ---------- reveal on scroll ---------- */
/* Only hide content once JS has confirmed it can reveal it again — otherwise a
   script error (or a non-JS crawler) would be served an entirely blank page. */
html.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .terminal { max-width: 520px; }
  .about-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* `1fr` carries an implicit min-content floor, which the contact rows
     (icon + truncating text + copy button) would blow past on narrow screens. */
  .contact-card { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: .2rem; margin: 0;
    padding: 1rem clamp(1.1rem, 4vw, 2rem) 1.4rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .24s var(--ease), opacity .24s var(--ease), visibility .24s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { padding: .78rem .9rem; font-size: 1rem; border-radius: 10px; }
  .site-nav a.active { background: var(--accent-soft); }
  .site-nav a.active::after { display: none; }
  .project-card.is-featured { grid-column: auto; }
  .lb-figure img { max-height: calc(100vh - 260px); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand-text em { display: none; }
  /* Two columns rather than four stacked rows — the labels wrap to a second
     line, which still costs far less height than a full-width row each. */
  .stat-strip li { padding: 1rem .95rem; }
  .stat-label { font-size: .715rem; letter-spacing: .04em; }
  .hero-cta .btn { flex: 1 1 100%; }
  .filter-bar { flex-direction: column; align-items: flex-start; }
  .contact-row { gap: .65rem; padding: .65rem .75rem; }
  .contact-cta, .contact-cta .btn { width: 100%; }
  .footer-inner { flex-wrap: wrap; }
  .footer-note { margin-left: 0; flex: 1 1 100%; order: 3; }
  .lb-nav { width: 40px; height: 40px; margin-top: -20px; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html.js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .hero-bg, .hero-cta, .hero-social, .site-footer,
  .lightbox, .filter-bar, .to-top, .resume-actions, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section { padding: 1.2rem 0; border-top: 1px solid #ccc; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
}
