/* ══════════════════════════════════════════════════════════════════════
   MYSTIC.BOND — CYBER-LUXE DEVELOPER COCKPIT
   Inspired by reejanexe.bond & top-tier engineer portfolios.
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #05060a;
  --bg-2: #080911;
  --surface: rgba(255, 255, 255, 0.032);
  --surface-2: rgba(255, 255, 255, 0.058);
  --surface-card: #0b0d16;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.15);
  --ink: #f4f2ec;
  --dim: #9696a4;
  --muted: #5e5e6e;

  /* Accent theme default: Mystic Lime */
  --accent: #c4f042;
  --accent-rgb: 196, 240, 66;

  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
  --pad: clamp(24px, 5vw, 72px);
  --max: 1360px;
  --radius: 20px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: #07080a;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

/* Hide default browser scrollbar on the side */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
  display: none !important;
  width: 0px !important;
  height: 0px !important;
  background: transparent !important;
}

body {
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  list-style: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad) !important;
  padding-right: var(--pad) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   CUSTOM CURSOR
   ══════════════════════════════════════════════════════════════════════ */
@media (pointer: fine) {
  html.cursor-on, html.cursor-on body, html.cursor-on a, html.cursor-on button, html.cursor-on input {
    cursor: none;
  }
}

.cur-dot, .cur-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99990;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}

html.cursor-on .cur-dot, html.cursor-on .cur-ring {
  opacity: 1;
}

.cur-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9);
}

.cur-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(var(--accent-rgb), 0.45);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s, background 0.25s;
}

.cur-ring.is-hover {
  width: 60px;
  height: 60px;
  border-color: rgba(var(--accent-rgb), 0.85);
  background: rgba(var(--accent-rgb), 0.08);
}

/* ══════════════════════════════════════════════════════════════════════
   SLOW HYPNOTIC AURORA & CANVAS
   ══════════════════════════════════════════════════════════════════════ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.25;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0, 0, 0, 0.05) 2px 4px);
}

#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

/* Very slow, calm, majestic ambient glow (45s to 60s period) */
.aurora {
  position: fixed;
  inset: -15%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  filter: blur(100px);
  opacity: 0.45;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
}

.aurora .a1 {
  width: 48vw;
  height: 48vw;
  left: -8%;
  top: -10%;
  background: rgba(var(--accent-rgb), 0.14);
  animation: driftSlow1 55s ease-in-out infinite;
}

.aurora .a2 {
  width: 40vw;
  height: 40vw;
  right: -6%;
  top: 25%;
  background: rgba(56, 189, 248, 0.11);
  animation: driftSlow2 65s ease-in-out infinite;
}

.aurora .a3 {
  width: 36vw;
  height: 36vw;
  left: 28%;
  bottom: -15%;
  background: rgba(168, 85, 247, 0.09);
  animation: driftSlow3 70s ease-in-out infinite;
}

@keyframes driftSlow1 { 50% { transform: translate(5vw, 6vh) scale(1.1); } }
@keyframes driftSlow2 { 50% { transform: translate(-6vw, -5vh) scale(1.08); } }
@keyframes driftSlow3 { 50% { transform: translate(4vw, -6vh) scale(1.12); } }

