/* ==========================================================================
   demonOS Developer Portfolio Design System (Pro Vector Edition)
   Target: Emmanuel Twumasi
   Aesthetic: Ultra-refined Minimalist / Linear & Vercel Inspired
   No Gradients • 100% Solid Color Grading • Precision Vector Icons
   ========================================================================== */

:root {
  /* Dark Theme (Obsidian Basalt Hardware) */
  --bg-primary: #07080a;
  --bg-secondary: #0d0f14;
  --bg-tertiary: #14171f;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #78889e; /* Calibrated for WCAG AA >= 4.5:1 on dark */
  
  --surface-0: #07080a; /* Deep canvas void */
  --surface-1: #0d0f14; /* Milled trenches and recesses */
  --surface-2: #14171f; /* Instrument deck and chassis */
  --surface-3: #1b202a; /* Raised faceplate and cards */
  --surface-4: #242b38; /* Tactile keycaps and actuators */
  --surface-5: #2f374a; /* Specular highlight rim */

  --accent: #f8fafc;
  --accent-hover: #ffffff;
  --accent-subtle: rgba(248, 250, 252, 0.08);
  --accent-border: rgba(248, 250, 252, 0.18);

  --btn-primary-bg: #f8fafc;
  --btn-primary-text: #07080a;
  --btn-primary-hover: #e2e8f0;

  --card-bg: #14171f;
  --card-border: #1f2533;
  --card-hover-border: #333d52;
  --glass-bg: rgba(7, 8, 10, 0.94);
  
  --success: #f8fafc;
  --error: #ef4444;
  --badge-success-text: #f8fafc;
  --badge-danger-text: #ef4444;

  /* Specular Chamfer Matrix (Strict Zero-Gradients) */
  --specular-rim: inset 0 1px 0 0 rgba(255, 255, 255, 0.14);
  --undercut-bevel: inset 0 -1px 0 0 rgba(0, 0, 0, 0.65);
  --countersink-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.70);

  /* Multi-Stop Composite Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-tactile-card:
    0 1px 0 0 rgba(255, 255, 255, 0.10) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.60) inset,
    0 0 0 1px #1d222d,
    0 2px 4px 0 rgba(0, 0, 0, 0.60),
    0 12px 28px -4px rgba(0, 0, 0, 0.70);
  --shadow-nav-pill:
    0 1px 0 0 rgba(255, 255, 255, 0.15) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.70) inset,
    0 0 0 1px #1f2533,
    0 4px 16px 0 rgba(0, 0, 0, 0.75);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Light Theme (Technical Ceramic / Alabaster) */
  --bg-primary: #f4f4f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e7e7ed;
  --text-primary: #09090b;
  --text-secondary: #4b5563;
  --text-muted: #4b5563; /* Calibrated for WCAG AA >= 4.5:1 on light */

  --surface-0: #f4f4f7;
  --surface-1: #e7e7ed;
  --surface-2: #f8f8fb;
  --surface-3: #ffffff;
  --surface-4: #ededf3;
  --surface-5: #d8d8e3;

  --accent: #09090b;
  --accent-hover: #18181b;
  --accent-subtle: rgba(9, 9, 11, 0.06);
  --accent-border: rgba(9, 9, 11, 0.18);

  --btn-primary-bg: #09090b;
  --btn-primary-text: #ffffff;
  --btn-primary-hover: #27272a;

  --card-bg: #ffffff;
  --card-border: #e2e2e8;
  --card-hover-border: #cbd5e1;
  --glass-bg: rgba(244, 244, 247, 0.94);

  --success: #09090b;
  --error: #b91c1c;
  --badge-success-text: #09090b;
  --badge-danger-text: #b91c1c;

  --specular-rim: inset 0 1px 0 0 rgba(255, 255, 255, 0.90);
  --undercut-bevel: inset 0 -1px 0 0 rgba(0, 0, 0, 0.12);
  --countersink-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.08);
  --shadow-tactile-card:
    0 1px 0 0 rgba(255, 255, 255, 1) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.10) inset,
    0 0 0 1px #e2e2e8,
    0 2px 6px 0 rgba(0, 0, 0, 0.04),
    0 12px 24px -4px rgba(0, 0, 0, 0.08);
  --shadow-nav-pill:
    0 1px 0 0 rgba(255, 255, 255, 1) inset,
    0 -1px 0 0 rgba(0, 0, 0, 0.08) inset,
    0 0 0 1px #e4e4eb,
    0 4px 16px 0 rgba(0, 0, 0, 0.09);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

