:root {
  --bg: #0b0d12;
  --bg-2: #11141b;
  --panel: rgba(20, 24, 32, 0.85);
  --border: #2a2f3a;
  --text: #e6e9ef;
  --muted: #9aa3b2;
  --dim: #6b7180;
  --accent: #7aa2f7;
  --pink: #f7768e;
  --green: #9ece6a;
  --amber: #e0af68;
  --purple: #bb9af7;
  --teal: #73daca;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(to bottom, rgba(11, 13, 18, 0.85), rgba(11, 13, 18, 0));
  backdrop-filter: blur(6px);
}
nav.top .brand {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; letter-spacing: 0.5px; color: var(--text);
}
nav.top .brand .dot { color: var(--pink); }
nav.top .links { display: flex; gap: 22px; }
nav.top .links a {
  color: var(--muted); font-size: 13px; text-decoration: none;
  transition: color .15s;
}
nav.top .links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  display: block;
  padding: 120px 24px 60px;
  box-sizing: border-box;
}
.hero-text {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 80px;
}
.viewer-eyebrow {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: 3px; color: var(--pink);
  text-transform: uppercase;
}
.hero-text h1 {
  font-size: clamp(44px, 7.5vw, 96px);
  margin: 0;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
}
.hero-text h1 .alt { color: var(--accent); }
.hero-text .sub {
  margin: 16px auto 0;
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--muted);
  max-width: 560px;
  line-height: 1.55;
}
.hero-viewer {
  position: relative;
  width: min(720px, 92%);
  height: 360px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #080a0f;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block;
}
.hero-viewer .hint {
  position: absolute; bottom: 12px; right: 14px;
  font-size: 10px; color: var(--dim);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 1px;
  pointer-events: none;
}
.hero-viewer .hint::before {
  content: "↻ "; color: var(--pink);
}

/* ---------- Section ---------- */
section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 100px 28px;
}
section h2 {
  font-size: 28px; margin: 0 0 8px;
  letter-spacing: -0.5px;
}
section h2 .num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px; color: var(--pink); margin-right: 12px;
  font-weight: 400;
}
section .lead {
  color: var(--muted); font-size: 15px; line-height: 1.6;
  max-width: 680px;
  margin-bottom: 40px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px;
  align-items: start;
}
.about-grid p { font-size: 15px; line-height: 1.7; color: #cdd3df; margin: 0 0 14px; }
.about-grid p.lead {
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 16px;
}
.bio {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  align-items: start;
}
.bio .headshot {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: 0 0 0 4px rgba(122, 162, 247, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
  display: block;
}
.about-grid .skills {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.about-grid .skills h3 {
  margin: 0 0 14px; font-size: 13px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--pink); letter-spacing: 1px;
}
.about-grid .skills ul { list-style: none; margin: 0; padding: 0; font-size: 13px; color: #cdd3df; }
.about-grid .skills li { padding: 5px 0; display: flex; gap: 10px; }
.about-grid .skills li::before { content: "▸"; color: var(--accent); }

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
  .bio { grid-template-columns: 90px 1fr; gap: 16px; }
  .bio .headshot { width: 90px; height: 90px; }
}

/* ---------- Projects ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.proj-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.proj-card::after {
  /* gradient overlay so the title is always readable on top of any image */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 10, 15, 0.92) 0%, rgba(8, 10, 15, 0.5) 38%, rgba(8, 10, 15, 0) 65%);
  pointer-events: none;
  transition: opacity .25s ease;
}
.proj-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 0 24px rgba(255, 255, 255, 0.18),
    0 0 60px rgba(255, 255, 255, 0.12);
}
.proj-card:hover .proj-thumb { transform: scale(1.05); filter: brightness(1.08); }
.proj-card:hover .proj-info h3 { color: #fff; }
.proj-card:hover .proj-info h3::after { transform: translateX(4px); color: #fff; }

.proj-thumb {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0e1118;
  transition: transform .4s ease, filter .25s ease;
}

/* Custom thumb for the embedding viewer card — a faux cluster */
.proj-thumb--embed {
  background: radial-gradient(ellipse at center, #1c2440 0%, #0a0d17 70%);
}
.proj-thumb--embed .dot {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 16px currentColor;
}
.proj-thumb--embed .d1 { top: 28%; left: 22%; background: #f7768e; color: #f7768e; }
.proj-thumb--embed .d2 { top: 30%; left: 72%; background: #f7768e; color: #f7768e; }
.proj-thumb--embed .d3 { top: 52%; left: 30%; background: #7aa2f7; color: #7aa2f7; }
.proj-thumb--embed .d4 { top: 50%; left: 64%; background: #7aa2f7; color: #7aa2f7; }
.proj-thumb--embed .d5 { top: 70%; left: 26%; background: #bb9af7; color: #bb9af7; }
.proj-thumb--embed .d6 { top: 72%; left: 70%; background: #bb9af7; color: #bb9af7; }
.proj-thumb--embed .d7 { top: 40%; left: 46%; background: #9ece6a; color: #9ece6a; width: 9px; height: 9px; }
.proj-thumb--embed .d8 { top: 60%; left: 48%; background: #e0af68; color: #e0af68; width: 9px; height: 9px; }

.proj-info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  z-index: 2;
}
.proj-info .proj-tagline {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  transition: color .25s;
}
.proj-card:hover .proj-info .proj-tagline { color: rgba(255,255,255,0.85); }
.proj-info h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  transition: color .25s, transform .25s;
}
.proj-info h3::after {
  content: " ↗";
  display: inline-block;
  color: var(--dim);
  font-size: 14px;
  margin-left: 4px;
  transition: transform .25s, color .25s;
}

/* ---------- Contact ---------- */
.contact {
  text-align: center;
  padding-bottom: 140px;
}
.contact h2 { display: inline-block; }
.contact .lead { margin-left: auto; margin-right: auto; }
.contact .links {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
  margin-top: 20px;
}
.contact .links a {
  border: 1px solid var(--border);
  background: var(--bg-2);
  padding: 12px 22px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.contact .links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Footer ---------- */
footer {
  text-align: center; padding: 28px 14px; color: var(--dim); font-size: 12px;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
