/* ozantuncal.com — tokens and rules documented in design-system/MASTER.md */
:root {
  --ink: #181b1a; --panel: #222625; --text: #f1f3f1; --muted: #a9b2b0; --line: #3a413f;
  /* tracks: pastel tones for text and marks, original tones for clip fills */
  --v1: #d2bcdc; --a1: #b5d7b2; --a2: #c0bcdc; --on-accent: #2c302f;
  --v1-fill: #7d6887; --a1-fill: #6a8768; --a2-fill: #6c6887;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 70rem;
  color-scheme: dark;
}
/* Dark is the default for everyone. The light palette applies only with an explicit data-theme="light". */
:root[data-theme="light"] {
  --ink: #eff1f0; --panel: #e4e7e6; --text: #262a29; --muted: #56615f; --line: #c9cfce;
  --v1: #694979; --a1: #3f6a3c; --a2: #4f4979; --on-accent: #fff;
  --v1-fill: #7d6887; --a1-fill: #6a8768; --a2-fill: #6c6887; color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #181b1a; --panel: #222625; --text: #f1f3f1; --muted: #a9b2b0; --line: #3a413f;
  /* tracks: pastel tones for text and marks, original tones for clip fills */
  --v1: #d2bcdc; --a1: #b5d7b2; --a2: #c0bcdc; --on-accent: #2c302f;
  --v1-fill: #7d6887; --a1-fill: #6a8768; --a2-fill: #6c6887; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 1.05rem/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--v1); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--v1); color: var(--on-accent); padding: .5rem 1rem; border-radius: 6px; }
.skip:focus { left: .5rem; }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .9rem var(--gutter); background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .name { font: 700 1.05rem var(--display); text-decoration: none; }
.top nav { display: flex; gap: clamp(.8rem, 2.5vw, 1.8rem); align-items: center; }
.top nav a { text-decoration: none; color: var(--muted); padding: .4rem 0; }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }
.top nav a.cta { color: var(--on-accent); background: var(--v1); padding: .45rem 1rem; border-radius: 99px; font-weight: 500; }

/* hero doors */
.doors { display: flex; height: min(680px, 82dvh); min-height: 480px; }
.door { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(1.5rem, 4vw, 3.5rem);
  text-decoration: none; overflow: hidden; transition: flex .6s cubic-bezier(.2, .8, .2, 1); }
.door:hover, .door:focus-visible { flex: 1.6; }
.door.picture { background: radial-gradient(120% 90% at 20% 15%, color-mix(in srgb, var(--v1) 22%, var(--ink)), var(--ink) 70%); }
.door.sound { background: radial-gradient(120% 90% at 80% 15%, color-mix(in srgb, var(--a1) 22%, var(--ink)), var(--ink) 70%); border-left: 1px solid var(--line); }
.door h2 { font: 800 clamp(2.2rem, 6vw, 5rem)/.9 var(--display); letter-spacing: -.04em; margin: 0 0 .8rem; }
.door.picture h2 { color: var(--v1); } .door.sound h2 { color: var(--a1); }
.door p { margin: 0; max-width: 28ch; }
.door .go { margin-top: 1.2rem; font-weight: 500; text-decoration: underline; text-underline-offset: .3em; }
.door-label { position: absolute; top: clamp(1rem, 3vw, 2rem); left: clamp(1.5rem, 4vw, 3.5rem); font-size: .85rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.door-label b { font-weight: 500; color: var(--text); }
.tc, .wave { position: absolute; left: 0; right: 0; top: 36%; transform: translateY(-50%); }
.tc { text-align: center; font: 500 clamp(1.9rem, 5.2vw, 4rem)/1 var(--body); font-variant-numeric: tabular-nums; color: var(--v1); }
.wave { display: flex; align-items: center; justify-content: center; gap: 6px; height: 110px; }
.wave i { display: block; width: 6px; border-radius: 3px; background: var(--a1); height: var(--h); animation: bar 1.4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes bar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* sections */
section { padding: clamp(3rem, 7vw, 6rem) var(--gutter); }
section > * { max-width: var(--max); }
.intro { padding-bottom: 0; }
.intro h1 { font: 700 clamp(1.6rem, 3.6vw, 2.6rem)/1.15 var(--display); letter-spacing: -.02em; margin: 0; max-width: 30ch; }
.t { font: 800 clamp(2rem, 5vw, 3.6rem)/1 var(--display); letter-spacing: -.03em; margin: 0 0 .6rem; }
#work .t, .reel-wrap .t { color: var(--v1); } .t.sound { color: var(--a1); }
.lead { max-width: 60ch; color: var(--muted); margin: 0 0 2rem; }
.prose { max-width: 62ch; } .prose p { margin: 0 0 1rem; }
.prose .motto { margin: 1.75rem 0; padding-left: 1rem; border-left: 3px solid var(--v1); font-style: italic; font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); line-height: 1.45; color: var(--text); }
.btn { display: inline-block; padding: .7rem 1.3rem; border-radius: 99px; background: var(--v1); color: var(--on-accent); font-weight: 500; text-decoration: none; margin: 1rem .5rem .5rem 0; }
.btn.sound { background: var(--a1); }
.btn.alt { background: none; color: var(--text); border: 1px solid var(--line); }

/* timeline ruler */
.ruler { height: 14px; margin-bottom: 1.5rem;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px) bottom/100% 6px no-repeat,
              repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 120px) bottom/100% 14px no-repeat;
  border-bottom: 1px solid var(--line); opacity: .8; }

