:root {
  --bg: #f0ede5;
  --surface: #e8e4da;
  --ink: #0c0c0c;
  --muted: #85827a;
  --line: rgba(12, 12, 12, 0.12);
  --accent: #d86755;
  --header-bg: rgba(240, 237, 229, 0.88);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  overflow-x: clip;
  transition: background-color 300ms ease, color 300ms ease;
}

body[data-theme="dark"] {
  --bg: #141412;
  --surface: #1e1d19;
  --ink: #f1eee7;
  --muted: #aaa59b;
  --line: rgba(241, 238, 231, 0.16);
  --accent: #ed8c79;
  --header-bg: rgba(20, 20, 18, 0.88);
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
.site-header, .section-shell, .skills-band { padding-left: 3.4vw; padding-right: 3.4vw; }
.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--header-bg);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding-bottom: 22px;
  padding-top: 22px;
  position: sticky;
  top: 0;
  flex-wrap: wrap;
  z-index: 20;
}
.header-contact { align-items: center; color: var(--muted); display: flex; flex-wrap: wrap; font-size: 12px; font-weight: 600; gap: 18px; letter-spacing: 0.01em; }
.header-contact a { transition: color 180ms ease; }
.header-contact a:hover { color: var(--ink); }
.nav-links { align-items: center; display: flex; gap: 30px; margin-left: auto; }
.nav-links > a, .theme-toggle, .eyebrow, .project-kicker, .experience-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links > a { font-weight: 600; opacity: 0.6; transition: opacity 180ms ease; }
.nav-links > a:hover { opacity: 1; }
.theme-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  padding: 8px 13px;
  transition: background-color 180ms ease, transform 180ms ease;
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle:active { transform: scale(0.98); }
.theme-icon { font-size: 12px; line-height: 1; }
.section-shell { max-width: 1600px; margin: 0 auto; }
.hero { min-height: 91vh; padding-bottom: 65px; padding-top: 18px; }
.eyebrow { color: var(--muted); font-weight: 600; margin: 0 0 28px; }
.hero .eyebrow { font-size: 22px; margin: 32px 0 0; }
.hero h1, h2, h3 { font-family: Syne, sans-serif; font-weight: 800; letter-spacing: -0.065em; line-height: 0.88; margin: 0; }
.hero h1 { font-size: clamp(70px, 10.56vw, 168px); letter-spacing: 1px; max-width: 930px; }
.hero-intro { color: var(--muted); font-size: clamp(17px, 1.45vw, 23px); line-height: 1.42; margin: 70px 0 0; max-width: 620px; }

