/* ===================================================================
   Saerom (Ronnie) Lee — Personal Academic Website
   =================================================================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 1rem; scroll-behavior: auto; scrollbar-width: none; -ms-overflow-style: none; }
@media screen and (min-width: 1441px) { html { font-size: calc(0.625rem + 0.4167vw); } }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background-color: unset; padding: unset; text-align: inherit; cursor: pointer; border: none; color: inherit; font: inherit; }
address { font-style: normal; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; line-height: inherit; font-weight: inherit; }
svg { display: block; }
section, header, footer { position: relative; }

/* Hide scrollbar (Chrome/Safari) */
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

/* Lenis smooth scroll */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* --- Design Tokens --- */
:root, [data-theme="light"] {
  /* Colors */
  --bg: #F5F5F3;
  --text: #1A1A1A;
  --text-faded: rgba(26, 26, 26, 0.65);
  --border: rgba(26, 26, 26, 0.1);
  --overlay-bg: rgba(245, 245, 243, 0.98);
  --link-bg: rgba(26, 26, 26, 0.06);
  --accent: #1A1A1A;
  --selection-bg: #1A1A1A;
  --selection-text: #F5F5F3;
  --bg-alt: #EFEFED;

  /* Typography */
  --font: 'JetBrains Mono', monospace;
  --text-base: 1rem;
  --text-sm: 0.9375rem;
  --text-xs: 0.8125rem;
  --text-xxs: 0.6875rem;
  --line-height: 1.6;

  /* Spacing */
  --pad: clamp(1rem, 0.714rem + 1.43vw, 2rem);
  --space-section: clamp(6rem, 4rem + 8vw, 14rem);
  --space-block: clamp(4rem, 3rem + 4vw, 8rem);
  --space-group: clamp(3rem, 2rem + 3vw, 6rem);
  --space-sub: clamp(1.5rem, 1rem + 1vw, 2.5rem);
  --space-item: clamp(1.25rem, 1rem + 0.5vw, 2rem);

  /* Transitions */
  --dur-fast: 0.2s;
  --dur-base: 0.25s;
  --dur-mid: 0.3s;
  --dur-slow: 0.5s;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111111;
  --text: #E8E8E8;
  --text-faded: rgba(232, 232, 232, 0.65);
  --border: rgba(232, 232, 232, 0.1);
  --overlay-bg: rgba(17, 17, 17, 0.98);
  --link-bg: rgba(232, 232, 232, 0.08);
  --accent: #6BA3D6;
  --selection-bg: #E8E8E8;
  --selection-text: #111;
  --bg-alt: #191919;
}

::selection { background: var(--selection-bg); color: var(--selection-text); }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--dur-slow) ease, color var(--dur-slow) ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  animation: page-enter 0.4s ease 0.1s forwards;
}
@keyframes page-enter { to { opacity: 1; } }

/* View Transition for theme toggle */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
  animation-timing-function: ease;
}

/* --- Utilities --- */
.skip-link { position: absolute; top: -100%; left: var(--pad); padding: 0.5rem 1rem; background: var(--text); color: var(--bg); z-index: 1000; font-size: var(--text-xxs); }
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pad { padding-left: var(--pad); padding-right: var(--pad); }

/* Grain texture overlay */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Animation-hidden elements */
[data-text-split], [data-fade-up], [data-fade-in], [data-line-animate] { visibility: hidden; }
[data-letters-slide-up] .line { overflow: hidden; }
[data-lines-slide-up] { overflow: hidden; }

/* Gradient overlay — visible only with sticky nav */
.gradient-top {
  position: fixed; top: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 60%, transparent 100%);
  pointer-events: none; z-index: 90;
  opacity: 0;
  transition: opacity var(--dur-mid) ease;
}
.nav-header.visible ~ .gradient-top { opacity: 1; }

