/* clarelowkey.com — portfolio styles.
   Built on the Big 3 Timelines design system, inverted to white ink on a black ground. */

/* ---------- Tokens ---------- */
:root {
  --paper: #151514;          /* ground */
  --paper-sunken: #232220;   /* hover fills */
  --paper-raised: #1c1c1a;
  --ink: #f3f2ee;            /* text, 16.3:1 */
  --ink-muted: #a8a59d;      /* secondary text, 7.4:1 */
  --line: #3a3935;           /* soft rules */
  --line-strong: #f3f2ee;    /* editorial hairlines and outlines */
  --on-ink: #151514;
  --signal: #ff3b1f;         /* the one accent */
  --sky: #c4dcf6; --mint: #bfe6cc; --peach: #ffcfae; --lilac: #e3c8f4; --lemon: #f4ea4a;
  --rose: #f6c6d0; --sage: #d3e0b4; --sand: #e6dcc8;
  --font-sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius-lg: 20px; --radius-pill: 999px;
  --gutter: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color-scheme: dark; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 15px; line-height: 22px; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: var(--radius-pill); }
.skip:focus { left: 16px; }
.mono { font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 28px 0 16px; border-bottom: 1px solid var(--line-strong); }
.brand { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 20px; line-height: 26px; font-weight: 500; text-decoration: none; }
.brand .slash { color: var(--signal); font-weight: 400; }
.brand .role { font-weight: 400; color: var(--ink-muted); }
.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 10px 0; text-underline-offset: 6px; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Page hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 72px 0 96px; }
.hero h1 { margin: 0; font-size: clamp(120px, 17vw, 248px); line-height: .82; font-weight: 400; letter-spacing: -.05em; }
.hero-side { display: flex; flex-direction: column; gap: 20px; width: 360px; max-width: 100%; }
.hero-side p { margin: 0; color: var(--ink-muted); }

/* ---------- Filter list (Big 3 FilterList) ---------- */
.filter { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.filter-list { display: flex; flex-direction: column; border-bottom: 1px solid var(--line-strong); }
.filter-list button { display: flex; align-items: center; gap: 8px; padding: 5px 0; border: 0; border-top: 1px solid var(--line-strong); background: none; font-size: 20px; line-height: 26px; text-align: left; cursor: pointer; }
.filter-list button:hover { color: var(--ink-muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }
.filter-list button[aria-pressed="true"] .dot { background: var(--signal); border-color: var(--signal); }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; align-self: flex-start; padding: 3px; gap: 2px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); }
.seg button { height: 32px; padding: 0 16px; border: 0; border-radius: var(--radius-pill); background: transparent; font-size: 13px; line-height: 18px; font-weight: 500; cursor: pointer; }
.seg button:hover { background: var(--paper-sunken); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* ---------- Tags and buttons ---------- */
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 24px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: transparent; font-size: 13px; line-height: 18px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--paper-sunken); }
.btn svg { width: 16px; height: 16px; }

/* ---------- Work grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 64px 32px; padding-bottom: 120px; }
.card { display: flex; flex-direction: column; gap: 12px; min-width: 0; text-decoration: none; }
.card-head { display: flex; align-items: center; gap: 20px; height: 72px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); min-width: 0; }
.num { flex: none; font-size: 64px; line-height: .95; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.card-title b { font-size: 20px; line-height: 26px; font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fill, var(--sky)); color: var(--on-ink); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: transform .4s ease, opacity .3s ease; }
.thumb.has-img img { opacity: 1; }
.thumb .stand-in { position: absolute; left: 20px; right: 20px; bottom: 14px; font-size: 48px; line-height: 1; letter-spacing: -.03em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.thumb.has-img .stand-in { display: none; }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; transition: transform .2s ease; }
.play svg { width: 22px; height: 22px; margin-left: 3px; }
.card:hover .thumb img { transform: scale(1.03); }
.card:hover .play { transform: scale(1.08); }
.card:hover .card-title b { text-decoration: underline; text-underline-offset: 4px; }
.more { display: none; justify-content: center; padding: 0 0 56px; }

/* ---------- Project page ---------- */
.proj-head { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 64px 0 48px; text-align: center; }
.proj-head h1 { margin: 0; font-size: clamp(56px, 9vw, 140px); line-height: .9; font-weight: 400; letter-spacing: -.045em; max-width: 14ch; text-wrap: balance; }
.media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fill, var(--sky)); color: var(--on-ink); }
.media img, .media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.media img { opacity: 0; transition: opacity .3s ease; }
.media.has-img img { opacity: 1; }
.media .stand-in { position: absolute; left: 32px; right: 32px; bottom: 24px; font-size: clamp(48px, 8vw, 112px); line-height: .9; letter-spacing: -.04em; }
.media.has-img .stand-in { display: none; }
.media button { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; cursor: pointer; }
.media .play { width: 112px; height: 112px; margin: -56px 0 0 -56px; }
.media .play svg { width: 40px; height: 40px; }
.media button:hover .play { transform: scale(1.06); }
.reels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.reel { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--lilac); text-decoration: none; }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.reel .play { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.reel .mono { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--paper); color: var(--ink); }
.reel:hover img { transform: scale(1.03); }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 48px; padding: 80px 0 120px; }
.facts { margin: 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line-strong); align-self: start; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-strong); }
.facts dt { font-size: 12px; color: var(--ink-muted); }
.facts dd { margin: 0; font-size: 20px; line-height: 26px; font-weight: 500; }
.details p { margin: 0; font-size: 24px; line-height: 34px; font-weight: 300; letter-spacing: -.01em; max-width: 30ch; }
.scope { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-strong); align-self: start; }
.scope > span { font-size: 12px; color: var(--ink-muted); }
.scope div { display: flex; flex-wrap: wrap; gap: 8px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; border-top: 1px solid var(--line-strong); padding: 48px 0 80px; }
.pager a { display: flex; align-items: center; gap: 20px; max-width: 620px; text-decoration: none; }
.pager a.next { margin-left: auto; text-align: right; }
.pager a > span:not(.round) { display: flex; flex-direction: column; gap: 6px; }
.pager a.next > span:not(.round) { align-items: flex-end; }
.pager b { font-size: clamp(36px, 4.5vw, 56px); line-height: .95; font-weight: 400; letter-spacing: -.04em; }
.round { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: background .15s ease, color .15s ease; }
.round svg { width: 20px; height: 20px; }
.pager a:hover .round { background: var(--ink); color: var(--on-ink); }

