/* ============================================
   KK — Editor Portfolio
   Design system: cutting-room / timecode identity
   ============================================ */

:root {
  --ink: #241A12;
  --ink-soft: #362718;
  --paper: #F1E7D4;
  --paper-dim: #DFCBA3;
  --signal: #BD6127;
  --steel: #9C8464;
  --line: rgba(241, 231, 212, 0.16);
  --line-dark: rgba(36, 26, 18, 0.14);

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Source Serif 4", "Georgia", serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --max: 1100px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

@font-face {
  font-family: "Archivo";
  src: local("Archivo");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img { max-width: 100%; display: block; }

/* ---------- Skip link / accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--signal);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  font-family: var(--font-display);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- Timecode bar (structural motif) ---------- */
.tc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem var(--pad);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--steel);
  border-bottom: 1px solid var(--line);
}
.tc-bar__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  margin-right: 0.5rem;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-bar__dot { animation: none; }
}

/* ---------- Header / nav ---------- */
header.site {
  padding: 1.25rem var(--pad) 0;
  max-width: var(--max);
  margin: 0 auto;
}
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: -0.005em;
  color: var(--paper);
  white-space: nowrap;
}
.wordmark span {
  color: var(--signal);
}
nav.primary {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
nav.primary a {
  text-decoration: none;
  color: var(--steel);
  position: relative;
  padding-bottom: 3px;
}
nav.primary a:hover,
nav.primary a[aria-current="page"] {
  color: var(--paper);
}
nav.primary a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--signal);
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line);
}
section:last-of-type { border-bottom: none; }

.eyebrow-tc {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--signal);
  margin-bottom: 0.9rem;
  letter-spacing: 0.02em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.25rem; }

p { max-width: 62ch; color: var(--paper); }
p.lede {
  font-size: 1.2rem;
  color: var(--paper-dim);
  max-width: 58ch;
}

.steel { color: var(--steel); }

/* ---------- Hero ---------- */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: end;
}
@media (max-width: 780px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-credits {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--steel);
  border-left: 2px solid var(--signal);
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--paper);
  color: var(--paper);
  background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: var(--paper);
  color: var(--ink);
}
.btn--solid {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--paper);
}
.btn--solid:hover {
  background: transparent;
  color: var(--signal);
}

/* ---------- Reel / video placeholder ---------- */
.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.reel-frame__scrub {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--line);
}
.reel-frame__scrub::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 28%;
  background: var(--signal);
}
.reel-frame__play {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-dim);
}
.reel-frame__label {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--steel);
  letter-spacing: 0.03em;
}
.reel-caption {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--steel);
}

/* ---------- Project list ---------- */
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-row {
  display: grid;
  grid-template-columns: 6rem 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.project-list li:last-child .project-row {
  border-bottom: 1px solid var(--line);
}
.project-row__year {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 0.9rem;
}
.project-row__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.project-row__role {
  color: var(--signal);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: none;
}
.project-row__meta {
  color: var(--steel);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .project-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .project-row__meta { text-align: left; }
}

/* ---------- Accolades ---------- */
.accolade {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.accolade:last-child { border-bottom: 1px solid var(--line); }
.accolade__mark {
  font-family: var(--font-mono);
  color: var(--signal);
  font-size: 0.8rem;
  padding-top: 0.2rem;
}

/* ---------- Bio ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 780px) {
  .bio-grid { grid-template-columns: 1fr; }
}
.stat-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.stat-block__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--signal);
}
.stat-block__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
}
.stat-row {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ---------- Contact ---------- */
.contact-card {
  border: 1px solid var(--line);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 30rem;
}
.contact-card h3 {
  margin: 0;
}
.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.contact-row a {
  color: var(--signal);
  text-decoration: none;
}
.contact-row a:hover { text-decoration: underline; }

/* ---------- Project category sub-nav ---------- */
.cat-nav {
  display: flex;
  gap: 2rem;
  margin: 1.5rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.cat-nav a {
  text-decoration: none;
  color: var(--steel);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid transparent;
}
.cat-nav a:hover,
.cat-nav a[aria-current="page"] {
  color: var(--paper);
}
.cat-nav a[aria-current="page"] {
  border-bottom-color: var(--signal);
}

/* ---------- Project index cards ---------- */
.cat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 780px) {
  .cat-cards { grid-template-columns: 1fr; }
}
.cat-card {
  border: 1px solid var(--line);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.15s ease;
}
.cat-card:hover {
  border-color: var(--signal);
}
.cat-card__num {
  font-family: var(--font-mono);
  color: var(--signal);
  font-size: 0.8rem;
}
.cat-card h3 {
  margin: 0;
}
.cat-card p {
  color: var(--steel);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Credit card with per-item video slot ---------- */
.credit-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.project-list li:last-child .credit-card {
  border-bottom: 1px solid var(--line);
}
@media (max-width: 620px) {
  .credit-card {
    grid-template-columns: 1fr;
  }
}
.credit-card__video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.credit-card__video .reel-frame__play {
  width: 40px;
  height: 40px;
}
.credit-card__video .reel-frame__play svg {
  width: 13px;
  height: 16px;
}
.credit-card__video-label {
  position: absolute;
  bottom: 0.4rem;
  left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--steel);
}
.credit-card--vertical .credit-card__video {
  aspect-ratio: 9 / 16;
  max-width: 160px;
  justify-self: start;
}
@media (max-width: 620px) {
  .credit-card--vertical .credit-card__video {
    max-width: 140px;
  }
}
.credit-card__body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.reel-frame video,
.credit-card__video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink-soft);
  display: block;
}
.reel-frame,
.credit-card__video {
  background: var(--ink-soft);
}

/* ---------- Footer ---------- */
footer.site {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
}
