:root {
  /* Pitch-Black + Crimson Sunrise / Lunar Silver Palette */
  --bg-page: #000000;
  --bg-card: #141414;
  --accent-crimson: #dd0e45;
  --accent-crimson-deep: #cd294a;
  --lunar-silver: #e6ecf5;
  --text-primary: rgba(255, 255, 255, 0.96);
  --text-secondary: rgba(255, 255, 255, 0.64);
  --text-muted: rgba(255, 255, 255, 0.40);
  --border-card: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.08);

  /* Typography + Handwritten Callout */
  --font-display: 'Silkscreen', 'Courier New', monospace;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fragment Mono', monospace;
  --font-hand: 'Caveat', cursive;

  /* Motion */
  --spring-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
}

body {
  background-color: var(--bg-page);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-x: clip;
  width: 100%;
  position: relative;
}

/* =========================================================
   OPTION 1: PRECISION TERMINAL CROSSHAIR POINTER (+ -> [ ])
   ========================================================= */
@media (pointer: fine) {
  body.js-ready.custom-cursor-active,
  body.js-ready.custom-cursor-active * {
    cursor: none !important;
  }
}

.crosshair-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.15s ease;
}

.crosshair-cursor.is-active {
  opacity: 1;
}

.ch-h,
.ch-v {
  position: absolute;
  background: #ffffff;
  transition: transform 0.2s var(--spring-ease), opacity 0.15s ease;
}

.ch-h {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1px;
  transform: translateY(-0.5px);
}

.ch-v {
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  transform: translateX(-0.5px);
}

.ch-bracket {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: #ffffff;
  border-style: solid;
  opacity: 0;
  transition: transform 0.22s var(--spring-ease), opacity 0.18s ease;
}

.ch-tl { top: 2px; left: 2px; border-width: 1.5px 0 0 1.5px; transform: translate(3px, 3px); }
.ch-tr { top: 2px; right: 2px; border-width: 1.5px 1.5px 0 0; transform: translate(-3px, 3px); }
.ch-bl { bottom: 2px; left: 2px; border-width: 0 0 1.5px 1.5px; transform: translate(3px, -3px); }
.ch-br { bottom: 2px; right: 2px; border-width: 0 1.5px 1.5px 0; transform: translate(-3px, -3px); }

.crosshair-cursor.is-hovering .ch-h {
  transform: translateY(-0.5px) scaleX(0.35);
}

.crosshair-cursor.is-hovering .ch-v {
  transform: translateX(-0.5px) scaleY(0.35);
}

.crosshair-cursor.is-hovering .ch-bracket {
  opacity: 1;
  transform: translate(0, 0);
}

@media (pointer: coarse), (hover: none) {
  .crosshair-cursor {
    display: none !important;
  }
}

/* Subtle Ambient Grain */
.ambient-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Floating Glass Pill Navigation — Hidden at Top, Reveals on Scroll Down */
.floating-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translate3d(-50%, -120px, 0);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition:
    transform 0.55s var(--spring-ease),
    opacity 0.35s ease;
}

.floating-nav.is-visible {
  transform: translate3d(-50%, 0, 0);
  opacity: 1;
  pointer-events: auto;
}

.nav-glass {
  height: 64px;
  padding: 0 24px;
  border-radius: 100px;
  background: rgba(20, 20, 20, 0.78);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid var(--border-glass);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-logo {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  transition: transform 0.3s var(--spring-ease);
}

.nav-logo:hover {
  transform: scale(1.08);
}

.nav-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.64;
  padding: 6px 12px;
  border-radius: 100px;
  transition: opacity 0.25s ease, background-color 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
}

.nav-term-btn {
  background: rgba(221, 14, 69, 0.14);
  border: 1px solid rgba(221, 14, 69, 0.35);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 9px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.nav-term-btn:hover {
  background: rgba(221, 14, 69, 0.28);
  border-color: rgba(221, 14, 69, 0.65);
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
}

.nav-resume svg {
  transition: transform 0.25s var(--spring-ease);
}

.nav-resume:hover svg {
  transform: translate(2px, -2px);
}

/* Main Container */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 200px;
  width: 100%;
  padding: 0 24px;
}

/* Hero Section */
.hero-section {
  width: 100%;
  max-width: 1000px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.2vh, 36px);
  position: relative;
  padding-top: clamp(148px, 19vh, 172px);
  padding-bottom: 24px;
}

