/*
 * Tomas Maldonado theme — site styles.
 * Lifted from D-Hybrid.html prototype. CSS custom properties duplicated from style.css for cascade safety.
 *
 * Authoring rules:
 *  • Don't add component styles inline in PHP partials going forward — extend this file.
 *  • Section grids and font tokens live here; one-off colors / spacing for repeating elements
 *    (cards, rows) should also migrate here over time. The inline style="" attributes in partials
 *    are a faithful 1:1 of the React prototype and intentionally left so visual diffs stay tiny.
 *  • Keep the file flat (no nesting / no preprocessor). WordPress + ACF authors should be able to
 *    read it without tooling.
 */

:root {
  --cream: #f1ead8;
  --cream-2: #e5dcc4;
  --black: #0d0b08;
  --black-2: #1a1612;
  --line: #0d0b0822;
  --line-strong: #0d0b0855;
  --ink: #0d0b08;
  --ink-2: #4a4238;
  --ink-3: #7a7064;
  --accent: #ffb547;
  --accent-deep: #c98317;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video, pre { max-width: 100%; }
.display { font-family: 'Archivo Narrow', sans-serif; font-weight: 800; letter-spacing: -0.025em; line-height: 0.9; }
.mono    { font-family: 'JetBrains Mono', monospace; }
.label   { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
::selection { background: var(--accent); color: var(--black); }
a { color: inherit; text-decoration: none; }
.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }

@keyframes scroll       { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
@keyframes press-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink        { 50% { border-color: transparent; } }

/* Site header / nav */
.d-site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--cream); border-bottom: 2px solid var(--black);
}
.d-nav-bar { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.d-brand { font-family: 'Archivo Narrow', sans-serif; font-weight: 800; font-size: 28px; letter-spacing: -0.025em; }
.d-nav { display: flex; gap: 28px; align-items: center; }
.d-book-btn { background: var(--black); color: var(--cream); padding: 8px 14px; }

/* Reveal-on-scroll (used by ticker.js) */
[data-tm-reveal] { opacity: 0; transform: translateX(-12px); transition: opacity 600ms ease, transform 600ms ease; }
[data-tm-reveal].is-visible { opacity: 1; transform: translateX(0); }

/* ─── MOBILE ─── ≤768px */
@media (max-width: 768px) {
  body { font-size: 15px; }
  .container { padding: 0 20px !important; max-width: 100% !important; }

  .d-nav a:not([href="#contact"]) { display: none !important; }
  .d-nav { gap: 12px !important; }
  .d-nav-bar { height: 56px !important; }

  section .container { padding-top: 48px !important; padding-bottom: 48px !important; padding-left: 20px !important; padding-right: 20px !important; }

  h1, .d-hero-headline { font-size: 34px !important; line-height: 1.05 !important; }
  .d-hero-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .d-status-row { flex-wrap: wrap; gap: 6px; }
  .d-hero-grid pre { font-size: 10.5px !important; padding: 14px !important; line-height: 1.7 !important; overflow-x: auto; }

  .d-scoreboard-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .d-scoreboard-grid > div { border-left: none !important; border-top: 1px solid #ffffff22 !important; padding: 20px !important; }
  .d-scoreboard-grid > div:nth-child(-n+2) { border-top: none !important; }
  .d-scoreboard-grid > div:nth-child(2n) { border-left: 1px solid #ffffff22 !important; }
  .d-scoreboard-grid > div .display { font-size: 42px !important; }

  .d-section-head .display:first-child { font-size: 44px !important; }
  section h2.display { font-size: 28px !important; }
  .d-press .display { font-size: 36px !important; }

  blockquote.display { font-size: 30px !important; line-height: 1.05 !important; }

  /* Timeline: stack year + body, hide diamond, accent left border on body */
  .d-tl-row { grid-template-columns: 1fr !important; gap: 0 !important; }
  .d-tl-row > .d-tl-rail { display: none !important; }
  .d-tl-row > div:nth-child(1) { padding: 24px 0 0 !important; }
  .d-tl-row > div:nth-child(1) .display { font-size: 38px !important; }
  .d-tl-row > div:nth-child(3) {
    padding: 12px 0 24px 16px !important;
    border-top: none !important;
    border-left: 2px solid var(--accent) !important;
  }
  .d-tl-row > div:nth-child(3) h3 { font-size: 20px !important; }

  .d-lib-grid    { grid-template-columns: 1fr !important; gap: 12px !important; }
  .d-libcard     { min-height: 0 !important; padding: 18px !important; }
  .d-libcard h3  { font-size: 18px !important; }
  .d-filter-row  { gap: 6px !important; }
  .d-filter-row button { padding: 7px 10px !important; font-size: 10px !important; }

  .d-talks-grid                          { grid-template-columns: 1fr !important; gap: 14px !important; }
  .d-talks-grid article > div:last-child { padding: 18px !important; }
  .d-talks-grid h3                       { font-size: 22px !important; }

  .d-li-grid    { grid-template-columns: 1fr !important; gap: 14px !important; }
  .d-li-card    { padding: 20px !important; }
  .d-li-card p  { font-size: 16px !important; }

  .d-adv-row { grid-template-columns: 1fr !important; padding: 20px 0 !important; gap: 8px !important; }

  .d-contact-grid { grid-template-columns: 1fr !important; }
  .d-contact-grid > a { border-left: none !important; border-top: 2px solid var(--cream) !important; padding: 22px !important; }
  .d-contact-grid > a:first-child { border-top: none !important; }
  .d-contact-headline { font-size: 52px !important; }
  .d-contact-grid .display { font-size: 18px !important; }
}

/* ─── TABLET ─── 769–1024 */
@media (min-width: 769px) and (max-width: 1024px) {
  .container     { padding: 0 28px !important; }
  .d-lib-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .d-nav a[href="#about"], .d-nav a[href="#timeline"] { display: none; }
}
