:root {
  --black: #080808;
  --paper: #f2f0e9;
  --paper-soft: #fbfaf5;
  --ink: #090909;
  --muted: #5d5d58;
  --teal: #69d3cf;
  --coral: #d3696d;
  --line: rgba(9, 9, 9, 0.19);
  --white-line: rgba(242, 240, 233, 0.22);
  --header-height: 72px;
  --radius: 8px;
  --max: 1220px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-display: swap;
  font-family: "Send Flowers";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/send-flowers-v7-latin-regular.woff2") format("woff2");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)' opacity='.48'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul, ol { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

::selection { color: var(--black); background: var(--teal); }

.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;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  transform: translateY(-150%);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: var(--black);
  background: var(--teal);
  font-weight: 900;
  transition: transform 0.2s ease;
}

.skip-link:focus { transform: translateY(0); }

.script-note {
  margin: 0;
  color: var(--teal);
  font-family: "Send Flowers", cursive;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.85;
}

.panel-dark { color: var(--paper); background: var(--black); }

.cv-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem max(1rem, calc((100vw - var(--max)) / 2));
  color: var(--paper);
  transition: color 0.25s ease;
}

.cv-header.on-light { color: var(--ink); }

.header-actions,
.cv-nav,
.social-links {
  display: flex;
  align-items: center;
}

.header-actions {
  position: relative;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.3rem;
  border: 1px solid rgba(242, 240, 233, 0.2);
  border-radius: var(--radius);
  background: rgba(8, 8, 8, 0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.24);
}

.cv-header.on-light .header-actions {
  border-color: rgba(8, 8, 8, 0.15);
  background: rgba(242, 240, 233, 0.72);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.1);
}

.cv-nav { gap: 0.1rem; }

.cv-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0 0.92rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0.78;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.cv-nav a:hover,
.cv-nav a:focus-visible,
.cv-nav a.is-active {
  opacity: 1;
  background: rgba(105, 211, 207, 0.18);
}

.social-links {
  gap: 0.35rem;
  margin-left: 0.25rem;
  padding-left: 0.45rem;
  border-left: 1px solid rgba(242, 240, 233, 0.18);
}

.cv-header.on-light .social-links { border-left-color: rgba(8, 8, 8, 0.18); }

.social-links a {
  display: grid;
  place-items: center;
  width: 2.45rem;
  aspect-ratio: 1;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.82rem;
  font-weight: 950;
  transition: transform 0.2s var(--ease), color 0.2s ease, background 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-2px);
  color: var(--black);
  background: var(--coral);
}

.social-links svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-toggle {
  display: none;
  width: 2.9rem;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: currentColor;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0.25rem auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.cv-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 4rem) max(1.5rem, calc((100vw - var(--max)) / 2)) 5rem;
  isolation: isolate;
}

.cv-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  height: 20%;
  background: linear-gradient(transparent, var(--black));
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.17) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.hero-shape {
  position: absolute;
  z-index: -2;
  display: block;
  transform: translate3d(0, var(--depth-y, 0), 0) rotate(var(--rotate));
  border: 1px solid rgba(242, 240, 233, 0.2);
  will-change: transform;
}

.hero-shape-teal {
  top: 21%;
  left: 8%;
  width: clamp(8rem, 13vw, 12rem);
  height: clamp(4.5rem, 7vw, 6.5rem);
  --rotate: -9deg;
}

.hero-shape-coral {
  right: 9%;
  bottom: 15%;
  width: clamp(5rem, 8vw, 7rem);
  height: clamp(5rem, 8vw, 7rem);
  --rotate: 0deg;
  border-radius: 50%;
}