/* ══════════════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 max(var(--pad), 20px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.scrolled {
  background: rgba(5, 6, 10, 0.8);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #07080a;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.35);
  transition: transform 0.35s var(--ease), box-shadow 0.3s;
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.6);
}

.brand em {
  font-style: normal;
  color: var(--dim);
  font-weight: 400;
}

.brand .caret {
  display: inline-block;
  width: 6px;
  height: 13px;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1.1s steps(1) infinite;
  vertical-align: -2px;
}

@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 8px 16px;
  border-radius: 20px;
  transition: color 0.2s;
}

.nav-links a sup {
  font-size: 8px;
  color: var(--muted);
  margin-right: 4px;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover::after, .nav-links a.active::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.themes {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 26px;
}

.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  opacity: 0.55;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.theme-dot:hover {
  opacity: 1;
  transform: scale(1.3);
}

.theme-dot.active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.25s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.icon-btn.active {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.06);
}

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

.kbd-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: 0.08em;
  background: var(--surface);
  transition: all 0.2s;
}

.kbd-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.kbd-btn kbd {
  font-family: var(--font-mono);
  font-size: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--dim);
}

/* ══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 30px);
  padding-bottom: 48px;
}

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

.hero-copy {
  position: relative;
  z-index: 2;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 7px 15px;
  border-radius: 30px;
  margin-bottom: 24px;
}

.badge .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: pulse 2s infinite;
}

.badge .sep {
  width: 1px;
  height: 10px;
  background: var(--line-strong);
}

.badge b {
  color: var(--ink);
  font-weight: 500;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 8.8vw, 126px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  margin-bottom: 24px;
}

.h1-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.04em;
}

.h1-name {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg, var(--ink) 10%, rgba(var(--accent-rgb), 0.95) 55%, var(--ink) 95%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sheen 7s linear infinite;
}

@keyframes sheen { to { background-position: -220% 0; } }

.h1-exe {
  font-size: 0.42em;
  letter-spacing: -0.03em;
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
  vertical-align: 0.18em;
  margin-left: 0.02em;
}

.h1-line:nth-child(2) {
  font-size: 0.65em;
  letter-spacing: -0.045em;
}

.h1-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(244, 242, 236, 0.48);
  transition: -webkit-text-stroke-color 0.4s, color 0.4s;
}

.h1-line:hover .h1-outline {
  color: rgba(var(--accent-rgb), 0.14);
  -webkit-text-stroke-color: rgba(var(--accent-rgb), 0.9);
}

.hero-lede {
  max-width: 520px;
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.85;
  margin-bottom: 34px;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 500;
}

.hero-lede .hl {
  color: var(--accent);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.25s, color 0.25s, background 0.25s;
  white-space: nowrap;
}

.btn .arrow {
  transition: transform 0.35s var(--ease);
  font-size: 16px;
}

.btn:hover .arrow {
  transform: translate(3px, -3px);
}

.btn-primary {
  background: var(--accent);
  color: #07080a;
  font-weight: 600;
  box-shadow: 0 8px 30px -10px rgba(var(--accent-rgb), 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -10px rgba(var(--accent-rgb), 0.7);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.6);
  background: rgba(var(--accent-rgb), 0.06);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: clamp(20px, 3.4vw, 44px);
  justify-content: start;
}

.stat-v {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  white-space: nowrap;
}

.stat-v .u {
  color: var(--accent);
}

.stat-l {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════
   3D PERSPECTIVE TERMINAL (Smooth Mouse Tracking)
   ══════════════════════════════════════════════════════════════════════ */
.term-shell {
  position: relative;
  z-index: 2;
  perspective: 1200px;
}

.term {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(15, 17, 26, 0.94), rgba(7, 8, 13, 0.98));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset, 0 1px 0 rgba(255, 255, 255, 0.06) inset;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out, box-shadow 0.3s;
}

.term::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.55), transparent);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
}

.term-dots {
  display: flex;
  gap: 6px;
  margin-right: 6px;
}

.term-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2b36;
}
.term-dots i:nth-child(1) { background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; }
.term-dots i:nth-child(3) { background: #28c840; }

.term-title {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.05em;
  flex: 1;
  text-align: center;
  padding-right: 34px;
  white-space: nowrap;
}

.term-live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 20px;
  padding: 2px 7px;
  background: rgba(var(--accent-rgb), 0.06);
}

.term-live i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s steps(1) infinite;
}

.term-body {
  height: 338px;
  overflow-y: auto;
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
  scrollbar-width: thin;
}