/* Top Crimson Sunrise Semicircle + Duotone Portrait Hover Reveal */
.sunrise-core-wrapper {
  position: absolute;
  top: -155px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1440px, 100vw);
  height: 560px;
  pointer-events: none;
  z-index: 0;
}

.sunrise-ambient-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-crimson) 0%, rgba(221, 14, 69, 0) 100%);
  opacity: 0.8;
  filter: blur(115px);
}

.sunrise-solar-disc {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff245c 0%, var(--accent-crimson) 60%, #7d0626 100%);
  box-shadow: 0 0 90px rgba(221, 14, 69, 0.6);
  overflow: hidden;
  pointer-events: auto;
  transition: transform 0.6s var(--spring-ease), box-shadow 0.6s ease;
}

.solar-portrait-layer {
  position: absolute;
  top: 138px;
  left: 50%;
  width: 210px;
  height: 155px;
  opacity: 0;
  transform: translateX(-50%) scale(0.95);
  -webkit-mask-image: radial-gradient(ellipse 46% 46% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 46% at 50% 50%, #000 30%, transparent 100%);
  transition: opacity 0.45s ease, transform 0.55s var(--spring-ease);
  pointer-events: none;
}

.solar-portrait-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  mix-blend-mode: luminosity;
  filter: contrast(1.2) brightness(1.06);
}

.solar-portrait-tint {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(221, 14, 69, 0.25) 0%, rgba(120, 6, 36, 0.72) 100%);
  mix-blend-mode: multiply;
}

.solar-portrait-badge {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  padding: 3px 10px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.4s var(--spring-ease);
}

.sunrise-solar-disc:hover,
.sunrise-solar-disc.is-touched {
  transform: translateX(-50%) scale(1.06);
  box-shadow: 0 0 110px rgba(221, 14, 69, 0.8);
}

.sunrise-solar-disc:hover .solar-portrait-layer,
.sunrise-solar-disc.is-touched .solar-portrait-layer {
  opacity: 0.75;
  transform: translateX(-50%) scale(1);
}

.sunrise-solar-disc:hover .solar-portrait-badge,
.sunrise-solar-disc.is-touched .solar-portrait-badge {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sunrise-beams {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  opacity: 0.055;
  pointer-events: none;
  z-index: -1;
}

.beam {
  width: 2px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.b-140 { height: 140px; }
.b-320 { height: 320px; }
.b-480 { height: 480px; }
.b-640 { height: 640px; }

.hero-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.hero-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(42px, 7.2vw, 90px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 4px;
}

.char-segment {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%) rotateX(-35deg);
  transform-origin: bottom center;
  animation: charReveal 0.85s var(--spring-ease) forwards;
  animation-delay: calc(var(--char-index) * 32ms + 120ms);
}

@keyframes charReveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

.hero-bio {
  max-width: 650px;
  font-size: 17px;
  line-height: 29px;
  color: var(--text-secondary);
  text-align: center;
}

.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.8s var(--spring-ease) var(--delay, 0.4s) forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta-group {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.glass-pill-btn {
  height: 54px;
  padding: 0 28px;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.35s var(--spring-ease), border-color 0.3s ease, background 0.3s ease;
}

.glass-pill-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.22) 100%);
}

.glass-pill-btn svg {
  transition: transform 0.35s var(--spring-ease);
}

.glass-pill-btn:hover svg {
  transform: translateX(4px);
}

.secondary-pill {
  background: rgba(255, 255, 255, 0.04);
}

.secondary-pill:hover svg {
  transform: translateY(3px);
}

/* =========================================================
   ALWAYS-OPEN LIVE INTERACTIVE LINUX TERMINAL IN HERO
   ========================================================= */
.hero-terminal-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  background: rgba(12, 12, 14, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.72), 0 0 40px rgba(221, 14, 69, 0.08);
  font-family: var(--font-mono);
  text-align: left;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  scroll-margin-top: 110px;
}