/* Line break — animated from width 0, with endpoint dot after draw */
.line-break { width: 100%; height: 1px; background: var(--border); position: relative; overflow: visible; transform-origin: left; }
.line-break::after {
  content: ''; position: absolute; right: -3.5px; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  opacity: 0; transform: scale(0);
  transition: opacity var(--dur-mid) ease, transform var(--dur-mid) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.line-break.is-drawn::after { opacity: 1; transform: scale(1); }

/* Shared button */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 1rem 2.5rem; border: 1px solid var(--text);
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease, box-shadow var(--dur-base) ease;
}
.btn:hover { background: var(--text); color: var(--bg); box-shadow: 0 0 24px rgba(26, 26, 26, 0.15); }
[data-theme="dark"] .btn:hover { box-shadow: 0 0 24px rgba(107, 163, 214, 0.25); }

/* ===================================================================
   NAV — compact sticky bar (hidden until scroll past hero)
   =================================================================== */
.nav-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-mid) ease;
}
.nav-header.visible { opacity: 1; pointer-events: auto; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem; padding: 0 var(--pad);
}

.nav__col-1 { display: flex; flex-direction: column; }
.nav__home {
  font-size: var(--text-sm); font-weight: 500;
}
.nav__sub { font-size: var(--text-xs); color: var(--text-faded); }

.nav__menu { display: flex; gap: 0.25rem; }
.nav__link {
  display: flex; align-items: center; gap: 0.3rem;
  font-size: var(--text-xs); font-weight: 400; color: var(--text-faded);
  padding: 0.35rem 0.75rem; position: relative; overflow: hidden;
  border-radius: 3px; transition: color var(--dur-base) ease;
}
.nav__link:hover, .nav__link.active { color: var(--text); }
@keyframes nav-pulse { 0%{transform:scale(1)} 50%{transform:scale(1.06)} 100%{transform:scale(1)} }
.nav__link.just-activated { animation: nav-pulse 0.35s ease; }
.nav__link-num { font-size: var(--text-xxs); opacity: 0.5; }
.nav__link-bg {
  position: absolute; inset: 0;
  background: var(--link-bg); border-radius: 3px;
  z-index: -1;
}

/* Hover stagger text */
.link-text-wrap { position: relative; overflow: hidden; display: inline-block; vertical-align: bottom; }
[hoverstagger="link"] { position: relative; display: inline-block; overflow: hidden; vertical-align: bottom; }
.nav__link[hoverstagger="link"],
.hero__nav-link[hoverstagger="link"] { display: flex; align-items: center; vertical-align: initial; }
.link-text { display: block; white-space: nowrap; }
.link-text.is-2 { position: absolute; left: 0; top: 0; opacity: 0; }

/* Actions & theme toggle */
.nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.nav__cv-link,
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  padding: 0.35rem; opacity: 0.55; transition: opacity var(--dur-fast) ease;
}
.nav__cv-link:hover,
.theme-toggle:hover { opacity: 1; }
[data-theme="light"] .theme-toggle__icon--moon { display: none; }
[data-theme="dark"] .theme-toggle__icon--sun { display: none; }

.nav__hamburger { display: none; flex-direction: column; gap: 6px; padding: 0.5rem; }
.nav__hamburger span {
  display: block; width: 24px; height: 1.5px; background: var(--text);
  transition: transform var(--dur-mid) cubic-bezier(0.16,1,0.3,1), opacity var(--dur-fast) ease;
}
.nav__hamburger.active span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.nav__hamburger.active span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

/* Mobile Menu */
.mobile-menu {
  position: fixed; inset: 0; background: var(--overlay-bg); z-index: 99;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--dur-mid) ease;
  overscroll-behavior: contain;
}
.mobile-menu.active { opacity: 1; pointer-events: auto; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 2.5rem; text-align: center; }
.mobile-menu__link {
  font-size: clamp(1.75rem, 1.25rem + 2.5vw, 3rem);
  font-weight: 300; letter-spacing: -0.02em; color: var(--text);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
}
.mobile-menu__num { font-size: var(--text-xs); opacity: 0.3; }

/* ===================================================================
   SECTIONS — shared patterns
   =================================================================== */
.section[id] { scroll-margin-top: 4rem; }
.section[data-padding="large"] {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}
.section--contact {
  padding-top: var(--space-section);
  padding-bottom: var(--space-block);
}
.section--cv {
  padding-top: var(--space-section);
  padding-bottom: 0;
}