.term-body::-webkit-scrollbar { width: 5px; }
.term-body::-webkit-scrollbar-thumb { background: #23242f; }

.tline {
  color: var(--dim);
  word-break: break-word;
  white-space: pre-wrap;
  margin-bottom: 3px;
}

.tline.cmd { color: var(--ink); }
.tline.cmd .pr { color: var(--accent); font-weight: 600; }
.tline.hi { color: var(--ink); font-weight: 500; }
.tline.ok { color: var(--accent); }
.tline.err { color: #ff6b85; }

.term-input-line {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.term-input-line .pr {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.term-input-line input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  caret-color: var(--accent);
}

.term-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.term-hints button {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 20px;
  transition: all 0.2s;
}

.term-hints button:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.05);
}

.term-glow {
  position: absolute;
  inset: -30px;
  z-index: -1;
  background: radial-gradient(50% 50% at 60% 30%, rgba(var(--accent-rgb), 0.16), transparent 70%);
  filter: blur(25px);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════
   MARQUEE TICKER
   ══════════════════════════════════════════════════════════════════════ */
.ticker {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 15, 0.65);
  overflow: hidden;
  padding: 20px 0;
}

.ticker-row {
  display: flex;
  width: max-content;
  will-change: transform;
}

.ticker-row.r1 { animation: tick 40s linear infinite; }
.ticker-row.r2 { animation: tick 52s linear infinite reverse; margin-top: 10px; opacity: 0.55; }

.ticker:hover .ticker-row { animation-play-state: paused; }

.ticker-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-track span {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 26px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-transform: uppercase;
}

.ticker-track span i {
  font-style: normal;
  color: var(--accent);
  font-size: 0.55em;
}

.ticker-row.r2 .ticker-track span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
  font-size: clamp(15px, 2vw, 24px);
}

@keyframes tick { to { transform: translateX(-50%); } }

/* ══════════════════════════════════════════════════════════════════════
   SECTIONS & BENTO GRID
   ══════════════════════════════════════════════════════════════════════ */
section {
  position: relative;
  z-index: 2;
  padding-top: clamp(72px, 10vw, 130px);
  padding-bottom: clamp(72px, 10vw, 130px);
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.sec-index {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 600;
}

.sec-rule {
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.45), var(--line));
}

.sec-name {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

.sec-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.2vw, 64px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
  max-width: 880px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.sec-title em {
  font-style: normal;
  color: var(--accent);
}

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 100%), #080a12;
  padding: clamp(26px, 3.2vw, 38px);
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.35s var(--ease), border-color 0.35s, box-shadow 0.35s;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.9), 0 0 35px -10px rgba(var(--accent-rgb), 0.18);
}

/* ══════════════════════════════════════════════════════════════════════
   CARD SPOTLIGHT HOVER GLOW & MICRO-INTERACTIONS
   ══════════════════════════════════════════════════════════════════════ */
.card, .project {
  position: relative;
  isolation: isolate;
}

.card::before, .project::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.4), transparent 65%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 2;
}

.card:hover::before, .project:hover::before {
  opacity: 1;
}

/* Subtle button tactile depression on active click */
button:active, .btn:active, .project:active, .chip:active {
  transform: scale(0.975);
}

.card-tag {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}

.card-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
}

.card-bio {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
}

.bio-name {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.bio-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(140deg, var(--accent), #10b981);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  color: #07080a;
  box-shadow: 0 0 35px rgba(var(--accent-rgb), 0.35);
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.bio-who {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.bio-who small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 4px;
}

.discord-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #fff;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  margin-top: 10px;
  width: fit-content;
}

.discord-tag-pill:hover {
  background: rgba(88, 101, 242, 0.25);
  border-color: #5865F2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.discord-tag-pill svg {
  fill: #5865F2;
}

.discord-tag-pill b {
  color: #c8cdfd;
  font-family: var(--font-mono);
}

.discord-tag-pill small {
  font-size: 8.5px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 8px;
  margin-left: 2px;
}

.live-activity-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 14px;
  border-radius: 10px;
  margin-top: 14px;
}

