/* carlmiller.co — clean rebuild, evolved from the Webflow design
   Identity: near-black olive ground, Oswald condensed display type in
   electric blue, Inconsolata for everything else. */

@font-face {
  font-family: 'Inconsolata';
  src: url('../assets/fonts/inconsolata-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Oswald';
  src: url('../assets/Oswald-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #141300;          /* olive-black ground */
  --bg-panel: #0e0e11;    /* near-black panels (contact band) */
  --ink: #ffffff;
  --ink-dim: #c8c8c8;
  --ink-faint: #758696;
  --blue: #525ceb;        /* display blue */
  --blue-action: #3998eb; /* button blue */
  --pale: #bfcfe7;        /* publication names, small accents */
  --rule: #444445;
  --oswald: 'Oswald', 'Arial Narrow', sans-serif;
  --mono: 'Inconsolata', ui-monospace, 'Courier New', monospace;
  --measure: 62ch;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1.55;
}

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

a { color: inherit; text-decoration: none; }
p a, li a { border-bottom: 1px solid var(--blue-action); }
p a:hover, li a:hover { color: var(--pale); }

/* ---------- header / menu ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px min(8vw, 110px);
}

.menu-toggle {
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 4px 0;
}
.menu-toggle:hover { color: var(--pale); }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 0 min(10vw, 140px);
  z-index: 50;
}
.menu-overlay.open { display: flex; }

.menu-overlay a {
  font-family: var(--oswald);
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--ink);
}
.menu-overlay a:hover,
.menu-overlay a[aria-current="page"] { color: var(--blue); }

.menu-close {
  position: absolute;
  top: 28px;
  right: min(8vw, 110px);
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 18px;
  cursor: pointer;
}

/* ---------- shared blocks ---------- */

main { padding: 0 min(8vw, 110px) 60px; }

.kicker {
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0.08em;
  margin: 70px 0 10px;
}
.kicker::before { content: '// '; }

.page-title {
  font-family: var(--oswald);
  font-size: clamp(56px, 10vw, 130px);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 0 0 40px;
}
.page-title .slash { color: var(--blue); opacity: .45; }

.index-label {
  color: var(--ink-faint);
  font-size: 16px;
  margin: 56px 0 4px;
}

h2.strand {
  font-family: var(--oswald);
  font-size: clamp(34px, 4.5vw, 52px);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 14px;
}

.prose { max-width: var(--measure); color: var(--ink-dim); }
.prose strong { color: var(--ink); font-weight: 400; }

/* ---------- home hero ---------- */

.hero { text-align: center; padding-top: 20px; }

.hero-name {
  font-family: var(--oswald);
  font-size: 14vw;
  line-height: 1;
  color: var(--blue);
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
}

.hero-social {
  display: flex;
  gap: 26px;
  justify-content: center;
  margin: 26px 0 18px;
}
.hero-social img { width: 22px; height: 22px; opacity: .85; }
.hero-social a:hover img { opacity: 1; }

.hero-tagline { font-size: clamp(20px, 2.4vw, 30px); margin: 0 0 46px; }

.more-link { margin: 14px 0 0; font-size: 16px; }
.more-link a { color: var(--pale); border-bottom: 0; }
.more-link a:hover { color: var(--blue); }

.hero-figure { margin: 0; }
.hero-figure img { width: 100%; }
.hero-crop img { height: min(620px, 58vw); object-fit: cover; object-position: 50% 62%; }

/* ---------- card list (work / investigations index) ---------- */

.link-rows { border-top: 1px solid var(--rule); margin-top: 26px; }
.link-rows a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 30px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
.link-rows .t { font-size: 20px; }
.link-rows .d { color: var(--ink-faint); text-align: right; max-width: 40ch; }
.link-rows a:hover .t { color: var(--blue); }

/* ---------- writing list ---------- */

.writing-list { list-style: none; padding: 0; margin: 30px 0 0; max-width: 900px; }
.writing-list li { border-bottom: 1px solid var(--rule); }
.writing-list a {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 0;
  border-bottom: 0;
}
.writing-list .headline { max-width: 56ch; }
.writing-list .outlet { color: var(--pale); white-space: nowrap; }
.writing-list a:hover .headline { color: var(--blue); }

.writing-list li.flat {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 0;
}
.writing-list li.flat .headline { max-width: 56ch; }
@media (max-width: 720px) {
  .writing-list li.flat { flex-direction: column; gap: 4px; }
}

.writing-list.awards li {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 16px 0;
}
@media (max-width: 720px) {
  .writing-list li.flat {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 22px 0;
}
.writing-list li.flat .headline { max-width: 56ch; }
@media (max-width: 720px) {
  .writing-list li.flat { flex-direction: column; gap: 4px; }
}

.writing-list.awards li { flex-direction: column; gap: 2px; }
}

/* ---------- video embed ---------- */

.video-embed { margin: 10px 0 50px; max-width: none; }
.video-frame { position: relative; aspect-ratio: 16 / 9; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed figcaption { color: var(--ink-faint); font-size: 15px; margin-top: 10px; }

/* ---------- lexicon ---------- */

.lexicon { max-width: var(--measure); margin: 26px 0 0; }
.lexicon dt { color: var(--pale); margin-top: 22px; }
.lexicon dd { margin: 6px 0 0; color: var(--ink-dim); }

.home-section-title { margin-top: 0; }
.intro-row { margin-top: clamp(80px, 11vw, 140px); margin-bottom: clamp(30px, 5vw, 60px); }
.about-item.plain:hover .strand { color: var(--ink); }

/* ---------- speaking bar ---------- */

.speaking-bar {
  margin: 60px calc(-1 * min(8vw, 110px)) 0;
  padding: 26px min(8vw, 110px);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.speaking-bar p { margin: 0; color: var(--ink-dim); flex: 1 1 auto; min-width: 0; }
.speaking-bar a { color: var(--blue); white-space: nowrap; }
.speaking-bar a:hover { color: var(--pale); }

/* ---------- forms ---------- */

.contact-band {
  background: var(--bg-panel);
  margin: clamp(60px, 9vw, 110px) calc(-1 * min(8vw, 110px)) 0;
  padding: 60px min(8vw, 110px) 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  max-width: 900px;
  margin: 40px auto 0;
}
.contact-grid .full { grid-column: 1 / -1; }

.field {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #c4c4c4;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  padding: 1.4em 0 0.6em;
  width: 100%;
  border-radius: 0;
}
.field:focus { outline: none; border-bottom-color: var(--blue-action); }
.field::placeholder { color: var(--ink-dim); }
textarea.field { min-height: 90px; resize: vertical; }

.btn {
  background: var(--blue-action);
  color: #fff;
  border: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 300;
  width: 260px;
  height: 42px;
  cursor: pointer;
  justify-self: end;
}
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .6; }

.form-note { display: none; background: #ddd; color: #333; text-align: center; padding: 20px; }
.form-note.fail { background: #ffdede; }

/* ---------- footer ---------- */

.site-footer {
  padding: 70px min(8vw, 110px) 50px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-name {
  font-family: var(--oswald);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--blue);
}
.footer-meta { color: var(--ink-faint); font-size: 15px; text-align: right; }
.footer-meta a { border-bottom: 1px solid var(--rule); }
.footer-meta a:hover { color: var(--pale); }

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero-name { font-size: 17vw; white-space: normal; }
  .contact-grid { grid-template-columns: 1fr; }
  .link-rows a { flex-direction: column; align-items: flex-start; gap: 6px; }
  .link-rows .d { text-align: left; }
  .writing-list a { flex-direction: column; gap: 4px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .footer-meta { text-align: left; }
}

/* homepage about grid */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px min(6vw, 90px);
}
.about-grid .index-label { margin-top: 40px; }
.about-grid .prose { max-width: none; }
.about-item.wide { grid-column: 1 / -1; }
.about-item.wide .prose { max-width: 90ch; }

/* whole block clickable via stretched more-link */
.about-item { position: relative; }
.about-item .prose a { position: relative; z-index: 1; }
.about-item .more-link a::after { content: ''; position: absolute; inset: 0; }
.about-item:hover .strand { color: var(--blue); }
.about-item:hover .more-link a { color: var(--blue); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 0; }
}