p {
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  color: inherit;
}

/* Highlight Text */
.highlight-text {
  color: var(--text-primary);
  display: inline-block;
  font-weight: 800;
}

/* ==========================================================================
   Navigation Bar (True Floating Island NavPill - shwn.design standard)
   ========================================================================== */

.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 16px 20px;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.navbar,
.navbar-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  min-height: 48px;
  width: fit-content;
  max-width: calc(100vw - 32px);
  padding: 0 8px 0 16px;
  background: var(--surface-3);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-nav-pill);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.navbar:hover,
.navbar-pill:hover {
  border-color: var(--card-hover-border);
}

.scroll-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: var(--text-primary);
  transition: width 0.08s ease-out;
  pointer-events: none;
  z-index: 10;
}

.cmd-palette-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  height: 38px;
  font-size: 0.82rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
}

.kbd-shortcut {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-0);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
}

/* Sound Toggle Rules */
#soundToggle[data-sound="muted"] .sound-on-icon {
  display: none;
}
#soundToggle[data-sound="muted"] .sound-off-icon {
  display: block;
}
#soundToggle[data-sound="unmuted"] .sound-on-icon {
  display: block;
}
#soundToggle[data-sound="unmuted"] .sound-off-icon {
  display: none;
}

.brand-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

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

.brand-accent {
  color: var(--accent);
}

.nav-links,
.desktop-nav-links {
  position: relative;
  display: flex;
  gap: 2px;
  align-items: center;
  background: var(--surface-1);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
}

/* Sliding Spring NavPill Indicator */
.nav-pill-indicator {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  background: var(--surface-3);
  border: 1px solid var(--surface-5);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.24s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.nav-link {
  position: relative;
  z-index: 2;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: color 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.desktop-only {
  display: inline-flex;
}

.mobile-tablet-only {
  display: none;
}

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

.nav-actions .btn {
  height: 34px;
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.nav-actions .btn:hover {
  transform: none;
}

.nav-actions .btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid var(--btn-primary-bg);
  padding: 0 16px;
  height: 34px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.nav-actions .btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  transform: none;
}

.nav-actions .btn-secondary {
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
}

.nav-actions .btn-secondary:hover {
  border-color: var(--card-hover-border);
  background: var(--surface-2);
  transform: none;
}

.nav-actions .cmd-palette-trigger {
  height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
}

.nav-actions .icon-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  padding: 0;
}

/* Accessible Touch Targets (WCAG 2.1 AA >= 44x44px) */
.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  transition: var(--transition);
}

.icon-btn:hover {
  border-color: var(--card-hover-border);
  color: var(--accent);
}

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

/* Universal Focus-Visible Rings */
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Buttons (Solid & Minimal) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: 1px solid var(--btn-primary-bg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--card-hover-border);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* Tactile Press Physics (Inspired by shwn.design data-cuelume-press) */
[data-tactile="true"], .btn, .icon-btn, .interactive-kw, .social-link, .filter-btn, .cmd-item {
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

[data-tactile="true"]:active, .btn:active, .icon-btn:active, .interactive-kw:active, .filter-btn:active {
  transform: translateY(1px) scale(0.982);
}

/* ==========================================================================
   Living Hero Micro-Interactions (Inspired by shwn.design)
   ========================================================================== */

.interactive-kw {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  margin: 0 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  vertical-align: baseline;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.interactive-kw:hover,
.interactive-kw:focus-visible {
  border-color: var(--card-hover-border);
  background: var(--surface-3);
  outline: none;
}

.kw-text {
  text-decoration: none;
}

.kw-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.interactive-kw:hover .kw-icon,
.interactive-kw:focus-visible .kw-icon {
  color: var(--text-primary);
}

/* Micro-Popover HUD */
.kw-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 270px;
  max-width: 320px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 120;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s ease;
  white-space: normal;
  text-align: left;
}

.interactive-kw:hover .kw-popover,
.interactive-kw:focus-visible .kw-popover {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.kw-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--card-border) transparent transparent transparent;
}

