/* =========================================================
   Hosung Kim — personal site
   Layout language: grey portrait hero with scrolling name,
   white content bands, dark contact footer behind a curved edge.
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #1c1d20;
  --muted: #6b6e74;
  --faint: #999da3;
  --line: rgba(28, 29, 32, 0.14);
  --panel: #e9eaeb;
  --dark: #1c1d20;
  --dark-2: #141517;
  --dark-ink: #ffffff;
  --dark-muted: rgba(255, 255, 255, 0.5);
  --dark-line: rgba(255, 255, 255, 0.18);
  --blue: #455ce9;
  --blue-deep: #334bd3;
  /* sampled from the headshot backdrop: lighter top, cooler sides, darker base */
  --hero-top: #7c7e81;
  --hero-mid: #6c6e72;
  --hero-low: #4f535a;
  --sans: "Geist", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1600px; margin: 0 auto; }
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: 0.02em; text-transform: uppercase; color: var(--faint); }

/* ---------- Preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--dark); color: #fff;
  display: grid; place-items: center;
  transition: transform 0.9s var(--ease);
}
.loader-word { font-size: clamp(36px, 5vw, 56px); display: flex; align-items: center; gap: 14px; opacity: 0; transition: opacity 0.6s; }
.loader.show-word .loader-word { opacity: 1; }
.loader-word .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
.loader-curve { position: absolute; left: 0; top: 100%; width: 100%; height: 12vh; fill: var(--dark); transition: height 0.9s var(--ease); }
.loader.done { transform: translateY(-112vh); }
.loader.done .loader-curve { height: 0; }

/* ---------- Top nav ---------- */
.topnav {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(28px + env(safe-area-inset-top, 0px)) var(--gutter) 0;
  color: #fff;
}
.logo { display: flex; align-items: center; gap: 4px; text-decoration: none; font-size: 15px; }
.logo .copy { display: inline-block; transition: transform 0.6s var(--ease-out); }
.logo:hover .copy { transform: rotate(360deg); }
.logo-roll { position: relative; overflow: hidden; display: inline-flex; white-space: nowrap; }
.logo-a, .logo-b { transition: transform 0.6s var(--ease-out), opacity 0.4s; }
.logo-b { position: absolute; left: 0; top: 0; transform: translateY(110%); }
.logo:hover .logo-a { transform: translateY(-110%); }
.logo:hover .logo-b { transform: translateY(0); }
.topnav ul { display: flex; gap: 6px; }
.navlink { position: relative; display: inline-block; padding: 10px 14px; font-size: 15px; text-decoration: none; }
.navlink::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: translateX(-50%) scale(0); transition: transform 0.3s var(--ease-out); }
.navlink:hover::after { transform: translateX(-50%) scale(1); }

/* ---------- Floating menu ---------- */
.menu-btn {
  position: fixed; z-index: 30; top: 24px; right: var(--gutter);
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--dark); display: grid; place-items: center;
  transform: scale(0); transition: transform 0.45s var(--ease-out), background 0.3s;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.menu-btn.visible { transform: scale(1); }
