/* ================================================================
   ZeliteX — Digital Identity Portfolio
   Design system: "Verification Deck"
   A dark, instrument-panel aesthetic built around the idea of a
   digital ID / verification badge — the same card language used
   in the hero is reused for certificates, badges and contact.
   ================================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Color */
  --bg: #05070d;
  --bg-1: #080b14;
  --bg-panel: #0c1220;
  --bg-panel-2: #101827;
  --line: rgba(226, 232, 245, 0.09);
  --line-strong: rgba(226, 232, 245, 0.18);

  --ion: #4fd8ff;
  --ion-dim: rgba(79, 216, 255, 0.14);
  --violet: #8b7bff;
  --violet-dim: rgba(139, 123, 255, 0.14);
  --amber: #ffb454;
  --amber-dim: rgba(255, 180, 84, 0.14);
  --green: #5ee6a0;

  --text: #e9edf6;
  --text-dim: #98a2b8;
  --text-faint: #5c6478;

  /* Type */
  --f-display: "Space Grotesk", "Inter", sans-serif;
  --f-body: "Inter", sans-serif;
  --f-mono: "JetBrains Mono", monospace;

  /* Layout */
  --max: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: 0.001s; }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}

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

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

::selection { background: var(--ion); color: #051019; }

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

/* ---------- Boot sequence ---------- */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  cursor: pointer;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.boot-overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-lines {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 2.1;
  text-align: left;
}
.boot-line {
  opacity: 0;
  transform: translateX(-8px);
  animation: boot-in 0.5s var(--ease) forwards;
}
.boot-line .prompt { color: var(--ion); margin-right: 0.6em; }
.boot-line:nth-child(1) { animation-delay: 0.2s; }
.boot-line:nth-child(2) { animation-delay: 0.6s; }
.boot-line:nth-child(3) { animation-delay: 1.0s; }
.boot-line-final { animation-delay: 1.4s; color: var(--text); }
@keyframes boot-in { to { opacity: 1; transform: translateX(0); } }

.boot-skip {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0;
  animation: boot-in 0.5s var(--ease) forwards;
  animation-delay: 1.8s;
}

@media (prefers-reduced-motion: reduce) {
  .boot-overlay { display: none; }
}

/* ---------- Background field ---------- */
.field {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60vw 60vw at 82% -10%, rgba(139,123,255,0.16), transparent 60%),
    radial-gradient(50vw 50vw at 8% 8%, rgba(79,216,255,0.12), transparent 60%),
    linear-gradient(180deg, #05070d 0%, #060811 40%, #05070d 100%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(to right, rgba(226,232,245,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226,232,245,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(90% 60% at 50% 0%, black 0%, transparent 75%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

section { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  flex-wrap: wrap;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ion);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ion);
  box-shadow: 0 0 10px var(--ion);
}

.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}

.section-sub {
  color: var(--text-dim);
  max-width: 56ch;
  margin-top: 0.6rem;
  font-size: 0.98rem;
}

.section-rule {
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, var(--line), transparent);
  min-width: 40px;
}

/* ---------- Glass panel primitive ---------- */
.panel {
  background: linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
}

.panel::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--ion), var(--violet));
  color: #04101a;
  border-color: transparent;
  box-shadow: 0 8px 30px -8px rgba(79,216,255,0.55);
}
.btn-primary:hover { box-shadow: 0 12px 34px -6px rgba(79,216,255,0.7); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); border-color: var(--ion); color: var(--ion); }

.btn-icon svg { width: 16px; height: 16px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem clamp(1.25rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5,7,13,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--line);
}

.nav-id {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-mono);
  font-size: 0.85rem;
}
.nav-id .chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2.4s ease-in-out infinite;
}
.nav-id b { font-family: var(--f-display); letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.9rem); }
.nav-links a {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--ion);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 16px; height: 1.5px;
  background: var(--text);
  position: relative;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span::after { transform: translateY(-5px) rotate(-45deg); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
  isolation: isolate; /* keeps hero-net canvas from painting over content */
}