.popover-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.popover-metric {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.popover-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.telemetry-beacon {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .kw-popover {
    left: 0;
    transform: translateY(4px);
    min-width: 240px;
    max-width: calc(100vw - 32px);
  }
  .interactive-kw:hover .kw-popover,
  .interactive-kw:focus-visible .kw-popover {
    transform: translateY(0);
  }
  .kw-popover::after {
    left: 24px;
    transform: none;
  }
}

/* Hamburger button (WCAG 2.1 AA >= 44x44px) */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  background: var(--surface-1);
  border-radius: var(--radius-full);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  border-color: var(--card-hover-border);
  background: var(--surface-2);
}

.hamburger-line,
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
  transform-origin: center;
}

.hamburger-btn.active .hamburger-line.top,
.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line.mid,
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active .hamburger-line.bot,
.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Mobile & Tablet Navigation Drawer Sheet (Tactile Floating Island)
   ========================================================================== */

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 76px;
  padding-left: 16px;
  padding-right: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-drawer-card {
  position: relative;
  z-index: 2;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(-14px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mobile-drawer-backdrop.open .mobile-drawer-card {
  transform: translateY(0) scale(1);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}

.mobile-drawer-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mobile-drawer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-drawer-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.drawer-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-primary);
  display: inline-block;
}

.mobile-drawer-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-drawer-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.mobile-drawer-close:hover {
  border-color: var(--card-hover-border);
  color: var(--text-primary);
}

/* Tactile Navigation Touch Targets (>= 48px hit area) */
.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-1);
  border: 1px solid transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: var(--surface-3);
  border-color: var(--card-hover-border);
  transform: translateX(4px);
}