.hero-terminal-shell:focus-within {
  border-color: rgba(221, 14, 69, 0.45);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.8), 0 0 45px rgba(221, 14, 69, 0.16);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-red { background: #ff5f56; }
.t-amber { background: #ffbd2e; }
.t-green { background: #27c93f; }

.terminal-title-text {
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-shortcut-hint {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent-crimson);
  background: rgba(221, 14, 69, 0.12);
  border: 1px solid rgba(221, 14, 69, 0.28);
  padding: 2px 8px;
  border-radius: 100px;
}

.terminal-body {
  height: 148px;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.55;
}

.term-line {
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.term-muted {
  color: var(--text-muted);
}

.term-cmd-highlight {
  color: var(--accent-crimson);
  font-weight: 500;
}

.term-ok {
  color: #34d399;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.42);
}

.terminal-prompt {
  color: var(--accent-crimson);
  font-size: 13px;
  white-space: nowrap;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Content Sections */
.content-section {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  scroll-margin-top: 130px;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4.8vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--text-primary);
}

/* Bento Layout Grid */
.bento-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bento-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

.bento-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.bento-row-3-1 {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
}

.bento-row-1-3 {
  display: grid;
  grid-template-columns: 1.15fr 2.85fr;
  gap: 24px;
}

/* Bento Card Base + Cursor-Reactive Spotlight Sheen + Directional Hover Colors */
.bento-card {
  --mouse-x: 50%;
  --mouse-y: 50%;
  position: relative;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: 40px;
  padding: 40px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  transition: transform 0.5s var(--spring-ease), border-color 0.4s ease;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.06),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.bento-card:hover::before {
  opacity: 1;
}

[data-project] {
  outline: none;
}

[data-project]:hover,
[data-project]:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Directional Hover Gradients */
.card-gradient {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  z-index: 0;
}

[data-project]:hover .card-gradient,
[data-project]:focus-visible .card-gradient {
  opacity: 1;
}

.grad-crimson {
  background: linear-gradient(64deg, rgb(30, 11, 15) 0%, rgb(67, 15, 27) 100%);
}

.grad-blue {
  background: linear-gradient(32deg, rgb(11, 16, 30) 0%, rgb(15, 29, 67) 100%);
}

.grad-amber {
  background: linear-gradient(48deg, rgb(30, 16, 11) 0%, rgb(67, 29, 15) 100%);
}

.grad-purple {
  background: linear-gradient(32deg, rgb(17, 11, 30) 0%, rgb(32, 15, 67) 100%);
}

.grad-emerald {
  background: linear-gradient(32deg, rgb(11, 30, 22) 0%, rgb(18, 64, 45) 100%);
}

/* Featured Full-Width Card */
.featured-card {
  min-height: 440px;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
}

.card-content-left {
  position: relative;
  z-index: 2;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.card-text-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.24;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.card-desc {
  font-size: 16px;
  line-height: 27px;
  color: var(--text-secondary);
}

.card-action-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-action-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s ease, transform 0.35s var(--spring-ease);
}

[data-project]:hover .card-action-hint {
  opacity: 1;
  transform: translateX(0);
}

.icon-circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: transform 0.4s var(--spring-ease), background 0.3s ease;
}

[data-project]:hover .icon-circle-btn {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.22);
}

/* Visual Architecture Schematic in Featured Card */
.card-visual-right {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(14px);
  transition: transform 0.55s var(--spring-ease);
}

[data-project]:hover .card-visual-right {
  transform: translateY(0);
}

.arch-schematic {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-node {
  width: 100%;
  background: rgba(0, 0, 0, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.highlight-node {
  border-color: rgba(221, 14, 69, 0.45);
  background: rgba(221, 14, 69, 0.08);
}

.node-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-crimson);
  letter-spacing: 0.08em;
}

.node-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.node-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.arch-connector {
  width: 1.5px;
  height: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(221, 14, 69, 0.6));
}

/* Tall & Medium Bento Cards */
.tall-card {
  min-height: 660px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.medium-card {
  min-height: 410px;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.card-content-top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card-visual-bottom {
  position: relative;
  z-index: 2;
  transform: translateY(14px);
  transition: transform 0.55s var(--spring-ease);
}

[data-project]:hover .card-visual-bottom {
  transform: translateY(0);
}

.telemetry-panel {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.telemetry-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.val-bright {
  color: var(--text-primary);
}

.telemetry-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.telemetry-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
}

.telemetry-terminal {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.telemetry-terminal code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

/* IISc CSA Photo Frame inside Bento Card */
.card-photo-bottom {
  position: relative;
  z-index: 2;
  margin: 0 -16px -16px;
  transform: translateY(10px);
  transition: transform 0.55s var(--spring-ease);
}

[data-project]:hover .card-photo-bottom {
  transform: translateY(0);
}

.photo-frame {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.6s var(--spring-ease);
}

[data-project]:hover .photo-frame img {
  transform: scale(1.04);
}

.photo-fade-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.25) 0%, rgba(20, 20, 20, 0) 40%, rgba(10, 10, 10, 0.85) 100%);
  pointer-events: none;
}

.photo-caption {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.card-pill-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-pill-tags span,
.interest-pills span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 12px;
  border-radius: 100px;
}

/* Static Context & Timeline Cards */
.static-card {
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.center-card {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.location-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #009a51;
  box-shadow: 0 0 10px #009a51;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
}

.small-display {
  font-size: 24px;
  line-height: 1.3;
}

.live-clock {
  color: var(--text-secondary);
}

/* Vertical & Horizontal Timelines */
.timeline-card {
  gap: 36px;
}

.timeline-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.inline-resume-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  opacity: 0.85;
  transition: opacity 0.25s ease;
}

.inline-resume-link:hover {
  opacity: 1;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.timeline-entry {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.timeline-track {
  display: flex;
  align-items: center;
  position: relative;
  height: 12px;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--text-primary);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-role {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.timeline-org {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

.interest-card {
  min-height: 410px;
}

.interest-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* =========================================================
   STAGGERED SQUIRCLE APP-TILE GAMING BENTO CARD
   ========================================================= */
.gaming-showcase-card {
  min-height: 410px;
  padding-bottom: 24px;
  padding-right: 0;
  gap: 20px;
}

.gaming-showcase-header {
  padding-right: 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.gaming-squircle-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
}

.squircle-col-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.squircle-col-mid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(-22px);
  flex-shrink: 0;
}

.squircle-col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-right: -28px;
  flex-shrink: 0;
}

.game-squircle {
  width: 104px;
  height: 104px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  background: #0c0c0c;
  transition: transform 0.4s var(--spring-ease), border-color 0.3s ease;
}

.game-squircle:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: rgba(255, 255, 255, 0.28);
}

.game-squircle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fav-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 2px;
}

.fav-curly-arrow {
  margin-left: -18px;
}

.fav-handwritten {
  font-family: var(--font-hand);
  font-size: 18px;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.48);
  white-space: nowrap;
}

/* =========================================================
   CONTACT SECTION & BOTTOM MOONRISE DOME
   ========================================================= */
.contact-section {
  width: 100%;
  max-width: 1000px;
  padding: 60px 0 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  position: relative;
  scroll-margin-top: 120px;
}

.contact-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.social-circle {
  width: 80px;
  height: 80px;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: transform 0.35s var(--spring-ease), border-color 0.3s ease, color 0.3s ease;
}

.social-circle:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.email-slide-pill {
  position: relative;
  height: 80px;
  min-width: 340px;
  padding: 0 36px;
  border-radius: 100px;
  border: 1px solid var(--border-glass);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.16) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 17px;
  transition: border-color 0.3s ease, transform 0.35s var(--spring-ease);
}