.skills-band { border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); overflow: hidden; padding-bottom: 21px; padding-top: 21px; }
.skills-track { align-items: center; animation: marquee 85s linear infinite; display: flex; gap: 34px; min-width: max-content; white-space: nowrap; }
.skills-track span { color: var(--muted); font-size: 13px; font-weight: 400; }
.skills-track span::after { color: var(--accent); content: "✳"; margin-left: 34px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.work, .about, .contact { padding-bottom: 150px; padding-top: 154px; }
.section-heading { margin-bottom: 80px; }
.section-heading h2 { font-size: clamp(47px, 6.7vw, 103px); letter-spacing: 1px; }
.project { border-top: 1px solid var(--line); display: grid; gap: 4.8vw; grid-template-columns: minmax(330px, 0.7fr) minmax(0, 1.3fr); padding: 62px 0 88px; }
.project:last-child { border-bottom: 1px solid var(--line); }
.project-meta { display: grid; gap: 30px; grid-template-columns: 38px minmax(0, 1fr); align-content: start; }
.project-number { color: var(--muted); font-size: 15px; }
.project-kicker { color: var(--muted); margin: 0 0 17px; }
.project h3 { font-size: clamp(30px, 3vw, 48px); letter-spacing: 0; line-height: 0.98; max-width: 560px; overflow-wrap: normal; }
.project-description { color: var(--muted); font-size: 16px; line-height: 1.55; margin: 28px 0 0; max-width: 520px; }
.project-date { color: var(--muted); font-size: 13px; margin: 22px 0 0; }
.project-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.project-links a, .contact-links a, .site-footer a { border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 600; padding-bottom: 3px; transition: color 180ms ease, border-color 180ms ease; }
.project-links a:hover, .contact-links a:hover, .site-footer a:hover { border-color: var(--accent); color: var(--accent); }
.project-visual { min-width: 0; }
.seasense-visual { aspect-ratio: 65 / 32; background: #e4eafc; border-radius: var(--radius); overflow: hidden; }
.seasense-screen { display: block; height: 100%; object-fit: cover; object-position: center top; width: 100%; }
.workflow-visual img, .rachelli-visual img { background: var(--surface); border-radius: var(--radius); display: block; width: 100%; }
.dubbing-visual img { aspect-ratio: 14 / 5; object-fit: cover; object-position: center top; }
.workflow-visual figcaption { color: var(--muted); font-size: 12px; margin-top: 13px; }
.rachelli-visual { display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; gap: 9vw; grid-template-columns: minmax(0, 1.08fr) minmax(290px, 0.92fr); }
.about-copy p { font-size: clamp(19px, 2.2vw, 30px); letter-spacing: -0.03em; line-height: 1.28; margin: 0 0 36px; max-width: 720px; }
.experience-label { color: var(--muted); font-weight: 600; margin: 4px 0 32px; }
.experience-entry { border-top: 1px solid var(--line); padding-top: 24px; }
.experience-header h3 { font-size: clamp(26px, 3vw, 44px); letter-spacing: 0; line-height: 1; }
.experience-header p { color: var(--muted); font-size: 14px; margin: 11px 0 0; }
.progression { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 27px 0 30px; }
.experience ul { border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.experience li { border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; padding: 15px 0; }

.contact { border-top: 1px solid var(--line); padding-bottom: 180px; }
.contact .section-heading { margin-bottom: 90px; }
.contact h2 { font-size: clamp(42px, 6.2vw, 97px); line-height: 0.9; }
.contact-grid { display: grid; gap: 8vw; grid-template-columns: minmax(220px, 0.62fr) minmax(280px, 0.9fr); margin-left: auto; max-width: 880px; }
.contact-grid > p { color: var(--muted); font-size: 18px; line-height: 1.45; margin: 0; max-width: 370px; }
.contact-details { align-self: end; }
.contact-email { display: inline-block; font-size: clamp(20px, 2.4vw, 32px); letter-spacing: -0.05em; margin-bottom: 34px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 24px; }
.cv-hero { display: grid; gap: 7vw; grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr); padding-bottom: 105px; padding-top: 90px; }
.cv-hero h1 { font-family: Syne, sans-serif; font-size: clamp(70px, 10vw, 160px); font-weight: 800; letter-spacing: 1px; line-height: 0.88; margin: 0; }
.cv-role { color: var(--muted); font-size: clamp(22px, 2.3vw, 36px); letter-spacing: 0.02em; margin: 34px 0 0; }
.cv-hero-copy { align-self: end; }
.cv-hero-copy p { color: var(--muted); font-size: clamp(18px, 1.55vw, 24px); line-height: 1.42; margin: 0; max-width: 620px; }
.cv-actions { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; }
.cv-actions a, .cv-card a, .cv-list a { border-bottom: 1px solid var(--ink); font-size: 13px; font-weight: 600; padding-bottom: 3px; transition: color 180ms ease, border-color 180ms ease; }
.cv-actions a:hover, .cv-card a:hover, .cv-list a:hover { border-color: var(--accent); color: var(--accent); }
.cv-content { border-top: 1px solid var(--line); display: grid; gap: 7vw; grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr); padding-bottom: 110px; padding-top: 78px; }
.cv-sidebar { align-content: start; display: grid; gap: 24px; }
.cv-card { border-top: 1px solid var(--line); display: grid; gap: 14px; padding-top: 20px; }
.cv-card h2, .cv-section h2 { color: var(--muted); font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; margin: 0; text-transform: uppercase; }
.cv-main { display: grid; gap: 42px; }
.cv-section { border-top: 1px solid var(--line); padding-top: 24px; }
.cv-section p { color: var(--ink); font-size: clamp(20px, 2vw, 28px); letter-spacing: -0.03em; line-height: 1.3; margin: 24px 0 0; max-width: 880px; }
.cv-entry h3 { font-family: Syne, sans-serif; font-size: clamp(28px, 3vw, 46px); font-weight: 800; letter-spacing: 0; line-height: 1; margin: 24px 0 0; }
.cv-entry p { color: var(--muted); font-size: 15px; letter-spacing: 0; margin-top: 14px; }
.cv-list { display: grid; gap: 14px; list-style: none; margin: 24px 0 0; padding: 0; }
.cv-list li { color: var(--muted); font-size: 16px; line-height: 1.55; }
.cv-pdf { border-top: 1px solid var(--line); padding-bottom: 150px; padding-top: 95px; }
.cv-pdf .section-heading { margin-bottom: 48px; }
.pdf-frame { background: var(--surface); border-radius: var(--radius); height: min(1080px, 82vh); overflow: hidden; }
.pdf-frame iframe { border: 0; display: block; height: 100%; width: 100%; }
.site-footer { border-top: 1px solid var(--line); display: flex; font-size: 12px; justify-content: space-between; padding-bottom: 30px; padding-top: 24px; }
.site-footer a { font-size: 12px; }

.version-tag {
  position: fixed;
  right: 14px;
  bottom: 12px;
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  opacity: 0.6;
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 5;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
  .site-header, .section-shell, .skills-band { padding-left: 20px; padding-right: 20px; }
  .site-header { align-items: flex-start; gap: 18px; }
  .header-contact { font-size: 11px; gap: 12px; order: 2; width: 100%; }
  .nav-links { flex-wrap: wrap; gap: 15px; justify-content: flex-end; }
  .nav-links > a, .theme-toggle { font-size: 10px; }
  .hero { min-height: auto; padding-bottom: 100px; padding-top: 40px; }
  .hero h1 { font-size: clamp(50px, 14.4vw, 120px); }
  .hero-intro { margin-top: 52px; }
  .work, .about, .contact { padding-bottom: 95px; padding-top: 100px; }
  .section-heading { margin-bottom: 55px; }
  .project { gap: 42px; grid-template-columns: 1fr; padding: 45px 0 60px; }
  .project-meta { grid-template-columns: 32px minmax(0, 1fr); }
  .seasense-visual { aspect-ratio: 65 / 32; }
  .rachelli-visual { gap: 12px; grid-template-columns: 1fr; }
  .about-grid, .contact-grid { gap: 54px; grid-template-columns: 1fr; margin-left: 0; }
  .about-copy p { font-size: 23px; }
  .contact .section-heading { margin-bottom: 60px; }
  .contact h2 { font-size: clamp(38px, 10vw, 70px); }
  .cv-hero, .cv-content { gap: 54px; grid-template-columns: 1fr; }
  .cv-hero { padding-bottom: 90px; padding-top: 70px; }
  .cv-hero h1 { font-size: clamp(50px, 14.4vw, 120px); }
  .cv-content { padding-top: 62px; }
  .pdf-frame { height: 72vh; }
}

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