.live-activity-bar .activity-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

.bio-text {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--dim);
  margin: 12px 0;
}

.bio-text strong {
  color: var(--ink);
  font-weight: 500;
}

.personal-mindset-box {
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  margin: 16px 0;
  position: relative;
}

.personal-mindset-box p {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 6px;
}

.personal-mindset-box b {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}

.bio-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}

.bio-foot span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bio-foot svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* Capability Metrics HUD */
.card-stats {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}

.stat-cell {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-cell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-cell:hover {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-2px);
}

.stat-cell:hover::after {
  opacity: 1;
}

.stat-cell b {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 38px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat-cell b i {
  font-style: normal;
  color: var(--accent);
}

.stat-cell span {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* Skills card with glowing shine animation */
.card-skills {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
}

.skill {
  margin-bottom: 20px;
}

.skill:last-child {
  margin-bottom: 0;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 12px;
}

.skill-top b {
  font-weight: 500;
  color: var(--ink);
}

.skill-top span {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}

.skill-bar {
  height: 6px;
  border-radius: 6px;
  background: #141624;
  overflow: hidden;
  position: relative;
}

.skill-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #10b981, var(--accent));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.5);
  transition: width 1.4s var(--ease);
  position: relative;
}

.skill-bar i::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: barShine 2.8s infinite linear;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Stack and GitHub Card */
.card-stack {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--dim);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  padding: 8px 16px;
  border-radius: 30px;
  transition: all 0.25s;
}

.chip:hover {
  color: #07080a;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.35);
}

.chip.accent {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.07);
}

/* GitHub Heatmap */
.git-streak {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(6, 7, 13, 0.7);
}

.git-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.git-top a {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 5px;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(28, 1fr);
  gap: 3px;
}

.hm-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #151622;
}

.hm-cell.l1 { background: rgba(var(--accent-rgb), 0.22); }
.hm-cell.l2 { background: rgba(var(--accent-rgb), 0.48); }
.hm-cell.l3 { background: rgba(var(--accent-rgb), 0.72); }
.hm-cell.l4 { background: var(--accent); box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.6); }

.now-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--dim);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.now-line .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
  animation: pulse 2s infinite;
}

.now-line b {
  color: var(--ink);
  font-weight: 500;
}

.now-line .time {
  color: var(--accent);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════════════
   PROJECTS (With Integrated Code Inspector Panels)
   ══════════════════════════════════════════════════════════════════════ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008));
  padding: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, box-shadow 0.4s, transform 0.25s var(--ease);
  cursor: pointer;
}

.project:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 24px 60px -25px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

.project.featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
  gap: clamp(24px, 3vw, 44px);
  padding: clamp(24px, 3vw, 36px);
}

.proj-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.proj-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: auto;
}

.proj-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.proj-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.05);
  padding: 3px 8px;
  border-radius: 20px;
}

.proj-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.4s steps(1) infinite;
}

.proj-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 22px 0 9px;
  transition: color 0.2s;
}

.project:hover .proj-title {
  color: var(--accent);
}

.project.featured .proj-title {
  font-size: clamp(26px, 3.2vw, 38px);
  margin-top: 24px;
}

.proj-desc {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--dim);
  max-width: 440px;
}

.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}

.proj-tags span {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 4px;
}

.proj-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.proj-metric {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.proj-metric b {
  color: var(--ink);
  font-weight: 500;
}

.proj-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 13px;
  transition: all 0.3s var(--ease);
}

.project:hover .proj-arrow {
  transform: translate(3px, -3px);
  background: var(--accent);
  border-color: var(--accent);
  color: #07080a;
}

/* Integrated Code Panel */
.code-panel {
  width: 44%;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #06070c;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  position: relative;
}

