/* =========================================================
   mohnish.ml: portfolio styles
   Dark is the default theme; [data-theme="light"] overrides.
   ========================================================= */

:root {
  /* colour: dark (default) */
  --bg: #080a0e;
  --bg-elev: #0c1016;
  --surface: #10151c;
  --surface-2: #151b24;
  --border: #1d2530;
  --border-strong: #2a3441;
  --text: #e7ebf0;
  --text-soft: #b9c2cd;
  --muted: #8591a0;
  --accent: #3ddc97;
  --accent-strong: #5cf0ad;
  --accent-ink: #03140c;
  --accent-soft: rgba(61, 220, 151, 0.1);
  --accent-line: rgba(61, 220, 151, 0.35);
  --grid-line: rgba(255, 255, 255, 0.035);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  --nav-bg: rgba(8, 10, 14, 0.72);

  /* type */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* layout */
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-sm: 8px;
  --nav-h: 64px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f5f1;
  --bg-elev: #efeee8;
  --surface: #ffffff;
  --surface-2: #f8f7f3;
  --border: #e2e0d9;
  --border-strong: #cfccc2;
  --text: #14171c;
  --text-soft: #343a43;
  --muted: #5b6370;
  --accent: #047857;
  --accent-strong: #035e44;
  --accent-ink: #ffffff;
  --accent-soft: rgba(4, 120, 87, 0.08);
  --accent-line: rgba(4, 120, 87, 0.35);
  --grid-line: rgba(20, 23, 28, 0.045);
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.04), 0 18px 40px -26px rgba(20, 23, 28, 0.35);
  --nav-bg: rgba(246, 245, 241, 0.8);
  color-scheme: light;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--font-mono); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }

.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 0.875rem; }

/* ---------- navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.logo-mark {
  width: 22px; height: 22px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  position: relative;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.85;
}
.logo .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.menu-toggle { display: none; }

/* ---------- section scaffolding ---------- */
.section {
  padding-block: clamp(72px, 10vw, 120px);
  border-top: 1px solid var(--border);
}

.section-head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.section-title { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; }
.section-sub { color: var(--muted); margin-top: 14px; font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 112px) clamp(64px, 9vw, 112px);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* annotation-canvas grid */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 30%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  right: -160px;
  top: -200px;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-soft);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-line);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-line); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}