.email-slide-pill:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
}

.email-text-default,
.email-text-hover {
  position: absolute;
  white-space: nowrap;
  transition: transform 0.45s var(--spring-ease), opacity 0.35s ease;
}

.email-text-default {
  opacity: 0.9;
  transform: translateY(0);
}

.email-text-hover {
  opacity: 0;
  transform: translateY(34px);
  font-family: var(--font-mono);
  font-size: 15px;
}

.email-slide-pill:hover .email-text-default {
  opacity: 0;
  transform: translateY(-34px);
}

.email-slide-pill:hover .email-text-hover {
  opacity: 1;
  transform: translateY(0);
}

.moonrise-dome-wrapper {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 100vw);
  height: 420px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.sunset-ambient-glow {
  position: absolute;
  bottom: -140px;
  left: 0;
  right: 0;
  height: 480px;
  background: radial-gradient(50% 50% at 50% 50%, var(--accent-crimson-deep) 0%, rgba(205, 41, 74, 0) 100%);
  opacity: 0.74;
  filter: blur(120px);
}

.lunar-disc {
  position: absolute;
  bottom: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 25%, #ffffff 0%, var(--lunar-silver) 55%, #9fb3d1 100%);
  box-shadow: 0 -20px 100px rgba(230, 236, 245, 0.42);
}