.cv-hero .ambient-light {
  position: absolute;
  z-index: -1;
  width: clamp(8rem, 14vw, 13rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  filter: blur(3.2rem);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: 0.14;
  will-change: transform;
}

.cv-hero .ambient-light-teal {
  top: 18%;
  right: 18%;
  color: rgb(105, 211, 207);
  animation: ambient-drift-teal 13s ease-in-out infinite alternate;
}

.cv-hero .ambient-light-coral {
  bottom: 14%;
  left: 17%;
  color: rgb(211, 105, 109);
  animation: ambient-drift-coral 15s ease-in-out -3.5s infinite alternate;
}

@keyframes ambient-drift-teal {
  from { transform: translate3d(-0.6rem, 0.35rem, 0) scale(0.96); }
  to { transform: translate3d(1.25rem, -1.1rem, 0) scale(1.05); }
}

@keyframes ambient-drift-coral {
  from { transform: translate3d(0.65rem, -0.35rem, 0) scale(1.04); }
  to { transform: translate3d(-1.35rem, 1rem, 0) scale(0.95); }
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: min(var(--max), 100%);
  min-width: 0;
  margin-inline: auto;
}

.cv-selection-frame {
  position: relative;
  width: min(62rem, 82%);
  min-height: clamp(18rem, 31vw, 25rem);
  display: grid;
  place-items: center;
  margin-inline: auto;
  padding: 3.5rem 2rem 3rem;
  border: 1px dashed rgba(242, 240, 233, 0.52);
  opacity: 1;
  animation: frame-float 6s ease-in-out infinite alternate;
}

.frame-handle {
  position: absolute;
  z-index: 2;
  width: 0.82rem;
  aspect-ratio: 1;
  background: rgba(242, 240, 233, 0.7);
  animation: handle-pulse 2.6s ease-in-out infinite;
}

.handle-a { top: -0.41rem; left: -0.41rem; }
.handle-b { top: -0.41rem; left: 50%; transform: translateX(-50%); }
.handle-c { top: -0.41rem; right: -0.41rem; }
.handle-d { right: -0.41rem; bottom: -0.41rem; }
.handle-e { bottom: -0.41rem; left: 50%; transform: translateX(-50%); }
.handle-f { bottom: -0.41rem; left: -0.41rem; }

@keyframes frame-float {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -0.45rem, 0); }
}

@keyframes handle-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.45; }
}

.hero-role {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  margin: 0;
  color: rgba(242, 240, 233, 0.75);
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cv-hero h1 {
  display: flex;
  align-items: baseline;
  justify-content: center;
  max-width: 100%;
  margin: 0;
  color: var(--paper);
  font-size: clamp(5rem, 10vw, 8.8rem);
  line-height: 0.82;
  font-weight: 950;
  letter-spacing: 0;
  text-align: center;
}

.cv-title-line {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.cv-title-letter {
  --i: 0;
  position: relative;
  display: inline-block;
}

.cv-title-line:first-child .cv-title-letter:nth-child(1) { --i: 0; }
.cv-title-line:first-child .cv-title-letter:nth-child(2) { --i: 1; }
.cv-title-line:first-child .cv-title-letter:nth-child(3) { --i: 2; }
.cv-title-line:first-child .cv-title-letter:nth-child(4) { --i: 3; }
.cv-title-line:first-child .cv-title-letter:nth-child(5) { --i: 4; }
.cv-title-line:first-child .cv-title-letter:nth-child(6) { --i: 5; }
.cv-title-line-second .cv-title-letter:nth-child(1) { --i: 6; }
.cv-title-line-second .cv-title-letter:nth-child(2) { --i: 7; }
.cv-title-line-second .cv-title-letter:nth-child(3) { --i: 8; }
.cv-title-line-second .cv-title-letter:nth-child(4) { --i: 9; }

.hero-signature {
  position: absolute;
  right: 2.25rem;
  bottom: 1.25rem;
  margin: 0;
  color: rgba(242, 240, 233, 0.78);
  font-family: "Send Flowers", cursive;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  line-height: 1;
  transform: rotate(-2deg);
}

.hero-cursor {
  position: absolute;
  right: -1.15rem;
  bottom: -1.65rem;
  width: 0;
  height: 0;
  border-top: 0.8rem solid rgba(242, 240, 233, 0.76);
  border-right: 0.55rem solid transparent;
  border-left: 0.55rem solid transparent;
  transform: rotate(-45deg);
}

.hero-cursor::after {
  content: "";
  position: absolute;
  top: -0.7rem;
  left: 0.4rem;
  width: 0.18rem;
  height: 1rem;
  background: rgba(242, 240, 233, 0.76);
}

.cv-js .cv-selection-frame {
  border-color: transparent;
}

.cv-selection-frame::before,
.cv-selection-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -1px;
  pointer-events: none;
}

.cv-selection-frame::before {
  background:
    linear-gradient(currentColor, currentColor) left top / 0 1px no-repeat,
    linear-gradient(currentColor, currentColor) right top / 1px 0 no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / 0 1px no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / 1px 0 no-repeat;
  color: rgba(242, 240, 233, 0.7);
  opacity: 0;
}

.cv-selection-frame::after {
  inset: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(105, 211, 207, 0.3) 50%, transparent calc(50% + 1px)),
    linear-gradient(180deg, transparent calc(50% - 1px), rgba(211, 105, 109, 0.28) 50%, transparent calc(50% + 1px));
  opacity: 0;
}