/* Full-Width Mobile Action Cluster */
.mobile-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.btn-drawer-cta {
  width: 100%;
  height: 44px;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.section {
  padding: 90px 0;
  position: relative;
}

.hero-section {
  padding-top: 145px;
  padding-bottom: 95px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
}

.hero-header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-avatar-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.hero-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  object-fit: cover;
  background: var(--bg-secondary);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.hero-avatar-img:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

.avatar-status-dot {
  position: absolute;
  bottom: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--success);
  border: 2.5px solid var(--bg-primary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
}

.hero-title {
  font-size: 3.2rem;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.cursor {
  animation: blink 1s infinite;
  color: var(--text-secondary);
}

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

.hero-desc {
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-cta-group {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.social-links-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link, .social-link-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover, .social-link-btn:hover {
  color: var(--text-primary);
  border-color: var(--card-hover-border);
  transform: translateY(-1px);
}

/* Code Card Visual */
.code-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}

.code-card:hover {
  border-color: var(--card-hover-border);
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--card-border);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: var(--surface-4); }

.code-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-block {
  padding: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-primary);
  overflow-x: auto;
}

.keyword { color: #f43f5e; font-weight: 600; }
.variable { color: #cbd5e1; }
.property { color: #a78bfa; }
.string { color: #e2e8f0; }
.function { color: #fbbf24; }

/* ==========================================================================
   Section Headers
   ========================================================================== */

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--accent-border);
}

.section-title {
  font-size: 2.1rem;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 0.98rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
}

.about-text-card, .about-features-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.about-card-title {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.about-text-card p {
  font-size: 0.98rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.stat-box {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.about-features-card {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* Pro Vector Feature Icon Container */
.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  flex-shrink: 0;
  transition: var(--transition);
}

.feature-item:hover .feature-icon {
  border-color: var(--accent);
  color: var(--accent);
}

.feature-title {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.feature-desc {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

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

.skill-category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.skill-category-card:hover {
  border-color: var(--card-hover-border);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

/* Pro Vector Category Icon */
.cat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  flex-shrink: 0;
}

.cat-title {
  font-size: 1.15rem;
}

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

.skill-tag {
  padding: 6px 13px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--card-hover-border);
  color: var(--accent);
}

/* ==========================================================================
   Projects Section & Filters
   ========================================================================== */

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--card-hover-border);
}

.filter-btn.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: var(--btn-primary-bg);
}

.filter-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.filter-btn.active .filter-count {
  background: rgba(128, 128, 128, 0.2);
  color: inherit;
  border-color: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: var(--card-hover-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Clean Solid Card Banner with Vector Icon */
.project-card-banner {
  height: 90px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--card-border);
}

.project-category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.project-icon-art {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
}

.project-card:hover .project-icon-art {
  border-color: var(--accent);
  color: var(--accent);
}

.project-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.tech-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.project-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
  gap: 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 6px;
  border-radius: var(--radius-sm);
}

.project-links {
  display: flex;
  gap: 14px;
  border-top: 1px solid var(--card-border);
  padding-top: 14px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent);
}

.project-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Engineering Labs & Interactive Prototypes (Inspired by shwn.design)
   ========================================================================== */

.labs-section {
  position: relative;
  background-color: var(--bg-primary);
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}

@media (max-width: 860px) {
  .labs-grid {
    grid-template-columns: 1fr;
  }
}

.lab-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lab-card:hover {
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow-md);
}

.lab-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.lab-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 4px;
  color: var(--text-primary);
}

.lab-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
}

.lab-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.lab-sandbox {
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.sandbox-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.sandbox-subtext {
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* Physical Token Dispenser M-10 */
.token-dispenser-housing {
  display: flex;
  gap: 20px;
  align-items: center;
}

.token-chute-col {
  width: 90px;
  height: 200px;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  box-shadow: var(--countersink-inner);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

.token-tank {
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  width: 100%;
  align-items: center;
  min-height: 160px;
}

.token-pellet {
  width: 68px;
  height: 14px;
  border-radius: 3px;
  background: var(--surface-4);
  border: 1px solid var(--surface-5);
  box-shadow: var(--specular-rim), var(--undercut-bevel);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
  user-select: none;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.15s ease;
}

.token-pellet.spent {
  background: transparent;
  border: 1px dashed var(--card-border);
  opacity: 0.25;
  box-shadow: none;
}

.token-spring-base {
  width: 40px;
  height: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-controls-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sandbox-status-row {
  display: flex;
  align-items: center;
}

.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--badge-success-text);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--badge-danger-text);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.badge-neutral {
  background: var(--surface-1);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.lab-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Avionics 4-Stage Sequencer */
.fsm-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.fsm-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--card-border);
  box-shadow: var(--specular-rim), 0 2px 0 0 var(--surface-1);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.15s ease;
  text-align: center;
  user-select: none;
}

.fsm-node-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.fsm-node-label {
  color: var(--text-secondary);
}

.fsm-node.active {
  transform: translateY(2px);
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.fsm-node.active .fsm-node-label {
  color: var(--accent);
}

.fsm-node.fault {
  transform: translateY(2px);
  border-color: var(--error);
  background: rgba(239, 68, 68, 0.15);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.fsm-node.fault .fsm-node-label {
  color: var(--badge-danger-text);
}

.fsm-hardware-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

.rotary-knob-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rotary-dial {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--surface-5);
  box-shadow: var(--specular-rim), 0 3px 6px rgba(0, 0, 0, 0.5);
  position: relative;
  cursor: pointer;
  touch-action: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rotary-pointer {
  width: 3px;
  height: 14px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 4px;
}

.rotary-label {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.safety-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fsm-console {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.console-prefix {
  color: var(--accent);
  font-weight: 700;
}

/* Double-Entry Torsion Balance Scale & Rotary Thumbwheels */
.torsion-balance-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.balance-beam-svg-wrap {
  width: 100%;
  max-width: 320px;
  height: 60px;
  display: flex;
  justify-content: center;
}

.balance-scale-svg {
  width: 100%;
  height: 100%;
}

.beam-group {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: 160px 24px;
}

.thumbwheel-rack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.thumbwheel-unit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.thumbwheel-roller-track {
  width: 100%;
  height: 36px;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  box-shadow: var(--countersink-inner);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  touch-action: none;
  display: flex;
  align-items: center;
}

.thumbwheel-cylinder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  pointer-events: none;
}

.thumbwheel-rib {
  width: 2px;
  height: 22px;
  background: var(--surface-4);
  border-radius: 1px;
}

.journal-stream {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-1);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.journal-row {
  display: flex;
  justify-content: space-between;
}

/* 1U Hot-Swap Memory Cassette Rack */
.caddy-rack {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cache-slots {
  display: contents;
}

.cache-slot, .caddy-slot {
  padding: 10px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  border: 1px solid var(--card-border);
  box-shadow: var(--specular-rim), 0 2px 0 0 var(--surface-1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
  word-break: break-all;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.cache-slot:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.cache-slot.mru {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 1px 0 0 var(--accent);
}

.caddy-lcd {
  font-size: 0.68rem;
  color: var(--text-primary);
  font-weight: 600;
}

.caddy-led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.cache-slot:not(.mru) .caddy-led {
  background: var(--text-muted);
}

/* ==========================================================================
   Experience Timeline Section
   ========================================================================== */

.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10px;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--card-hover-border);
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: var(--card-hover-border);
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

.timeline-title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.timeline-desc {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
}

.contact-info-card, .contact-form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}

.contact-info-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.contact-info-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 26px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-method {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-method-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  color: var(--accent);
  flex-shrink: 0;
}

.method-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.method-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.method-value-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-copy:hover {
  color: var(--text-primary);
  border-color: var(--card-hover-border);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
}

.required {
  color: var(--error);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-error {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 16px;
}

/* ==========================================================================
   Toast Notification (Vector Powered)
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 260px;
  max-width: 380px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.2s ease forwards;
}

.toast-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast.toast-success {
  border-color: var(--success);
}

.toast.toast-error {
  border-color: var(--error);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--card-border);
  background: var(--bg-primary);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.85rem;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.back-to-top:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
  .hamburger-btn {
    display: flex !important;
  }
  .mobile-tablet-only {
    display: flex !important;
  }
  .desktop-nav-links {
    display: none !important;
  }
  .desktop-only {
    display: none !important;
  }
  .navbar,
  .navbar-pill {
    padding: 0 8px 0 14px;
    gap: 8px;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .about-grid, .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin: 0 auto 26px;
  }
  .hero-cta-group, .social-links-row {
    justify-content: center;
  }
  .skills-grid, .projects-grid {
    grid-template-columns: 1fr;
  }
  .sm-hide {
    display: none;
  }
  .footer-container {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .navbar-wrapper {
    padding: 10px 12px;
  }
  .navbar,
  .navbar-pill {
    max-width: calc(100vw - 24px);
  }
  .mobile-drawer-backdrop {
    padding-top: 64px;
  }
}

/* ==========================================================================
   Project Architecture Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  backdrop-filter: blur(4px);
}

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

.modal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

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

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--card-border);
  gap: 16px;
}

.modal-header-text {
  flex: 1;
}

.modal-category {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-close-btn {
  flex-shrink: 0;
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-section-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-highlights li {
  position: relative;
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-highlights li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--card-border);
}

/* ==========================================================================
   Print / CV Resume Stylesheet
   ========================================================================== */

@media print {
  #navbar,
  #themeToggle,
  #printCvBtn,
  #mobileMenuBtn,
  .hero-cta-group,
  .filter-bar,
  .project-actions-row,
  .contact-section,
  .back-to-top,
  .toast-container,
  .modal-backdrop,
  .social-links-row {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 15mm !important;
  }

  .section {
    padding: 16px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  .hero-section {
    padding-top: 0 !important;
  }

  .hero-container {
    display: block !important;
  }

  .hero-visual {
    display: none !important;
  }

  .hero-title {
    font-size: 24pt !important;
    color: #111827 !important;
    margin-bottom: 6px !important;
  }

  .hero-subtitle {
    font-size: 13pt !important;
    color: #374151 !important;
    margin-bottom: 12px !important;
  }

  .highlight-text {
    color: #111827 !important;
  }

  .skills-grid, .projects-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
  }

  .card, .project-card, .skill-category-card, .timeline-card {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .footer {
    display: block !important;
    border-top: 1px solid #e5e7eb !important;
    padding: 12px 0 !important;
    font-size: 9pt !important;
  }
}

/* ==========================================================================
   Architecture Diagram SVG
   ========================================================================== */

.modal-diagram-wrap {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  overflow-x: auto;
  display: flex;
  justify-content: center;
}

.architecture-diagram-svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Command Palette (Cmd+K)
   ========================================================================== */

.cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.76);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  backdrop-filter: blur(6px);
}

.cmd-palette-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.cmd-palette-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cmd-palette-backdrop.open .cmd-palette-card {
  transform: translateY(0) scale(1);
}

.cmd-palette-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-secondary);
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  font-family: inherit;
}

.cmd-palette-input::placeholder {
  color: var(--text-muted);
}

.kbd-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--bg-tertiary);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  cursor: pointer;
}

.cmd-palette-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  user-select: none;
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cmd-item-icon {
  display: flex;
  align-items: center;
  color: var(--accent);
}

.cmd-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.cmd-item-category {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cmd-item:hover, .cmd-item.selected {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.cmd-item:hover .cmd-item-title, .cmd-item.selected .cmd-item-title {
  color: var(--accent);
}

.cmd-empty-msg {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cmd-palette-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--card-border);
  background: var(--bg-tertiary);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kbd-micro {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  margin-right: 4px;
}