.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.code-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-bar-left i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #282936;
}

.code-bar-left span {
  font-size: 9.5px;
  color: var(--muted);
  margin-left: 6px;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  cursor: pointer;
}

.code-copy-btn:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.06);
}

.code-body {
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.85;
  overflow: auto;
  flex: 1;
  color: #8b8b9b;
  white-space: pre;
  font-family: var(--font-mono);
  display: flex;
}

.code-lines {
  display: flex;
  flex-direction: column;
  user-select: none;
  opacity: 0.35;
  text-align: right;
  padding-right: 14px;
  margin-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: var(--dim);
}

.code-text {
  flex: 1;
}

.code-body .k { color: #c792ea; }
.code-body .f { color: #82aaff; }
.code-body .s { color: #c3e88d; }
.code-body .c { color: #42434f; }
.code-body .v { color: #f78c6c; }
.code-body .p { color: #89ddff; }

/* Feather Live Equalizer Mini Wave */
.live-wave-strip {
  display: inline-flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
  margin-left: 8px;
  vertical-align: middle;
}

.live-wave-strip span {
  width: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.live-wave-strip span:nth-child(1) { height: 6px; animation: eqWave 0.9s infinite alternate ease-in-out; }
.live-wave-strip span:nth-child(2) { height: 11px; animation: eqWave 0.6s infinite alternate ease-in-out; }
.live-wave-strip span:nth-child(3) { height: 5px; animation: eqWave 1.1s infinite alternate ease-in-out; }
.live-wave-strip span:nth-child(4) { height: 9px; animation: eqWave 0.75s infinite alternate ease-in-out; }

@keyframes eqWave { to { height: 2px; } }

/* Heatmap Tooltip */
.hm-tooltip {
  position: fixed;
  z-index: 99999;
  background: #0d0f1a;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.hm-tooltip.show {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════
   CONTACT & FOOTER
   ══════════════════════════════════════════════════════════════════════ */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.contact-copy p {
  color: var(--dim);
  font-size: 14.5px;
  line-height: 1.85;
  max-width: 430px;
  margin-bottom: 30px;
}

.avail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.05);
  padding: 9px 15px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.contact-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  transition: padding-left 0.4s var(--ease), color 0.3s;
}

.contact-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease);
}

.contact-link:hover {
  color: #07080a;
  padding-left: 28px;
}

.contact-link:hover::before {
  transform: scaleY(1);
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.contact-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 2px;
}

.contact-arrow {
  font-size: 20px;
  opacity: 0.5;
  transition: transform 0.4s var(--ease);
  position: relative;
  z-index: 1;
}

.contact-link:hover .contact-arrow {
  opacity: 1;
  transform: translate(4px, -4px);
}

/* Giant Footer Outline */
.footer {
  position: relative;
  z-index: 2;
  padding: 0 0 32px;
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
  overflow: hidden;
}

.footer-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(60px, 15vw, 220px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  text-align: center;
  margin: clamp(26px, 4vw, 50px) 0 0;
  user-select: none;
  position: relative;

  /* Permanent top-to-bottom gradient fill */
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.3) 0%, rgba(var(--accent-rgb), 0.08) 50%, rgba(255, 255, 255, 0.01) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* Glowing accent stroke */
  -webkit-text-stroke: 1.2px rgba(var(--accent-rgb), 0.55);

  /* Top-to-bottom fade mask: vibrant glow at top, fading to transparent at bottom */
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.12) 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.12) 100%);

  transition: filter 0.4s ease;
}

.footer-word:hover {
  filter: drop-shadow(0 0 25px rgba(var(--accent-rgb), 0.35));
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════════════════
   MODALS (Command Palette & Case Study)
   ══════════════════════════════════════════════════════════════════════ */
.palette {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 14vh 20px 20px;
  background: rgba(3, 4, 8, 0.65);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s;
}

.palette.open {
  opacity: 1;
  visibility: visible;
}

.palette-panel {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(10, 11, 18, 0.98);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.palette-input-wrap .pfx {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.palette-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
}

.palette-list {
  max-height: 330px;
  overflow-y: auto;
  padding: 7px;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--dim);
  transition: all 0.15s;
}

.palette-item:hover, .palette-item.sel {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--ink);
}