/* track marks */
.marks { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 .4rem; }
.mark { font-size: .78rem; letter-spacing: .04em; border: 1px solid currentColor; border-radius: 99px; padding: .1rem .55rem; }
.mark b { font-weight: 500; }
.mark.picture { color: var(--v1); } .mark.sound { color: var(--a1); } .mark.music { color: var(--a2); }

/* grid and cards */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: clamp(1.2rem, 3vw, 2.2rem); align-items: start; }
.card a { display: block; text-decoration: none; }
.card h2, .card h3 { font: 700 1.35rem/1.2 var(--display); margin: 0 0 .2rem; }
.card .meta { color: var(--muted); font-size: .95rem; }
.card[hidden] { display: none; }
.thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: var(--panel); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.thumb.vertical img { object-position: center; }
.card a:hover .thumb img, .card a:focus-visible .thumb img { transform: scale(1.04); }
.thumb.audio { display: grid; place-items: center; background: radial-gradient(90% 90% at 50% 40%, color-mix(in srgb, var(--a1) 25%, var(--panel)), var(--panel)); }
.wave-mini { width: 60%; height: 40%; background: repeating-linear-gradient(90deg, var(--a1) 0 4px, transparent 4px 9px);
  mask: linear-gradient(0deg, transparent, #000 30%, #000 70%, transparent); -webkit-mask: linear-gradient(0deg, transparent, #000 30%, #000 70%, transparent); }

/* players */
.player { position: relative; border-radius: 6px; overflow: hidden; background: var(--panel); margin-bottom: 2rem; }
.player.landscape { aspect-ratio: 16/9; }
.player.vertical { aspect-ratio: 9/16; max-width: 26rem; max-height: 80dvh; }
.player iframe, .player video, .facade, .facade img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade img { object-fit: cover; }
.facade { display: grid; place-items: center; }
.play { position: relative; width: 4.8rem; height: 4.8rem; border-radius: 50%; background: var(--v1); display: grid; place-items: center; transition: transform .25s; box-shadow: 0 6px 30px rgb(0 0 0 / .35); }
.play::after { content: ""; margin-left: .3rem; border-left: 1.2rem solid var(--on-accent); border-top: .8rem solid transparent; border-bottom: .8rem solid transparent; }
.facade:hover .play, .facade:focus-visible .play { transform: scale(1.1); }
.player.audio { height: 380px; background: none; }
.player.audio iframe { border-radius: 12px; }
.player.audio-file { background: none; } .player.audio-file audio { width: 100%; }
.reel-wrap .player { max-width: var(--max); }

/* music */
.band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
.band h3 { font: 700 1.6rem var(--display); margin: 0 0 .5rem; }
.band p { color: var(--muted); margin: 0 0 1rem; }

/* contact */
#contact { background: var(--panel); }
.mail { font: 800 clamp(1.3rem, 4.6vw, 3rem)/1.1 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; text-decoration-thickness: 3px; text-underline-offset: .2em; text-decoration-color: var(--v1); }

/* work index */
.page-head { padding-bottom: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button { font: 500 .95rem var(--body); color: var(--text); background: none; border: 1px solid var(--line); border-radius: 99px; padding: .55rem 1.1rem; min-height: 44px; cursor: pointer; }
.filters button b { font-weight: 500; color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.filters button[aria-pressed="true"] b { color: var(--ink); }
.count { color: var(--muted); font-size: .9rem; min-height: 1.5em; margin: .8rem 0 0; }
.work-list { padding-top: 1rem; }

/* project page */
.project { padding: clamp(2rem, 5vw, 4rem) var(--gutter); }
.project > * { max-width: var(--max); }
.back { color: var(--muted); text-decoration: none; display: inline-block; padding: .4rem 0; }
.back:hover { color: var(--text); }
.project-head .lead { margin-bottom: 2rem; }
.project-body { display: grid; grid-template-columns: 18rem 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); }
.facts { margin: 0; display: grid; gap: 1rem; align-content: start; }
.facts dt { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; font: 700 1.2rem/1.2 var(--display); max-width: 45%; }
.pager a span { display: block; font: 400 .85rem var(--body); color: var(--muted); }
.pager .next { text-align: right; margin-left: auto; }
.tc-big { font: 500 clamp(2.5rem, 8vw, 5rem)/1 var(--body); font-variant-numeric: tabular-nums; color: var(--v1); margin: 0 0 1rem; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--gutter); color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.foot .links { display: flex; gap: 1.5rem; }
.foot a { text-decoration: none; padding: .3rem 0; } .foot a:hover { color: var(--text); }

@media (max-width: 760px) {
  .top { padding: .55rem 1rem; }
  .top .name { font-size: .9rem; }
  .top nav a:not(.cta):not([href="/work.html"]) { display: none; }
  .top nav a.cta { padding: .35rem .8rem; font-size: .85rem; }
  .doors { flex-direction: column; height: auto; min-height: 0; }
  .door { min-height: 340px; }
  .door:hover, .door:focus-visible { flex: 1; }
  .door.sound { border-left: 0; border-top: 1px solid var(--line); }
  .tc, .wave { top: 32%; }
  .wave { gap: 5px; height: 64px; }
  .wave i { width: 5px; height: calc(var(--h) * .55); }
  .band, .project-body { grid-template-columns: 1fr; }
  .player.vertical { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .wave i { animation: none; transform: scaleY(.7); }
  .door, .thumb img, .play { transition: none; }
  html { scroll-behavior: auto; }
}
