/* ============================================================
   david.virginia.dev — stylesheet
   Dark mode default, light mode via [data-theme="light"]
   Fonts: Lora (display) · Source Sans 3 (body) · JetBrains Mono (code)
   ============================================================ */

/* === Custom Properties === */
:root {
  --bg:           #0D1117;
  --surface:      #161C27;
  --surface-2:    #1E2535;
  --border:       #2C3A52;
  --text:         #E2E8F0;
  --text-muted:   #7A8BA5;
  --accent:       #D97706;
  --accent-light: #FBBF24;
  --accent-glow:  rgba(217, 119, 6, 0.12);

  --font-display: 'Lora', Georgia, serif;
  --font-body:    'Source Sans 3', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  14px;
  --max-width:  1100px;
  --nav-height: 64px;
  --tr:         180ms ease;
}

[data-theme="light"] {
  --bg:           #F5F1EA;
  --surface:      #FFFFFF;
  --surface-2:    #EDE8DF;
  --border:       #D4CDBE;
  --text:         #1A1F2E;
  --text-muted:   #5A6478;
  --accent:       #B45309;
  --accent-light: #D97706;
  --accent-glow:  rgba(180, 83, 9, 0.08);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  transition: background var(--tr), color var(--tr);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

/* === Typography === */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 0.9rem; font-weight: 600; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

p { color: var(--text); }
p + p { margin-top: 1rem; }

.mono, code { font-family: var(--font-mono); font-size: 0.875em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.section-header { margin-bottom: 3rem; }
.section-header .eyebrow { margin-bottom: 0.6rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 55ch; }

/* === Navigation === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .nav { background: rgba(245, 241, 234, 0.88); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}
.nav-logo-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: color var(--tr), background var(--tr);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.35rem 0.55rem;
  line-height: 1;
  transition: all var(--tr);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }

.nav-hamburger {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  text-decoration: none;
  transition: all var(--tr);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-light); color: #fff; }

.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* === Hero === */
.hero {
  position: relative;
  padding: 7rem 0 5.5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bg svg {
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: 0.045;
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero-tagline {
  font-size: clamp(2.1rem, 5.5vw, 3.75rem);
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.75rem;
}

/* The signature element: amber left-bar on each tagline line */
.hero-tagline .tl {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.15em;
}
.hero-tagline .tl::before {
  content: '';
  flex-shrink: 0;
  width: 3px;
  height: 0.85em;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.9;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}
.hero-sub .separator { margin: 0 0.3rem; opacity: 0.4; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* === Page Hero (inner pages) === */
.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-hero .eyebrow { margin-bottom: 0.75rem; }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { color: var(--text-muted); max-width: 55ch; font-size: 1.05rem; }

/* === Pillars === */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow var(--tr);
}
.pillar:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.25); }
.pillar-icon { font-size: 1.6rem; margin-bottom: 0.75rem; }
.pillar h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.pillar p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.7; }

/* === Cards === */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 6px 24px rgba(0,0,0,0.2);
}
.card-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.25rem; }
.card-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.card-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.875rem; }
.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
}
.card-link:hover { text-decoration: underline; }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

/* === Timeline === */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45rem;
  bottom: 0;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.75rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.45rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-4px);
  border: 2px solid var(--bg);
}
.timeline-item.current::before {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
  letter-spacing: 0.08em;
}
.timeline-item h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.timeline-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}
.timeline-item p { font-size: 0.875rem; color: var(--text-muted); }

/* === Beyond Work (theater / radio) === */
.beyond-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.beyond-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.beyond-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.beyond-card-header .icon { font-size: 1.75rem; }
.beyond-card h3 { font-size: 1.1rem; margin: 0; }
.beyond-card p { color: var(--text-muted); font-size: 0.875rem; }
.beyond-list {
  list-style: none;
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.beyond-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
}
.beyond-list li::before { content: '—'; color: var(--accent); flex-shrink: 0; }

/* === Callout / Blockquote === */
.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
}
.callout cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === Pull-quote (hero-grade) === */
.pull-quote {
  position: relative;
  padding: 2.5rem 2rem 2rem 3.5rem;
  margin: 1rem 0;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pull-quote::before {
  content: "\201C";
  position: absolute;
  top: 0.25rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  pointer-events: none;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}
.pull-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
@media (max-width: 640px) {
  .pull-quote { padding: 2rem 1.25rem 1.5rem 2.25rem; }
  .pull-quote::before { font-size: 4rem; top: 0.5rem; left: 0.5rem; }
  .pull-quote p { font-size: 1.2rem; }
}

/* === Writing list === */
.writing-list { list-style: none; }
.writing-list li { border-bottom: 1px solid var(--border); }
.writing-list li:first-child { border-top: 1px solid var(--border); }
.writing-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  color: var(--text);
  text-decoration: none;
  transition: color var(--tr);
}
.writing-list a:hover { color: var(--accent); text-decoration: none; }
.writing-list .writing-title { font-weight: 600; font-size: 0.95rem; }
.writing-list .writing-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.writing-list .writing-stub { color: var(--text-muted); font-style: italic; cursor: default; }

/* === Skills (resume page) === */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}
.skill-group h4 {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}
.skill-group ul { list-style: none; }
.skill-group li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}
.skill-group li:last-child { border-bottom: none; }

/* === Contact options === */
.contact-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: all var(--tr);
}
.contact-item:hover { border-color: var(--accent); text-decoration: none; }
.contact-item:hover .contact-item-value { color: var(--accent); }
.contact-icon { font-size: 1.4rem; flex-shrink: 0; }
.contact-item-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}
.contact-item-value { font-weight: 600; font-size: 0.9rem; }

/* === Now page === */
.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.now-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.now-card h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 1rem;
}
.now-card p, .now-card li { color: var(--text-muted); font-size: 0.9rem; }
.now-card ul { list-style: none; padding: 0; }
.now-card li { padding: 0.25rem 0; border-bottom: 1px solid var(--border); }
.now-card li:last-child { border-bottom: none; }
.now-card li::before { content: '→ '; color: var(--accent); font-family: var(--font-mono); }

/* === Footer === */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-brand { }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.06em;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--tr);
}
.footer-links a:hover { color: var(--accent); }

/* === Utility === */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0 !important; }

.productions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.productions-table th {
  text-align: left;
  padding: 0.6rem 1rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.productions-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.productions-table td:first-child { color: var(--text); font-weight: 600; }
.productions-table tr:last-child td { border-bottom: none; }
.productions-table tr:hover td { background: var(--surface-2); }

.callsign-display {
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 1rem 0 0.5rem;
}
.callsign-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* === Responsive === */
@media (max-width: 900px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 99;
  }
  .nav-links.open li { border-bottom: 1px solid var(--border); }
  .nav-links.open li:last-child { border-bottom: none; }
  .nav-links.open a {
    padding: 0.8rem 1.5rem;
    border-radius: 0;
    font-size: 0.95rem;
  }
  .nav-hamburger { display: block; }
  .nav { overflow: visible; }

  section { padding: 3.5rem 0; }
  .hero { padding: 4.5rem 0 3.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 1rem; }
  .productions-table th:nth-child(3),
  .productions-table td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

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