.hero-net {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  mix-blend-mode: screen;
  pointer-events: none;
}
@media (max-width: 760px) { .hero-net { opacity: 0.4; } }

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-kicker {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.hero-kicker span { color: var(--ion); }

.hero-name {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.hero-handle {
  margin-top: 0.9rem;
  font-family: var(--f-mono);
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--ion);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-handle::before { content: "//"; color: var(--text-faint); }

.hero-tagline {
  margin-top: 1.4rem;
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-meta {
  margin-top: 2.6rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.hero-meta b { display: block; color: var(--text); font-family: var(--f-body); font-size: 0.92rem; margin-bottom: 0.2rem; }

/* --- Signature element: the ID card --- */
.id-card {
  position: relative;
  padding: 1.8rem;
  aspect-ratio: 4 / 5.1;
  max-width: 380px;
  margin-inline: auto;
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform 0.5s var(--ease);
}
.id-card:hover {
  transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
}

.id-card::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, transparent 30%, rgba(79,216,255,0.35), transparent 55%);
  background-size: 220% 220%;
  animation: scan 5s linear infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}
@keyframes scan {
  0% { background-position: 120% -20%; }
  100% { background-position: -20% 120%; }
}

.id-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.id-card-badge {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ion);
  border: 1px solid rgba(79,216,255,0.4);
  background: var(--ion-dim);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}
.id-card-chip {
  width: 34px; height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffe9b8, #d9ad5c);
  position: relative;
  overflow: hidden;
}
.id-card-chip::before, .id-card-chip::after {
  content: ""; position: absolute; background: rgba(0,0,0,0.25);
}
.id-card-chip::before { top: 50%; left: 0; right: 0; height: 1px; }
.id-card-chip::after { left: 50%; top: 0; bottom: 0; width: 1px; }

.id-card-photo {
  margin-top: 1.3rem;
  aspect-ratio: 1;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(139,123,255,0.35), transparent 60%),
    linear-gradient(160deg, #131c2e, #0a0f19);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.id-card-photo svg { width: 46%; height: 46%; opacity: 0.55; color: var(--text-dim); }

.id-card-info { margin-top: 1.3rem; }
.id-card-info .name { font-family: var(--f-display); font-size: 1.15rem; }
.id-card-info .handle { font-family: var(--f-mono); font-size: 0.82rem; color: var(--ion); margin-top: 0.15rem; }
.id-card-info .role { font-family: var(--f-mono); font-size: 0.7rem; color: var(--text-faint); margin-top: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; }

.id-card-foot {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.id-card-code { font-family: var(--f-mono); font-size: 0.62rem; color: var(--text-faint); letter-spacing: 0.06em; }
.id-card-verify { display: flex; align-items: center; gap: 0.35rem; font-family: var(--f-mono); font-size: 0.62rem; color: var(--green); }
.id-card-verify .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

.blink-cursor {
  display: inline-block;
  width: 5px; height: 10px;
  margin-left: 4px;
  background: var(--ion);
  vertical-align: -1px;
  animation: cursor-blink 1.1s step-end infinite;
}
@keyframes cursor-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .blink-cursor { animation: none; opacity: 1; } }

/* ---------- Hover accent bar (shared by every card type) ---------- */
.cert-card, .badge-card, .project-card, .contact-card, .skill-cat, .timeline-card {
  position: relative;
  overflow: hidden;
}
.cert-card::after, .badge-card::after, .project-card::after,
.contact-card::after, .skill-cat::after, .timeline-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ion), var(--violet), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.cert-card:hover::after, .badge-card:hover::after, .project-card:hover::after,
.contact-card:hover::after, .skill-cat:hover::after, .timeline-card:hover::after,
.cert-card:focus-within::after, .badge-card:focus-within::after {
  transform: scaleX(1);
}

.hero-scroll {
  position: absolute;
  z-index: 1;
  bottom: clamp(1.2rem, 3vw, 2.4rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero-scroll .line { width: 1px; height: 30px; background: linear-gradient(var(--ion), transparent); animation: drop 1.8s ease-in-out infinite; }
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: 1rem; font-size: 1.02rem; }
.about-text p:last-child { margin-bottom: 0; }

.fact-list { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.fact-row { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.fact-row:last-child { border-bottom: none; padding-bottom: 0; }
.fact-row .k { font-family: var(--f-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.fact-row .v { font-size: 0.92rem; text-align: right; }

/* ---------- Timeline (Education / Learning journey) ---------- */
.timeline { position: relative; padding-left: clamp(1.6rem, 4vw, 2.4rem); }
.timeline::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(var(--ion), var(--violet), transparent);
}
.timeline-item { position: relative; padding-bottom: clamp(1.8rem, 4vw, 2.4rem); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: calc(-1 * clamp(1.6rem, 4vw, 2.4rem));
  top: 4px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--ion);
  box-shadow: 0 0 0 4px rgba(79,216,255,0.12);
}
.timeline-card { padding: 1.3rem 1.5rem; }
.timeline-period { font-family: var(--f-mono); font-size: 0.72rem; color: var(--ion); letter-spacing: 0.05em; text-transform: uppercase; }
.timeline-title { margin-top: 0.4rem; font-size: 1.08rem; }
.timeline-sub { color: var(--text-dim); font-size: 0.88rem; margin-top: 0.2rem; }
.timeline-desc { color: var(--text-dim); margin-top: 0.6rem; font-size: 0.92rem; }

/* ---------- Empty state ---------- */
.empty-state {
  padding: 2.6rem 1.6rem;
  text-align: center;
  color: var(--text-faint);
}
.empty-state .glyph {
  width: 46px; height: 46px;
  margin: 0 auto 1rem;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
}
.empty-state .glyph svg { width: 20px; height: 20px; }
.empty-state .title { font-family: var(--f-mono); font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); }
.empty-state .sub { font-size: 0.85rem; margin-top: 0.4rem; max-width: 40ch; margin-inline: auto; }

/* ---------- Skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.skill-cat { padding: 1.5rem; }
.skill-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.skill-cat-head h3 { font-size: 1rem; font-family: var(--f-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.skill-cat-count { font-family: var(--f-mono); font-size: 0.7rem; color: var(--text-faint); border: 1px solid var(--line); padding: 0.15rem 0.5rem; border-radius: 999px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.skill-tag {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  transition: border-color 0.3s, transform 0.3s;
}
.skill-tag:hover { border-color: var(--ion); transform: translateY(-2px); }

/* ---------- Certificates ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.filter-chip {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  transition: all 0.3s var(--ease);
}
.filter-chip:hover { color: var(--text); border-color: var(--ion); }
.filter-chip.is-active { background: var(--ion); color: #04101a; border-color: var(--ion); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.3rem; }
.cert-card {
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}
.cert-card:hover { transform: translateY(-5px); border-color: rgba(79,216,255,0.4); }
.cert-thumb {
  aspect-ratio: 4/3;
  background: var(--bg-panel-2);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.cert-card:hover .cert-thumb img { transform: scale(1.06); }
.cert-thumb .id-flag {
  position: absolute; top: 0.6rem; right: 0.6rem;
  font-family: var(--f-mono); font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(5,7,13,0.75); border: 1px solid var(--amber); color: var(--amber);
  padding: 0.25rem 0.5rem; border-radius: 999px; backdrop-filter: blur(6px);
}
.cert-body { padding: 1.1rem 1.2rem 1.3rem; }
.cert-cat { font-family: var(--f-mono); font-size: 0.66rem; color: var(--ion); letter-spacing: 0.08em; text-transform: uppercase; }
.cert-title { margin-top: 0.4rem; font-size: 1.02rem; }
.cert-org { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.25rem; }
.cert-date { font-family: var(--f-mono); font-size: 0.72rem; color: var(--text-faint); margin-top: 0.6rem; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3,5,10,0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }

.modal {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2.2rem);
  transform: translateY(24px) scale(0.98);
  transition: transform 0.4s var(--ease);
}
.modal-backdrop.is-open .modal { transform: translateY(0) scale(1); }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.modal-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s, transform 0.3s;
}
.modal-close:hover { border-color: var(--ion); transform: rotate(90deg); }
.modal-close svg { width: 16px; height: 16px; }

.modal-evidence { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.modal-evidence.has-id { grid-template-columns: 1fr 1fr; }
.evidence-block img { border-radius: var(--radius-sm); border: 1px solid var(--line); width: 100%; }
.evidence-label {
  font-family: var(--f-mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem;
}
.evidence-label.linked { color: var(--amber); }
.evidence-link-note {
  grid-column: 1 / -1;
  font-family: var(--f-mono); font-size: 0.72rem; color: var(--amber);
  background: var(--amber-dim); border: 1px solid rgba(255,180,84,0.35);
  padding: 0.6rem 0.9rem; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 0.5rem;
}

.modal-meta { margin-top: 1.4rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.modal-meta .item .k { font-family: var(--f-mono); font-size: 0.66rem; text-transform: uppercase; color: var(--text-faint); letter-spacing: 0.06em; }
.modal-meta .item .v { margin-top: 0.25rem; font-size: 0.92rem; }
.modal-verify { margin-top: 1.4rem; }

/* ---------- Badges ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.badge-card { padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; transition: transform 0.3s var(--ease); }
.badge-card:hover { transform: translateY(-4px); }
.badge-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--violet-dim), var(--ion-dim));
  border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
}
.badge-icon img { width: 60%; height: 60%; object-fit: contain; }
.badge-icon svg { width: 20px; height: 20px; color: var(--ion); }
.badge-title { font-size: 0.98rem; }
.badge-date { font-family: var(--f-mono); font-size: 0.68rem; color: var(--text-faint); margin-top: 0.2rem; }
.badge-desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.4rem; }

/* ---------- Projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.3rem; }
.project-card { padding: 1.5rem; transition: transform 0.3s var(--ease), border-color 0.3s; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(79,216,255,0.35); }
.project-status {
  font-family: var(--f-mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--green); display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 0.8rem;
}
.project-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.contact-card {
  padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.contact-card:hover { transform: translateY(-5px); border-color: var(--ion); }
.contact-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-platform { font-family: var(--f-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.contact-handle { font-size: 1.05rem; }
.contact-cta { font-family: var(--f-mono); font-size: 0.74rem; color: var(--ion); display: inline-flex; align-items: center; gap: 0.4rem; }
.contact-cta svg { width: 14px; height: 14px; transition: transform 0.3s; }
.contact-card:hover .contact-cta svg { transform: translateX(3px); }

/* ---------- Resume ---------- */
.resume-panel { padding: clamp(1.5rem, 4vw, 2.6rem); }
.resume-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.resume-name { font-size: 1.5rem; }
.resume-role { font-family: var(--f-mono); color: var(--ion); font-size: 0.85rem; margin-top: 0.3rem; }
.resume-section { margin-bottom: 1.8rem; }
.resume-section:last-child { margin-bottom: 0; }
.resume-section h3 { font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.8rem; }
.resume-section p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- Footer ---------- */
footer { padding-block: 2.5rem; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-family: var(--f-mono); font-size: 0.74rem; color: var(--text-faint); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .id-card { order: -1; max-width: 300px; transform: none; }
  .id-card:hover { transform: none; }
  .about-grid { grid-template-columns: 1fr; }
  .modal-evidence.has-id { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 0; right: 0; height: 100svh; width: min(78vw, 320px);
    background: rgba(6,8,17,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 0.95rem; }
  .nav-toggle { display: flex; z-index: 101; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Print (Resume) ---------- */
@media print {
  .field, .grid-overlay, .noise, .nav, .hero-scroll, footer, .filter-bar,
  #certificates, #badges, #projects, #currently-learning, .btn, .id-card { display: none !important; }
  body { background: #fff; color: #111; }
  .resume-panel { border: none; background: none; backdrop-filter: none; }
  section { padding-block: 1rem; }
}
