:root {
  --bg: #0d0d0d;
  --bg-alt: #1a1a1a;
  --fg: #f5f5f5;
  --fg-muted: #b3b3b3;
  --accent: #ef4444;
  --border: #2e2e2e;
  --radius: 8px;
  --max-width: 1100px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
}

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

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(13, 13, 13, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; position: relative; }
.nav-brand { color: var(--fg); font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--fg-muted); text-decoration: none; font-size: 0.95rem; transition: color .15s; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--fg); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--fg); display: block; }

/* Hero */
.hero { background: linear-gradient(to right, #000000 0%, #2b2b2b 100%); padding: 4rem 0; }
.hero-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1 1 320px; }
.hero-text h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.05; margin: 0 0 .75rem; color: #fff; }
.hero-tagline { font-size: 1.25rem; color: var(--accent); margin: 0 0 1rem; font-weight: 600; }
.hero-blurb { color: var(--fg-muted); max-width: 42ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: var(--radius); text-decoration: none; font-weight: 600; font-size: .95rem; transition: transform .15s, background .15s, border-color .15s; }
.btn-primary { background: var(--accent); color: #200404; }
.btn-primary:hover { background: #f87171; }
.btn-secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--fg-muted); }

/* Photo is sized to match the height of .hero-text (name/title/blurb/buttons)
   via flex stretch. The img is positioned absolutely so its own intrinsic
   size never affects that stretch height — it just fills whatever height
   .hero-photo ends up with, at its natural (uncropped) aspect ratio. */
.hero-photo { flex: 1 1 280px; position: relative; display: flex; justify-content: center; }
.hero-photo img {
  position: absolute;
  top: 0;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.photo-placeholder {
  width: min(320px, 80vw);
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--fg-muted);
  padding: 1.5rem;
  font-size: .9rem;
}

/* Contact */
.contact { padding: 4rem 1.5rem; max-width: var(--max-width); margin: 0 auto; }
.contact h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.contact-list { list-style: none; padding: 0; display: flex; gap: 2rem; flex-wrap: wrap; }
.contact-list a { color: var(--accent); text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--fg-muted); font-size: .85rem; }

/* Generic page content (resume/projects/skills) */
.page { max-width: var(--max-width); margin: 0 auto; padding: 4rem 1.5rem; }
.page h1 { font-size: 2.25rem; margin-bottom: .5rem; }
.page-intro { color: var(--fg-muted); max-width: 60ch; margin-bottom: 2.5rem; }
.page-actions { margin-bottom: 2.5rem; }

.page h2 { font-size: 1.4rem; margin: 0 0 1rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.page h2:first-of-type { border-top: none; padding-top: 0; }
.page h3 { font-size: 1.05rem; margin: 0 0 .25rem; }
.meta { color: var(--fg-muted); font-size: .85rem; margin: 0 0 .5rem; }

.timeline { list-style: none; padding: 0; border-left: 2px solid var(--border); margin: 0 0 2.5rem .5rem; }
.timeline li { padding: 0 0 2rem 1.5rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.timeline .meta { color: var(--fg-muted); font-size: .85rem; margin-bottom: .5rem; }

/* Bulleted detail lists inside a timeline entry (not new timeline stops,
   so they're reset back to plain static list items) */
.timeline li ul { margin: .5rem 0 0; padding-left: 1.2rem; list-style: disc; color: var(--fg-muted); }
.timeline li ul li { position: static; padding: 0 0 .35rem; }
.timeline li ul li::before { content: none; }

.timeline .workstream { margin-top: 1.1rem; }
.timeline .workstream:first-child { margin-top: .5rem; }
.timeline .workstream h4 { margin: 0 0 .3rem; font-size: .95rem; font-weight: 600; color: var(--fg); }

/* Label/value grid, e.g. the resume's skills breakdown */
.spec-grid { display: grid; grid-template-columns: 140px 1fr; gap: .6rem 1.5rem; margin: 0 0 2.5rem; }
.spec-grid dt { color: var(--fg-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .15rem; }
.spec-grid dd { margin: 0; color: var(--fg); }

@media (max-width: 600px) {
  .spec-grid { grid-template-columns: 1fr; gap: .15rem 0; }
  .spec-grid dt { margin-top: .75rem; }
}

.disclosure-list { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.disclosure-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.disclosure-list li:last-child { border-bottom: none; }
.disclosure-list .tag { font-size: .75rem; color: var(--fg-muted); white-space: nowrap; }

.list-plain { padding-left: 1.2rem; color: var(--fg-muted); margin: 0 0 2.5rem; }
.list-plain li { margin-bottom: .5rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; background: var(--bg-alt); }
.card h3 { margin-top: 0; }
.card p { color: var(--fg-muted); }
.card .tag { display: inline-block; font-size: .75rem; color: var(--fg-muted); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .6rem; margin-top: .5rem; }

.skill-group { margin-bottom: 2rem; }
.skill-group h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); margin-bottom: .75rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; margin: 0; }
.skill-tags li { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 999px; padding: .4rem 1rem; font-size: .9rem; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }

  /* Hero stacks here, so there's no sibling height for the photo to
     stretch to — fall back to sizing it by its own natural aspect ratio. */
  .hero-photo { position: static; }
  .hero-photo img {
    position: static;
    height: auto;
    width: min(320px, 80vw);
    max-width: 100%;
  }
}
