@font-face {
  font-family: Outfit;
  src: url("../assets/portfolio/outfit-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f7f6f0;
  --ink: #20231f;
  --muted: #535950;
  --line: #c9cbc2;
  --accent: #a33c12;
  --bg-start: #f7f6f0;
  --display: Outfit, "Avenir Next", "Segoe UI", sans-serif;
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171a17;
    --ink: #f4f2e9;
    --muted: #b2b8ae;
    --line: #424740;
    --accent: #ffa375;
    --bg-start: #171a17;
  }
}

:root[data-theme="dark"] {
  --paper: #171a17;
  --ink: #f4f2e9;
  --muted: #b2b8ae;
  --line: #424740;
  --accent: #ffa375;
  --bg-start: #171a17;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .24em; }
a:hover, summary:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

h1, h2, h3, p { margin: 0; }
.wrap { width: min(1376px, calc(100% - clamp(40px, 9vw, 144px))); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: 8px; left: 12px; padding: 10px 16px; background: var(--ink); color: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .primary-nav, .brand, .theme-toggle, .footer-inner {
  display: flex;
  align-items: center;
}
.masthead-inner, .footer-inner { justify-content: space-between; gap: 12px; }
.masthead-inner { min-height: 75px; }
.brand { gap: 10px; text-decoration: none; font: 650 1.45rem/1 var(--display); letter-spacing: -.045em; }
.brand img { flex: none; border-radius: 50%; }
.primary-nav { gap: clamp(12px, 2.4vw, 34px); }
.primary-nav a, .theme-toggle { font: 600 .96rem/1 var(--display); color: var(--ink); }
.primary-nav a, .footer-inner a { display: inline-flex; align-items: center; min-height: 44px; }
.primary-nav a { text-decoration: none; }
.primary-nav a:hover { text-decoration: underline; }
.theme-toggle { min-width: 44px; min-height: 44px; gap: 8px; justify-content: center; cursor: pointer; padding: 0; border: 0; background: none; }
.theme-toggle .icon { width: 20px; height: 20px; display: none; }
.theme-toggle[data-theme="light"] .icon-light,
.theme-toggle[data-theme="dark"] .icon-dark,
.theme-toggle[data-theme="system"] .icon-system { display: block; }

body { font-family: var(--display) }
.theme-toggle span { display: none }
h1, h2 { font-weight: 470; line-height: .98; letter-spacing: -.065em }
h1 { font-size: clamp(3.4rem,8vw,8rem) }
h1 span { color: var(--accent) }
h2 { font-size: clamp(3rem,6.5vw,7rem) }
h3 { font-weight: 500; letter-spacing: -.035em; font-size: 1.6rem }
.index-head { padding-block: clamp(36px,5vw,80px) 24px }
.project-nav { display: flex; gap: 0 clamp(18px,3vw,45px); flex-wrap: wrap; margin-top: 24px; border-top: 1px solid var(--line) }
.project-nav a, .action, .quiet-link, .detail-links a, summary { display: inline-flex; align-items: center; min-height: 44px }
.project-nav a { text-decoration: none }
.project-nav a:hover { text-decoration: underline }
main section { padding-block: clamp(48px,7vw,108px); border-top: 1px solid var(--line) }
.platform { font: .77rem/1.4 Consolas,monospace; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .85rem }
.drive { background: #101e27; color: #f4f5ea; border-color: transparent }
.drive .platform { color: #c6db98 }
.drive a:hover { color: #c6db98 }
.drive-header, .section-head { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 7%; margin-bottom: clamp(22px,3.6vw,58px) }
.lead { font-size: clamp(1.3rem,2.2vw,2.3rem); line-height: 1.22; letter-spacing: -.032em; max-width: 36ch }
.intro > p + p, .body-copy { margin-top: 14px; max-width: 53ch; color: var(--muted) }
.drive-proof, .race-exhibit { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(0,1fr); gap: clamp(24px,4vw,65px); align-items: center }
.app-exhibit { background: #243640; padding: 6%; display: flex; align-items: center; justify-content: center; gap: 5% }
.app-exhibit img:first-child { width: 28%; border-radius: 4px }
.app-exhibit img:last-child { width: 63%; border-radius: 3px }
.lap-art { width: min(45%,160px); margin-bottom: 8px }
.drive-info p { margin-block: 8px 12px; max-width: 43ch; color: #c2d1d4 }
.action { font-weight: 620; margin-right: 16px }
.quiet-link { font-size: .95rem; margin-right: 14px }
.watch-specimen h3 { order: 1 }
.watch-exhibit #dial-motion { grid-column: 1/-1; justify-self: start; margin-top: 0 }
.racing { background: #272a2a; color: #f7f3e8; --muted: #c4c9c2 }
.race-main img { width: 100% }
.watch-race img { width: min(60%,220px); margin-block: 12px; border-radius: 50% }
details { margin-top: 12px }
summary { cursor: pointer; text-decoration: underline }
summary::before { content: '+'; margin-right: .6em }
details[open] summary::before { content: '−' }
.detail-links { display: flex; flex-direction: column; align-items: start }
.inspection-grid, .archive-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 6%; align-items: center }
.inspection-grid .lead, .archive-grid .lead { margin-top: 22px }
.inspection .action, .archive .actions { margin-top: 14px }
.inspection-exhibit, .tennis-exhibit { display: grid; align-items: center; gap: 4%; padding: 6% }
.inspection-exhibit { grid-template-columns: 3fr 1fr; background: #d1dde0 }
.tennis-exhibit { grid-template-columns: 1fr 1fr; background: #21352f; padding: 8% }
.tennis-exhibit img { border-radius: 50% }
footer { border-top: 1px solid var(--line) }
.footer-inner { flex-wrap: wrap; padding-block: 15px }
.footer-inner span { margin-right: auto }
@media (max-width: 720px) {
  .drive-header, .section-head, .drive-proof, .race-exhibit, .inspection-grid, .archive-grid { grid-template-columns: 1fr; gap: 22px }
  .watch-exhibit roko-watch { width: 90% }
  .watch-race img { width: min(55%,180px) }
  .lap-art { float: right; margin: 0 0 12px 12px; width: 28% }
}
@media (max-width: 480px) {
  .watch-exhibit { grid-template-columns: 1fr }
  .watch-exhibit roko-watch { width: min(75%,230px) }
  .brand { font-size: 1.12rem; gap: 6px }
  .primary-nav { gap: 10px }
  .primary-nav a { font-size: .9rem }
  .theme-toggle { min-width: 36px }
}

.drive-captures { margin: 0 }
.drive-captures figcaption { color: #b9c9ce; margin-top: 10px; font-size: .9rem }
