/* ==========================================================================
   Bengisu Koc — portfolio
   Palette: deep-space navy, starlight white, soft pink accent, periwinkle.
   Type: Playfair Display / DM Sans / DM Mono
   ========================================================================== */

:root {
  --space: #0e1330;        /* page background */
  --space-2: #121842;      /* alternate section */
  --space-3: #0a0e24;      /* deepest (nav, footer) */
  --surface: #171d45;      /* cards */
  --surface-2: #1d2454;    /* card hover / chips */
  --line: #2a3270;
  --line-soft: #222a5e;
  --text: #f4f1fa;
  --text-soft: #c9cbe3;
  --muted: #9aa0c8;
  --pink: #f2a0ba;
  --pink-strong: #ff8fb1;
  --peri: #9fb4ff;
  --gold: #f3cf8a;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 7vw, 105px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; background: var(--space); }
body {
  margin: 0;
  background: var(--space);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin-top: 0; }
img, svg { display: block; }
em { font-weight: 500; color: var(--pink); }
a { color: inherit; }
::selection { background: var(--pink); color: var(--space); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 2px; }

.shell { width: min(1200px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }

/* Faint fixed starfield behind everything */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffffb0, transparent 60%),
    radial-gradient(1px 1px at 34% 72%, #ffffff80, transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 34%, #ffffffa0, transparent 60%),
    radial-gradient(1px 1px at 77% 81%, #ffffff70, transparent 60%),
    radial-gradient(1px 1px at 88% 12%, #ffffff90, transparent 60%),
    radial-gradient(1px 1px at 22% 46%, #c9d3ff80, transparent 60%),
    radial-gradient(1px 1px at 66% 58%, #ffd6e270, transparent 60%),
    radial-gradient(1px 1px at 45% 8%, #ffffff70, transparent 60%),
    radial-gradient(1px 1px at 5% 90%, #ffffff60, transparent 60%),
    radial-gradient(1px 1px at 95% 52%, #ffffff60, transparent 60%);
  background-size: 520px 520px;
}
main, footer { position: relative; z-index: 1; }

/* Shared small type ------------------------------------------------------ */
.eyebrow, .label, .section-number, .scroll-note, .map-label, .map-coordinates {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-number { color: var(--pink); }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 13px 18px 13px 22px;
  border-radius: 30px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn span { font-size: 17px; line-height: 1; }
.btn:hover { transform: translateY(-2px); }
.btn-primary, .btn-light { background: var(--pink); color: var(--space); }
.btn-primary:hover, .btn-light:hover { background: #ffc0d3; box-shadow: 0 8px 30px -8px #f2a0ba88; }
.btn-ghost, .btn-outline-light { border-color: #4a548f; color: var(--text); }
.btn-ghost:hover, .btn-outline-light:hover { border-color: var(--peri); background: #9fb4ff14; }

/* Navigation ------------------------------------------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 72px;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #0a0e24d9;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
}
.wordmark { font: 600 25px var(--serif); letter-spacing: -.06em; text-decoration: none; color: var(--text); }
.wordmark span { color: var(--pink); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14px; text-decoration: none; color: var(--text-soft); transition: color .2s; }
.nav-links a:hover { color: var(--pink); }
.nav-links .nav-cv { color: var(--text); padding: 8px 16px; border: 1px solid #4a548f; border-radius: 20px; }
.nav-links .nav-cv:hover { border-color: var(--pink); color: var(--pink); }
.menu-toggle {
  display: none;
  background: none; border: 1px solid #4a548f; border-radius: 20px;
  color: var(--text); font: 500 13px var(--sans);
  padding: 7px 14px; cursor: pointer;
}

/* Hero ------------------------------------------------------------------- */
.hero-scroll { height: 200svh; position: relative; }
.hero {
  position: sticky; top: 0;
  height: 100svh; min-height: 680px; width: 100%;
  display: flex; align-items: center;
  padding: 110px var(--gutter) 110px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 55% at 78% 48%, #3a3f9a55 0%, transparent 70%),
    radial-gradient(ellipse 30% 35% at 88% 70%, #f2a0ba26 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 10%, #2b3488 0%, transparent 70%),
    radial-gradient(circle at 8% 15%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 27% 10%, #ffe1ea 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 51% 19%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 63% 82%, #c9d3ff 0 1px, transparent 2px),
    radial-gradient(circle at 42% 90%, #ffffff 0 1px, transparent 2px),
    linear-gradient(160deg, #141a48 0%, #0e1330 55%, #0a0e24 100%);
}
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.hero .eyebrow { color: var(--peri); }
.name-title {
  font: 500 clamp(73px, 10.8vw, 155px) / .83 var(--serif);
  letter-spacing: -.07em;
  margin: 24px 0 26px;
  color: var(--pink);
  white-space: nowrap;
  text-shadow: 0 0 60px #f2a0ba40;
  transform: translate3d(var(--name-x, 0), var(--name-y, 0), 0) rotate(var(--name-rotate, 0deg)) scale(var(--name-scale, 1));
  transform-origin: left center;
  opacity: var(--name-opacity, 1);
  will-change: transform, opacity;
}
.name-title span {
  position: relative; display: inline-block;
  transform: translate3d(var(--letter-x, 0), var(--letter-y, 0), 0) rotate(var(--letter-rotate, 0deg)) scale(var(--letter-scale, 1));
  opacity: var(--letter-opacity, 1);
  will-change: transform, opacity;
}
.name-title span::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: var(--planet-size, 0px); height: var(--planet-size, 0px);
  border-radius: 50%;
  background: var(--planet-fill, transparent);
  background-size: 400% 200%;
  background-position: var(--atlas-x, 0%) var(--atlas-y, 0%);
  box-shadow: var(--planet-shadow, none);
  opacity: var(--planet-opacity, 0);
  transform: translate(-50%, -50%) scale(var(--planet-scale, .5));
  pointer-events: none;
}
.name-title span:nth-child(6)::before { /* Saturn's ring */
  content: ""; position: absolute; left: 50%; top: 50%;
  width: calc(var(--planet-size, 0px) * 1.9); height: calc(var(--planet-size, 0px) * .54);
  border: 1px solid #e6cfa3; border-radius: 50%;
  opacity: var(--planet-opacity, 0);
  transform: translate(-50%, -50%) rotate(-19deg);
  pointer-events: none;
}
.name-title i { display: inline-block; width: .21em; }
.hero-line {
  font: 500 clamp(26px, 3vw, 39px) / 1.05 var(--serif);
  letter-spacing: -.035em;
  margin: 0 0 22px;
  color: var(--text);
}
.intro { max-width: 480px; color: var(--text-soft); font-size: 17px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero::after {
  content: "01 · ORBITAL FIELD · 52.6369° N";
  position: absolute; right: var(--gutter); top: 98px;
  color: var(--muted); font: 10px var(--mono); letter-spacing: .16em;
}
.star-map {
  position: absolute; right: -.5%; top: 50%;
  width: min(44vw, 500px); aspect-ratio: 1;
  transform: translate3d(var(--map-x, 0), calc(-48% + var(--map-y, 0)), 0) rotate(var(--map-rotate, 0deg));
  opacity: var(--map-opacity, .85);
  will-change: transform, opacity;
}
.star-map svg { width: 100%; height: 100%; overflow: visible; }
.star-map path { stroke: #9fb4ff66; stroke-width: 1; fill: none; stroke-dasharray: 3 6; }
.star-map circle { fill: #ffffff; filter: drop-shadow(0 0 4px #9fb4ff); }
.star-map circle:nth-of-type(2), .star-map circle:nth-of-type(5) { fill: var(--pink); filter: drop-shadow(0 0 5px var(--pink)); }
.map-label { position: absolute; left: 14%; top: 22%; line-height: 1.55; color: var(--muted); }
.map-coordinates { position: absolute; right: 6%; bottom: 17%; line-height: 1.7; text-align: right; color: var(--muted); }
.star { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px #9fb4ff66; animation: twinkle 4s ease-in-out infinite; }
.s1 { width: 6px; height: 6px; top: 17%; left: 38%; }
.s2 { width: 4px; height: 4px; top: 32%; right: 17%; animation-delay: -1s; }
.s3 { width: 5px; height: 5px; bottom: 30%; left: 20%; background: var(--pink); box-shadow: 0 0 14px 4px #f2a0ba66; }
.s4 { width: 3px; height: 3px; bottom: 17%; right: 34%; animation-delay: -2s; }
.s5 { width: 4px; height: 4px; top: 55%; left: 47%; background: var(--pink); box-shadow: 0 0 14px 4px #f2a0ba66; }
.orbit { position: absolute; border: 1px solid #9fb4ff2e; border-radius: 50%; pointer-events: none; will-change: transform; }
.orbit-one { width: 560px; height: 560px; right: 5%; top: 50%; transform: translateY(-50%) rotate(calc(-24deg + var(--orbit-turn, 0deg))); }
.orbit-two { width: 730px; height: 310px; right: -6%; top: 50%; border-color: #f2a0ba30; transform: translateY(-50%) rotate(calc(31deg - var(--orbit-turn, 0deg))); }
.scroll-note { position: absolute; bottom: 34px; left: var(--gutter); display: flex; align-items: center; gap: 8px; }
.scroll-note span { display: inline-block; width: 32px; height: 1px; background: var(--muted); }

/* Section scaffolding ---------------------------------------------------- */
.section { padding: 130px 0; position: relative; }
.section-heading {
  display: flex; justify-content: space-between; align-items: end; gap: 30px;
  margin-bottom: 56px;
}
.section-heading h2, .about h2, .contact h2 {
  font: 500 clamp(40px, 5vw, 68px) / 1.04 var(--serif);
  letter-spacing: -.045em;
  margin: 14px 0 0;
  color: var(--text);
}
.section-note { font: 17px/1.4 var(--serif); color: var(--text-soft); text-align: right; max-width: 300px; margin: 0; }

/* About ------------------------------------------------------------------ */
.about {
  overflow: hidden;
  background:
    radial-gradient(ellipse 40% 50% at 85% 15%, #2b348866 0%, transparent 70%),
    var(--space-2);
  border-top: 1px solid var(--line-soft);
}
.about::before {
  content: ""; position: absolute; right: -25vw; top: -25vw;
  width: min(68vw, 960px); aspect-ratio: 1;
  border: 1px solid #9fb4ff1f; border-radius: 50%;
}
.about h2 { margin-bottom: 40px; }
.about-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 9%; margin-top: 30px; align-items: start; }
.about-copy { color: var(--text-soft); padding-left: 36px; border-left: 1px solid var(--line); }
.about-copy p { font-size: 17px; margin-bottom: 20px; }
.about-copy .label { color: var(--peri); margin-bottom: 22px; }
.interest-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 30px; padding: 0; list-style: none; }
.interest-list li { font-size: 13px; padding: 6px 13px; border: 1px solid #f2a0ba66; border-radius: 20px; color: var(--pink); }
.fact-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0 10px; border-top: 1px solid var(--line); font-size: 14px; }
.fact-row span { color: var(--muted); }
.fact-row strong { font-weight: 500; color: var(--text); text-align: right; }
.about-orbit-card {
  position: relative; height: 148px; max-width: 390px;
  border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(125deg, #1d2454, #151b42); overflow: hidden;
}
.about-orbit-card::before { content: ""; position: absolute; width: 240px; height: 90px; left: 28px; top: 28px; border: 1px solid #9fb4ff55; border-radius: 50%; transform: rotate(-22deg); }
.about-world { position: absolute; width: 76px; aspect-ratio: 1; border-radius: 50%; left: 104px; top: 35px; background: radial-gradient(circle at 33% 28%, #ffe4ee 0 8%, #f2a0ba 36%, #8d5f9e 67%, #2b2552 100%); box-shadow: inset -16px -9px 25px #0e133099, 0 0 40px #f2a0ba33; }
.about-orbit-card i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #9fb4ff; }
.about-orbit-card i:nth-of-type(1) { width: 6px; height: 6px; left: 53px; top: 52px; }
.about-orbit-card i:nth-of-type(2) { width: 5px; height: 5px; left: 266px; top: 98px; background: var(--pink); box-shadow: 0 0 12px var(--pink); }
.about-orbit-card span, .about-orbit-card small { position: absolute; font: 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.about-orbit-card span { left: 20px; bottom: 16px; }
.about-orbit-card small { right: 20px; top: 17px; }

/* Projects --------------------------------------------------------------- */
.work { background: var(--space); }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.project {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.project:hover { transform: translateY(-4px); border-color: #f2a0ba66; box-shadow: 0 24px 50px -24px #000000aa, 0 0 0 1px #f2a0ba22; }
.project-visual { position: relative; height: 210px; background: radial-gradient(ellipse at 70% 30%, #232b66 0%, #141a40 70%); border-bottom: 1px solid var(--line-soft); }
.project-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-visual .tag {
  position: absolute; left: 18px; top: 16px;
  font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text);
  background: #0e1330cc; border: 1px solid var(--line); padding: 4px 9px; border-radius: 12px;
}
.viz-grid line { stroke: #9fb4ff1f; stroke-width: 1; }
.viz-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.viz-a { stroke: var(--pink); }
.viz-b { stroke: var(--peri); }
.viz-c { stroke: var(--gold); }
.viz-dash { stroke-dasharray: 4 5; }
.viz-fill { fill: var(--pink); }
.viz-text { font: 10px var(--mono); fill: var(--muted); letter-spacing: .06em; }
.project-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.project-meta { display: flex; justify-content: space-between; margin-bottom: 10px; }
.project h3 { font: 500 28px/1.1 var(--serif); letter-spacing: -.025em; margin-bottom: 12px; color: var(--text); }
.project p { font-size: 15px; color: var(--text-soft); margin-bottom: 16px; }
.result {
  display: block;
  font-size: 14px; color: var(--text);
  padding: 11px 14px; margin-bottom: 18px;
  background: #f2a0ba12; border-left: 2px solid var(--pink); border-radius: 0 4px 4px 0;
}
.result strong { font: 500 13px var(--mono); color: var(--pink); white-space: nowrap; margin-right: 8px; }
.tech { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.tech li { font: 11px var(--mono); padding: 4px 9px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-soft); color: var(--peri); }
.project-link {
  margin-top: auto; align-self: flex-start;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--text);
  border-bottom: 1px solid #4a548f; padding-bottom: 4px;
  display: inline-flex; gap: 10px; transition: color .2s, border-color .2s;
}
.project-link span { color: var(--pink); }
.project-link:hover { color: var(--pink); border-color: var(--pink); }

/* Lab work --------------------------------------------------------------- */
.lab { background: var(--space-2); border-top: 1px solid var(--line-soft); }
.lab-list { border-top: 1px solid var(--line); }
.lab-item {
  display: grid; grid-template-columns: 60px 1fr 260px; gap: 24px;
  padding: 30px 0; border-bottom: 1px solid var(--line);
  transition: background .25s, padding .25s;
}
.lab-item:hover { background: #ffffff06; padding-left: 12px; padding-right: 12px; }
.lab-index { font: 12px var(--mono); color: var(--muted); padding-top: 8px; }
.lab-item h3 { font: 500 25px/1.15 var(--serif); letter-spacing: -.02em; margin-bottom: 6px; color: var(--text); }
.lab-item .label { display: block; margin-bottom: 12px; }
.lab-item p { font-size: 15px; color: var(--text-soft); margin: 0; max-width: 620px; }
.lab-figure { align-self: center; text-align: right; }
.lab-figure strong { display: block; font: 500 28px/1.15 var(--serif); letter-spacing: -.02em; color: var(--pink); }
.lab-figure span { font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Skills ----------------------------------------------------------------- */
.skills { background: var(--space); border-top: 1px solid var(--line-soft); }
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.skill-card { padding: 26px 22px 24px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 6px; transition: border-color .25s; }
.skill-card:hover { border-color: #9fb4ff55; }
.skill-card .icon { width: 34px; height: 34px; margin-bottom: 20px; color: var(--pink); }
.skill-card h3 { font: 500 22px/1.15 var(--serif); letter-spacing: -.02em; margin-bottom: 16px; color: var(--text); }
.skill-card ul { list-style: none; margin: 0; padding: 0; }
.skill-card li { font-size: 14px; color: var(--text-soft); padding: 7px 0; border-top: 1px solid var(--line-soft); }

/* Education & experience ------------------------------------------------- */
.journey { background: var(--space-2); border-top: 1px solid var(--line-soft); }
.timeline { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.timeline h3.col-title { font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--peri); margin-bottom: 18px; }
.entry { position: relative; padding: 0 0 34px 28px; border-left: 1px solid var(--line); }
.entry:last-child { padding-bottom: 0; }
.entry::before { content: ""; position: absolute; left: -5px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 4px var(--space-2), 0 0 12px var(--pink); }
.entry .when { font: 12px var(--mono); color: var(--muted); }
.entry h4 { font: 500 23px/1.15 var(--serif); letter-spacing: -.02em; margin: 4px 0 4px; color: var(--text); }
.entry .where { font-size: 14px; color: var(--pink); margin-bottom: 10px; }
.entry p { font-size: 15px; color: var(--text-soft); margin: 0; }
.modules { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.modules li { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-soft); }

/* Contact ---------------------------------------------------------------- */
.contact {
  padding: 120px 0; overflow: hidden;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 50% 70% at 15% 100%, #f2a0ba1f 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 90% 0%, #3a3f9a55 0%, transparent 70%),
    var(--space-3);
}
.contact-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: end; }
.contact .eyebrow { color: var(--peri); }
.contact h2 { margin: 18px 0 20px; }
.contact-note { color: var(--text-soft); font-size: 17px; max-width: 460px; margin-bottom: 32px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { border-top: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; text-decoration: none; font-size: 15px; color: var(--text); transition: color .2s, padding .2s; }
.contact-list a:hover { color: var(--pink); padding-left: 6px; }
.contact-list small { font: 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 80px; padding: 20px var(--gutter);
  background: var(--space-3); color: var(--muted);
  border-top: 1px solid var(--line-soft);
  font: 11px var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
footer a { text-decoration: none; border-bottom: 1px solid #4a548f; padding-bottom: 2px; transition: color .2s; }
footer a:hover { color: var(--pink); }

/* Cursor ----------------------------------------------------------------- */
.shooting-star, .shooting-trail { display: none; }
@media (pointer: fine) {
  .shooting-star, .shooting-trail { display: block; position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; }
  .shooting-star { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 7px 3px #ffd0de, 0 0 20px 7px #f2a0ba66; transform: translate(-50%, -50%); }
  .shooting-trail { height: 2px; width: 0; border-radius: 2px; background: linear-gradient(90deg, transparent, #f2a0ba 70%, #fff); transform-origin: right center; opacity: 0; filter: drop-shadow(0 0 4px #f2a0ba); }
}

/* Motion ----------------------------------------------------------------- */
@keyframes twinkle { 50% { transform: scale(.55); opacity: .45; } }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .85s ease, transform .85s cubic-bezier(.2, .7, .2, 1); }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1080px) {
  .skill-grid { grid-template-columns: 1fr 1fr; }
  .lab-item { grid-template-columns: 50px 1fr 200px; }
}

@media (max-width: 860px) {
  .nav { height: 64px; padding: 0 20px; }
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px;
    background: var(--space-3); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 16px; color: var(--text); }
  .nav-links .nav-cv { margin-top: 14px; text-align: center; border-radius: 24px; }

  .section { padding: 90px 0; }
  .section-heading { flex-direction: column; align-items: start; margin-bottom: 38px; }
  .section-note { text-align: left; font-size: 15px; }
  .about-grid, .contact-inner, .timeline { grid-template-columns: 1fr; gap: 40px; }
  .about-copy { padding-left: 22px; }
  .project-grid { grid-template-columns: 1fr; }
  .lab-item { grid-template-columns: 1fr; gap: 10px; }
  .lab-index { padding: 0; }
  .lab-figure { text-align: left; }
  .lab-item:hover { padding-left: 0; padding-right: 0; background: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 64px; }
  .shell { width: calc(100% - 40px); }

  /* Hero: static on phones (no scroll-driven animation) */
  .hero-scroll { height: auto; }
  .hero { position: relative; height: auto; min-height: 0; padding: 112px 20px 72px; align-items: start; }
  .hero::after, .star-map, .scroll-note, .orbit-two { display: none; }
  .orbit-one { width: 320px; height: 320px; right: -170px; top: 120px; transform: rotate(-24deg); }
  .hero-copy { max-width: 100%; margin: 0; }
  .hero .eyebrow { font-size: 10px; line-height: 1.7; }
  .name-title { font-size: clamp(54px, 15.5vw, 80px); margin: 16px 0 18px; }
  .hero-line { font-size: 26px; margin-bottom: 16px; }
  .intro { font-size: 16px; margin-bottom: 26px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  /* Sections */
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 28px; gap: 12px; }
  .section-heading h2, .about h2, .contact h2 { font-size: clamp(34px, 10vw, 44px); }
  .section-note { font-size: 15px; max-width: none; }

  /* About */
  .about h2 { margin-bottom: 0; }
  .about-grid { gap: 28px; margin-top: 12px; }
  .about-orbit-card { display: none; }
  .about-copy { padding-left: 0; border-left: 0; }
  .about-copy p { font-size: 16px; }
  .about-copy .label { margin-bottom: 14px; }
  .interest-list { margin-bottom: 24px; }
  .fact-row { font-size: 13px; }

  /* Projects */
  .project-grid { gap: 20px; }
  .project-visual { height: 150px; }
  .project-body { padding: 20px 18px 22px; }
  .project h3 { font-size: 24px; }
  .project p { font-size: 15px; }

  /* Lab */
  .lab-item { padding: 24px 0; gap: 6px; }
  .lab-item h3 { font-size: 21px; }
  .lab-item .label { margin-bottom: 10px; }
  .lab-figure { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }
  .lab-figure strong { font-size: 19px; display: inline; margin-right: 8px; }
  .lab-figure span { font-size: 10px; }

  /* Skills */
  .skill-grid { grid-template-columns: 1fr; gap: 14px; }
  .skill-card { padding: 18px 18px 14px; display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; }
  .skill-card .icon { width: 26px; height: 26px; margin: 0; }
  .skill-card h3 { font-size: 20px; margin: 0; }
  .skill-card ul { grid-column: 1 / -1; margin-top: 12px; }
  .skill-card li { padding: 6px 0; }

  /* Education & experience */
  .timeline { gap: 36px; }
  .entry { padding-bottom: 28px; padding-left: 22px; }
  .entry h4 { font-size: 21px; }

  /* Contact & footer */
  .contact { padding: 72px 0; }
  .contact-inner { gap: 32px; }
  .contact-note { font-size: 16px; margin-bottom: 24px; }
  .contact-actions .btn { flex: 1 1 auto; justify-content: center; }
  .contact-list a { font-size: 14px; }
  footer { flex-direction: column; align-items: start; gap: 10px; padding: 24px 20px; }
}

@media (min-width: 520px) and (max-width: 760px) {
  .skill-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll { height: auto; }
  .hero { position: relative; }
  .name-title, .star-map { transform: none !important; }
  .star { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .shooting-star, .shooting-trail { display: none !important; }
}
