/* ============================================================
   Jiaqi Zhao — portfolio
   Dark, calm, teal-accented. No frameworks, no build step.
   ============================================================ */

:root {
  --bg: #0a0e13;
  --bg-soft: #0d131a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9eef3;
  --muted: #98a5b1;
  --faint: #6b7784;
  --accent: #2dd4bf;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-line: rgba(45, 212, 191, 0.35);
  --gold: #e8b04b;
  --gold-soft: rgba(232, 176, 75, 0.14);
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --container: 1120px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
::selection { background: rgba(45, 212, 191, 0.25); }

/* ---------- type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.015em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.section-title { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
.section-sub { color: var(--muted); max-width: 640px; font-size: 17px; }

.container {
  width: min(var(--container), 100% - 48px);
  margin-inline: auto;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 14, 19, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.3s ease;
}
.nav.scrolled { box-shadow: 0 10px 40px -18px rgba(0, 0, 0, 0.8); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }
.nav-logo img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--muted);
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 8px 16px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  background: var(--accent-soft);
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: rgba(45, 212, 191, 0.2); text-decoration: none; }
.nav-burger {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg::before,
.hero-bg::after {
  content: "";
  position: absolute;
  width: 60vw;
  height: 60vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
}
.hero-bg::before {
  background: radial-gradient(circle, #14b8a6 0%, transparent 65%);
  top: -22%;
  right: -12%;
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-bg::after {
  background: radial-gradient(circle, #4f46e5 0%, transparent 65%);
  bottom: -30%;
  left: -16%;
  opacity: 0.12;
  animation: drift 20s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6%, 8%, 0) scale(1.12); }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 35%, black 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-name {
  font-size: clamp(46px, 8.5vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero-name .accent { color: var(--accent); }
.hero-rotate {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.2vw, 20px);
  color: var(--muted);
  min-height: 1.6em;
  margin-bottom: 22px;
}
.hero-rotate .word { color: var(--accent); border-bottom: 1px dashed var(--accent-line); }
.hero-rotate .cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 3px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-tagline {
  font-size: clamp(17px, 2.4vw, 21px);
  color: var(--text);
  max-width: 620px;
  margin-bottom: 34px;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 14px;
  color: var(--faint);
  font-family: var(--font-mono);
  margin-bottom: 40px;
}
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts svg { width: 14px; height: 14px; color: var(--accent); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--accent);
  color: #052e2a;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(45, 212, 191, 0.45);
}
.btn-primary:hover { background: #43e0cc; }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- stats bento ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 56px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.25s, transform 0.25s;
}
.stat:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.stat .value {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat .label { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------- about ---------- */
.about-cols {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-text p { color: var(--muted); font-size: 17px; }
.about-text p strong { color: var(--text); font-weight: 600; }
.about-photo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.about-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-photo .caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(8, 11, 15, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.about-photo .caption strong { color: var(--text); display: block; font-size: 13.5px; }

/* ---------- journey (timeline + map) ---------- */
.journey-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 26px;
  margin-top: 44px;
  align-items: start;
}
.journey-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ev, var(--accent)); flex: none; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip[data-type="award"] .dot, .chip.active[data-type="award"] { }

/* type colors */
.t-education { --ev: #7aa2f7; }
.t-work { --ev: #b0d36f; }
.t-project { --ev: #ce7df0; }
.t-travel { --ev: #4fd6c8; }
.t-award { --ev: #e8b04b; }

.timeline {
  position: relative;
  max-height: 640px;
  overflow-y: auto;
  padding: 6px 18px 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.timeline::-webkit-scrollbar { width: 6px; }
.timeline::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 999px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, rgba(45,212,191,0.4), rgba(255,255,255,0.06) 70%, transparent);
}
.event {
  position: relative;
  padding: 14px 16px 14px 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  animation: fadeUp 0.5s ease both;
}
.event + .event { margin-top: 2px; }
.event:hover, .event.active { background: var(--surface-2); }
.event.active { outline: 1px solid var(--accent-line); }
.event .node {
  position: absolute;
  left: 2px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ev, var(--accent));
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--ev, var(--accent));
  transition: transform 0.2s, box-shadow 0.2s;
}
.event.active .node {
  transform: scale(1.35);
  box-shadow: 0 0 0 1px var(--ev), 0 0 18px var(--ev);
  animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ev) 55%, transparent); }
  100% { box-shadow: 0 0 0 14px transparent; }
}
.event .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.event .date {
  color: var(--faint);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.event .type-badge { color: var(--ev, var(--muted)); text-transform: uppercase; }
.event h3 { font-size: 16.5px; margin-bottom: 3px; }
.event .place { color: var(--faint); font-size: 13px; margin-bottom: 6px; }
.event .desc { color: var(--muted); font-size: 14px; line-height: 1.55; }
.event.highlight h3::after {
  content: "★";
  color: var(--gold);
  font-size: 13px;
  margin-left: 8px;
  vertical-align: 2px;
}

/* map panel */
.map-panel {
  position: sticky;
  top: 86px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  overflow: hidden;
}
.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.map-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-status strong { color: var(--accent); font-weight: 500; }
#map { height: 520px; background: #0a0e13; cursor: grab; }
.map-fallback {
  height: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--faint);
  padding: 30px;
  text-align: center;
  font-size: 14px;
}
.leaflet-container { font-family: var(--font-body); font-size: 13px; }
.leaflet-popup-content-wrapper {
  background: rgba(13, 19, 26, 0.94);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.leaflet-popup-tip { background: rgba(13, 19, 26, 0.94); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.5; }
.leaflet-popup-content .pop-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.leaflet-popup-content .pop-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.leaflet-popup-content .pop-place { color: var(--faint); font-size: 12px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--faint); }
.leaflet-control-zoom a {
  background: rgba(13, 19, 26, 0.9) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.leaflet-control-attribution {
  background: rgba(10, 14, 19, 0.7) !important;
  color: var(--faint) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--muted) !important; }