/* Alternating section backgrounds for visual progression */
.section:nth-of-type(even) { background-color: var(--bg-alt); }
.section--cv { background-color: var(--bg-alt); }

.section__label { margin-bottom: var(--space-group); }
.section__label-inner {
  display: flex; align-items: center; gap: 0.75rem;
  padding-top: 1rem;
}
.section__num { font-size: var(--text-xs); font-weight: 400; color: var(--text-faded); }
.section__name {
  font-size: var(--text-xs); font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faded);
}

/* Subsection titles */
.subsection-title {
  color: var(--text-faded);
  margin-bottom: var(--space-sub);
  margin-top: var(--space-block);
}

/* ===================================================================
   HERO
   =================================================================== */
.section--hero {
  min-height: 100vh; min-height: 100dvh;
  padding-top: clamp(1.5rem, 1rem + 2vw, 3rem);
  padding-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - clamp(3rem, 2rem + 4vw, 6rem));
  min-height: calc(100dvh - clamp(3rem, 2rem + 4vw, 6rem));
}

.hero__nav {
  grid-column: 1; grid-row: 1;
  display: flex; flex-direction: column; gap: 0.25rem;
  align-self: start;
}
.hero__nav-link {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-xs); font-weight: 500; color: var(--text);
  padding: 0.4rem 0; position: relative; overflow: hidden;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color var(--dur-base) ease;
}
.hero__nav-link:hover { color: var(--text-faded); }
.hero__nav-num { font-size: var(--text-xxs); opacity: 0.5; }