.cv-js .cv-title-letter,
.cv-js .hero-role,
.cv-js .hero-signature,
.cv-js .frame-handle {
  opacity: 0;
}

.cv-js .cv-title-letter {
  transform: translate3d(0, 0.24em, 0) rotate(-1deg) scale(0.965);
  filter: blur(5px);
}

.cv-ready .cv-selection-frame {
  border-color: rgba(242, 240, 233, 0.52);
  transition: border-color 0.24s ease 0.92s;
}

.cv-ready .cv-selection-frame::before {
  animation: cv-frame-draw 0.92s var(--ease) 0.08s both;
}

.cv-ready .cv-selection-frame::after {
  animation: cv-frame-guides 1.08s var(--ease) 0.34s both;
}

.cv-ready .cv-title-letter {
  animation: cv-letter-settle 0.72s var(--ease) both;
  animation-delay: calc(0.34s + (var(--i) * 42ms));
}

.cv-ready .hero-role {
  animation: cv-meta-intro 0.72s var(--ease) 0.18s both;
}

.cv-ready .hero-signature {
  animation: cv-signature-intro 1.1s var(--ease) 0.82s both;
}

.cv-ready .frame-handle {
  animation:
    cv-handle-intro 0.64s var(--ease) both,
    handle-pulse 2.6s ease-in-out 0.9s infinite;
}

@keyframes cv-frame-draw {
  0% { background-size: 0 1px, 1px 0, 0 1px, 1px 0; opacity: 0.25; }
  55% { background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%; opacity: 0.9; }
  100% { background-size: 100% 1px, 1px 100%, 100% 1px, 1px 100%; opacity: 0; }
}

@keyframes cv-frame-guides {
  0%, 100% { opacity: 0; }
  42%, 72% { opacity: 0.48; }
}

@keyframes cv-letter-settle {
  from { opacity: 0; transform: translate3d(0, 0.24em, 0) rotate(-1deg) scale(0.965); filter: blur(5px); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); filter: blur(0); }
}

