:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --surface: #161616;
  --surface-2: #1d1d1d;
  --text: #f2f2f2;
  --text-soft: #cfcfcf;
  --muted: #8a8a8a;
  --muted-2: #555;
  --border: #262626;
  --border-2: #333;
  --accent: #ffffff;
  --radius: 4px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--text-soft); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.accent { color: #fff; }
.muted { color: var(--muted); }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 1rem;
  font-family: 'JetBrains Mono', monospace;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--muted);
}
.section-eyebrow.light { color: #bbb; }
.section-eyebrow.light::before { background: #bbb; }

.rule { border: 0; border-top: 1px solid var(--border); margin: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.brand-text {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.primary-nav { display: flex; gap: 28px; }
.primary-nav a {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.15s ease;
}
.primary-nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px; height: 40px;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hero */
.hero {
  padding: clamp(100px, 14vw, 180px) 0 clamp(80px, 11vw, 140px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 85% 15%, rgba(255,255,255,0.04), transparent 70%),
    radial-gradient(400px 200px at 10% 90%, rgba(255,255,255,0.03), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 820px; }
.hero-split {
  max-width: var(--maxw);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-portrait {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-2);
  aspect-ratio: 1 / 1;
  max-width: 360px;
  justify-self: end;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.8);
}
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; gap: 32px; }
  .hero-portrait { justify-self: start; max-width: 220px; order: -1; }
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.hero-tag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.6);
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-soft);
  max-width: 640px;
  margin-bottom: 2.2rem;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  max-width: 720px;
}
.hero-meta li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta li span:last-child { color: var(--text); font-size: 0.95rem; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}
.btn-primary:hover { transform: translateY(-1px); background: #eaeaea; color: #0a0a0a; border-color: #eaeaea; }
.btn-ghost { border-color: var(--border-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* About */
.about { padding: clamp(70px, 10vw, 130px) 0; border-top: 1px solid var(--border); }
.about-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text p { font-size: 1.05rem; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.about-list { list-style: none; padding: 0; margin: 0; }
.about-list li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.95rem;
}
.about-list li:first-child { border-top: 0; padding-top: 0; }
.about-list li:last-child { padding-bottom: 0; }

/* Section heads */
.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-sub { color: var(--muted); margin: 0; }

/* Timeline */
.timeline-section { padding: clamp(70px, 10vw, 130px) 0; border-top: 1px solid var(--border); background: var(--bg-alt); }

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  max-width: 780px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--border-2) 0%, var(--border) 100%);
}
.tl-item {
  position: relative;
  padding: 0 0 44px 48px;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-marker {
  position: absolute;
  left: 5px;
  top: 8px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 0 5px var(--border-2);
}
.tl-item.placeholder-item .tl-marker {
  background: var(--bg-alt);
  box-shadow: 0 0 0 4px var(--bg-alt), 0 0 0 5px var(--border-2);
}
.tl-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.tl-content h3 { margin-bottom: 0.5em; }
.tl-content p { color: var(--text-soft); }
.tl-media {
  margin: 14px 0 0;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.tl-media + .tl-media { margin-top: 10px; }
.tl-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-media.placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 10px, rgba(255,255,255,0.04) 10px 20px);
  display: grid;
  place-items: center;
}
.tl-media.placeholder::after {
  content: "PHOTO COMING SOON";
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(10,10,10,0.55);
}

/* Projects */
.projects-section { padding: clamp(70px, 10vw, 130px) 0; border-top: 1px solid var(--border); }
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.project-media {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-media.placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0 10px, rgba(255,255,255,0.05) 10px 20px);
  display: grid;
  place-items: center;
}
.project-media.placeholder::after {
  content: "PHOTO COMING SOON";
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.project-body { padding: 22px 22px 24px; }
.project-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.project-body h3 { margin-bottom: 0.4em; }
.project-body p { color: var(--text-soft); font-size: 0.95rem; }
.project-tags {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tags li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--muted);
}
.placeholder-card { opacity: 0.7; }

/* CTA */
.cta-band {
  padding: clamp(80px, 11vw, 140px) 0;
  text-align: center;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255,255,255,0.05), transparent 70%),
    var(--bg-alt);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--text-soft); max-width: 560px; margin: 0 auto 2rem; }
.cta-band .btn-primary { background: #fff; color: #0a0a0a; }
.cta-band .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.3); }
.cta-band .btn-ghost:hover { border-color: #fff; }

/* Page head (for contact/404) */
.page-head {
  padding: clamp(80px, 11vw, 140px) 0 clamp(50px, 7vw, 80px);
  border-bottom: 1px solid var(--border);
}

/* Contact */
.contact { padding: clamp(60px, 9vw, 100px) 0 clamp(80px, 10vw, 120px); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.contact-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.contact-card h2 { font-size: 1.4rem; margin-bottom: 0.4em; }
.contact-card p { color: var(--text-soft); font-size: 0.95rem; }
.contact-card a { color: #fff; border-bottom: 1px solid var(--border-2); }
.contact-card a:hover { border-bottom-color: #fff; }

/* Footer */
.site-footer {
  background: #070707;
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0 0 0.35em; font-size: 0.92rem; }
.footer-contact { text-align: right; }

/* Email chooser popover (re-used from motostudent) */
.email-popover {
  position: absolute;
  z-index: 1000;
  min-width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}
.email-popover.open { opacity: 1; transform: translateY(0); }
.email-popover-inner { padding: 8px; }
.email-popover-head {
  padding: 10px 12px 12px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.email-popover-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.email-popover-addr { font-size: 0.92rem; color: #fff; word-break: break-all; }
.email-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  transition: background 0.15s ease;
}
.email-opt:hover, .email-opt:focus-visible {
  background: rgba(255,255,255,0.06);
  color: #fff;
  outline: none;
}
.email-opt.copied { background: rgba(255,255,255,0.12); }
.email-opt-icon {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.email-opt-icon svg { width: 17px; height: 17px; display: block; }
.email-opt-label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
}
.email-opt-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* Mobile */
@media (max-width: 860px) {
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  .primary-nav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    gap: 12px;
    display: none;
  }
  .primary-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding-top: clamp(70px, 12vw, 110px); }
  .footer-inner { flex-direction: column; gap: 12px; }
  .footer-contact { text-align: left; }
}
