/* ============================================================
   TOKENS
   ============================================================ */
:root {
  --charcoal: #12151c;
  --slate: #1b2438;
  --slate-2: #232f48;
  --ice: #eef2f6;
  --ice-dim: #aab3c2;
  --teal: #3fd6c0;
  --teal-dim: #1f6f73;
  --amber: #e8a33d;
  --line: rgba(238, 242, 246, 0.09);
  --line-strong: rgba(238, 242, 246, 0.16);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 10px;
  --nav-h: 64px;
  --status-h: 34px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--charcoal);
  background-image:
    linear-gradient(rgba(238,242,246,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,242,246,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  color: var(--ice);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   SCROLL PROGRESS (signature element, part 1)
   ============================================================ */
.scan-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  z-index: 999;
  transition: width 0.1s linear;
}

/* ============================================================
   NAV
   ============================================================ */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
}

.glass {
  background: rgba(18, 21, 28, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  gap: clamp(18px, 2.4vw, 34px);
}
.nav-link {
  font-size: 0.9rem;
  color: var(--ice-dim);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--teal);
  transition: width 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--ice); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ice);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.status-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--status-h);
  padding: 0 clamp(20px, 4vw, 56px);
  font-size: 0.68rem;
  color: var(--ice-dim);
  background: rgba(31, 111, 115, 0.08);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
}
.status-item--sep { border-left: 1px solid var(--line-strong); padding-left: 18px; }
.status-item--clock { margin-left: auto; color: var(--teal); }
.dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 7px;
  background: var(--teal-dim);
}
.dot--live { background: var(--teal); box-shadow: 0 0 0 0 rgba(63,214,192,0.6); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(63,214,192,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(63,214,192,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,214,192,0); }
}

/* ============================================================
   LAYOUT / SECTION SCAFFOLDING
   ============================================================ */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 112px) clamp(20px, 4vw, 56px);
}

.eyebrow {
  color: var(--teal);
  font-size: 0.72rem;
  margin: 0 0 14px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin: 0 0 40px;
  max-width: 720px;
  letter-spacing: -0.01em;
}

.accent { color: var(--teal); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: #0b1310;
}
.btn-primary:hover { background: #58e0cc; }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ice);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   HERO
   ============================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  min-height: calc(72vh - var(--nav-h) - var(--status-h));
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: 1.05rem;
  color: var(--teal);
  margin: 0 0 22px;
  min-height: 1.4em;
}
.cursor { animation: blink 1s step-start infinite; color: var(--teal); }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  font-size: 1.02rem;
  color: var(--ice-dim);
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-desc strong { color: var(--ice); font-weight: 600; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  display: grid;
  gap: 20px;
}

.photo-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--slate);
  aspect-ratio: 4 / 5;
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  border-radius: var(--radius);
}
.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ice-dim);
}
.photo-label { font-size: 0.66rem; letter-spacing: 0.08em; }
.photo-frame-corner {
  position: absolute;
  width: 18px; height: 18px;
  border: 1.5px solid var(--teal);
}
.photo-frame-corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.photo-frame-corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.telemetry-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--slate-2);
  padding: 20px 22px;
}
.telemetry-title {
  font-size: 0.66rem;
  color: var(--teal);
  margin: 0 0 14px;
  letter-spacing: 0.1em;
}
.telemetry-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.74rem;
  color: var(--ice-dim);
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.telemetry-row span:first-child { color: var(--ice); opacity: 0.6; }
.telemetry-row span:last-child { text-align: right; color: var(--ice); }
.telemetry-bar {
  margin-top: 16px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.telemetry-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-dim), var(--teal));
  border-radius: 3px;
}
.telemetry-caption {
  margin: 10px 0 0;
  font-size: 0.62rem;
  color: var(--ice-dim);
  letter-spacing: 0.06em;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 26px 24px;
}
.panel-tag {
  font-size: 0.66rem;
  color: var(--teal);
  margin: 0 0 14px;
  letter-spacing: 0.08em;
}
.panel-body {
  font-size: 0.95rem;
  color: var(--ice-dim);
  margin: 0;
}

