/* ============================================================
   Justin Kim — Portfolio
   Built on the original site's system: Space Grotesk, deep-navy
   gradients (#1b2e4b → #2d4d7d), alternating light / navy bands,
   centered composition. Elevated with motion and depth.
   ============================================================ */

:root {
  --navy-900: #14243d;
  --navy-800: #1b2e4b;
  --navy-700: #243c61;
  --navy-600: #27426b;
  --navy-500: #2d4d7d;
  --navy-400: #3b5f95;

  --ink-900: #1c398e;      /* headings on light (blue-900, as original) */
  --ink-700: #364153;
  --ink-600: #4a5565;
  --ink-500: #6a7282;

  --light: #f9fafb;
  --light-2: #f3f4f6;
  --white: #ffffff;

  --sky-100: #dbeafe;
  --sky-200: #bfdbfe;
  --sky-300: #93c5fd;
  --sky-400: #60a5fa;
  --cyan: #67e8f9;

  --live: #34d399;
  --amber: #fbbf24;

  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --font: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 18px 44px -18px rgba(20, 36, 61, 0.55), 0 2px 6px rgba(20, 36, 61, 0.12);
  --shadow-chip: -4px 4px 0 0 rgba(20, 36, 61, 0.55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html { overflow-x: clip; }
html, body { width: 100%; min-height: 100%; }
body {
  margin: 0;
  background: var(--light);
  color: var(--ink-700);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: visible;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--sky-200); color: var(--navy-900); }
:focus-visible { outline: 2px solid var(--sky-400); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -9999px; top: 12px; z-index: 300; padding: 10px 18px; background: var(--sky-100); color: var(--navy-900); border-radius: 8px; font-weight: 600; }
.skip:focus { left: 16px; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 210;
  width: 100%; height: 3px;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--sky-300), var(--cyan));
  pointer-events: none;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav.is-stuck {
  background: rgba(27, 46, 75, 0.86);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 10px 30px -18px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.08);
}
.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; justify-self: start; }
.brand__mark { width: 26px; height: 26px; }
.nav__links { display: flex; gap: 4px; justify-self: center; }
.nav__links a {
  position: relative;
  padding: 8px 12px;
  color: #d7dfec;
  font-weight: 500;
  font-size: 15px;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav__links a.is-active { color: #fff; }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sky-300), var(--cyan));
}
.nav__right { display: flex; align-items: center; gap: 8px; justify-self: end; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid rgba(255,255,255,0.75);
  border-radius: 8px;
  color: #fff; font-weight: 500; font-size: 15px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-outline:hover { background: #fff; color: var(--navy-800); border-color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(255,255,255,0.5); }
.btn-outline svg { width: 15px; height: 15px; }
.nav__toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-500) 100%);
  color: #fff;
  text-align: center;
  isolation: isolate;
  margin-top: -64px;   /* sit under the sticky nav so the gradient runs edge to edge */
  padding-top: 64px;
}
.hero__canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__glow {
  position: absolute; z-index: 0; pointer-events: none;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}