@keyframes cv-meta-intro {
  from { opacity: 0; transform: translateY(-0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cv-signature-intro {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes cv-handle-intro {
  from { opacity: 0; scale: 0.3; }
  to { opacity: 0.9; scale: 1; }
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  width: min(54rem, 82%);
  margin: 2.25rem auto 0;
}

.hero-bottom p {
  max-width: 35rem;
  margin: 0;
  color: rgba(242, 240, 233, 0.76);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
}

.scroll-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
  font-size: 0.86rem;
  font-weight: 900;
}

.scroll-link span {
  display: grid;
  place-items: center;
  width: 2.35rem;
  aspect-ratio: 1;
  border: 1px solid rgba(242, 240, 233, 0.28);
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
}

.hero-year {
  position: absolute;
  right: max(1.5rem, calc((100vw - var(--max)) / 2));
  bottom: 1.25rem;
  z-index: 4;
  color: rgba(242, 240, 233, 0.34);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.timeline-section {
  position: relative;
  padding: clamp(5rem, 9vw, 9rem) max(1.5rem, calc((100vw - var(--max)) / 2));
  background:
    radial-gradient(circle at 12% 10%, rgba(105, 211, 207, 0.13), transparent 25rem),
    radial-gradient(circle at 88% 50%, rgba(211, 105, 109, 0.1), transparent 28rem),
    var(--paper);
}

.timeline-intro {
  width: min(var(--max), 100%);
  margin: 0 auto clamp(5rem, 10vw, 9rem);
}

.timeline-intro h2,
.skills-heading h2,
.outro-copy h2 {
  margin: 0.35rem 0 1.5rem;
  font-size: clamp(3.6rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.timeline-intro > p:last-child {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.65;
}

.timeline-stage {
  position: relative;
  width: min(var(--max), 100%);
  margin-inline: auto;
}

.timeline-year-backdrop {
  position: sticky;
  top: 22vh;
  z-index: 0;
  width: 100%;
  height: 0;
  overflow: visible;
  color: rgba(9, 9, 9, 0.055);
  font-size: clamp(7rem, 20vw, 19rem);
  font-weight: 950;
  line-height: 0.75;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.45s var(--ease);
}

.timeline-year-backdrop.is-changing { opacity: 0; transform: translateY(1rem); }

.timeline-rail {
  position: absolute;
  inset: 0 auto 0 50%;
  z-index: 1;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(9, 9, 9, 0.12);
}

.timeline-rail span {
  display: block;
  width: 100%;
  height: calc(var(--timeline-progress, 0) * 100%);
  background: linear-gradient(var(--teal), var(--coral));
  box-shadow: 0 0 20px rgba(105, 211, 207, 0.38);
}

.timeline-list { list-style: none; }

.timeline-entry {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 75vh;
  align-items: center;
  padding-block: 5rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 0.85rem;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.75);
  border: 3px solid var(--paper);
  border-radius: 50%;
  background: rgba(9, 9, 9, 0.28);
  box-shadow: 0 0 0 1px rgba(9, 9, 9, 0.2);
  transition: transform 0.35s var(--ease), background 0.3s ease, box-shadow 0.3s ease;
}

.timeline-entry.is-active::before,
.timeline-entry.is-current::before {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--teal);
  box-shadow: 0 0 0 7px rgba(105, 211, 207, 0.18), 0 0 30px rgba(105, 211, 207, 0.45);
}

.timeline-card {
  width: min(31rem, calc(100% - 4rem));
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  border: 1px solid rgba(9, 9, 9, 0.15);
  border-radius: var(--radius);
  background: rgba(251, 250, 245, 0.82);
  box-shadow: 0 24px 65px rgba(9, 9, 9, 0.09);
  backdrop-filter: blur(10px);
  transform: translate3d(0, var(--card-y, 2rem), 0);
  opacity: 0.42;
  transition: opacity 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}

.timeline-entry:nth-child(odd) .timeline-card { grid-column: 1; justify-self: start; }
.timeline-entry:nth-child(even) .timeline-card { grid-column: 2; justify-self: end; }

.timeline-entry.is-active .timeline-card {
  opacity: 1;
  border-color: rgba(105, 211, 207, 0.62);
  box-shadow: 0 28px 80px rgba(9, 9, 9, 0.13);
}

.timeline-card-featured {
  color: var(--paper);
  background: linear-gradient(145deg, #102928, #21191b);
}

.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  opacity: 0.62;
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
}

.timeline-card-featured .timeline-meta { color: var(--paper); }
.timeline-meta span { color: var(--coral); }

.timeline-kicker {
  margin: 1.5rem 0 0.55rem;
  color: var(--coral);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-card h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 2.6vw, 2.45rem);
  line-height: 1.02;
}

.timeline-card > p:not(.timeline-kicker) {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.timeline-card-featured > p:not(.timeline-kicker) { color: rgba(242, 240, 233, 0.72); }
.timeline-card .timeline-note { margin-top: 1rem !important; font-size: 0.88rem; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.35rem;
  list-style: none;
}

.tag-list li {
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(9, 9, 9, 0.16);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
}

.inline-link {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 1.35rem;
  color: var(--teal);
  font-weight: 900;
}

.skills-section {
  position: relative;
  padding: clamp(6rem, 10vw, 10rem) max(1.5rem, calc((100vw - var(--max)) / 2));
  overflow: hidden;
}

.skills-section::before {
  content: "SKILLS";
  position: absolute;
  top: 1rem;
  right: -0.04em;
  color: rgba(242, 240, 233, 0.04);
  font-size: clamp(8rem, 21vw, 21rem);
  font-weight: 950;
  line-height: 0.8;
  pointer-events: none;
}

.skills-heading,
.skills-groups {
  position: relative;
  z-index: 2;
  width: min(var(--max), 100%);
  margin-inline: auto;
}

.skills-heading > p:last-child {
  max-width: 43rem;
  color: rgba(242, 240, 233, 0.68);
  line-height: 1.65;
}

.skills-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: clamp(3rem, 5vw, 5rem);
}

.skill-group {
  min-height: 24rem;
  padding: clamp(1.25rem, 2vw, 1.8rem);
  border: 1px solid var(--white-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.skill-group > span {
  color: var(--teal);
  font-size: clamp(3rem, 5vw, 5.2rem);
  font-weight: 900;
  opacity: 0.28;
}

.skill-group h3 { margin: 1.5rem 0; font-size: 1.35rem; }
.skill-group ul { display: grid; gap: 0.75rem; list-style: none; }

.skill-group li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(242, 240, 233, 0.13);
  color: rgba(242, 240, 233, 0.72);
}

.cv-outro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: end;
  padding: clamp(6rem, 11vw, 11rem) max(1.5rem, calc((100vw - var(--max)) / 2));
  background:
    linear-gradient(rgba(242, 240, 233, 0.86), rgba(242, 240, 233, 0.96)),
    linear-gradient(90deg, var(--teal), var(--coral));
}

.outro-copy > p:last-child {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.65;
}

.outro-actions { display: grid; gap: 0.75rem; }

.button-primary,
.button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  font-weight: 900;
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease;
}

.button-primary { color: var(--black); background: var(--coral); box-shadow: 0 16px 40px rgba(211, 105, 109, 0.22); }
.button-secondary { border: 1px solid var(--line); background: rgba(251, 250, 245, 0.55); }
.button-primary:hover, .button-primary:focus-visible, .button-secondary:hover, .button-secondary:focus-visible { transform: translateY(-3px); }
.text-link { justify-self: center; margin-top: 0.4rem; font-size: 0.86rem; font-weight: 850; }

.cv-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem max(1.5rem, calc((100vw - var(--max)) / 2));
  color: rgba(242, 240, 233, 0.58);
  background: var(--black);
  font-size: 0.78rem;
}

.cv-footer p { margin: 0; }
.cv-footer div { display: flex; gap: 1rem; }

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 35;
  display: grid;
  place-items: center;
  width: 3.2rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--black);
  background: var(--coral);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-size: 1.4rem;
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.75s ease, transform 0.75s var(--ease);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