.palette-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 8.5px;
  color: var(--muted);
}

.palette-foot kbd {
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1px 4px;
}

/* Case Study Modal */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 8, 0.75);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.case-modal.open {
  opacity: 1;
  visibility: visible;
}

.case-panel {
  width: 100%;
  max-width: 740px;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(165deg, #0b0d16, #07080d);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.95);
}

.case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.case-kicker {
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.case-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--dim);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.case-close:hover {
  background: var(--accent);
  color: #07080a;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 30000;
  transform: translate(-50%, 20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(12, 13, 21, 0.96);
  backdrop-filter: blur(16px);
  font-size: 11px;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.toast span.ok { color: var(--accent); font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════
   MOBILE HAMBURGER BUTTON & FROSTED GLASS DRAWER
   ══════════════════════════════════════════════════════════════════════ */
.menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  position: relative;
  z-index: 9200;
  transition: all 0.25s var(--ease);
}

.menu-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s, background 0.2s;
}

.menu-btn span + span {
  margin-top: 0;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .menu-btn {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
}

body.menu-open .menu-btn span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile Navigation Drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 8900;
  background: rgba(5, 6, 10, 0.97);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + 20px) var(--pad) 36px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.5s var(--ease), visibility 0.5s;
  visibility: hidden;
  overflow-y: auto;
}

body.menu-open .mobile-menu {
  clip-path: inset(0 0 0 0);
  visibility: visible;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

.mm-link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  transition: color 0.2s, transform 0.2s;
}

.mm-link span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

.mm-link:hover, .mm-link:active {
  color: var(--accent);
  transform: translateX(4px);
}

.mobile-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
}