/* ---------- Archive ---------- */
.seg-wrap { display: flex; flex-direction: column; gap: 6px; }
.rows { padding-bottom: 120px; }
.row { display: flex; flex-wrap: wrap; gap: 16px 40px; padding: 24px 0 32px; border-top: 1px solid var(--line-strong); }
.row-when { flex: 0 0 220px; display: flex; flex-direction: column; gap: 8px; }
.row-what { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.row-what h2 { margin: 0; font-size: 28px; line-height: 32px; font-weight: 400; letter-spacing: -.01em; }
.row ul { flex: 1 1 400px; margin: 0; padding: 8px 0 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.row li { display: flex; gap: 10px; }
.row li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); }

/* ---------- Skills ---------- */
.skill-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; align-items: start; padding-bottom: 120px; }
.skill-card { border: 1.5px solid var(--line-strong); border-radius: var(--radius-lg); padding: 20px 24px 8px; }
.skill-card h2 { margin: 0 0 12px; font-size: 28px; line-height: 32px; font-weight: 400; letter-spacing: -.01em; }
.skill-card ol, .skill-card ul { margin: 0; padding: 0; list-style: none; }
.skill-card li { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--line); font-size: 17px; line-height: 24px; }
.skill-card ul li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }

/* ---------- Footer ---------- */
.site-foot { border-top: 1px solid var(--line-strong); padding: 48px 0 32px; display: flex; flex-direction: column; gap: 64px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 40px; }
.foot-nav { display: flex; flex-direction: column; font-size: 40px; line-height: 46px; letter-spacing: -.02em; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.thanks { margin: 0; font-size: clamp(56px, 7.5vw, 112px); line-height: .95; letter-spacing: -.04em; }
.thanks em { font-weight: 300; }
.thanks .dot-end { color: var(--signal); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot-base a:hover { color: var(--ink); }

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-head { flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px 0 4px; }
  .brand { font-size: 18px; line-height: 24px; }
  .brand .role { font-size: 15px; }
  .nav { gap: 24px; }
  .nav a { padding: 12px 0; }
  .hero { padding: 40px 0; gap: 20px; }
  .hero h1 { font-size: clamp(96px, 34vw, 136px); }
  .hero h1.long { font-size: 24vw; }
  .grid { gap: 40px; padding-bottom: 40px; }
  .card { gap: 10px; }
  .card-head { height: 60px; gap: 14px; }
  .num { font-size: 48px; }
  .card-title b { font-size: 17px; line-height: 22px; }
  .thumb .stand-in { left: 14px; bottom: 10px; font-size: 34px; }
  .play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
  .play svg { width: 18px; height: 18px; }
  .grid.is-clipped .card:nth-child(n + 7) { display: none; }
  .grid.is-clipped + .more { display: flex; }
  .proj-head { padding: 36px 0 28px; }
  .media .play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .media .play svg { width: 26px; height: 26px; }
  .media .stand-in { left: 16px; bottom: 12px; }
  .reels { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .details { gap: 32px; padding: 40px 0 64px; }
  .details p { font-size: 19px; line-height: 28px; }
  .pager { flex-direction: column; padding: 32px 0 48px; }
  .pager a.next { margin-left: 0; }
  .row-when { flex-basis: 100%; flex-direction: row; align-items: baseline; justify-content: space-between; }
  .row-when .num { font-size: 48px; }
  .site-foot { padding: 36px 0 28px; gap: 40px; }
  .foot-nav { font-size: 36px; line-height: 44px; }
  .thanks { font-size: 60px; }
  .foot-base { flex-direction: column; gap: 4px; }
  .foot-base a { padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
