/* ============================================================
   Diwas Basnet — Portfolio  ·  "Meridian" Design System v2
   Display: Syne · Body: DM Sans · Data: JetBrains Mono
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --indigo: #818cf8;
  --indigo-deep: #6366f1;
  --emerald: #34d399;
  --emerald-deep: #059669;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 56px);

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── Dark (primary) ────────────────────────── */
[data-theme="dark"] {
  --bg: #06070b;
  --bg-sub: #0c0e15;
  --surface: rgba(15, 23, 42, 0.52);
  --surface-2: rgba(22, 28, 45, 0.8);
  --text: #cbd5e1;
  --text-strong: #f1f5f9;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.08);
  --line-strong: rgba(148, 163, 184, 0.16);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow: 0 16px 48px rgba(0,0,0,0.4);
  --glow-indigo: rgba(99, 102, 241, 0.18);
  --glow-emerald: rgba(52, 211, 153, 0.12);
  color-scheme: dark;
}

/* ── Light ─────────────────────────────────── */
[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-sub: #e2e8f0;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.92);
  --text: #334155;
  --text-strong: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.07);
  --line-strong: rgba(15, 23, 42, 0.13);
  --shadow-sm: 0 2px 8px rgba(15,23,42,0.06);
  --shadow: 0 16px 48px rgba(15,23,42,0.1);
  --glow-indigo: rgba(99, 102, 241, 0.14);
  --glow-emerald: rgba(5, 150, 105, 0.1);
  --indigo: #6366f1;
  --emerald: #059669;
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Security: prevent selection/drag on non-interactive elements ── */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* ── Subtle dot grid (GPU-friendly, single layer) ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--line-strong) 0.7px, transparent 0.7px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000, transparent);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; }
svg { display: block; }

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}
h2 { font-size: clamp(2.1rem, 5.2vw, 3.8rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; font-weight: 600; }

.lead {
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.75;
}

.gradient-text {
  background: linear-gradient(115deg, var(--indigo) 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--indigo);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--indigo);
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 1;
}

.section {
  padding-block: clamp(80px, 12vw, 140px);
  position: relative;
  z-index: 1;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.section-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.prose p + p { margin-top: 16px; }
.prose strong { color: var(--text-strong); font-weight: 600; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 200;
  background: var(--indigo);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
  will-change: border-color;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-xs);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo-deep), var(--indigo));
  box-shadow: 0 4px 14px var(--glow-indigo);
}
.brand strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.brand strong span { color: var(--indigo); }

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-xs);
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}
.nav-link:hover { color: var(--text-strong); background: var(--line); }
.nav-link.active { color: var(--text-strong); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--indigo);
}

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

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.icon-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

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

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}
.menu-btn span {
  display: block;
  width: 17px; height: 1.5px;
  margin-inline: auto;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  will-change: transform;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-panel {
  display: none;
  overflow: hidden;
  max-height: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  transition: max-height 0.4s var(--ease);
  will-change: max-height;
}
.mobile-panel.open { max-height: 340px; }
.mobile-panel .wrap { display: flex; flex-direction: column; padding-block: 12px; gap: 2px; }
.mobile-panel .nav-link {
  padding: 14px 8px;
  font-size: 1rem;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.mobile-panel .nav-link:last-child { border-bottom: none; }
.mobile-panel .nav-link:hover { background: none; }
.mobile-panel .nav-link.active::after { display: none; }
.mobile-panel .nav-link.active { color: var(--indigo); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  will-change: transform;
}
.btn .icon { width: 17px; height: 17px; }
.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: 0 4px 16px var(--glow-indigo), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px var(--glow-indigo), inset 0 1px 0 rgba(255,255,255,0.15); }
.btn-primary .icon { transition: transform 0.2s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }
.btn-secondary {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-strong);
}
.btn-secondary:hover { border-color: var(--indigo); transform: translateY(-2px); color: var(--indigo); }

/* ============================================================
   Hero ambient (performance-optimized)
   ============================================================ */