.mm-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.mobile-themes {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-themes .theme-dot {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.mobile-menu-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.mm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  transition: all 0.2s;
}

.mm-btn:active {
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════════
   HIGH-PRECISION MOBILE RESPONSIVE QUERIES
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 30px); }
  .bento { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .card-bio { grid-column: span 6; }
  .card-stats { grid-column: span 6; }
  .card-skills { grid-column: span 6; }
  .card-stack { grid-column: span 6; }
  .work-grid { grid-template-columns: 1fr; }
  .project.featured { grid-column: span 1; flex-direction: column; gap: 24px; }
  .code-panel { width: 100%; height: 230px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  .nav-links, .themes, .kbd-btn { display: none; }
  .menu-btn { display: flex; }
  .cur-dot, .cur-ring { display: none !important; }

  /* Disable 3D terminal tilt on tablet/mobile for smooth performance */
  .term-shell { perspective: none; }
  .term { transform: none !important; }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 68px;
    --pad: 20px;
  }

  /* Navigation Bar */
  .brand {
    font-size: 16px;
    font-weight: 700;
  }
  .brand em {
    display: inline;
    color: var(--accent);
  }
  .brand-mark {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  /* Hero Section — Spacious, breathable & punchy */
  .hero {
    padding-top: calc(var(--nav-h) + 36px);
    padding-bottom: 52px;
    min-height: auto;
  }
  .hero-grid {
    gap: 30px;
  }
  .badge {
    font-size: 9px;
    padding: 5px 12px;
    margin-bottom: 18px;
    border-radius: 20px;
  }
  h1 {
    font-size: clamp(36px, 11vw, 48px);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 18px;
  }
  .h1-exe {
    font-size: 0.52em;
  }
  .h1-outline {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-text-stroke: 0 !important;
    font-weight: 700;
    letter-spacing: -0.03em;
  }
  .hero-lede {
    font-family: var(--font-display);
    font-size: 14.5px;
    line-height: 1.75;
    margin-bottom: 26px;
    color: #b8b8cc;
    letter-spacing: -0.01em;
  }
  .hero-lede strong {
    color: #ffffff;
    font-weight: 600;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
  }
  .hero-actions .btn {
    height: 48px;
    font-size: 11px;
    font-weight: 600;
    padding: 0 16px;
    letter-spacing: 0.03em;
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  /* Hide duplicate stats-row in hero — Section 01 has the dedicated Verified Metrics HUD */
  .hero-copy .stats-row {
    display: none;
  }

  /* Sleek, comfortable terminal with generous padding */
  .term-shell {
    margin-top: 6px;
  }
  .term {
    border-radius: 16px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  }
  .term-bar {
    height: 38px;
    padding: 0 14px;
  }
  .term-dots i {
    width: 8px;
    height: 8px;
  }
  .term-title {
    font-size: 9.5px;
  }
  .term-live {
    font-size: 7.5px;
    padding: 2px 7px;
  }
  .term-body {
    height: 145px;
    font-size: 11px;
    padding: 14px 16px;
    line-height: 1.7;
  }
  .term-input-line {
    display: none; /* Hide active text input on mobile to prevent virtual keyboard popups */
  }
  .term-hints {
    padding: 10px 14px;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
  }
  .term-hints::-webkit-scrollbar {
    display: none;
  }
  .term-hints button {
    flex-shrink: 0;
    padding: 5px 11px;
    font-size: 9.5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 7px;
    color: var(--ink);
  }

  /* Hide loud Marquee Ticker on mobile so Hero flows straight into Section 01 */
  .ticker {
    display: none;
  }

  /* Section Headers with spacious vertical breathing room */
  section {
    padding-top: 64px;
    padding-bottom: 52px;
  }
  .sec-head {
    gap: 14px;
    margin-bottom: 14px;
  }
  .sec-index {
    font-size: 10px;
  }
  .sec-rule {
    max-width: 48px;
  }
  .sec-name {
    font-size: 9px;
    letter-spacing: 0.22em;
  }
  .sec-title {
    font-size: clamp(26px, 7.5vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.035em;
    margin-bottom: 32px;
  }

  /* Bento Grid with comfortable card gaps */
  .bento {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .card-bio, .card-stats, .card-skills, .card-stack {
    grid-column: span 1;
  }
  .card {
    padding: 26px 20px;
    border-radius: 18px;
    background: #080a13;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  }
  .card-tag {
    font-size: 9px;
    letter-spacing: 0.2em;
    margin-bottom: 18px;
  }

  /* Bio Card */
  .bio-name {
    gap: 16px;
    margin-bottom: 16px;
  }
  .bio-avatar {
    width: 50px;
    height: 50px;
    font-size: 22px;
    border-radius: 13px;
  }
  .bio-who {
    font-size: 21px;
    font-weight: 700;
  }
  .bio-who small {
    font-size: 10px;
    margin-top: 4px;
  }
  .bio-text {
    font-size: 13.5px;
    line-height: 1.8;
    margin: 0 0 20px;
    color: #b4b4c6;
  }
  .bio-foot {
    gap: 12px 20px;
    padding-top: 18px;
    font-size: 10.5px;
  }
  .bio-foot svg {
    width: 14px;
    height: 14px;
  }

  /* Verified Metrics HUD with spacious cells */
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .stat-cell {
    padding: 20px 16px;
    min-height: 100px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
  }
  .stat-cell b {
    font-size: 28px;
    line-height: 1;
  }
  .stat-cell span {
    font-size: 9px;
    letter-spacing: 0.14em;
    margin-top: 7px;
  }

  /* Skills Bars */
  .card-skills {
    padding: 26px 20px;
  }
  .skill {
    margin-bottom: 16px;
  }
  .skill:last-child {
    margin-bottom: 0;
  }
  .skill-top {
    font-size: 11.5px;
    margin-bottom: 7px;
  }
  .skill-top b {
    font-size: 11.5px;
    font-weight: 500;
  }
  .skill-top span {
    font-size: 10.5px;
  }
  .skill-bar {
    height: 7px;
    border-radius: 5px;
  }

  /* Ecosystem & Heatmap */
  .card-stack {
    padding: 26px 20px;
  }
  .stack-cloud {
    gap: 8px;
    margin-bottom: 20px;
  }
  .tech-pill {
    font-size: 10px;
    padding: 6px 12px;
    border-radius: 7px;
  }
  .git-streak {
    padding: 14px 12px;
    border-radius: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.35);
  }
  .git-streak::-webkit-scrollbar {
    height: 4px;
  }
  .git-streak::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), 0.35);
    border-radius: 4px;
  }
  .git-streak-head {
    font-size: 8.5px;
    margin-bottom: 10px;
  }
  .heatmap-grid {
    min-width: 480px;
    gap: 4px;
  }
  .hm-cell {
    width: 12px;
    height: 12px;
    border-radius: 2.5px;
  }
  .stack-clock {
    font-size: 9.5px;
    padding-top: 14px;
    flex-direction: row;
    justify-content: space-between;
  }

  /* Projects Section */
  .work-grid {
    gap: 22px;
  }
  .project {
    padding: 26px 20px;
    border-radius: 18px;
    background: #080a13;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .proj-top {
    margin-bottom: 14px;
  }
  .proj-num {
    font-size: 8.5px;
  }
  .proj-status {
    font-size: 8px;
    padding: 3px 8px;
  }
  .proj-title {
    font-size: 22px;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.25;
  }
  .project.featured .proj-title {
    font-size: 24px;
    margin-top: 0;
  }
  .proj-desc {
    font-size: 13.5px;
    line-height: 1.75;
    margin-bottom: 18px;
    color: #a4a5b8;
  }
  .proj-tags {
    gap: 7px;
    margin-bottom: 20px;
  }
  .proj-tags span {
    font-size: 10px;
    padding: 4px 10px;
  }
  .proj-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-top: 16px;
  }
  .proj-metric {
    font-size: 11px;
  }
  .proj-meta .btn {
    width: 100%;
    height: 44px;
    font-size: 11px;
    justify-content: center;
    border-radius: 10px;
  }
  .code-panel {
    height: 180px;
    margin-top: 18px;
    border-radius: 12px;
  }
  .code-bar {
    height: 32px;
    padding: 0 10px;
    font-size: 8.5px;
  }
  .code-body {
    padding: 12px 14px;
    font-size: 10px;
    line-height: 1.6;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .code-lines {
    margin-right: 10px;
    padding-right: 8px;
  }

  /* Contact Section */
  .contact-card {
    padding: 28px 20px;
    border-radius: 18px;
  }
  .contact-lede {
    font-size: 14px;
    margin-bottom: 22px;
  }
  .contact-links {
    gap: 12px;
  }
  .contact-link {
    padding: 16px 16px;
    border-radius: 12px;
  }
  .contact-label span {
    font-size: 16px;
  }
  .contact-label small {
    font-size: 10.5px;
  }

  /* Footer */
  .footer {
    padding: 44px 0 32px;
  }
  .footer-word {
    font-size: clamp(32px, 10vw, 48px);
    margin-top: 20px;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: -0.02em;
  }
  .footer-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    font-size: 9.5px;
    padding-top: 22px;
  }

  .case-panel {
    max-height: 90vh;
    border-radius: 14px;
  }
}

@media (max-width: 380px) {
  h1 { font-size: 29px; }
  .hero-actions { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .stat-cell b { font-size: 20px; }
  .bio-name { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (pointer: coarse) {
  .cur-dot, .cur-ring { display: none !important; }
}