.hero__identity {
  grid-column: 2; grid-row: 1;
  justify-self: end; align-self: start;
  text-align: right;
}
.hero__name {
  display: inline-flex; overflow: hidden; position: relative;
  font-size: var(--text-sm); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.hero__role { font-size: var(--text-xs); color: var(--text-faded); text-transform: uppercase; letter-spacing: 0.04em; }

.hero__actions {
  grid-column: 3; grid-row: 1;
  justify-self: end; align-self: start;
  margin-left: clamp(1.5rem, 1rem + 2vw, 4rem);
}

/* Middle: illustration fills the flexible space without overflowing */
.hero__illustration {
  grid-column: 1 / -1; grid-row: 2;
  align-self: center; justify-self: center;
  overflow: hidden;
  min-height: 0;
}
.hero__illustration img {
  max-width: min(40vw, 35rem);
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
}

.hero__headline-wrap {
  grid-column: 1 / -1; grid-row: 3;
  align-self: end;
}
.hero__headline {
  font-size: clamp(1.4rem, 0.4rem + 3.2vw, 3.2rem);
  font-weight: 300; line-height: 1.3; letter-spacing: -0.035em;
  max-width: 38ch;
  text-wrap: balance;
  margin-bottom: clamp(1rem, 0.5rem + 1vw, 2rem);
}
.hero__highlight {
  background: var(--accent); color: var(--bg);
  padding: 0.05em 0.2em;
}
.hero__divider {
  width: 100%; height: 1px; background: var(--text-faded);
  margin-bottom: clamp(1rem, 0.5rem + 1vw, 2rem);
}
.hero__subline {
  max-width: 80ch;
  margin-bottom: var(--space-sub);
}
.hero__scroll-hint {
  font-size: var(--text-xs); color: var(--text-faded);
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ===================================================================
   ABOUT / INFO
   =================================================================== */
.about__intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(3rem, 2rem + 4vw, 6rem);
  align-items: center;
  margin-bottom: var(--space-block);
}
.about__lead { max-width: 55ch; }
.about__photo {
  width: clamp(16rem, 12rem + 8vw, 20rem);
  aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--border);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.about__photo.is-revealed { clip-path: inset(0 0 0 0); }
[data-theme="dark"] .about__photo { border-color: rgba(232, 232, 232, 0.2); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }

.about__contact { margin-bottom: var(--space-block); }
.about__contact a { text-decoration: underline; text-underline-offset: 0.2em; transition: opacity var(--dur-base) ease; }
.about__contact a:hover { opacity: 0.5; }
.about__cv { margin-bottom: var(--space-block); text-align: center; }

/* Awards */
.award-row__inner {
  display: flex; align-items: baseline; gap: 2rem;
  padding: 1rem 0;
}
.award-row__year { font-size: var(--text-xs); font-weight: 500; color: var(--text-faded); flex-shrink: 0; min-width: 2.5rem; }

/* ===================================================================
   RESEARCH
   =================================================================== */
.pub-group { margin-bottom: var(--space-block); }
.pub-group:last-child { margin-bottom: 0; }
.pub-group__title {
  color: var(--text-faded);
  margin-bottom: var(--space-sub);
}

.pub__inner {
  display: flex; gap: clamp(1rem, 0.5rem + 1.5vw, 2.5rem);
  padding: var(--space-item) 0;
  align-items: flex-start;
}
.pub__num { font-size: var(--text-xs); font-weight: 400; color: var(--text-faded); flex-shrink: 0; padding-top: 0.15rem; }
.pub__body { flex: 1; }
.pub__body h4 { font-weight: 500; margin-bottom: 0.35rem; }
.pub__title-link { transition: opacity var(--dur-base) ease, text-decoration-color var(--dur-base) ease, color var(--dur-base) ease; cursor: pointer; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 0.2em; }
.pub__title-link:hover { opacity: 0.5; text-decoration-color: currentColor; }
[data-theme="dark"] .pub__title-link { color: var(--accent); }
.pub__meta { font-size: var(--text-sm); color: var(--text-faded); line-height: var(--line-height); }
.pub__badge {
  display: inline-block; font-size: var(--text-xxs); font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.15em 0.5em; margin-left: 0.5rem;
  border: 1px solid var(--text-faded); border-radius: 2px;
  vertical-align: middle;
}
.pub__abstract-hint {
  display: inline-block;
  font-size: var(--text-xxs); color: var(--text-faded); opacity: 0.5;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.5rem 0.75rem; margin-top: 0;
  cursor: pointer;
  transition: opacity var(--dur-base) ease;
}
.pub.is-expanded .pub__abstract-hint,
.pub.is-hover-open .pub__abstract-hint { opacity: 0; }
.pub__abstract {
  font-size: var(--text-sm); color: var(--text-faded); line-height: var(--line-height);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s ease, opacity var(--dur-mid) ease, margin-top var(--dur-mid) ease;
  margin-top: 0;
}
.pub.is-expanded .pub__abstract,
.pub.is-hover-open .pub__abstract {
  max-height: 60rem; opacity: 1;
  margin-top: 0.75rem;
}

/* Media coverage pill tags */
.pub__media { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; align-items: center; }
.pub__media-label { font-size: var(--text-xxs); color: var(--text-faded); opacity: 0.5; letter-spacing: 0.04em; text-transform: uppercase; margin-right: 0.25rem; }
.pub__media-tag {
  display: inline-block; font-size: var(--text-xxs); color: var(--text-faded);
  padding: 0.2em 0.55em; border: 1px solid var(--text-faded); border-radius: 2px;
  transition: color var(--dur-base) ease, border-color var(--dur-base) ease;
}
.pub__media-tag:hover { color: var(--text); border-color: var(--text); }

/* ===================================================================
   TEACHING
   =================================================================== */
.course__inner { padding: var(--space-item) 0; }
.course__name { font-weight: 500; margin-bottom: 0.25rem; }
.course__detail { font-size: var(--text-sm); color: var(--text-faded); line-height: var(--line-height); }

/* ===================================================================
   CONTACT — two-column: primary (email/calendly) + secondary (profiles)
   =================================================================== */
.contact__grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--border); border: 1px solid var(--border);
  margin-bottom: var(--space-block);
}
.contact__col { background: var(--bg); padding: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section:nth-of-type(even) .contact__col { background: var(--bg-alt); }
.contact__col-label {
  font-size: var(--text-xxs); font-weight: 500; color: var(--text-faded);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.contact__email {
  display: block;
  font-size: clamp(1rem, 0.8rem + 0.8vw, 1.25rem);
  text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 0.2em;
  transition: text-decoration-color var(--dur-base) ease;
  margin-bottom: 1rem;
}
.contact__email:hover { text-decoration-color: currentColor; }
.contact__calendly {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-xxs); color: var(--text-faded);
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color var(--dur-base) ease;
}
.contact__calendly:hover { color: var(--text); }
.contact__calendly img { display: inline-block; }
.contact__links { display: flex; flex-direction: column; }
.contact__link {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
  font-size: var(--text-xs); color: var(--text-faded);
  transition: color var(--dur-base) ease;
}
.contact__link:first-child { border-top: 1px solid var(--border); }
.contact__link:hover { color: var(--text); }
.contact__link-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; opacity: 0.6; transition: opacity var(--dur-base) ease; }
.contact__link:hover .contact__link-icon { opacity: 1; }