.hero, .page-hero { position: relative; overflow: hidden; z-index: 1; }
.hero-stage, .page-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Two soft gradient orbs — single animation each, GPU-only */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.hero-glow-a {
  width: 50vw; height: 50vw; max-width: 520px; max-height: 520px;
  top: -14%; right: -8%;
  background: radial-gradient(circle, var(--glow-indigo), transparent 65%);
  animation: glow-drift 20s ease-in-out infinite alternate;
}
.hero-glow-b {
  width: 42vw; height: 42vw; max-width: 440px; max-height: 440px;
  bottom: -18%; left: -10%;
  background: radial-gradient(circle, var(--glow-emerald), transparent 65%);
  animation: glow-drift 24s ease-in-out infinite alternate-reverse;
}
@keyframes glow-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(20px, 24px, 0) scale(1.08); }
}

/* Scan lines — very subtle, static (no animation = no cost) */
.scan-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0, transparent 3px,
    var(--line) 3px, var(--line) 4px
  );
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

/* Orbits — simplified: static rings with one animated dot each */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  will-change: auto;
}
.orbit::after {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 10px var(--indigo);
  top: -3px; left: 50%;
  margin-left: -3px;
}
.orbit-one {
  width: 420px; height: 420px;
  animation: orbit-spin 32s linear infinite;
  opacity: 0.5;
}
.orbit-two {
  width: 620px; height: 620px;
  animation: orbit-spin 50s linear infinite reverse;
  opacity: 0.3;
}
.orbit-two::after { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }

@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ============================================================
   Landing hero
   ============================================================ */
.landing-hero { padding-block: clamp(52px, 8vw, 96px) clamp(36px, 5vw, 64px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero-intro h2 { margin-block: 6px 20px; }
.hero-intro .lead { margin-bottom: 28px; }
.hero-intro strong { color: var(--text-strong); }

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

.status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.pill.live {
  color: var(--emerald);
  border-color: color-mix(in srgb, var(--emerald) 30%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pill.live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(36px, 5vw, 64px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

/* ---------- Profile card ---------- */
.hero-media { position: relative; }
.float {
  animation: float-gentle 8s var(--ease) infinite alternate;
  will-change: transform;
}
@keyframes float-gentle {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -10px, 0); }
}

.profile-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px;
  box-shadow: var(--shadow);
  contain: layout style;
}
/* Signature: top-edge gradient line */
.profile-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 20px; right: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
}
.profile-card::after { display: none; }

.photo-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: linear-gradient(145deg, var(--surface), var(--surface-2));
}
.photo-wrap img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.photo-wrap.no-photo::after {
  content: "DB";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.8rem;
  color: var(--indigo);
  letter-spacing: 0.04em;
}
.photo-overlay {
  position: absolute;
  left: 10px; bottom: 10px;
  display: flex;
  gap: 5px;
}
.photo-overlay span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 100px;
  color: var(--text-strong);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--line);
}

.profile-info { padding: 16px 6px 6px; display: grid; gap: 16px; }
.profile-info h3 { font-size: 1.1rem; }
.profile-info p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

.metric-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 11px 13px;
  background: var(--surface);
}
.metric span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}
.metric strong { font-family: var(--font-display); font-size: 0.92rem; color: var(--text-strong); }

/* ============================================================
   Tags
   ============================================================ */
.tool-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.15s var(--ease);
  will-change: transform;
}
.tag:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); }

/* ============================================================
   Cards  — lightweight, performant
   ============================================================ */
.card, .feature-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px 22px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  will-change: transform;
  contain: layout style;
}
/* Top-edge glow on hover — the "shield pulse" signature */
.card::before, .feature-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 16px; right: 16px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}
/* Remove old pointer-follow pseudo */
.card::after, .feature-card::after { display: none; }

.card:hover, .feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.card:hover::before, .feature-card:hover::before { opacity: 1; }

.card h3, .feature-card h3 { margin-bottom: 8px; }
.card p, .feature-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.card p + p { margin-top: 6px; }
.card strong { color: var(--text-strong); font-weight: 600; }
.card .gradient-text { font-family: var(--font-mono); font-weight: 600; font-size: 0.82rem; }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--radius-xs);
  margin-bottom: 16px;
  color: var(--indigo);
  background: var(--glow-indigo);
  border: 1px solid color-mix(in srgb, var(--indigo) 20%, transparent);
}
.card-icon .icon { width: 22px; height: 22px; }

.project-kicker {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 10px;
}

/* ============================================================
   Timeline
   ============================================================ */