.cv-hero .reveal {
  animation: hero-reveal 0.9s var(--ease) both;
}

.cv-hero .hero-bottom { animation-delay: 0.3s; }

@keyframes hero-reveal {
  from { opacity: 0; transform: translateY(2.2rem); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  :root { --header-height: 68px; }

  .cv-header {
    justify-content: flex-end;
    padding-inline: 1rem;
  }

  .cv-header::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: rgba(5, 8, 9, 0.62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.24s ease;
  }

  body.nav-open .cv-header::before {
    pointer-events: auto;
    opacity: 1;
  }

  .header-actions {
    z-index: 1;
    gap: 0.5rem;
    padding: 0.25rem;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.nav-open .header-actions {
    color: var(--paper);
    border-color: rgba(242, 240, 233, 0.22);
    background: rgba(18, 20, 21, 0.94);
  }

  .social-links a { width: 2.45rem; }
  .social-links a:nth-child(3) { display: none; }
  .nav-toggle { display: block; }

  .cv-nav {
    position: fixed;
    top: calc(var(--header-height) + 0.8rem);
    right: 1rem;
    left: auto;
    width: min(22rem, calc(100% - 2rem));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    counter-reset: mobile-nav;
    gap: 0.35rem;
    padding: 0.6rem;
    border: 1px solid rgba(242, 240, 233, 0.18);
    border-radius: var(--radius);
    color: var(--paper);
    background: rgba(12, 15, 18, 0.62);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.65rem) scale(0.985);
    transform-origin: top right;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.24s var(--ease);
  }

  .cv-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .cv-nav a {
    counter-increment: mobile-nav;
    justify-content: flex-start;
    gap: 0.55rem;
    min-width: 0;
    min-height: 3.5rem;
    padding: 0 0.8rem;
    border: 1px solid rgba(242, 240, 233, 0.09);
    color: var(--paper);
    background: rgba(242, 240, 233, 0.055);
    font-size: 0.82rem;
    opacity: 0.88;
  }

  .cv-nav a::before {
    content: counter(mobile-nav, decimal-leading-zero);
    flex: 0 0 auto;
    color: var(--teal);
    font-size: 0.64rem;
    font-weight: 950;
  }

  .cv-nav a:last-child { grid-column: 1 / -1; }

  body.nav-open .social-links a,
  body.nav-open .nav-toggle { color: var(--paper); }

  .cv-hero {
    padding-inline: 1rem;
    padding-bottom: 4.25rem;
  }

  .cv-selection-frame {
    width: 100%;
    min-height: 18rem;
    padding: 3.5rem 1rem 3rem;
  }

  .cv-hero h1 {
    max-width: 100%;
    font-size: 5.1rem;
    line-height: 0.82;
  }

  .cv-hero h1 {
    flex-direction: column;
    align-items: center;
  }

  .cv-title-line { display: flex; }
  .hero-role { top: 1rem; left: 1rem; }
  .hero-signature { right: 1.25rem; bottom: 1rem; font-size: 2.2rem; }
  .hero-bottom {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 1.1rem;
    margin-top: 1.75rem;
  }

  .hero-shape-teal {
    top: 20%;
    left: 8%;
    width: 9rem;
    height: 5rem;
  }

  .hero-shape-coral {
    right: 8%;
    bottom: 13%;
    width: 6rem;
    height: 6rem;
  }

  .timeline-section { padding-inline: 1rem; }
  .timeline-intro { margin-bottom: 3rem; }
  .timeline-intro h2,
  .skills-heading h2,
  .outro-copy h2 {
    max-width: 100%;
    font-size: 3.65rem;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .timeline-year-backdrop { top: 15vh; text-align: right; font-size: 7rem; }
  .timeline-rail { left: 0.55rem; transform: none; }

  .timeline-entry {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 3.4rem 0 3.4rem 1.9rem;
  }

  .timeline-entry::before { top: 50%; left: 0.55rem; }
  .timeline-entry:nth-child(n) .timeline-card { grid-column: 1; justify-self: stretch; }
  .timeline-card { width: 100%; transform: translate3d(0, var(--card-y, 1rem), 0); }

  .skills-section, .cv-outro { padding-inline: 1rem; }
  .skills-groups { grid-template-columns: 1fr; }
  .skill-group { min-height: auto; }
  .cv-outro { grid-template-columns: 1fr; align-items: start; }
  .cv-footer { flex-direction: column; padding-inline: 1rem; }
}

@media (max-width: 480px) {
  .hero-role { font-size: 0.68rem; }
  .cv-selection-frame { min-height: 16.5rem; }
  .cv-hero h1 { font-size: 4rem; }
  .timeline-intro h2,
  .skills-heading h2,
  .outro-copy h2 { font-size: 3.05rem; }
  .hero-bottom p { font-size: 0.96rem; }
  .timeline-card { padding: 1.15rem; }
  .timeline-meta { align-items: flex-start; flex-direction: column; gap: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal, .timeline-card { opacity: 1; transform: none; }
  .hero-shape { transform: rotate(var(--rotate)); }
  .timeline-year-backdrop { display: none; }
  .timeline-rail span { height: 100%; }
}

@media print {
  .cv-header, .hero-shape, .hero-grid, .back-to-top, .scroll-link { display: none !important; }
  .cv-hero { min-height: auto; padding: 2rem; color: var(--ink); background: white; }
  .cv-hero h1 span { color: var(--ink); -webkit-text-stroke: 0; }
  .timeline-section, .skills-section, .cv-outro { padding: 2rem; background: white; color: var(--ink); }
  .timeline-year-backdrop, .timeline-rail { display: none; }
  .timeline-entry { display: block; min-height: 0; padding: 0 0 1rem; break-inside: avoid; }
  .timeline-entry::before { display: none; }
  .timeline-card { width: 100%; opacity: 1; transform: none; box-shadow: none; backdrop-filter: none; }
  .timeline-card-featured { color: var(--ink); background: white; }
  .skills-groups { grid-template-columns: repeat(3, 1fr); }
  .skill-group { min-height: 0; color: var(--ink); border-color: var(--line); }
  .skill-group li, .skills-heading > p:last-child { color: var(--muted); }
}