/* ===================================================================
   CV
   =================================================================== */
.cv__download { margin-bottom: clamp(2rem, 1.5rem + 1vw, 3rem); text-align: center; }
.cv__viewer {
  width: 100%; max-width: 900px;
  margin: 0 auto var(--space-block);
}
.cv__viewer iframe {
  width: 100%; height: 80vh; border: 1px solid var(--border);
  background: var(--bg-alt);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.footer__bar {
  margin: 0 calc(-1 * var(--pad));
  padding: 2rem var(--pad) var(--space-block);
  border-top: 1px solid var(--border);
  font-size: var(--text-xxs); color: var(--text-faded);
  text-align: center;
  background-color: var(--bg);
}

/* ===================================================================
   CUSTOM CURSOR (desktop only)
   =================================================================== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--dur-mid) ease;
}
.cursor-active .cursor-dot, .cursor-active .cursor-ring { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; background: var(--accent); margin: -3px 0 0 -3px; }
.cursor-ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border: 1px solid var(--text-faded);
  transition: border-color var(--dur-base) ease, opacity var(--dur-mid) ease;
}
.cursor-ring.is-hover { border-color: var(--accent); }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}
.cursor-active a, .cursor-active button, .cursor-active [role="button"] { cursor: none; }

/* ===================================================================
   SECTION NUMBER WATERMARKS
   =================================================================== */
.section__watermark {
  position: absolute; top: var(--space-section); left: var(--pad);
  font-size: clamp(10rem, 8rem + 10vw, 25rem);
  font-weight: 700; line-height: 1;
  color: var(--text); opacity: 0.03;
  pointer-events: none; user-select: none;
  z-index: 0;
}
.section > .pad { position: relative; z-index: 1; }

/* ===================================================================
   SCROLL PROGRESS
   =================================================================== */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 101; pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
}
[data-theme="dark"] .scroll-progress__bar {
  background: linear-gradient(90deg, var(--accent), #a3c9e8);
}

/* ===================================================================
   BACK TO TOP
   =================================================================== */
.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 95;
  display: flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--text-faded);
  background: var(--bg);
  color: var(--text);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-mid) ease, background-color var(--dur-base) ease, color var(--dur-base) ease, border-color var(--dur-base) ease;
  cursor: pointer;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ===================================================================
   FOCUS
   =================================================================== */
:focus-visible { outline: 1px solid var(--text); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
  [data-text-split], [data-fade-up], [data-fade-in], [data-line-animate] { visibility: visible !important; }
  body { opacity: 1 !important; animation: none !important; cursor: auto !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 767px) {
  .nav-header { opacity: 1; pointer-events: auto; }
  .hero__nav { display: none; }
  .section--hero { padding-top: 5rem; }
  .nav__menu { display: none; }
  .nav__hamburger { display: flex; }
  .nav__sub { display: none; }
  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .hero__identity { grid-column: 1; grid-row: 1; justify-self: start; text-align: left; }
  .hero__actions { display: none; }
  .hero__headline-wrap { grid-column: 1; grid-row: 3; }
  .hero__headline { max-width: 100%; }
  .hero__illustration img { max-width: min(80vw, 20rem); }
  .about__intro { grid-template-columns: 1fr; }
  .about__photo { max-width: 20rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .gradient-top { opacity: 1; height: 80px; }
}