.timeline { position: relative; padding-left: 24px; display: grid; gap: 20px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 4px; top: 6px; bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--indigo), var(--emerald), transparent);
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--indigo);
  box-shadow: 0 0 0 3px var(--glow-indigo);
}
.timeline-item h3 { margin-bottom: 4px; }
.timeline-item p { color: var(--muted); font-size: 0.92rem; }
.timeline-item strong { color: var(--text-strong); }

/* ============================================================
   Skills
   ============================================================ */
.level { margin-top: 14px; }
.level-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  margin-bottom: 6px;
}
.level-head span:first-child { font-weight: 600; color: var(--text-strong); }
.level-head span:last-child {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--indigo);
}
.bar {
  height: 6px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
  transition: width 0.9s var(--ease);
  will-change: width;
}
.bar.fill span { width: var(--value); }

.skill-list { display: grid; gap: 10px; margin-top: 4px; }
.skill-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}
.skill-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--emerald);
  border-bottom: 2px solid var(--emerald);
  transform: rotate(-45deg);
}

/* ============================================================
   Contact
   ============================================================ */
.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease-out), transform 0.15s var(--ease);
}
a.contact-card:hover { border-color: var(--indigo); transform: translateY(-2px); }
.contact-card .card-icon { margin-bottom: 0; width: 42px; height: 42px; flex-shrink: 0; }
.contact-card div span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}
.contact-card div strong { color: var(--text-strong); font-weight: 600; font-size: 0.92rem; }

.social-section { margin-top: 30px; }
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.15s var(--ease);
  will-change: transform;
}
.social-card .social-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: inherit;
}
.social-card:hover { transform: translateY(-3px); color: var(--text-strong); }
.social-card.linkedin:hover, .social-card.linkedin:hover .social-icon { border-color: #2f7fc4; color: #4596db; }
.social-card.instagram:hover, .social-card.instagram:hover .social-icon { border-color: #d6336c; color: #e1568b; }
.social-card.facebook:hover, .social-card.facebook:hover .social-icon { border-color: #2f6fd6; color: #4c86e6; }

/* Form */
.form-panel {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: var(--shadow);
}
.form-panel::before {
  content: "";
  position: absolute;
  top: -1px; left: 20px; right: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
}
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--text);
  padding: 11px 13px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.6; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--glow-indigo);
}
.field.invalid input, .field.invalid textarea { border-color: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,0.15); }

.form-panel .btn-primary { justify-content: center; width: 100%; margin-top: 4px; }
.form-status {
  min-height: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  color: var(--muted);
}
.form-status.ok { color: var(--emerald); }
.form-status.error { color: #f87171; }
.btn[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

/* ============================================================
   Page hero (interior)
   ============================================================ */
.page-hero { padding-block: clamp(52px, 8vw, 96px) clamp(16px, 3vw, 36px); }
.page-hero h2 { margin-block: 6px 16px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); margin-top: 36px; position: relative; z-index: 1; }
.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 26px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--muted);
}
.footer-inner a { color: var(--indigo); font-weight: 600; }
.footer-inner a:hover { text-decoration: underline; }

/* ============================================================
   Scroll reveal (smooth, GPU-only)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ============================================================
   Focus
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   Security: hide content when printing
   ============================================================ */
@media print {
  body { display: none !important; }
  html::after {
    content: "Printing is disabled for security.";
    display: block;
    padding: 48px;
    font-size: 18px;
    font-family: system-ui;
    text-align: center;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .split, .hero-grid, .section-head { grid-template-columns: 1fr; }
  .section-head { align-items: start; }
  .hero-media { max-width: 400px; margin-inline: auto; }
  .float { animation: none; }
}

@media (max-width: 760px) {
  nav[aria-label="Primary navigation"] { display: none; }
  .menu-btn { display: flex; }
  .mobile-panel { display: block; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 460px) {
  body { font-size: 15px; }
  .photo-overlay { flex-wrap: wrap; }
  .metric-row { grid-template-columns: 1fr; }
}

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

/* ============================================================
   Security overlay (populated by JS)
   ============================================================ */
.security-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}
.security-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Blur content when devtools detected */
body.dt-detected > *:not(.security-overlay) {
  filter: blur(12px) !important;
  pointer-events: none !important;
}