.video-card {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--slate);
}
.video-card-media {
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, rgba(63,214,192,0.16), transparent 60%),
    var(--slate-2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.pitch-video {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: block;
  object-fit: cover;
  background: #000;
}
.video-fallback {
  padding: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ice-dim);
}
.video-fallback a { color: var(--teal); text-decoration: underline; }
.video-card-overlay {
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.video-card-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 12px;
  font-weight: 600;
}
.video-card-overlay code {
  background: var(--slate-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  color: var(--teal);
}

/* ============================================================
   RESUME
   ============================================================ */
.resume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.resume-header .section-title { margin-bottom: 0; }

.btn-download svg { flex-shrink: 0; }

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ice-dim);
  margin-bottom: 40px;
}
.resume-contact a:hover { color: var(--teal); }
.dot-sep { color: var(--line-strong); }

.resume-block { margin-bottom: 34px; }
.resume-block-title {
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
}

.resume-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.resume-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.resume-role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
}
.resume-date {
  font-size: 0.7rem;
  color: var(--teal);
  white-space: nowrap;
}
.resume-org {
  color: var(--ice-dim);
  font-size: 0.85rem;
  margin: 0 0 12px;
}
.resume-desc {
  color: var(--ice-dim);
  font-size: 0.9rem;
  margin: 0;
}
.resume-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.resume-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.88rem;
  color: var(--ice-dim);
}
.resume-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 1.5px;
  background: var(--teal);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-col {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 20px 22px;
}
.skill-col-title {
  font-size: 0.64rem;
  color: var(--teal);
  margin: 0 0 12px;
  letter-spacing: 0.08em;
}
.skill-tags {
  font-size: 0.84rem;
  color: var(--ice-dim);
  margin: 0;
  line-height: 1.7;
}

/* ============================================================
   PROJECTS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover { border-color: var(--teal-dim); transform: translateY(-3px); }

.project-head h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.project-link {
  font-size: 0.68rem;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 14px;
}
.project-link--static { color: var(--ice-dim); }
.project-role {
  font-size: 0.64rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}
.project-desc {
  font-size: 0.88rem;
  color: var(--ice-dim);
  margin: 0 0 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 4px 9px;
  border-radius: 5px;
  background: rgba(63,214,192,0.1);
  color: var(--teal);
  white-space: nowrap;
}
.tag--ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ice-dim);
}

.viz-frame {
  margin-top: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 16px 16px 14px;
  background: rgba(238,242,246,0.02);
  color: var(--teal);
}
.viz-label {
  font-size: 0.6rem;
  color: var(--ice-dim);
  margin: 0 0 10px;
  letter-spacing: 0.06em;
}
.viz-svg { width: 100%; height: 70px; display: block; }
.viz-caption {
  margin: 10px 0 0;
  font-size: 0.62rem;
  color: var(--ice-dim);
}

.viz-frame--kpi { color: var(--ice); }
.kpi-row { display: flex; gap: 12px; margin-bottom: 12px; }
.kpi-box {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-num { font-size: 1.1rem; color: var(--teal); }
.kpi-label { font-size: 0.58rem; color: var(--ice-dim); }
.kpi-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
}
.kpi-bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--teal), var(--teal-dim));
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
}

/* ============================================================
   CONTACT
   ============================================================ */
.section--contact { text-align: left; }
.contact-desc { margin-bottom: 40px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.contact-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--slate);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: var(--teal); transform: translateY(-3px); }
.contact-icon { color: var(--teal); }
.contact-label {
  font-size: 0.62rem;
  color: var(--ice-dim);
  letter-spacing: 0.08em;
}
.contact-value {
  font-size: 0.86rem;
  word-break: break-word;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  text-align: center;
  padding: 30px 20px 48px;
  font-size: 0.68rem;
  color: var(--ice-dim);
  border-top: 1px solid var(--line);
}
.footer-sep { margin: 0 10px; opacity: 0.4; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .video-card { grid-template-columns: 1fr; }
  .video-card-media { border-right: none; border-bottom: 1px solid var(--line); }
  .skill-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(18, 21, 28, 0.97);
    backdrop-filter: blur(14px);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { max-height: 360px; }
  .nav-links li { width: 100%; }
  .nav-link {
    display: block;
    padding: 16px clamp(20px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
  }
  .nav-link::after { display: none; }

  .status-strip { font-size: 0.62rem; gap: 12px; }
  .status-item--sep { padding-left: 12px; }

  .projects-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .resume-item-head { flex-direction: column; align-items: flex-start; gap: 4px; }
}