.hero-name {
  margin-top: 40px;
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

/* YOLO-style bounding box around the name */
.bbox {
  position: relative;
  display: inline-block;
  padding: 0.12em 0.22em 0.16em;
  margin-left: -0.22em;
}
.bbox-frame {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 3px;
  pointer-events: none;
  animation: bbox-draw 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.25s both;
}
.bbox-frame::before,
.bbox-frame::after {
  /* corner handles */
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent);
}
.bbox-frame::before { left: -5px; bottom: -5px; }
.bbox-frame::after { right: -5px; bottom: -5px; }
.bbox-label {
  position: absolute;
  left: -2px;
  bottom: 100%;
  padding: 3px 9px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.4vw, 0.82rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  border-radius: 3px 3px 0 0;
  white-space: nowrap;
  animation: fade-up 0.4s ease-out 1.05s both;
}
@keyframes bbox-draw {
  from { clip-path: inset(0 100% 100% 0); }
  to { clip-path: inset(-10px -10px -10px -10px); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.hero-pitch {
  margin-top: 28px;
  max-width: 600px;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}
.hero-pitch strong { color: var(--text); font-weight: 600; }

.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* inference log card */
.infer {
  margin: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.infer-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.infer-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.infer-bar span { margin-left: 6px; }
.infer-bar .tag {
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--accent-line);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.72rem;
}

.infer-stage {
  padding: 40px 20px 30px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 60%, var(--accent-soft), transparent 70%),
    repeating-linear-gradient(135deg, transparent 0 10px, var(--grid-line) 10px 11px);
}

.plate-det { position: relative; padding: 8px; }
.plate-det .bbox-frame { animation-delay: 1.2s; }
.plate-det .bbox-label { font-size: 0.7rem; animation-delay: 1.9s; }

.plate {
  display: flex;
  align-items: stretch;
  background: #f4f4f0;
  border: 3px solid #111;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
}
.plate-ind {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  width: 30px;
  padding-bottom: 5px;
  background: #1d4ed8;
  color: #fff;
  font: 700 0.6rem/1 var(--font-body);
  letter-spacing: 0.04em;
}
.plate-ind::before {
  content: "";
  width: 12px; height: 12px;
  margin-bottom: auto;
  margin-top: 6px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}
.plate-num {
  padding: 6px 16px 5px 12px;
  color: #111;
  font: 700 clamp(1.15rem, 5.2vw, 1.75rem)/1.15 var(--font-mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.infer-log {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 7px;
}
.infer-log li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 8px;
  color: var(--text-soft);
  animation: fade-up 0.35s ease-out both;
}
.infer-log li::before { content: "›"; color: var(--muted); }
.infer-log li:nth-child(1) { animation-delay: 1.5s; }
.infer-log li:nth-child(2) { animation-delay: 1.7s; }
.infer-log li:nth-child(3) { animation-delay: 1.9s; }
.infer-log li:nth-child(4) { animation-delay: 2.15s; }
.infer-log .k { color: var(--muted); }
.infer-log .ok { color: var(--accent); }
.infer-log .ok::before { content: "✓"; color: var(--accent); }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.about-text { display: grid; gap: 18px; color: var(--text-soft); font-size: 1.08rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.fact {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.fact:nth-child(odd) { border-right: 1px solid var(--border); }
.fact:nth-last-child(-n + 2) { border-bottom: 0; }
.fact dt {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.fact dd { margin: 0; font-weight: 600; line-height: 1.4; }
.fact dd .sub { color: var(--muted); font-weight: 500; }
.fact dd.big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.fact dd.big small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }

/* ---------- projects ---------- */
.projects { display: grid; gap: clamp(28px, 4vw, 40px); }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(20px, 3.4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  transition: border-color 0.25s;
}
.project:hover { border-color: var(--border-strong); }
.project:nth-child(even) .project-media { order: -1; }

.project-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.project-kicker { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.project h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
.project-desc { margin-top: 12px; color: var(--text-soft); }

.bullets { margin-top: 18px; display: grid; gap: 10px; }
.bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--text-soft);
  font-size: 0.97rem;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px; height: 9px;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
}

.metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.metric { background: var(--surface-2); padding: 14px 14px 12px; }
.metric b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.metric span { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--muted); line-height: 1.35; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.project .chips { margin-top: 22px; }
.chip {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.4;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--accent-line); color: var(--accent); }

.project-links { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

.project-media { align-self: center; }
.shot {
  position: relative;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev);
}
.shot-bar {
  display: flex;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 0.6s ease; }
.project:hover .shot img { transform: scale(1.015); }
.shot::after {
  /* detection-corner overlay on hover */
  content: "";
  position: absolute;
  inset: 10px;
  top: 42px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
  mask:
    linear-gradient(#000 0 0) top left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) top right / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom left / 22px 22px no-repeat,
    linear-gradient(#000 0 0) bottom right / 22px 22px no-repeat;
}
.project:hover .shot::after { opacity: 1; transform: none; }
.shot figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.finding {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.finding b { color: var(--text); }

/* small project cards */
.more-title {
  margin-top: clamp(48px, 7vw, 72px);
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 700;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.mini {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s;
}
.mini:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.mini h4 { font-size: 1.15rem; font-weight: 700; padding-right: 28px; }
.mini p { margin-top: 10px; margin-bottom: 18px; color: var(--muted); font-size: 0.93rem; }
.mini .chips { margin-top: auto; }
.mini .arrow {
  position: absolute;
  top: 20px; right: 20px;
  width: 20px; height: 20px;
  color: var(--muted);
  transition: color 0.2s, transform 0.2s;
}
.mini:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ---------- skills ---------- */
.skills-grid {
  columns: 3 300px;
  column-gap: 16px;
}
.skill-group {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.skill-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.skill-group h3 span { color: var(--muted); font-weight: 400; }

/* ---------- education timeline ---------- */
.timeline { position: relative; display: grid; gap: 20px; max-width: 820px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(var(--accent-line), var(--border));
}
.tl-item { position: relative; padding-left: 40px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 15px; height: 15px;
  border: 2px solid var(--accent);
  border-radius: 3px;
  background: var(--bg);
}
.tl-card {
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tl-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.tl-meta .accent { color: var(--accent); }
.tl-card h3 { font-size: 1.25rem; font-weight: 700; }
.tl-card p { margin-top: 6px; color: var(--text-soft); }
.cert-list { margin-top: 12px; display: grid; gap: 8px; }
.cert-list li {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.cert-list li span { color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; align-self: center; }

/* ---------- contact ---------- */
.contact-wrap {
  position: relative;
  padding: clamp(28px, 5vw, 64px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  isolation: isolate;
}
.contact-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 100% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, #000, transparent 70%);
}
.contact-title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; max-width: 16ch; letter-spacing: -0.03em; }
.contact-title em { font-style: normal; color: var(--accent); }
.contact-sub { margin-top: 16px; color: var(--text-soft); max-width: 560px; }

.email-box {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  max-width: 640px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
}
.email-text {
  flex: 1 1 260px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.2vw, 1.02rem);
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: all;
}
.email-actions { display: flex; gap: 8px; }
.copy-status { min-height: 1.4em; margin-top: 10px; font-size: 0.85rem; color: var(--accent); font-family: var(--font-mono); }

.socials { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.site-footer a { color: var(--muted); text-decoration: none; font-family: var(--font-mono); font-size: 0.82rem; }
.site-footer a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links a { padding: 8px 9px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 1rem; border-radius: var(--radius-sm); }
  /* without JavaScript, keep links reachable */
  .no-js .nav-links { position: static; display: flex; flex-direction: row; flex-wrap: wrap; padding: 0; border: 0; box-shadow: none; background: none; }
  .no-js .site-header { height: auto; padding-block: 10px; }
  .no-js .nav { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .hero-grid,
  .about-grid,
  .project { grid-template-columns: minmax(0, 1fr); }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media { order: -1; }
  .mini-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-name { margin-top: 36px; }
  .infer { max-width: 460px; }
}

@media (max-width: 480px) {
  .nav { gap: 10px; }
  .nav-actions { gap: 6px; }
  .icon-btn { width: 38px; height: 38px; }
  .resume-btn { padding-inline: 12px; }
  .resume-btn svg { display: none; }
}

@media (max-width: 360px) {
  .logo-mark { display: none; }
  .logo { font-size: 0.9rem; }
  .nav { gap: 6px; }
  .resume-btn { padding-inline: 10px; }
}

@media (max-width: 420px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact:nth-child(odd) { border-right: 0; }
  .fact:nth-last-child(2) { border-bottom: 1px solid var(--border); }
  .email-box { padding: 14px; }
  .email-actions { width: 100%; }
  .email-actions .btn { flex: 1; justify-content: center; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- print ---------- */
@media print {
  .site-header, .hero-cta, .infer, .email-actions { display: none; }
  .section { border: 0; padding-block: 24px; }
}