.hero__glow--a { width: 52vw; height: 52vw; max-width: 720px; max-height: 720px; left: -12vw; top: -10vh; background: radial-gradient(circle, rgba(96,165,250,0.55), transparent 62%); }
.hero__glow--b { width: 46vw; height: 46vw; max-width: 640px; max-height: 640px; right: -10vw; bottom: -14vh; background: radial-gradient(circle, rgba(103,232,249,0.42), transparent 62%); }
.hero__grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero__inner { position: relative; z-index: 1; padding-block: 80px 96px; }
.hero__hi {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 500;
  color: #dbe6f7;
  letter-spacing: 0.01em;
  opacity: 0; animation: rise 0.9s var(--ease) 0.15s forwards;
}
.hero__name {
  margin-top: 10px;
  font-size: clamp(3rem, 9vw, 6.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  opacity: 0; animation: rise 0.9s var(--ease) 0.3s forwards;
}
.hero__name .dotmark { color: var(--sky-300); }
.hero__type {
  margin-top: 18px;
  min-height: 1.4em;
  font-size: clamp(1.4rem, 3.2vw, 2.1rem);
  font-weight: 500;
  color: #eaf1fb;
  opacity: 0; animation: rise 0.9s var(--ease) 0.45s forwards;
}
.hero__type .caret {
  display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em;
  background: var(--sky-300);
  animation: blink 1s steps(2) infinite;
}
.hero__lede {
  margin: 22px auto 0;
  max-width: 58ch;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  color: #c6d3e6;
  opacity: 0; animation: rise 0.9s var(--ease) 0.6s forwards;
}
.hero__actions {
  margin-top: 36px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  opacity: 0; animation: rise 0.9s var(--ease) 0.75s forwards;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 170px;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600; font-size: 15.5px;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn--fill { background: var(--sky-100); color: var(--ink-900); box-shadow: 0 10px 30px -10px rgba(219,234,254,0.55); }
.btn--fill:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(219,234,254,0.7); }
.btn--line { border-color: var(--sky-300); color: #fff; box-shadow: 0 10px 30px -14px rgba(147,197,253,0.5); }
.btn--line:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); border-color: #fff; }

.hero__socials {
  margin-top: 34px;
  display: flex; justify-content: center; gap: 14px;
  opacity: 0; animation: rise 0.9s var(--ease) 0.9s forwards;
}
.social {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.social:hover { transform: translateY(-3px); background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
.social svg { width: 20px; height: 20px; }

.hero__stats {
  margin: 56px auto 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 44px;
  opacity: 0; animation: rise 0.9s var(--ease) 1.05s forwards;
}
.hstat { text-align: center; }
.hstat__v { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1; }
.hstat__l { margin-top: 5px; font-size: 12.5px; color: #b8c7de; letter-spacing: 0.02em; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; z-index: 1; transform: translateX(-50%);
  color: #fff; opacity: 0.8;
  animation: bob 2.2s ease-in-out infinite;
}
.hero__scroll svg { width: 26px; height: 26px; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) {
  .hero__hi, .hero__name, .hero__type, .hero__lede, .hero__actions, .hero__socials, .hero__stats { animation: none; opacity: 1; }
  .hero__scroll, .hero__type .caret { animation: none; }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { position: relative; padding-block: clamp(72px, 10vh, 120px); scroll-margin-top: 64px; }
.section--light { background: var(--light); color: var(--ink-700); }
.section--navy  { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #e5ecf7; }
.section--navy::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.3;
  background-image: radial-gradient(circle at 20% 20%, rgba(96,165,250,0.18), transparent 40%),
                    radial-gradient(circle at 80% 90%, rgba(103,232,249,0.14), transparent 40%);
}
.section > .wrap { position: relative; }

.title {
  text-align: center;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}
.section--navy .title { color: #fff; }
.title__kicker {
  display: block; text-align: center;
  margin-bottom: 12px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--navy-400);
}
.section--navy .title__kicker { color: var(--sky-300); }
.title__bar {
  width: 56px; height: 4px; margin: 18px auto 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--navy-500), var(--sky-400));
}
.section--navy .title__bar { background: linear-gradient(90deg, var(--sky-300), var(--cyan)); }
.sub { text-align: center; margin: 14px auto 0; max-width: 60ch; color: var(--ink-500); font-size: 1.02rem; }
.section--navy .sub { color: #b8c7de; }

.subtitle {
  text-align: center;
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 64px;
}
.section--navy .subtitle { color: #fff; }

/* ============================================================
   ABOUT + EDUCATION
   ============================================================ */
.about__text {
  margin: 44px auto 0;
  max-width: 78ch;
  text-align: center;
  font-size: clamp(1.02rem, 1.6vw, 1.12rem);
  line-height: 1.85;
  color: var(--ink-600);
  text-wrap: pretty;
}
.about__text .lead { color: var(--ink-900); font-weight: 600; }

.edu { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 26px; align-items: stretch; }
.card-navy {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-navy::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(96,165,250,0.28), transparent 65%); pointer-events: none;
}
.edu__school { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; }
.edu__dates { margin-top: 8px; color: #c6d3e6; font-weight: 500; }
.edu__loc { margin-top: 6px; display: inline-flex; align-items: center; gap: 7px; color: #dbe6f7; font-size: 15px; }
.edu__loc svg { width: 16px; height: 16px; }
.edu__scores { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.score {
  padding: 16px 18px; border-radius: 12px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
}
.score__l { font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #b8c7de; font-weight: 600; }
.score__v { margin-top: 6px; font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.score__v small { font-size: 0.55em; font-weight: 500; color: #b8c7de; margin-left: 4px; }
.score__b { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.score__b span { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,0.1); color: #eaf1fb; }

.courses {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.courses__head { padding: 16px 22px; background: var(--light-2); color: var(--ink-900); font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; display: flex; justify-content: space-between; }
.courses__head span:last-child { color: var(--ink-500); font-weight: 600; }
.course { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 15px 22px; border-top: 1px solid var(--light-2); flex: 1; transition: background 0.2s var(--ease); }
.course:hover { background: #f5f8ff; }
.course__n { color: var(--ink-700); font-weight: 500; font-size: 15px; }
.course__lv { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; background: var(--sky-100); color: var(--ink-900); }
.course__g {
  min-width: 42px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-500)); color: #fff; font-weight: 700; font-size: 14px;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills { margin-top: 48px; display: grid; gap: 44px; }
.skillgroup h3 { font-size: 1.35rem; font-weight: 600; color: #fff; }
.skillgroup__row { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 14px; }
.skill {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-width: 108px; padding: 16px 18px;
  background: var(--sky-100); color: var(--ink-900);
  border-radius: 6px;
  font-weight: 600; font-size: 14.5px;
  box-shadow: var(--shadow-chip);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.skill:hover { transform: translate(3px, -3px); box-shadow: -7px 7px 0 0 rgba(20, 36, 61, 0.55); background: #fff; }
.skill img { width: 36px; height: 36px; }
.skill--text { padding: 12px 18px; min-width: 0; flex-direction: row; }

/* ============================================================
   PROJECTS
   ============================================================ */
.filters { margin-top: 32px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--sky-200); background: #fff; color: var(--ink-900);
  font-weight: 600; font-size: 13.5px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.filter:hover { transform: translateY(-1px); border-color: var(--navy-500); }
.filter.is-on { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

.group { margin-top: 56px; }
.group__year {
  text-align: center;
  font-size: clamp(1.4rem, 2.4vw, 1.7rem);
  font-weight: 700; color: var(--ink-900);
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.group__year::before, .group__year::after { content: ""; flex: 1; max-width: 160px; height: 1px; background: linear-gradient(90deg, transparent, var(--sky-300)); }
.group__year::after { background: linear-gradient(90deg, var(--sky-300), transparent); }
.group__year .pill { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--sky-100); color: var(--ink-900); border: 1px solid var(--sky-200); }

.grid { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.project {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(22px, 2.8vw, 32px);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: #e5ecf7;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 16px;
  transform-style: preserve-3d;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.35s var(--ease);
  overflow: hidden;
}
.project::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(147,197,253,0.16), transparent 45%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.project:hover::before { opacity: 1; }
.project:hover { box-shadow: 0 30px 60px -22px rgba(20, 36, 61, 0.7), 0 2px 8px rgba(20,36,61,0.15); }
.project.is-hidden { display: none; }

.project__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.project__role { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky-300); }
.project__title { margin-top: 6px; font-size: clamp(1.15rem, 1.9vw, 1.35rem); color: #fff; }
.project__sub { margin-top: 4px; font-size: 14px; color: #b8c7de; }
.project__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #dbe6f7;
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: #9fb3cc; }
.status--in-progress { background: var(--sky-100); border-color: var(--sky-100); color: var(--ink-900); }
.status--in-progress i { background: var(--navy-500); box-shadow: 0 0 0 0 rgba(45,77,125,0.5); animation: ping 2s ease-out infinite; }
.status--accepted { background: rgba(147,197,253,0.16); border-color: rgba(147,197,253,0.45); color: #eaf1fb; }
.status--accepted i { background: var(--sky-300); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(45,77,125,0.5); } 100% { box-shadow: 0 0 0 7px rgba(45,77,125,0); } }
.project__dates { font-size: 12.5px; color: #b8c7de; white-space: nowrap; }

.project h4 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.project__block p { margin-top: 6px; font-size: 14.5px; line-height: 1.65; color: #d7dfec; }
.project__note {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(147,197,253,0.1); border: 1px solid rgba(147,197,253,0.3); color: #dbe6f7; font-size: 13.5px; line-height: 1.5;
}
.project__note--accepted { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); color: #dbe6f7; }
.project__note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }

.bullets { margin-top: 8px; display: grid; gap: 9px; }
.bullets li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.62; color: #d7dfec; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--sky-300); }
.project__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.project.is-open .project__body { grid-template-rows: 1fr; }
.project__body > div { overflow: hidden; }
.project__more {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--sky-200);
  padding: 6px 0; border-bottom: 1.5px solid rgba(147,197,253,0.4);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.project__more:hover { color: #fff; border-color: #fff; }
.project__more svg { width: 13px; height: 13px; transition: transform 0.3s var(--ease); }
.project.is-open .project__more svg { transform: rotate(180deg); }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.tag { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 6px; background: var(--sky-100); color: var(--ink-900); }
.reflink {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 8px;
  background: #fff; color: var(--ink-900); font-weight: 600; font-size: 13.5px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.reflink:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5); }
.reflink svg { width: 14px; height: 14px; }

/* ============================================================
   TIMELINE (Leadership & Activities) — staggered two-column
   ============================================================ */
.timeline { position: relative; margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; grid-auto-rows: 8px; align-items: start; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.35) 6%, rgba(255,255,255,0.35) 94%, transparent);
}
.tl { position: relative; }
.tl__node {
  position: absolute; top: 26px; z-index: 1;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--navy-800); border: 3px solid var(--sky-300);
  box-shadow: 0 0 0 6px rgba(147,197,253,0.16);
}
.tl .tl__node { right: -45px; }
.tl.is-right .tl__node { left: -45px; right: auto; }
.tl--ongoing .tl__node { border-color: var(--cyan); box-shadow: 0 0 0 6px rgba(103,232,249,0.18); }
.tl__date { position: absolute; z-index: 1; top: 24px; right: 26px; font-size: 12.5px; font-weight: 600; color: var(--sky-200); white-space: nowrap; padding: 4px 9px; border-radius: 6px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); }
.tl__card {
  position: relative;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 24px 26px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.tl__card::before {
  content: ""; position: absolute; top: 28px; width: 28px; height: 2px; background: rgba(255,255,255,0.3);
}
.tl .tl__card::before { right: -28px; }
.tl.is-right .tl__card::before { left: -28px; right: auto; }
.tl__card:hover { transform: translateY(-3px); background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }
.tl__kind { display: inline-block; max-width: calc(100% - 150px); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: rgba(147,197,253,0.18); color: var(--sky-200); }
.tl__kind--lead { background: rgba(103,232,249,0.18); color: var(--cyan); }
.tl__title { margin-top: 10px; font-size: 1.15rem; color: #fff; }
.tl__role { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--sky-200); }
.tl__org { margin-top: 2px; font-size: 13.5px; color: #b8c7de; }
.tl__card .bullets { margin-top: 12px; }
.tl__card .bullets li { color: #d7dfec; }

/* ============================================================
   AWARDS
   ============================================================ */
.awards-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.award {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 22px 22px 20px;
  box-shadow: 0 10px 30px -18px rgba(20,36,61,0.35), 0 1px 3px rgba(20,36,61,0.08);
  border: 1px solid #eef1f6;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.award:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -18px rgba(20,36,61,0.45); border-color: var(--sky-200); }
.award--major::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--navy-500), var(--sky-400));
}
.award__date { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-400); }
.award__honor { font-size: 1.02rem; font-weight: 700; color: var(--ink-900); line-height: 1.3; }
.award__title { font-size: 14px; color: var(--ink-700); font-weight: 500; }
.award__org { font-size: 12.5px; color: var(--ink-500); line-height: 1.45; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { text-align: center; }
.contact .sub { max-width: 52ch; }
.contact__cta { margin-top: 32px; display: flex; justify-content: center; }
.btn--navy { background: var(--navy-800); color: #fff; box-shadow: 0 14px 30px -12px rgba(27,46,75,0.6); }
.btn--navy:hover { background: var(--navy-500); transform: translateY(-2px); }
.contact__mail { display: inline-block; margin-top: 18px; font-weight: 600; color: var(--ink-900); border-bottom: 1.5px solid var(--sky-200); padding-bottom: 2px; transition: border-color 0.2s var(--ease); }
.contact__mail:hover { border-color: var(--navy-500); }
.contact__socials { margin-top: 30px; display: flex; justify-content: center; gap: 12px; }
.contact__socials .social { color: var(--ink-900); background: #fff; border-color: #e5e9f0; box-shadow: 0 6px 16px -10px rgba(20,36,61,0.4); }
.contact__socials .social:hover { background: var(--sky-100); }

.footer { padding: 26px var(--gutter) 34px; text-align: center; font-size: 13px; color: var(--ink-500); border-top: 1px solid var(--light-2); background: var(--light); }

/* ---------- to top ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--navy-800); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 14px 30px -10px rgba(27,46,75,0.7);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--navy-500); }
.totop svg { width: 20px; height: 20px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); }
@media (prefers-reduced-motion: no-preference) { .reveal { transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); } }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .project { transition: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .awards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edu { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .nav__links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: 10px var(--gutter) 16px;
    background: var(--navy-800);
    box-shadow: 0 24px 40px -20px rgba(0,0,0,0.7);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__links a.is-active::after { left: 14px; right: auto; width: 20px; }
  .nav__toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1.5px solid rgba(255,255,255,0.4); border-radius: 8px; color: #fff; }
  .nav__toggle svg { width: 18px; height: 18px; }
  .btn-outline span { display: none; }
  .btn-outline { padding: 9px 11px; }
  .grid { grid-template-columns: 1fr; }
  .timeline { display: flex; flex-direction: column; gap: 28px; padding-left: 40px; }
  .timeline::before { left: 8px; transform: none; }
  .tl .tl__node, .tl.is-right .tl__node { left: -41px; right: auto; top: 22px; }
  .tl .tl__card::before, .tl.is-right .tl__card::before { left: -22px; right: auto; width: 22px; top: 30px; }
}
@media (max-width: 640px) {
  .awards-grid { grid-template-columns: 1fr; }
  .edu__scores { grid-template-columns: 1fr; }
  .course { grid-template-columns: 1fr auto; row-gap: 6px; }
  .course__n { grid-column: 1 / -1; }
  .project__top { flex-direction: column; }
  .project__meta { flex-direction: row; align-items: center; }
  .btn { min-width: 0; width: 100%; }
  .hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 12px; margin-top: 44px; }
  .hero__inner { padding-block: 64px 72px; }
  .skill { min-width: 92px; padding: 14px 14px; }
}
@media print {
  .nav, .totop, .progress, .hero__canvas, .hero__scroll, .filters, .project__more { display: none !important; }
  .project__body { grid-template-rows: 1fr !important; }
  .section--navy, .project, .card-navy { background: #fff !important; color: #000 !important; box-shadow: none; border: 1px solid #ccc; }
}

/* center a year group that has a single award */
.awards-grid:has(> :only-child) { grid-template-columns: minmax(0, 380px); justify-content: center; }


/* ============================================================
   v3 — custom icon set, section heads, marquee, code card,
   cursor, grain, developer-portfolio polish
   ============================================================ */
.ic { width: 1em; height: 1em; flex-shrink: 0; }
.ic-slot { display: inline-flex; }
.ic-slot .ic { width: 16px; height: 16px; }
.mk { width: 36px; height: 36px; flex-shrink: 0; }

.brand__tag { margin-left: 4px; padding: 3px 8px; border-radius: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--sky-200); background: rgba(147,197,253,0.12); border: 1px solid rgba(147,197,253,0.2); }

.head { text-align: center; display: flex; flex-direction: column; align-items: center; }
.head__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 16px; color: var(--ink-900); background: #fff; box-shadow: 0 10px 24px -14px rgba(20,36,61,0.5), 0 0 0 1px var(--sky-100); }
.head__icon .ic { width: 20px; height: 20px; }
.section--navy .head__icon { color: #fff; background: rgba(255,255,255,0.08); box-shadow: 0 0 0 1px rgba(255,255,255,0.14); }
.head__kicker { display: block; margin-bottom: 12px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--navy-400); }
.section--navy .head__kicker { color: var(--sky-300); }
.head--sub { margin-top: 72px; }
.head--sub .head__icon { width: 40px; height: 40px; margin-bottom: 12px; }
.head--sub .subtitle { margin-top: 0; }

/* hero */
.hero__hi { display: inline-flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: clamp(0.85rem, 1.4vw, 1rem); letter-spacing: 0.04em; }
.hero__hi-line { display: inline-block; width: 34px; height: 1px; background: rgba(255,255,255,0.4); }
.hero__type { font-family: var(--mono); font-weight: 500; font-size: clamp(1.15rem, 2.6vw, 1.7rem); }
.hero__type-pre { color: var(--sky-300); }
.hero__type .caret { background: var(--cyan); }
.hstat__n { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #8fa4c2; margin-top: 2px; }
.hstat__l { color: #dbe6f7; font-weight: 500; }
.social .ic { width: 20px; height: 20px; }
.btn .ic { width: 16px; height: 16px; }
.magnetic { transition: transform 0.35s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); will-change: transform; }
.magnetic:hover { transform: none; }

/* marquee */
.marquee { position: relative; overflow: hidden; background: var(--navy-900); border-block: 1px solid rgba(255,255,255,0.06); padding: 14px 0; }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 1; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--navy-900), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--navy-900), transparent); }
.marquee__track { display: flex; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: inline-flex; align-items: center; gap: 10px; margin-right: 44px; color: #b8c7de; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; }
.marquee__item .mk { width: 22px; height: 22px; color: var(--sky-300); }
.marquee__item .logo .mk { color: var(--sky-300); }
.marquee__item .ic { width: 18px; height: 18px; color: var(--sky-300); }
@keyframes slide { to { transform: translateX(calc(-100% / 3)); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* about + code card */
.about { margin-top: 44px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.about__text { margin: 0; text-align: left; max-width: none; }
.codecard { border-radius: 14px; overflow: hidden; background: var(--navy-900); color: #dbe6f7; box-shadow: var(--shadow-card); border: 1px solid rgba(255,255,255,0.06); }
.codecard__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.06); }
.codecard__dots { display: inline-flex; gap: 6px; }
.codecard__dots i { width: 10px; height: 10px; border-radius: 50%; background: #3b5f95; }
.codecard__dots i:nth-child(2) { background: #4f7ab8; }
.codecard__dots i:nth-child(3) { background: var(--sky-300); }
.codecard__file { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px; color: #9fb3cc; }
.codecard__file .ic { width: 14px; height: 14px; }
.codecard__body { margin: 0; padding: 18px 18px 20px; font-family: var(--mono); font-size: 13px; line-height: 1.75; overflow-x: auto; }
.codecard__body code { display: block; white-space: pre; }
.codecard .ln { display: inline-block; width: 28px; color: #4f6890; user-select: none; }
.codecard .k { color: var(--cyan); }
.codecard .v { color: #fff; }
.codecard .s { color: #a7f3d0; }
.codecard .n { color: #fcd34d; }

/* skills: custom marks */
.skill .mk { color: var(--ink-900); }
.logo { display: inline-flex; width: 36px; height: 36px; }
.logo img, .logo .mk { width: 36px; height: 36px; }
.marquee__item .logo, .marquee__item .logo img { width: 22px; height: 22px; }
.skill .ic { width: 30px; height: 30px; color: var(--ink-900); }
.skill--text { flex-direction: column; }

/* project index + kind */
.project { padding-top: clamp(26px, 3vw, 34px); }
.project__index { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: #7f95b8; letter-spacing: 0.08em; }
.project__index .ic { width: 15px; height: 15px; color: var(--sky-300); }
.project__top { padding-right: 0; }
.project__meta { margin-top: 26px; }
.filter { display: inline-flex; align-items: center; gap: 7px; }
.filter .ic { width: 14px; height: 14px; }
.group__year .pill { display: inline-flex; align-items: center; gap: 6px; }
.group__year .pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--navy-500); box-shadow: 0 0 0 3px rgba(45,77,125,0.18); }
.project__more .ic { width: 13px; height: 13px; transition: transform 0.3s var(--ease); }
.project.is-open .project__more .ic { transform: rotate(180deg); }
.project__note .ic { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; }
.reflink .ic { width: 14px; height: 14px; }

/* timeline kind icons */
.tl__kind { display: inline-flex; align-items: center; gap: 6px; }
.tl__kind .ic { width: 12px; height: 12px; }

/* awards medal */
.award__top { display: flex; justify-content: space-between; align-items: center; }
.award__medal { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--sky-100); color: var(--ink-900); }
.award__medal .ic { width: 16px; height: 16px; }

/* contact card */
.contact__card { border-radius: 22px; padding: clamp(36px, 5vw, 64px); background: #fff; box-shadow: var(--shadow-card); border: 1px solid #eef1f6; position: relative; overflow: hidden; }
.contact__card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 240px at 50% -10%, rgba(147,197,253,0.28), transparent 70%); }
.contact__card > * { position: relative; }

/* footer */
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; }
.footer__mid { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-500); }
.footer__inner .ic { width: 14px; height: 14px; }
.footer__inner a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-900); font-weight: 500; }
.footer { padding-inline: 0; }

/* custom cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; opacity: 0; transition: opacity 0.3s var(--ease); mix-blend-mode: difference; }
.cursor.is-on { opacity: 1; }
.cursor__ring { position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #fff; transition: transform 0.35s var(--ease), opacity 0.35s var(--ease); }
.cursor__dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.cursor.is-hover .cursor__ring { transform: scale(1.7); opacity: 0.7; }
.totop .ic { width: 20px; height: 20px; }
.nav__toggle .ic { width: 18px; height: 18px; }
.btn-outline .ic { width: 15px; height: 15px; }
.hero__scroll .ic { width: 26px; height: 26px; }

/* film grain on navy bands */
.section--navy::after, .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.hero__inner { z-index: 2; }

@media (max-width: 1024px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 880px) { .brand__tag { display: none; } .hero__hi-line { width: 18px; } }
@media (max-width: 640px) { .project__index { top: 12px; right: 12px; } .project__meta { margin-top: 12px; } .footer__mid { order: 3; width: 100%; } .head--sub { margin-top: 56px; } }

.brand, .brand__tag { white-space: nowrap; }
@media (max-width: 1100px) { .brand__tag { display: none; } }
.section > .wrap { z-index: 1; }
.awards-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
