
:root {
  --bg: #05080d;
  --bg-2: #070c12;
  --panel: #091019;
  --panel-2: #0c131d;
  --line: rgba(255,255,255,.095);
  --line-soft: rgba(255,255,255,.055);
  --text: #f1efe9;
  --muted: #969ca6;
  --dim: #68707b;
  --accent: #9885ff;
  --accent-2: #6b84ff;
  --gold: #d4aa62;
  --rail: 98px;
  --max: 1120px;
  --ease: cubic-bezier(.2,.75,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); color-scheme: dark; }
body { margin: 0; background: radial-gradient(circle at 80% 2%, rgba(34,70,112,.09), transparent 28rem), var(--bg); color: var(--text); font-family: Manrope, system-ui, sans-serif; line-height: 1.5; overflow-x: hidden; }
button, a { color: inherit; touch-action: manipulation; }
a { text-decoration: none; }
button { font: inherit; }
.serif { font-family: Newsreader, Georgia, serif; }
.mono { font-family: 'IBM Plex Mono', monospace; }
::selection { background: var(--accent); color: #080a0d; }

.noise { position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.scroll-progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; z-index: 110; background: linear-gradient(90deg,var(--accent),var(--gold)); box-shadow: 0 0 14px rgba(152,133,255,.45); }

.side-rail { position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 60; border-right: 1px solid var(--line); background: rgba(5,8,13,.9); backdrop-filter: blur(15px); }
.rail-brand { position: absolute; left: 24px; top: 19px; padding: 0; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.rail-track { position: absolute; left: 28px; top: 69px; bottom: 58px; width: 1px; background: var(--line); }
.rail-nav { position: absolute; top: 77px; left: 0; width: 100%; display: grid; gap: 49px; }
.rail-link { position: relative; display: flex; align-items: center; width: 100%; height: 26px; padding: 0; border: 0; background: transparent; color: var(--dim); cursor: pointer; text-align: left; }
.rail-link i { position: absolute; left: 24px; width: 8px; height: 8px; border: 1px solid #6c7179; border-radius: 50%; background: var(--bg); transition: border-color .25s ease, background .25s ease, box-shadow .25s ease, color .25s ease; }
.rail-link span { margin-left: 43px; font-size: 8px; line-height: 1.15; letter-spacing: .04em; }
.rail-link b { display: block; color: #6b7079; font-weight: 400; margin-bottom: 5px; }
.rail-link.active, .rail-link:hover { color: var(--text); }
.rail-link.active i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 10px rgba(152,133,255,.55); }
.rail-status { position: absolute; left: 23px; bottom: 25px; width: 13px; height: 13px; border: 1px dashed var(--gold); border-radius: 50%; }
.rail-status span { position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

.site-shell { margin-left: var(--rail); }
.section-block { min-height: 390px; padding: 52px max(5vw, 54px); border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }
[data-parallax] { will-change: transform; }

.hero { min-height: min(78vh, 610px); position: relative; display: flex; align-items: center; overflow: hidden; padding-top: 70px; }
.hero-copy { position: relative; z-index: 4; width: min(460px, 52%); margin-left: 6.5vw; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .14em; margin-bottom: 20px; }
.hero h1 { font-size: clamp(62px, 7vw, 96px); font-weight: 400; letter-spacing: -.045em; line-height: .88; margin: 0 0 26px; }
.hero-role { color: #a8adb5; font-size: 10px; line-height: 1.7; letter-spacing: .015em; margin: 0 0 15px; max-width: 425px; }
.hero-tagline { max-width: 430px; color: #c2c5ca; font-size: 16px; line-height: 1.65; margin: 0 0 29px; }
.cta { display: inline-flex; align-items: center; gap: 30px; min-height: 42px; padding: 0 19px; border: 1px solid rgba(255,255,255,.2); background: rgba(5,8,13,.25); font-size: 9px; letter-spacing: .08em; cursor: pointer; transition: transform .25s var(--ease), border-color .25s ease, color .25s ease, box-shadow .25s ease, background .25s ease; }
.cta:hover { border-color: rgba(152,133,255,.6); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.cta span { font-size: 15px; transition: transform .25s ease; }
.cta:hover span { transform: translateX(4px); }
.hero-visual { position: absolute; z-index: 1; right: -1%; top: 4%; width: 63%; height: 93%; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: left center; opacity: .98; mix-blend-mode: screen; filter: saturate(.86) contrast(1.04); }
.hero-visual::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg,var(--bg) 0%, rgba(5,8,13,.55) 16%, transparent 42%), linear-gradient(0deg,var(--bg) 0%, transparent 18%); pointer-events: none; }
.hero-glow { position: absolute; inset: 10% 8% 10% 17%; border-radius: 50%; filter: blur(36px); background: radial-gradient(circle,rgba(80,136,210,.14),transparent 62%); }
.orbit { position: absolute; border: 1px solid rgba(212,170,98,.25); border-radius: 50%; pointer-events: none; }
.orbit-a { width: 44%; height: 24%; left: 37%; top: 25%; transform: rotate(17deg); animation: drift 8s ease-in-out infinite; }
.orbit-b { width: 35%; height: 20%; left: 49%; top: 52%; transform: rotate(-18deg); animation: drift 10s -3s ease-in-out infinite reverse; }
.orbit-dot { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.dot-a { left: 66%; top: 31%; } .dot-b { left: 78%; top: 54%; }
@keyframes drift { 50% { transform: translateY(-8px) rotate(20deg); } }
.scroll-cue { position: absolute; z-index: 5; left: 50%; bottom: 24px; display: grid; place-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #858b94; font-size: 8px; letter-spacing: .09em; cursor: pointer; }
.mouse { width: 16px; height: 25px; border: 1px solid #d5d7db; border-radius: 9px; position: relative; }
.mouse i { position: absolute; width: 2px; height: 5px; left: 6px; top: 4px; background: var(--accent); border-radius: 2px; animation: wheel 1.5s infinite; }
@keyframes wheel { 50% { transform: translateY(7px); opacity: .3; } }

.section-header { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px; margin-bottom: 25px; }
.section-header > div { grid-column: 1 / -1; display: flex; align-items: center; gap: 28px; }
.section-index { color: #7c828b; font-size: 10px; }
.section-label { color: var(--accent); font-size: 9px; letter-spacing: .13em; }
.section-header h2 { margin: 3px 0 0; font-size: clamp(34px,4vw,54px); line-height: 1; font-weight: 400; letter-spacing: -.025em; }
.header-link { font-size: 9px; letter-spacing: .07em; color: #ddd; align-self: center; }
.header-link span { margin-left: 18px; }

.projects-section { padding-top: 42px; padding-bottom: 52px; }
.project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; max-width: 1000px; }
.project-card { position: relative; min-height: 255px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: linear-gradient(120deg,#081019 0%,#09101a 46%,#070a0e 100%); transition: transform .35s var(--ease), border-color .3s ease, box-shadow .3s ease; transform-style: preserve-3d; }
.project-card:hover { transform: translateY(-5px); border-color: rgba(152,133,255,.3); box-shadow: 0 22px 55px rgba(0,0,0,.24); }
.project-card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg,rgba(5,8,13,.98) 0%,rgba(5,8,13,.85) 45%,rgba(5,8,13,.1) 74%); }
.card-num { position: absolute; z-index: 4; left: 18px; top: 17px; color: #a5a9b0; font-size: 9px; }
.project-copy { position: absolute; z-index: 5; left: 19px; bottom: 20px; max-width: 57%; }
.project-copy h3 { font-size: 25px; font-weight: 400; line-height: 1.08; margin: 0 0 12px; }
.project-copy p { color: #b6bac1; font-size: 11px; line-height: 1.65; margin: 0 0 13px; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 16px; }
.tech-stack span { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(154,160,173,.18); border-radius: 999px; background: rgba(255,255,255,.025); color: #8f96a0; font-size: 7px; letter-spacing: .08em; line-height: 1; }
.project-card:hover .tech-stack span { border-color: rgba(152,133,255,.28); color: #b8b2df; }
.card-link { font-size: 9px; letter-spacing: .08em; color: #f2f2f2; }
.card-link b { margin-left: 22px; font-size: 14px; font-weight: 400; }
.project-art { position: absolute; z-index: 1; right: 0; top: 0; width: 55%; height: 100%; object-fit: cover; opacity: .94; transition: transform .65s var(--ease), filter .5s ease; }
.project-card:hover .project-art { transform: scale(1.035); filter: brightness(1.08); }
.globe-art { object-position: 74% center; }
.history-art { width: 58%; object-position: center; }

/* France Histoire uses a cleaner split so copy never sits on top of the painting. */
.history-card .project-copy { max-width: 44%; }
.history-card .project-art { width: 50%; }
.history-card::after {
  z-index: 2;
  background: linear-gradient(90deg,
    rgba(5,8,13,.99) 0%,
    rgba(5,8,13,.99) 43%,
    rgba(5,8,13,.93) 47%,
    rgba(5,8,13,.48) 52%,
    rgba(5,8,13,.08) 58%,
    rgba(5,8,13,0) 66%
  );
}
.history-card::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.09) 18%, rgba(255,255,255,.09) 82%, transparent);
  pointer-events: none;
}

.research-section { padding-top: 39px; padding-bottom: 43px; }
.research-row { min-height: 78px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto auto auto; gap: 18px; align-items: center; padding: 15px 20px; border: 1px solid var(--line-soft); border-radius: 7px; background: linear-gradient(90deg,#091019,#080d14); }
.paper-icon { width: 25px; height: 31px; border: 1px solid #dadde1; position: relative; }
.paper-icon::after { content: ''; position: absolute; right: -1px; top: -1px; width: 9px; height: 9px; border-left: 1px solid #dadde1; border-bottom: 1px solid #dadde1; background: var(--panel); }
.paper-icon span { position: absolute; left: 5px; right: 5px; bottom: 7px; height: 1px; background: #a9adb4; box-shadow: 0 -5px 0 #a9adb4; }
.paper-main h3 { margin: 0 0 6px; font-size: 18px; font-weight: 400; line-height: 1.2; }
.paper-main p { margin: 0; color: #858b94; font-size: 9px; }
.paper-tech { margin: 8px 0 0; }
.paper-tech span { color: #a69ed3; border-color: rgba(152,133,255,.2); background: rgba(152,133,255,.035); }
.paper-action { border: 0; background: transparent; color: #d8d9dd; font-size: 9px; letter-spacing: .08em; cursor: pointer; padding: 8px; }
.paper-action:hover { color: var(--accent); }
.paper-detail { max-height: 0; overflow: hidden; transition: max-height .45s var(--ease), padding .45s var(--ease); padding: 0 20px 0 80px; color: #9ca1aa; }
.paper-detail.open { max-height: 180px; padding-top: 17px; }
.paper-detail p { max-width: 760px; margin: 0; font-family: Newsreader,Georgia,serif; font-size: 16px; line-height: 1.6; }

.cv-section { padding-top: 39px; padding-bottom: 48px; }
.cv-panel { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 28px; padding: 23px 25px; border: 1px solid var(--line); border-radius: 7px; background: linear-gradient(90deg,#091019,#090e15); }
.cv-column { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.cv-icon { color: #aeb3bb; font-size: 21px; }
.cv-column h3, .skills-column h3 { color: #a7abb3; font-size: 12px; font-weight: 400; margin: 0 0 8px; }
.cv-column strong { display: block; font-size: 15px; font-weight: 400; margin: 0 0 3px; }
.cv-column p { color: #a3a8b1; font-size: 10px; line-height: 1.55; margin: 0 0 9px; }
.cv-column p span { color: #707780; }
.skills-column { min-width: 0; }
.skills-list { display: flex; flex-wrap: wrap; gap: 7px; }
.skills-list span { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid #252d38; border-radius: 999px; background: rgba(255,255,255,.018); color: #aab0b8; font-size: 8px; letter-spacing: .05em; }

.contact-section { min-height: 205px; position: relative; display: flex; align-items: center; overflow: hidden; padding: 34px max(5vw,54px); border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#07101a 0%,#081019 48%,#05080d 100%); }
.contact-copy { position: relative; z-index: 4; width: 42%; }
.contact-copy > div { display: flex; gap: 28px; margin-bottom: 9px; }
.contact-copy h2 { font-size: 39px; font-weight: 400; margin: 0 0 12px; }
.contact-copy p { max-width: 340px; margin: 0 0 18px; color: #aeb3ba; font-size: 12px; line-height: 1.6; }
.contact-details { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; margin: 0 0 18px; font-size: 9px; letter-spacing: .035em; color: #c2c6cd; }
.contact-details a { transition: color .2s ease; }
.contact-details a:hover { color: var(--accent); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.cta-secondary { background: rgba(255,255,255,.025); }
.skyline { position: absolute; right: 0; bottom: 0; width: 65%; height: 100%; }
.skyline img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.skyline::before { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg,#07101a 0%,rgba(7,16,26,.64) 24%,transparent 55%), linear-gradient(0deg,rgba(5,8,13,.2),transparent 50%); }

.footer { min-height: 48px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 0 max(5vw,54px); color: #777e88; font-size: 8px; }
.footer .city { text-align: center; }
.footer > span:last-child { text-align: right; }
.footer i { display: inline-block; width: 5px; height: 5px; margin: 0 10px; background: #5dd89e; border-radius: 50%; box-shadow: 0 0 7px rgba(93,216,158,.55); }

.mobile-menu, .mobile-panel { display: none; }

@media (max-width: 900px) {
  :root { --rail: 72px; }
  .rail-link span { display: none; }
  .rail-track { left: 28px; }
  .hero-copy { margin-left: 3vw; width: 57%; }
  .hero-visual { width: 67%; right: -15%; }
  .project-copy { max-width: 65%; }
  .project-art { opacity: .75; }
  .history-card .project-copy { max-width: 46%; }
  .history-card .project-art { width: 50%; opacity: .9; }
  .cv-panel { grid-template-columns: 1fr 1fr; }
  .skills-column { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --rail: 0px; }
  .side-rail { display: none; }
  .site-shell { margin-left: 0; }
  .mobile-menu { position: fixed; display: grid; z-index: 90; right: 18px; top: 17px; width: 42px; height: 42px; place-content: center; gap: 4px; border: 1px solid var(--line); background: rgba(5,8,13,.82); backdrop-filter: blur(12px); }
  .mobile-menu span { width: 17px; height: 1px; background: #e9e9e9; }
  .mobile-panel { position: fixed; z-index: 80; display: grid; inset: 0; align-content: center; gap: 0; padding: 70px 30px; background: rgba(5,8,13,.96); backdrop-filter: blur(18px); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .mobile-panel.open { opacity: 1; pointer-events: auto; }
  .mobile-panel button { padding: 18px 0; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: #ddd; font-family: 'IBM Plex Mono',monospace; font-size: 12px; }
  .hero { min-height: 760px; align-items: flex-start; padding: 108px 24px 80px; }
  .hero-copy { width: 100%; margin: 0; }
  .hero h1 { font-size: clamp(58px,18vw,84px); }
  .hero-role { max-width: 310px; }
  .hero-tagline { max-width: 330px; font-size: 15px; }
  .hero-visual { width: 110%; height: 54%; right: -33%; top: 42%; opacity: .8; }
  .scroll-cue { left: 24px; bottom: 27px; display: flex; }
  .section-block { padding: 48px 20px; }
  .section-header { grid-template-columns: 1fr; }
  .header-link { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 260px; }
  .history-card .project-copy { max-width: 58%; }
  .history-card .project-art { width: 54%; opacity: .64; }
  .history-card::before { display: none; }
  .history-card::after { background: linear-gradient(90deg,rgba(5,8,13,.99) 0%,rgba(5,8,13,.94) 50%,rgba(5,8,13,.48) 70%,rgba(5,8,13,.08) 100%); }
  .research-row { grid-template-columns: 34px 1fr; gap: 12px; }
  .paper-action { grid-row: 2; }
  .paper-action:nth-of-type(1) { grid-column: 2; justify-self: start; padding-left: 0; }
  .paper-action:nth-of-type(2) { display: none; }
  .paper-action:nth-of-type(3) { display: none; }
  .paper-detail { padding-left: 20px; }
  .cv-panel { grid-template-columns: 1fr; }
  .skills-column { grid-column: auto; }
  .contact-section { min-height: 330px; align-items: flex-start; padding: 45px 20px; }
  .contact-copy { width: 100%; }
  .contact-details { font-size: 10px; }
  .contact-actions { gap: 8px; }
  .skyline { width: 100%; height: 48%; opacity: .68; }
  .skyline::before { background: linear-gradient(0deg,transparent,#07101a 98%); }
  .footer { grid-template-columns: 1fr; gap: 8px; padding: 18px 20px; }
  .footer .city, .footer > span:last-child { text-align: left; }
}

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


/* ===== 2026 cinematic motion/design pass ===== */
:root {
  --page-pad: max(5vw, 54px);
  --spot-x: 50%;
  --spot-y: 50%;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  left: calc(var(--rail) + 18px);
  top: 12px;
  z-index: 200;
  padding: 9px 12px;
  border: 1px solid rgba(152,133,255,.45);
  background: #0b1018;
  color: #fff;
  font-size: 9px;
  letter-spacing: .08em;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible {
  outline: 1px solid rgba(174,160,255,.95);
  outline-offset: 4px;
}

.rail-track { overflow: hidden; }
.rail-progress {
  position: absolute;
  inset: 0 0 auto 0;
  width: 1px;
  height: 0;
  background: linear-gradient(to bottom, var(--accent), var(--gold));
  box-shadow: 0 0 10px rgba(152,133,255,.4);
  will-change: height;
}

.site-shell { position: relative; isolation: isolate; }
.site-shell::before {
  content: '';
  position: fixed;
  inset: 0 0 0 var(--rail);
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 5%, rgba(95,91,196,.08), transparent 28rem),
    radial-gradient(circle at 42% 68%, rgba(44,92,132,.045), transparent 34rem);
}

.section-block {
  position: relative;
  overflow: hidden;
  padding-block: clamp(72px, 8vw, 116px);
}
.section-block::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.012), transparent 32%, rgba(152,133,255,.012) 76%, transparent);
  opacity: .75;
}
.section-header h2,
.hero h1,
.contact-copy h2 { text-wrap: balance; }
.hero-tagline,
.project-copy p,
.contact-copy p { text-wrap: pretty; }

.hero {
  min-height: min(92vh, 760px);
  padding-top: clamp(86px, 11vh, 118px);
  padding-bottom: 84px;
}
.hero-copy { width: min(535px, 53%); margin-left: clamp(22px, 6.5vw, 96px); }
.eyebrow { margin-bottom: 24px; opacity: .88; }
.hero h1 {
  opacity: 1;
  visibility: visible;
  font-size: clamp(70px, 8.2vw, 118px);
  max-width: 760px;
  line-height: .82;
  letter-spacing: -.055em;
  margin-bottom: 30px;
  will-change: transform, opacity;
}
.hero-role { max-width: 500px; font-size: 10px; }
.hero-tagline { max-width: 500px; font-size: clamp(16px,1.55vw,20px); line-height: 1.58; }
.hero-tagline .word,
.contact-copy p .word { display: inline-block; will-change: opacity, transform; }
.hero-visual { right: -4%; top: 0; width: 67%; height: 100%; will-change: transform, opacity; }
.hero-visual img { transform: scale(1.015); }
.hero-grid {
  position: absolute;
  inset: 9% 3% 8% 16%;
  z-index: -1;
  opacity: .25;
  background-image:
    linear-gradient(rgba(139,148,168,.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,148,168,.14) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 58% 50%, black 5%, rgba(0,0,0,.8) 42%, transparent 73%);
  transform: perspective(500px) rotateX(56deg) translateY(21%);
  transform-origin: center bottom;
}
.hero::after {
  content: '';
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(152,133,255,.36) 40%, rgba(212,170,98,.16) 70%, transparent);
  transform: scaleX(.86);
  opacity: .75;
}
.hero .cta { backdrop-filter: blur(12px); }

.cta {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  padding-inline: 20px;
  backdrop-filter: blur(10px);
  transition: transform .25s var(--ease), border-color .25s ease, color .25s ease, box-shadow .25s ease, background .25s ease;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.1) 48%, transparent 74%);
  transform: translateX(-130%);
  transition: transform .65s var(--ease);
}
.cta:hover::before { transform: translateX(130%); }
.cta:hover { background: rgba(152,133,255,.055); }

.section-header { margin-bottom: clamp(34px, 4vw, 52px); }
.section-header > div { gap: 22px; }
.section-header h2 { font-size: clamp(44px,5.5vw,68px); letter-spacing: -.04em; }
.section-index { opacity: .72; }
.section-label { opacity: .85; }

.projects-section { min-height: 82vh; padding-top: clamp(76px,9vw,120px); padding-bottom: clamp(86px,10vw,130px); }
.project-grid {
  grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr);
  gap: 20px;
  max-width: none;
}
.project-card {
  min-height: clamp(330px, 34vw, 405px);
  border-radius: 10px;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(126,114,255,.09), transparent 30%),
    linear-gradient(120deg,#081019 0%,#09101a 46%,#070a0e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
  will-change: transform, opacity;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(circle 190px at var(--spot-x) var(--spot-y), rgba(167,151,255,.1), transparent 72%);
  transition: opacity .3s ease;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover { border-color: rgba(152,133,255,.38); box-shadow: 0 28px 78px rgba(0,0,0,.32), 0 0 0 1px rgba(152,133,255,.04); }
.project-copy { left: 24px; bottom: 26px; max-width: 51%; }
.project-copy h3 { font-size: clamp(27px,2.5vw,36px); margin-bottom: 14px; }
.project-copy p { font-size: 11px; max-width: 330px; line-height: 1.72; }
.project-art {
  width: 58%;
  transition: transform .7s var(--ease), filter .5s ease, opacity .3s ease;
  will-change: transform;
}
.project-card:hover .project-art { filter: brightness(1.08) contrast(1.02); }
.globe-art { object-position: 69% center; }
.history-card .project-copy { max-width: 43%; }
.history-card .project-art { width: 54%; }
.history-card::before { z-index: 7; }
.history-card::after {
  background: linear-gradient(90deg,rgba(5,8,13,.995) 0%,rgba(5,8,13,.995) 42%,rgba(5,8,13,.94) 47%,rgba(5,8,13,.46) 53%,rgba(5,8,13,.04) 62%,transparent 72%);
}
.card-num { left: 24px; top: 22px; }
.card-link b { transition: transform .28s var(--ease); display: inline-block; }
.project-card:hover .card-link b { transform: translateX(7px); }
.tech-stack span { backdrop-filter: blur(6px); }

.research-section { min-height: 58vh; padding-top: clamp(70px,8vw,100px); padding-bottom: clamp(70px,8vw,100px); }
.research-row {
  min-height: 104px;
  border-radius: 10px;
  padding: 20px 24px;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(152,133,255,.075), transparent 28%),
    linear-gradient(90deg,#091019,#080d14);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.research-row:hover { border-color: rgba(152,133,255,.25); box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.paper-main h3 { font-size: clamp(18px,2vw,24px); }
.paper-action { position: relative; }
.paper-action::after { content:''; position:absolute; left:8px; right:8px; bottom:2px; height:1px; background:var(--accent); transform:scaleX(0); transform-origin:left; transition:transform .24s ease; }
.paper-action:hover::after, .paper-action:focus-visible::after { transform:scaleX(1); }
.paper-detail p { font-size: 18px; }

.cv-section { min-height: 66vh; padding-top: clamp(70px,8vw,100px); padding-bottom: clamp(72px,8vw,105px); }
.cv-panel {
  gap: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #080d14;
}
.cv-column, .skills-column { padding: 27px 28px; }
.cv-column + .cv-column, .skills-column { border-left: 1px solid var(--line-soft); }
.cv-column { grid-template-columns: 32px 1fr; }
.cv-icon { color: #a89df1; opacity: .78; }
.cv-column h3, .skills-column h3 { font-size: 11px; letter-spacing: .03em; }
.cv-column strong { font-size: 18px; }
.cv-column p { font-size: 10px; }
.skills-list { gap: 8px; }
.skills-list span {
  min-height: 28px;
  padding-inline: 11px;
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.025);
  transition: transform .22s var(--ease), border-color .22s ease, color .22s ease, background .22s ease;
}
.skills-list span:hover { transform: translateY(-2px); border-color: rgba(152,133,255,.32); color: #ddd8ff; background: rgba(152,133,255,.055); }

.contact-section {
  min-height: 360px;
  padding: 62px var(--page-pad);
  background: linear-gradient(90deg,#07101a 0%,#081019 48%,#05080d 100%);
}
.contact-copy { width: min(48%,520px); }
.contact-copy h2 { font-size: clamp(50px,6vw,78px); letter-spacing: -.045em; }
.contact-copy p { max-width: 420px; font-size: 13px; }
.skyline { width: 69%; height: 110%; bottom: -5%; will-change: transform, opacity; }
.skyline img { transform: scale(1.02); }
.skyline::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 67% 50%, rgba(212,170,98,.06), transparent 36%);
}

@media (max-width: 900px) {
  .hero { min-height: 720px; }
  .hero-copy { width: 58%; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 360px; }
  .history-card .project-copy { max-width: 45%; }
  .cv-column + .cv-column, .skills-column { border-left: 0; }
  .skills-column { border-top: 1px solid var(--line-soft); }
}

@media (max-width: 680px) {
  :root { --page-pad: 20px; }
  .skip-link { left: 12px; }
  .hero { min-height: 820px; padding-top: 112px; }
  .hero h1 { font-size: clamp(62px,19vw,86px); }
  .hero-visual { top: 44%; height: 51%; width: 118%; right: -43%; }
  .hero-grid { opacity: .14; }
  .section-block { padding-block: 72px; }
  .section-header h2 { font-size: clamp(42px,12vw,58px); }
  .project-card { min-height: 330px; }
  .project-copy { max-width: 62%; left: 20px; bottom: 22px; }
  .project-copy h3 { font-size: 28px; }
  .project-art { width: 57%; opacity: .68; }
  .history-card .project-copy { max-width: 58%; }
  .history-card .project-art { width: 56%; opacity: .62; }
  .research-row { min-height: 120px; }
  .cv-column, .skills-column { padding: 24px 21px; }
  .contact-section { min-height: 420px; padding-top: 60px; }
  .contact-copy { width: 100%; }
  .contact-copy h2 { font-size: 56px; }
  .skyline { height: 48%; width: 100%; bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1,
  .hero-visual,
  .project-card,
  .skyline,
  .hero-tagline .word,
  .contact-copy p .word { transform: none !important; opacity: 1 !important; }
}

/* Pointer perspective sits on the card while scroll motion stays on inner media. */
.project-card {
  --rx: 0deg;
  --ry: 0deg;
  transform: perspective(1200px) rotateX(var(--rx)) rotateY(var(--ry));
}
.project-card:hover {
  transform: perspective(1200px) translateY(-5px) rotateX(var(--rx)) rotateY(var(--ry));
}

/* Education metadata */
.gpa-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid rgba(152,133,255,.28);
  border-radius: 999px;
  color: #c8c0ff;
  font-size: 7px;
  letter-spacing: .06em;
  vertical-align: 2px;
  white-space: nowrap;
}

/* Space stacked research entries without breaking the expandable abstract flow. */
.paper-detail + .research-row { margin-top: 14px; }

/* ============================================================
   CASE STUDY SYSTEM — fast-scannable proof of work
   ============================================================ */
.case-study-intro {
  max-width: 820px;
  margin: 0 0 18px;
  color: #c6c9cf;
  font-family: Newsreader, Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
}
.case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 930px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 6px;
  background: rgba(255,255,255,.07);
}
.case-item {
  min-height: 118px;
  padding: 16px 17px 17px;
  background: rgba(8,12,19,.96);
}
.case-label {
  display: block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: .12em;
}
.case-item p {
  margin: 0;
  color: #aeb3bb;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 10px;
  line-height: 1.62;
}
.paper-detail.open {
  max-height: 620px;
  padding-top: 20px;
  padding-bottom: 24px;
}

.project-card {
  min-height: 410px;
}
.project-copy {
  top: 62px;
  bottom: auto;
  max-width: 52%;
}
.history-card .project-copy { max-width: 47%; }
.project-copy > p { margin-bottom: 17px; }
.project-case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px 17px;
  max-width: 470px;
  margin: 0 0 22px;
}
.project-case-grid > div {
  min-width: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255,255,255,.09);
}
.project-case-grid .case-label { margin-bottom: 5px; }
.project-case-grid b {
  display: block;
  color: #aeb3bb;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
}
.project-card .card-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 980px) {
  .case-study-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .project-card { min-height: 430px; }
  .project-copy, .history-card .project-copy { max-width: 58%; }
  .project-case-grid { grid-template-columns: 1fr; gap: 9px; max-width: 370px; }
  .project-case-grid > div:nth-child(2),
  .project-case-grid > div:nth-child(4) { display: none; }
}

@media (max-width: 700px) {
  .case-study-grid { grid-template-columns: 1fr; }
  .case-item { min-height: auto; }
  .paper-detail.open { max-height: 1100px; }
  .project-card { min-height: 390px; }
  .project-copy, .history-card .project-copy { top: 48px; max-width: 68%; }
  .project-case-grid > div:nth-child(3) { display: block; }
}


/* ===== Project card cleanup ===== */
.projects-section .project-card {
  min-height: 315px;
}
.projects-section .project-copy {
  top: auto;
  bottom: 24px;
  left: 24px;
  max-width: 48%;
}
.projects-section .project-copy h3 {
  margin-bottom: 13px;
  font-size: clamp(27px, 2.2vw, 34px);
}
.projects-section .project-copy > p {
  max-width: 360px;
  margin: 0 0 17px;
  color: #b3b8c0;
  font-size: 11px;
  line-height: 1.7;
}
.projects-section .tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
}
.projects-section .tech-stack span {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 8px;
  border: 1px solid rgba(154,160,173,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: #959ca6;
  font-size: 7px;
  letter-spacing: .08em;
}
.projects-section .project-card::after {
  background: linear-gradient(90deg, rgba(5,8,13,.99) 0%, rgba(5,8,13,.94) 38%, rgba(5,8,13,.68) 50%, rgba(5,8,13,.12) 70%, transparent 100%);
}
.projects-section .history-card .project-copy {
  max-width: 43%;
}
.projects-section .history-card .project-art {
  width: 50%;
}
.projects-section .history-card::after {
  background: linear-gradient(90deg, rgba(5,8,13,.99) 0%, rgba(5,8,13,.99) 40%, rgba(5,8,13,.83) 47%, rgba(5,8,13,.24) 57%, transparent 68%);
}
.projects-section .history-card::before {
  left: 50%;
}
@media (max-width: 980px) {
  .projects-section .project-card { min-height: 340px; }
  .projects-section .project-copy,
  .projects-section .history-card .project-copy { max-width: 55%; }
}
@media (max-width: 700px) {
  .projects-section .project-card { min-height: 390px; }
  .projects-section .project-copy,
  .projects-section .history-card .project-copy {
    top: auto;
    bottom: 22px;
    max-width: 68%;
  }
  .projects-section .project-art { opacity: .58; }
}