.ev-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ev);
  border: 2.5px solid #0a0e13;
  box-shadow: 0 0 0 1.5px var(--ev), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}
.ev-dot:hover, .ev-dot.selected {
  transform: scale(1.4);
  background: var(--ev);
}
.ev-dot.stop { border-radius: 3px; transform: rotate(45deg); }
.ev-dot.stop:hover, .ev-dot.stop.selected { transform: rotate(45deg) scale(1.4); }

/* ---------- business ---------- */
.qb-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: center;
  margin-top: 48px;
}
.qb-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(232, 176, 75, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.qb-badge .live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 1.4s ease infinite;
}
.qb-copy h3 { font-size: clamp(26px, 3.6vw, 34px); margin-bottom: 14px; }
.qb-copy p { color: var(--muted); font-size: 16px; }
.qb-microstats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 26px;
}
.qb-microstats div {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.qb-microstats .v { font-family: var(--font-display); font-weight: 700; color: var(--text); font-size: 16px; }
.qb-microstats .l { color: var(--faint); font-size: 12.5px; }

.qb-shots { min-width: 0; }
.shot-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.shot-tab {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.shot-tab:hover { color: var(--text); border-color: var(--border-strong); }
.shot-tab.active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.shot-frame {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #121a22, #0d131a);
  padding: 12px;
  box-shadow: var(--shadow);
}
.shot-frame .frame-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 12px;
}
.shot-frame .frame-bar .fdot { width: 10px; height: 10px; border-radius: 50%; }
.shot-frame .frame-bar .fdot:nth-child(1) { background: #ff5f57; }
.shot-frame .frame-bar .fdot:nth-child(2) { background: #febc2e; }
.shot-frame .frame-bar .fdot:nth-child(3) { background: #28c840; }
.shot-frame .frame-bar .url {
  margin-left: 10px;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--faint);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-view {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin: 0;
}
.shot-view img { width: 100%; height: auto; display: block; }
.shot-view figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(5, 8, 11, 0.85));
  font-size: 13px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.25s;
}
.shot-view:hover figcaption { opacity: 1; }

/* ---------- projects ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 44px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  border-color: var(--accent-line);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card .card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h3 { font-size: 19px; }
.card .meta { color: var(--faint); font-size: 13px; margin-top: 4px; }
.status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.status.shipped { color: #6ee7b7; background: rgba(110, 231, 183, 0.1); border: 1px solid rgba(110, 231, 183, 0.25); }
.status.award { color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(232, 176, 75, 0.3); }
.status.wip { color: #a5b4fc; background: rgba(165, 180, 252, 0.1); border: 1px solid rgba(165, 180, 252, 0.25); }
.card .desc { color: var(--muted); font-size: 14.5px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- awards ---------- */
.awards-list { margin-top: 44px; display: grid; gap: 14px; }
.award {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.25s, transform 0.25s;
}
.award:hover { border-color: rgba(232, 176, 75, 0.4); transform: translateX(4px); }
.award .medal {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  border: 1px solid rgba(232, 176, 75, 0.3);
  color: var(--gold);
}
.award .medal svg { width: 22px; height: 22px; }
.award h3 { font-size: 18px; }
.award .award-meta { color: var(--faint); font-size: 13.5px; margin: 3px 0 8px; font-family: var(--font-mono); }
.award .desc { color: var(--muted); font-size: 14.5px; }

/* ---------- certificates ---------- */
.cert-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 44px;
}
.cert {
  aspect-ratio: 3/4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
}
.cert:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.cert img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); transition: filter 0.2s; }
.cert:hover img { filter: saturate(1.05); }
.cert::after {
  content: "🔍";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 11, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 18px;
}
.cert:hover::after { opacity: 1; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: rgba(4, 6, 9, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}
.lightbox.open { display: grid; }
.lightbox figure {
  margin: 0;
  max-width: min(680px, 92vw);
  width: 100%;
  text-align: center;
}
.lightbox img {
  max-height: 76vh;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.lightbox figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  font-family: var(--font-mono);
}
.lightbox .lb-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox .lb-btn:hover { background: var(--surface-2); }
.lightbox .lb-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 22px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { top: 20px; right: 22px; }
.lightbox .lb-btn svg { width: 18px; height: 18px; }

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 44px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.skill-group h3 {
  font-size: 15px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 500;
}
.skill-group .tags { gap: 8px; }

/* ---------- interests ---------- */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 44px;
}
.interest {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color 0.25s, transform 0.25s;
}
.interest:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.interest .emoji { font-size: 26px; display: block; margin-bottom: 12px; }
.interest h3 { font-size: 16px; margin-bottom: 8px; }
.interest p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ---------- contact ---------- */
.contact-box {
  text-align: center;
  padding: 40px 0 20px;
}
.contact-box h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 14px; }
.contact-box p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; font-size: 16.5px; }
.contact-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }

footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 34px 0 44px;
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 13.5px;
}
.footer-inner .heart { color: var(--accent); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }

/* ---------- snow easter egg ---------- */
.snowflake {
  position: fixed;
  top: -12px;
  z-index: 999;
  pointer-events: none;
  color: #dff5f1;
  text-shadow: 0 0 6px rgba(45, 212, 191, 0.6);
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); opacity: 0.15; }
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .interest-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-strip { grid-template-columns: repeat(4, 1fr); }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-3 .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .section { padding: 72px 0; }
  .journey-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  #map, .map-fallback { height: 420px; }
  .timeline { max-height: 460px; }
  .qb-layout { grid-template-columns: 1fr; gap: 34px; }
  .about-cols { grid-template-columns: 1fr; gap: 28px; }
  .skills-grid { grid-template-columns: 1fr; }
  .nav-links {
    position: fixed;
    top: 62px;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 14, 19, 0.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .interest-grid { grid-template-columns: 1fr; }
  .cert-strip { grid-template-columns: repeat(3, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .hero { min-height: 86vh; padding-top: 110px; }
  .award { flex-direction: column; gap: 12px; padding: 20px; }
  .qb-microstats { grid-template-columns: 1fr; }
  .container { width: min(var(--container), 100% - 36px); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