/* =========================================================
   PROJECT DETAIL DRAWER MODAL
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal-panel {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 32px;
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s var(--spring-ease);
}

.modal-backdrop.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal-title {
  font-size: clamp(24px, 4vw, 32px);
}

.modal-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.modal-bullets li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 24px;
  color: var(--text-secondary);
}

.modal-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent-crimson);
}

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

.modal-tags span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 11px;
  border-radius: 100px;
}

.modal-footer {
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .char-segment,
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Responsive Breakpoints (Desktop -> Laptop -> Tablet -> Mobile -> Narrow Phone) */
@media (max-width: 900px) {
  .page-wrapper {
    gap: 150px;
  }

  .featured-card {
    flex-direction: column;
  }

  .card-content-left {
    max-width: 100%;
  }

  .bento-two-col,
  .bento-row-3-1,
  .bento-row-1-3,
  .timeline-horizontal {
    grid-template-columns: 1fr;
  }

  .tall-card,
  .medium-card,
  .interest-card,
  .gaming-showcase-card {
    min-height: auto;
  }

  .gaming-squircle-stage {
    padding-top: 24px;
  }
}

@media (max-width: 640px) {
  .page-wrapper {
    padding: 0 16px;
    gap: 128px;
  }

  .floating-nav {
    top: 12px;
    width: calc(100% - 24px);
    max-width: 440px;
  }

  .nav-glass {
    height: 54px;
    padding: 0 14px;
    gap: 6px;
    justify-content: space-between;
  }

  .nav-divider {
    display: none;
  }

  .nav-link {
    padding: 4px 7px;
    font-size: 13px;
  }

  .nav-term-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .hero-section {
    padding-top: 132px;
    gap: 26px;
  }

  .hero-bio {
    font-size: 15.5px;
    line-height: 26px;
  }

  .hero-cta-group {
    width: 100%;
    gap: 12px;
  }

  .hero-cta-group .glass-pill-btn {
    flex: 1 1 200px;
    height: 50px;
    font-size: 15px;
  }

  .terminal-body {
    height: 136px;
    padding: 12px 14px;
    font-size: 12px;
  }

  .terminal-input-row {
    padding: 10px 14px;
    gap: 8px;
  }

  .terminal-prompt,
  .terminal-input {
    font-size: 12px;
  }

  .content-section {
    gap: 40px;
  }

  .bento-card {
    border-radius: 28px;
    padding: 26px;
  }

  .card-photo-bottom {
    margin: 0 -10px -10px;
  }

  .photo-frame {
    height: 190px;
    border-radius: 20px;
  }

  .gaming-showcase-card {
    padding-right: 0;
    padding-bottom: 20px;
  }

  .gaming-showcase-header {
    padding-right: 26px;
  }

  .gaming-squircle-stage {
    gap: 11px;
    padding-top: 20px;
  }

  .squircle-col-mid {
    gap: 11px;
    transform: translateY(-16px);
  }

  .squircle-col-right {
    gap: 11px;
    margin-right: -24px;
  }

  .game-squircle {
    width: 84px;
    height: 84px;
    border-radius: 20px;
  }

  .fav-curly-arrow {
    width: 46px;
    height: 38px;
    margin-left: -12px;
  }

  .fav-handwritten {
    font-size: 16px;
  }

  .contact-section {
    padding: 40px 0 220px;
    gap: 44px;
  }

  .contact-actions {
    gap: 16px;
    width: 100%;
  }

  .email-slide-pill {
    min-width: 0;
    height: 64px;
    order: -1;
    width: 100%;
  }

  .social-circle {
    width: 62px;
    height: 62px;
  }

  .sunrise-core-wrapper {
    top: -135px;
    height: 440px;
  }

  .sunrise-solar-disc {
    width: 260px;
    height: 260px;
  }

  .solar-portrait-layer {
    top: 112px;
    width: 170px;
    height: 126px;
  }

  .moonrise-dome-wrapper {
    height: 320px;
  }

  .lunar-disc {
    width: 320px;
    height: 320px;
    bottom: -160px;
  }
}

@media (max-width: 390px) {
  .nav-glass {
    padding: 0 10px;
    gap: 4px;
  }

  .nav-link {
    padding: 4px 5px;
    font-size: 12px;
  }

  .game-squircle {
    width: 74px;
    height: 74px;
    border-radius: 18px;
  }

  .fav-handwritten {
    font-size: 15px;
  }
}