.menu-btn:hover, .menu-btn.open { background: var(--blue); }
.menu-btn .bars, .menu-btn .bars::before { display: block; width: 26px; height: 1.5px; background: #fff; position: relative; transition: transform 0.35s var(--ease-out), top 0.35s; }
.menu-btn .bars { background: transparent; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; width: 26px; height: 1.5px; background: #fff; transition: transform 0.35s var(--ease-out), top 0.35s; }
.menu-btn .bars::before { top: -4px; }
.menu-btn .bars::after { top: 4px; }
.menu-btn.open .bars::before { top: 0; transform: rotate(45deg); }
.menu-btn.open .bars::after { top: 0; transform: rotate(-45deg); }

.menu-overlay { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.menu-panel {
  position: fixed; z-index: 25; top: 0; right: 0; height: 100%;
  width: min(480px, 100vw); background: var(--dark); color: #fff;
  transform: translateX(calc(100% + 140px)); transition: transform 0.8s var(--ease);
}
.menu-panel.open { transform: translateX(0); }
.menu-curve { position: absolute; top: 0; right: 100%; width: 100px; height: 100%; fill: var(--dark); transition: width 0.8s var(--ease); pointer-events: none; }
.menu-panel.open .menu-curve { width: 0; }
.menu-inner { height: 100%; overflow-y: auto; padding: 120px clamp(28px, 6vw, 72px) 48px; display: flex; flex-direction: column; }
.menu-inner .eyebrow { color: var(--dark-muted); padding-bottom: 18px; border-bottom: 1px solid var(--dark-line); margin-bottom: 28px; }
.menu-links { margin-bottom: 56px; }
.menu-links a { display: inline-block; font-size: clamp(36px, 5vw, 52px); line-height: 1.25; text-decoration: none; transition: transform 0.35s var(--ease-out); }
.menu-links a:hover { transform: translateX(10px); }
.menu-socials { display: flex; gap: 24px; flex-wrap: wrap; }
.menu-socials a { text-decoration: none; font-size: 15px; }
.menu-socials a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse 60% 70% at 50% 20%, #808286 0%, transparent 70%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 55%, var(--hero-low) 100%);
}
.hero-photo {
  position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; max-width: none;
  transform: translateX(-50%);
  /* feather the photo's edges into the backdrop so a 4:5 photo blends on a wide screen */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
}
.hero-pill {
  position: absolute; z-index: 3; left: 0; top: 46%;
  display: flex; align-items: center; gap: 28px;
  padding: 18px 18px 18px var(--gutter);
  background: var(--dark); border-radius: 0 999px 999px 0;
  font-size: 16px; line-height: 1.3;
}
.globe { width: 64px; height: 64px; border-radius: 50%; background: #999; display: grid; place-items: center; }
.globe svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.2; }
.globe .spin { transform-origin: 12px 12px; animation: globe 6s linear infinite; }
@keyframes globe { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }

.hero-role { position: absolute; z-index: 3; right: var(--gutter); top: 40%; font-size: clamp(20px, 2vw, 30px); line-height: 1.25; }
.hero-role .arrow { width: 20px; height: 20px; margin-bottom: 36px; }
.hero-role .sub { font-size: 14px; color: rgba(255, 255, 255, 0.7); margin-top: 12px; }
.arrow { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.marquee { position: absolute; z-index: 2; left: 0; bottom: 2vh; width: 100%; overflow: hidden; pointer-events: none; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-track span { font-size: clamp(96px, 15vw, 240px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap; padding-right: 0.3em; }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: clamp(32px, 8vw, 140px); padding-top: clamp(80px, 12vw, 160px); padding-bottom: clamp(60px, 8vw, 120px); }
.intro-lead { font-size: clamp(26px, 3.2vw, 44px); line-height: 1.3; letter-spacing: -0.01em; max-width: 22ch; }
.intro-side { display: flex; flex-direction: column; gap: 48px; align-items: flex-start; padding-top: 8px; color: var(--ink); }
.intro-side p { font-size: 16px; line-height: 1.6; }

/* ---------- Circle buttons & pills (with rising fill) ---------- */
.circle-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; place-items: center;
  width: 180px; height: 180px; border-radius: 50%;
  text-decoration: none; font-size: 16px;
}
.circle-btn.big { width: 200px; height: 200px; }
.circle-btn.dark { background: var(--dark); color: #fff; }
.circle-btn.blue { background: var(--blue); color: #fff; }
.circle-btn .fill, .pill .fill {
  position: absolute; z-index: -1; left: -10%; top: 100%; width: 120%; height: 160%;
  border-radius: 50%; background: var(--blue); transition: top 0.6s var(--ease-out);
}
.circle-btn.blue .fill { background: var(--blue-deep); }
.circle-btn:hover .fill, .pill:hover .fill { top: -30%; }
.circle-btn .label, .pill .label { position: relative; pointer-events: none; }
.magnetic { will-change: transform; }

/* ---------- Section heads ---------- */
.sec-head { display: flex; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

/* ---------- Experience list ---------- */
.experience { padding-bottom: clamp(80px, 10vw, 140px); position: relative; }
.exp { border-bottom: 1px solid var(--line); }
.exp-row {
  width: 100%; display: grid; grid-template-columns: 1fr auto 48px; align-items: center; gap: 24px;
  padding: clamp(28px, 4.2vw, 56px) clamp(0px, 2vw, 32px); text-align: left;
  transition: padding 0.5s var(--ease-out), opacity 0.4s;
}
.exp-co { font-size: clamp(32px, 5.4vw, 80px); line-height: 1; letter-spacing: -0.03em; font-weight: 400; transition: transform 0.5s var(--ease-out); }
.exp-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 16px; text-align: right; }
.exp-dates { color: var(--muted); font-size: 14px; }
.plus { position: relative; width: 20px; height: 20px; justify-self: end; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 1.5px; background: var(--ink); transition: transform 0.4s var(--ease-out); }
.plus::after { transform: rotate(90deg); }
.exp-row[aria-expanded="true"] .plus::after { transform: rotate(0deg); }
@media (hover: hover) and (pointer: fine) {
  .exp-list:hover .exp-row { opacity: 0.35; }
  .exp-list .exp-row:hover, .exp-list .exp-row[aria-expanded="true"] { opacity: 1; }
  .exp-row:hover .exp-co { transform: translateX(-10px); }
}
.exp-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-out); }
.exp-body > .exp-inner { overflow: hidden; }
.exp.open .exp-body { grid-template-rows: 1fr; }
.exp-inner { padding: 0 clamp(0px, 2vw, 32px); }
.exp.open .exp-inner { padding-bottom: 44px; }

/* LinkedIn-style experience card */
.li-head { display: flex; gap: 16px; margin-bottom: 18px; }
.li-title { font-size: 18px; font-weight: 500; }
.li-org { font-size: 15px; color: var(--ink); }
.li-dim { font-size: 14px; color: var(--muted); }
.li-bullets { max-width: 820px; display: grid; gap: 10px; }
.li-bullets li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.6; }
.li-bullets li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.li-bullets a { text-decoration-color: var(--blue); text-underline-offset: 3px; }
.li-skills { margin-top: 18px; font-size: 14px; color: var(--muted); }
.li-skills strong { color: var(--ink); font-weight: 500; }

/* Cursor-following preview */
.preview {
  position: fixed; z-index: 15; left: 0; top: 0; width: 380px; height: 300px;
  pointer-events: none; overflow: visible;
  transform: translate(-50%, -50%) scale(0); transition: transform 0.4s var(--ease-out);
}
.preview.active { transform: translate(-50%, -50%) scale(1); }
.preview-slider { position: absolute; inset: 0; overflow: hidden; }
.preview-slider { display: flex; flex-direction: column; }
.pv { flex: 0 0 300px; display: flex; flex-direction: column; justify-content: center; padding: 36px; gap: 6px; transition: transform 0.5s var(--ease-out); }
.pv-k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.7; }
.pv-n { font-size: 54px; letter-spacing: -0.03em; line-height: 1.05; }
.pv-s { font-size: 15px; opacity: 0.85; max-width: 26ch; }
.pv-1 { background: #24324f; color: #fff; }
.pv-2 { background: #d9ddd3; color: var(--ink); }
.pv-3 { background: #3b3f46; color: #fff; }
.pv-4 { background: #e7dfd3; color: var(--ink); }
.preview-cta { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 14px; transform: translate(110px, 90px); }

/* ---------- Projects ---------- */
.projects { padding-bottom: clamp(80px, 10vw, 140px); }
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px) clamp(24px, 4vw, 64px); padding-top: clamp(40px, 5vw, 72px); }
.proj-panel { display: grid; place-items: center; aspect-ratio: 1.15 / 1; background: var(--panel); overflow: hidden; text-decoration: none; }
.proj-panel .mock { transition: transform 0.7s var(--ease-out); }
.proj-panel:hover .mock { transform: scale(1.04); }
.proj-text { padding-top: 26px; }
.proj-text h3 { font-size: clamp(28px, 3vw, 44px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.proj-tag { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.proj-text ul { display: grid; gap: 10px; }
.proj-text li { position: relative; padding-left: 22px; line-height: 1.6; }
.proj-text li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

.proj-link { display: inline-flex; gap: 6px; margin-top: 18px; padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; text-decoration: none; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.proj-link:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Video panel: letterboxed on a navy that matches the demo's background */
.proj-video { background: #0a0c3a; }
.rt-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #0a0c3a; }

/* Mock panels (typographic stand-ins for screenshots) */
.mock { width: 78%; background: #fff; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.25); font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f3f3f4; border-bottom: 1px solid #e3e3e5; color: var(--faint); font-size: 11px; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d4d5d8; }
.mock-bar span { margin-left: 10px; }
.db-title { padding: 22px 22px 6px; font-size: 20px; letter-spacing: -0.01em; }
.db-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 22px; }
.db-stats div { background: #f3f4f8; padding: 12px; border-radius: 6px; }
.db-stats b { display: block; font-size: 20px; font-weight: 500; color: var(--blue); letter-spacing: -0.02em; }
.db-stats span { font-size: 11px; color: var(--muted); }
.db-rows { padding: 6px 22px 24px; display: grid; gap: 8px; }
.db-rows i { display: block; height: 8px; border-radius: 4px; background: #ececee; }
.db-rows i:nth-child(2) { width: 82%; } .db-rows i:nth-child(3) { width: 90%; } .db-rows i:nth-child(4) { width: 64%; }

.mock-rt { background: #2b2d31; color: #e8e9ea; padding: 22px; border-radius: 10px; }
.rt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rt-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #fff; }
.rt-chip { margin-left: auto; font-size: 11px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #b5b8bd; }
.rt-q { font-size: 15px; margin-bottom: 14px; }
.rt-opt { position: relative; padding: 10px 12px; margin-bottom: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.rt-opt span { position: relative; z-index: 1; }
.rt-opt i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: rgba(69, 92, 233, 0.35); }
.rt-note { margin-top: 12px; font-size: 11px; color: #9a9ca1; }

.mock-anua { width: 70%; padding: 26px 30px; }
.an-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 18px; }
.an-bars { display: grid; gap: 14px; }
.an-bar { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 16px; }
.an-bar i { display: block; height: 30px; border-radius: 3px; }
.an-bar.comp i { background: var(--blue); width: 100%; }
.an-bar.brand i { background: #c9ccd3; width: 5%; min-width: 8px; }
.an-bar span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.an-bar b { font-size: 20px; color: var(--ink); font-weight: 500; }
.an-foot { display: flex; gap: 28px; margin-top: 22px; padding-top: 14px; border-top: 1px solid #ececee; font-size: 12px; color: var(--muted); }
.an-foot b { color: var(--ink); font-weight: 500; }

.mock-fevs { width: 80%; padding: 24px 26px 18px; }
.fv-k { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 16px; max-width: 40ch; }
.fv-chart { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; height: 190px; align-items: end; border-bottom: 1px solid #d9dadd; }
.fv-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.fv-col i { display: block; width: 100%; height: var(--h); background: var(--blue); border-radius: 3px 3px 0 0; }
.fv-col:nth-child(n+4) i { background: #9aa6f2; }
.fv-col b { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.fv-col span { position: absolute; top: calc(100% + 8px); font-size: 10.5px; line-height: 1.25; color: var(--muted); text-align: center; white-space: nowrap; }
.fv-foot { margin-top: 44px; font-size: 11px; color: var(--faint); }

/* ---------- Toolkit sliding rows ---------- */
.toolkit { overflow: hidden; padding: clamp(20px, 4vw, 40px) 0 clamp(80px, 10vw, 140px); display: grid; gap: clamp(16px, 2.4vw, 32px); }
.slide-row { display: flex; gap: clamp(16px, 2.4vw, 32px); width: max-content; will-change: transform; }
.tile {
  flex: 0 0 auto; display: grid; place-items: center;
  height: clamp(120px, 15vw, 210px); min-width: clamp(220px, 24vw, 360px); padding: 0 40px;
  background: var(--panel); font-size: clamp(20px, 2vw, 30px); letter-spacing: -0.01em; white-space: nowrap;
}
.tile.t-dark { background: var(--dark); color: #fff; }
.tile.t-blue { background: var(--blue); color: #fff; }

/* ---------- Education & courses ---------- */
.education { padding-bottom: clamp(80px, 10vw, 140px); }
.edu-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding: clamp(32px, 4vw, 56px) 0; border-bottom: 1px solid var(--line); }
.edu-main h3 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 10px; }
.edu-deg { font-size: 18px; margin: 18px 0 8px; line-height: 1.45; }
.edu-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-content: start; }
.edu-facts div:last-child { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--line); }
.edu-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); margin-bottom: 6px; }
.edu-facts dd { font-size: 18px; line-height: 1.35; }
.edu-facts div:first-child dd { font-size: clamp(36px, 4vw, 56px); letter-spacing: -0.03em; line-height: 1; color: var(--blue); }

.courses { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); padding-top: clamp(32px, 4vw, 56px); }
.col-title { font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); margin: 0 0 10px; }
.course-list + .col-title { margin-top: 44px; }
.course-list li { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.4; transition: padding 0.35s var(--ease-out); }
.course-list li:hover { padding-left: 8px; }
.course-list .code { flex: 0 0 82px; color: var(--muted); font-size: 14px; }
.course-list em { color: var(--muted); font-style: normal; }
.certs li { align-items: center; }
.certs li::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }

/* ---------- Clubs ---------- */
.clubs { padding-bottom: clamp(80px, 10vw, 140px); }
.club-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); padding-top: clamp(32px, 4vw, 56px); }
.club { position: relative; padding: 28px 28px 34px; background: var(--panel); overflow: hidden; isolation: isolate; transition: color 0.45s var(--ease-out); }
.club::before { content: ""; position: absolute; z-index: -1; left: -10%; top: 100%; width: 120%; height: 180%; border-radius: 50%; background: var(--dark); transition: top 0.7s var(--ease-out); }
.club:hover { color: #fff; }
.club:hover::before { top: -40%; }
.club-no { display: block; font-size: 13px; color: var(--muted); margin-bottom: 64px; transition: color 0.45s; }
.club:hover .club-no { color: rgba(255, 255, 255, 0.55); }
.club h3 { font-size: clamp(24px, 2.2vw, 32px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px; }
.club p { font-size: 15px; line-height: 1.55; opacity: 0.8; }

/* ---------- Military service ---------- */
.service { padding-bottom: clamp(100px, 12vw, 180px); }
.svc { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; padding-top: clamp(32px, 4vw, 56px); }
.svc-rank { display: inline-block; font-size: 13px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 18px; }
.svc h3 { font-size: clamp(28px, 3.4vw, 48px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px; }

/* ---------- Curve into footer ---------- */
main { position: relative; z-index: 2; background: var(--bg); }
.curve-wrap { position: absolute; left: 0; right: 0; top: 100%; height: 0; pointer-events: none; }
.curve { position: absolute; left: -10%; width: 120%; height: 120px; top: -60px; background: var(--bg); border-radius: 0 0 50% 50%; box-shadow: 0 60px 50px rgba(0, 0, 0, 0.05); will-change: height; }

/* ---------- Contact footer ---------- */
.contact { position: relative; z-index: 1; background: var(--dark); color: var(--dark-ink); padding-top: clamp(140px, 16vw, 220px); }
.contact-head { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1200px; }
.contact-head h2 { font-size: clamp(48px, 7vw, 104px); font-weight: 400; letter-spacing: -0.035em; line-height: 1.02; }
.avatar { display: inline-block; vertical-align: middle; width: clamp(56px, 6.5vw, 96px); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-right: 18px; position: relative; top: -0.08em; }
.contact-arrow { width: 22px; height: 22px; margin-top: 30%; color: #fff; }
.contact-line { position: relative; border-bottom: 1px solid var(--dark-line); margin: clamp(48px, 6vw, 80px) 0 0; max-width: 1200px; }
.contact-line .circle-btn { position: absolute; right: 10%; top: 0; transform: translateY(-50%); }
.pills { display: flex; flex-wrap: wrap; gap: 14px; padding-top: clamp(70px, 8vw, 110px); }
.pill { position: relative; overflow: hidden; isolation: isolate; display: inline-block; padding: 22px 36px; border: 1px solid var(--dark-line); border-radius: 999px; text-decoration: none; font-size: 16px; }

/* Contact form */
.cform { max-width: 900px; padding-top: clamp(80px, 10vw, 130px); scroll-margin-top: 40px; }
.cform-intro { color: var(--dark-muted); margin-bottom: 24px; }
.field { display: grid; grid-template-columns: 48px 1fr; padding: 34px 0 22px; border-top: 1px solid var(--dark-line); }
.field:last-of-type { border-bottom: 1px solid var(--dark-line); }
.field .num { color: var(--dark-muted); font-size: 14px; padding-top: 6px; }
.field label { font-size: clamp(20px, 2vw, 26px); margin-bottom: 10px; }
.field input, .field textarea { grid-column: 2; width: 100%; background: transparent; border: 0; color: #fff; font: inherit; font-size: 18px; padding: 8px 0; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, 0.32); }
.field input:focus, .field textarea:focus { outline: none; }
.field:focus-within { border-top-color: rgba(255, 255, 255, 0.6); }
.field.invalid label { color: #ff8c8c; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cform-foot { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: -40px; padding-left: 48px; }
.cform-status { color: var(--dark-muted); font-size: 15px; max-width: 46ch; min-height: 1.5em; padding-top: 70px; }
.cform-status.ok { color: #8fe3a5; }
.cform-status.err { color: #ff9f9f; }
.cform-status a { color: #fff; }
#send-btn { flex: 0 0 auto; transform-origin: center; }
#send-btn[disabled] { opacity: 0.6; cursor: progress; }

.footbar { display: flex; gap: clamp(28px, 5vw, 64px); padding: clamp(80px, 10vw, 140px) 0 calc(28px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.fb-col { display: flex; flex-direction: column; gap: 10px; }
.fb-k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--dark-muted); }
.fb-socials { margin-left: auto; }
.fb-socials span:last-child { display: flex; gap: 22px; }
.fb-socials a { text-decoration: none; position: relative; }
.fb-socials a::after { content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: #fff; transform: scaleX(0); transform-origin: right; transition: transform 0.35s var(--ease-out); }
.fb-socials a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .topnav ul { display: none; }
  .menu-btn { transform: scale(1); width: 60px; height: 60px; top: 18px; }
  .hero-role { top: auto; bottom: 30vh; right: var(--gutter); font-size: 18px; }
  .hero-role .arrow { margin-bottom: 18px; }
  .hero-pill { top: auto; bottom: 30vh; padding: 12px 12px 12px var(--gutter); gap: 16px; font-size: 13px; }
  .hero-pill .globe { width: 44px; height: 44px; }
  .hero-pill .globe svg { width: 22px; height: 22px; }
  .hero-role { display: none; }
  .intro { grid-template-columns: 1fr; }
  .intro-side { flex-direction: row; align-items: center; gap: 24px; }
  .intro-side .circle-btn { flex: 0 0 auto; width: 128px; height: 128px; }
  .exp-row { grid-template-columns: 1fr 28px; gap: 8px 16px; }
  .exp-meta { grid-column: 1; grid-row: 2; align-items: flex-start; text-align: left; }
  .plus { grid-row: 1; grid-column: 2; }
  .proj-grid { grid-template-columns: 1fr; }
  .mock { width: 86%; }
  .mock-anua { width: 86%; }
  .mock-fevs { width: 90%; padding: 20px 16px 14px; }
  .fv-chart { height: 150px; gap: 6px; }
  .fv-col span { font-size: 9.5px; }
  .edu-card, .courses, .svc, .club-list { grid-template-columns: 1fr; }
  .club-no { margin-bottom: 28px; }
  .contact-arrow { display: none; }
  .contact-line .circle-btn { width: 118px; height: 118px; right: 0; }
  .cform-foot { flex-direction: column-reverse; align-items: flex-start; padding-left: 0; margin-top: 32px; }
  .cform-status { padding-top: 0; }
  .footbar { flex-wrap: wrap; }
  .fb-socials { margin-left: 0; width: 100%; order: -1; }
}
@media (max-width: 520px) {
  .exp-co { font-size: 34px; }
  .db-stats { grid-template-columns: 1fr; }
  .db-stats div:nth-child(n+2) { display: none; }
  .an-bar { grid-template-columns: 1fr 84px; }
  .an-foot { flex-direction: column; gap: 6px; }
  .field { grid-template-columns: 34px 1fr; }
  .pill { padding: 18px 26px; font-size: 15px; }
  .course-list .code { flex-basis: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

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