:root {
  --bg: #0b0b0d;
  --bg-elev: #131316;
  --bg-elev-2: #1c1c21;
  --fg: #e8e8ea;
  --fg-muted: #9a9aa2;
  --fg-dim: #6a6a72;
  --accent: #d8b66a;
  --accent-dim: #8a7642;
  --border: #2a2a30;
  --max-w: 1200px;
  --pad: clamp(16px, 4vw, 32px);
  --radius: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #f0d68a; text-decoration: underline; }

img, iframe, video { max-width: 100%; }

h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4.5vw, 44px); letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }

p { margin: 0 0 1em; }

code, pre { font-family: var(--font-mono); font-size: 13px; }
pre {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  line-height: 1.5;
}
:not(pre) > code {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 var(--pad); }

main { padding: clamp(32px, 6vw, 64px) 0 96px; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 11, 13, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.site-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }
.site-logo span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__item { position: relative; }
.nav__link {
  display: inline-block;
  padding: 8px 12px;
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  white-space: nowrap;
}
.nav__link:hover, .nav__link.is-active {
  color: var(--fg);
  background: var(--bg-elev);
  text-decoration: none;
}
.nav__link.is-active { color: var(--accent); }

.nav__submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  margin-top: 4px;
  list-style: none;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.nav__item:hover .nav__submenu,
.nav__item:focus-within .nav__submenu { display: block; }
.nav__submenu a {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--fg-muted);
  border-radius: 4px;
  white-space: nowrap;
}
.nav__submenu a:hover { color: var(--fg); background: var(--bg-elev-2); text-decoration: none; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* Hero */
.hero {
  padding: clamp(24px, 5vw, 56px) 0 clamp(24px, 4vw, 40px);
  text-align: left;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero__title { margin-bottom: 12px; }
.hero__lede {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--fg-muted);
  max-width: 700px;
  line-height: 1.55;
  margin-bottom: 0;
}

/* Video embed */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--border);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Section */
.section { margin: 64px 0; }
.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.section__head h2 { margin: 0; }
.section__head a { font-size: 14px; color: var(--fg-muted); }
.section__head a:hover { color: var(--accent); }

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.grid--reels { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
  text-decoration: none;
  color: var(--fg);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-dim);
  text-decoration: none;
}
.card__thumb {
  aspect-ratio: 16 / 9;
  background: #000 center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.card:hover .card__thumb img { transform: scale(1.04); }
.card__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.35));
}
.card__play {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 3px;
  z-index: 1;
}
.card__body { padding: 16px 18px; }
.card__title { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--fg); }
.card__desc { font-size: 13.5px; color: var(--fg-muted); margin: 0; line-height: 1.5; }
.card__meta { font-size: 12px; color: var(--fg-dim); margin-top: 8px; letter-spacing: 0.04em; }

/* Article body (R&D, old-works) */
.article { max-width: 820px; margin: 0 auto; }
.article__back {
  display: inline-block;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 24px;
}
.article__back:hover { color: var(--accent); text-decoration: none; }
.article__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 24px;
}
.article__body p { margin: 0 0 1em; color: #d4d4d8; }
.article__body ul, .article__body ol { color: #d4d4d8; }
.article__body li { margin-bottom: 6px; }
.article__body h2 {
  margin-top: 2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--border);
}
.article__body h3 { margin-top: 1.5em; }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg-muted);
  margin-right: 6px;
}

/* Timeline (reel breakdowns) */
.timeline {
  border-left: 2px solid var(--border);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  list-style: none;
}
.timeline li {
  position: relative;
  padding: 6px 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.timeline__time {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  margin-right: 10px;
  font-weight: 600;
}

/* Resume */
.resume__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.resume__name { margin: 0 0 4px; }
.resume__role { color: var(--fg-muted); font-size: 18px; margin: 0; }
.resume__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: var(--fg-muted);
  margin-top: 18px;
}
.resume__contact a { color: var(--accent); }
.resume__contact span:not(:last-child)::after { content: ""; }

.resume section { margin: 32px 0; }
.resume h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 18px;
}
.job { margin-bottom: 22px; }
.job__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.job__company { font-weight: 600; color: var(--fg); font-size: 16px; }
.job__role { color: var(--fg-muted); font-size: 14px; }
.job__dates { font-family: var(--font-mono); font-size: 13px; color: var(--fg-dim); white-space: nowrap; }
.job ul { margin: 8px 0 0; padding-left: 20px; }
.job li { color: #c8c8cc; font-size: 14px; line-height: 1.6; }

.skills__group { margin-bottom: 12px; }
.skills__group strong { color: var(--fg); margin-right: 8px; }
.skills__group span { color: var(--fg-muted); font-size: 14px; }

/* Contact */
.contact-card {
  max-width: 560px;
  margin: 32px auto;
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.contact-card p { color: var(--fg-muted); }
.email-reveal {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 18px;
  margin: 12px 0;
  color: var(--accent);
  cursor: pointer;
  border: 1px dashed var(--accent-dim);
  padding: 10px 18px;
  border-radius: 4px;
  background: transparent;
}
.email-reveal:hover { background: var(--bg-elev-2); }

.social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}
.social-row a {
  font-size: 14px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-muted);
}
.social-row a:hover { color: var(--accent); border-color: var(--accent-dim); text-decoration: none; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 96px;
  color: var(--fg-dim);
  font-size: 13px;
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--fg-muted); }

/* Mobile */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 8px var(--pad) 16px;
    gap: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__item { width: 100%; }
  .nav__link { display: block; padding: 12px 8px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav__submenu {
    position: static;
    display: block;
    border: none;
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: 0 0 8px 16px;
  }
  .nav__submenu a { padding: 8px; font-size: 13px; color: var(--fg-dim); border-bottom: 1px solid var(--border); }
}

/* Print */
@media print {
  .site-header, .site-footer, .article__back { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .resume__contact a, .resume h2 { color: #000; }
  .resume h2 { border-bottom: 1px solid #999; }
  .job__dates, .timeline__time { color: #444; }
  main { padding: 0; }
}
