/* ============================================
   TERMINAL NOIR - Resume Portfolio
   A sophisticated hacker aesthetic
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Colors */
  --color-bg: #0a0a0a;
  --color-bg-elevated: #111111;
  --color-bg-card: #161616;
  --color-surface: #1a1a1a;
  --color-border: #2a2a2a;
  --color-border-subtle: #1f1f1f;

  --color-text: #e8e8e8;
  --color-text-muted: #888888;
  --color-text-subtle: #555555;

  --color-accent: #00fff5;
  --color-accent-dim: rgba(0, 255, 245, 0.1);
  --color-accent-glow: rgba(0, 255, 245, 0.3);
  --color-warning: #ffa500;
  --color-danger: #ff4757;
  --color-success: #2ed573;

  /* Typography */
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  /* Sizing */
  --container-max: 1400px;
  --nav-height: 80px;

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;

  /* Effects */
  --glow-accent: 0 0 20px var(--color-accent-glow);
  --glow-strong: 0 0 40px var(--color-accent-glow);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

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

/* Noise Overlay */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* CRT Scanline Effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.scanlines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  opacity: 0.15;
}

.scanlines::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 255, 245, 0.02) 50%,
    transparent 100%
  );
  height: 200%;
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0%); }
}

/* Grid Background Pattern */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 255, 245, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 245, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

/* Matrix Rain Canvas */
#matrixRain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  opacity: 0.06;
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--color-accent-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* Selection */
::selection {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  background: linear-gradient(to bottom, var(--color-bg) 0%, transparent 100%);
  z-index: 1000;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform var(--duration-fast) ease;
}

.nav__logo:hover {
  transform: scale(1.05);
}

.nav__logo-bracket {
  color: var(--color-accent);
  transition: color var(--duration-fast) ease;
}

.nav__logo:hover .nav__logo-bracket {
  color: var(--color-warning);
}

.nav__logo-text {
  color: var(--color-text);
  transition: text-shadow var(--duration-fast) ease;
}

.nav__logo:hover .nav__logo-text {
  text-shadow: 0 0 10px var(--color-accent-glow);
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav__link:hover {
  color: var(--color-text);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--accent {
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: var(--space-sm) var(--space-md);
  transition: all var(--duration-fast) ease;
}

.nav__link--accent::after {
  display: none;
}

.nav__link--accent:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--glow-accent);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--duration-fast) ease;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--nav-height) var(--space-xl) var(--space-xl);
  position: relative;
}

.hero__terminal {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
  transition: all 0.6s var(--ease-out-expo);
  max-width: 450px;
}

/* Expanded terminal during demo */
.hero__terminal.demo-expanded {
  animation: none;
  max-width: 900px;
  width: 95vw;
  position: relative;
  z-index: 10;
}

/* Collapse hero content to the right during demo */
.hero__content {
  transition: transform 0.6s var(--ease-out-expo), opacity 0.5s ease;
}

.hero.demo-playing {
  overflow: hidden;
}

.hero.demo-playing .hero__content {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.hero.demo-playing .hero__grid {
  justify-content: flex-start;
}

.hero.demo-playing .hero__terminal {
  flex: 1;
  max-width: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red { background: var(--color-danger); }
.terminal__dot--yellow { background: var(--color-warning); }
.terminal__dot--green { background: var(--color-success); }

.terminal__title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.terminal__body {
  padding: var(--space-lg);
  font-size: 0.9rem;
  text-align: left;
}

.terminal__line {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.terminal__prompt {
  color: var(--color-accent);
  flex-shrink: 0;
}

.terminal__command {
  color: var(--color-text);
}

.terminal__output {
  padding-left: calc(var(--space-md) + 1ch);
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 1.5s;
}

.terminal__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-warning);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.terminal__cert {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(0, 255, 245, 0.1);
  border: 1px solid rgba(0, 255, 245, 0.3);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.terminal__hint {
  margin-top: var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  opacity: 0.6;
}

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

/* Typing animation */
.typing {
  overflow: hidden;
  border-right: 2px solid var(--color-accent);
  white-space: nowrap;
  animation:
    typing 1s steps(6) forwards,
    blink 0.75s step-end infinite;
  width: 0;
}

@keyframes typing {
  to { width: 6ch; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ============================================
   PENTEST DEMO STYLES
   ============================================ */

/* Demo Button */
.terminal__demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  margin-left: var(--space-sm);
  background: transparent;
  border: 1px solid var(--color-accent);
  border-radius: 3px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.terminal__demo-btn:hover:not(:disabled) {
  background: var(--color-success);
  border-color: var(--color-success);
  color: var(--color-bg);
  box-shadow: 0 0 10px rgba(46, 213, 115, 0.3);
}

.terminal__demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

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

.terminal__demo-icon {
  font-size: 0.6rem;
  transition: transform var(--duration-fast) ease;
}

.terminal__demo-btn:hover:not(:disabled) .terminal__demo-icon {
  transform: scale(1.2);
}

/* Demo button in "stop" mode */
.terminal__demo-btn.running {
  border-color: var(--color-accent);
  color: var(--color-accent);
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.terminal__demo-btn.running:hover {
  background: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--color-bg);
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.3);
}

/* Status text (shown during demo) */
.terminal__status {
  display: none;
  margin-left: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: demoPulse 1s ease-in-out infinite;
}

.terminal__status.visible {
  display: inline;
}

/* Cursor - Separate element for JS control */
.terminal__cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--color-accent);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.75s step-end infinite;
}

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

/* Initial typing animation (page load) */
.typing-init {
  overflow: hidden;
  white-space: nowrap;
  animation: typingInit 1s steps(6) forwards;
  width: 0;
}

@keyframes typingInit {
  to { width: 6ch; }
}

/* Demo active state - disable CSS animation */
.terminal__command.demo-active {
  animation: none;
  width: auto;
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

/* Single pane (default view) */
.terminal__pane--single {
  display: block;
}

.terminal__pane--single.hidden {
  display: none;
}

/* Split Terminal View */
.terminal__split {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(-10px);
}

.terminal__split.active {
  display: grid;
  animation: splitPaneIn 0.4s var(--ease-out-expo) forwards;
}

@keyframes splitPaneIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal__pane--left,
.terminal__pane--right {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  min-height: 150px;
  max-height: 200px;
}

.terminal__pane-header {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  background: var(--color-surface);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--color-border);
}

.terminal__pane-header::before {
  content: '●';
  margin-right: 6px;
  font-size: 0.5rem;
  color: var(--color-success);
}

.terminal__pane-body {
  padding: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  height: calc(100% - 28px);
  overflow-y: auto;
}

/* Command line within panes */
.demo-cmd-line {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.demo-cmd-line .terminal__prompt {
  color: var(--color-accent);
  flex-shrink: 0;
}

.demo-cmd-line .terminal__command {
  color: var(--color-text);
  word-break: break-all;
}

/* Demo Output Container */
/* Command output container (above explanations) */
.terminal__cmd-output {
  display: none;
  padding: var(--space-sm) 0;
  transition: opacity 0.3s ease-out;
}

.terminal__cmd-output.active {
  display: block;
}

/* Explanation container (below output) */
.terminal__demo-output {
  display: none;
  padding-top: var(--space-sm);
  transition: opacity 0.3s ease-out;
}

.terminal__demo-output.active {
  display: block;
}

/* Output Line Types */
.demo-line {
  margin: 2px 0;
  padding-left: calc(var(--space-md) + 1ch);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease-out, transform 0.25s var(--ease-out-expo);
}

.demo-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.demo-line--info {
  color: var(--color-text-muted);
}

.demo-line--success {
  color: var(--color-success);
}

.demo-line--warning {
  color: var(--color-warning);
}

.demo-line--danger {
  color: var(--color-danger);
}

.demo-line--ip {
  color: var(--color-accent);
}

.demo-line--user {
  color: var(--color-warning);
  font-weight: 500;
}

.demo-line--hash {
  color: var(--color-text-subtle);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  word-break: break-all;
  padding-left: calc(var(--space-md) + 3ch);
}

.demo-line--cmd {
  color: var(--color-text);
  padding-left: 0;
}

/* Pane output lines (no left padding) */
.pane-line {
  margin: 2px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateX(-5px);
  transition: opacity 0.2s ease-out, transform 0.2s var(--ease-out-expo);
}

.pane-line.visible {
  opacity: 1;
  transform: translateX(0);
}

.pane-line--info { color: var(--color-text-muted); }
.pane-line--success { color: var(--color-success); }
.pane-line--warning { color: var(--color-warning); }
.pane-line--danger { color: var(--color-danger); }
.pane-line--ip { color: var(--color-accent); }
.pane-line--user { color: var(--color-warning); font-weight: 500; }
.pane-line--hash {
  color: var(--color-text-subtle);
  font-size: 0.65rem;
  padding-left: 12px;
}

/* Phase Header Box */
.demo-phase {
  margin: var(--space-lg) 0 var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--color-accent);
  background: linear-gradient(135deg, rgba(0, 255, 245, 0.08) 0%, rgba(0, 255, 245, 0.02) 100%);
  border-radius: 0 8px 8px 0;
  opacity: 0;
  transform: translateY(-15px);
  transition: opacity 0.4s ease-out, transform 0.5s var(--ease-out-expo);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.demo-phase.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-phase__title {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
  text-shadow: 0 0 20px rgba(0, 255, 245, 0.3);
}

.demo-phase__subtitle {
  color: var(--color-warning);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-xs);
  opacity: 0.9;
}

.demo-phase__explanation {
  color: var(--color-text);
  font-size: 0.85rem;
  font-style: normal;
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.demo-phase__explanation:last-child {
  margin-bottom: 0;
}

.demo-phase__detail {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
  padding-left: var(--space-md);
  border-left: 2px solid var(--color-border);
  margin-top: var(--space-sm);
}

.demo-phase__highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.demo-phase__warning {
  color: var(--color-warning);
  font-weight: 600;
}

/* Phase title only (for single pane phases) */
.demo-phase__title-only {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  text-shadow: 0 0 20px rgba(0, 255, 245, 0.3);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.4s ease-out, transform 0.4s var(--ease-out-expo);
}

.demo-phase__title-only.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Per-command explanation */
.demo-cmd-explanation {
  margin: var(--space-sm) 0 var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 255, 245, 0.03);
  border-left: 2px solid var(--color-accent);
  border-radius: 0 4px 4px 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.35s ease-out, transform 0.4s var(--ease-out-expo);
}

.demo-cmd-explanation.visible {
  opacity: 1;
  transform: translateX(0);
}

.demo-cmd-explanation .highlight {
  color: var(--color-accent);
  font-weight: 600;
}

.demo-cmd-explanation .warning {
  color: var(--color-warning);
  font-weight: 600;
}

/* Second explanation fade-in */
.demo-phase__second {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease-out, transform 0.5s var(--ease-out-expo);
}

.demo-phase__second.visible {
  opacity: 1;
  transform: translateY(0);
}

/* NTDS Hash Dump Scroll Window */
.demo-hash-window {
  margin: var(--space-md) 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.demo-hash-window__header {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.demo-hash-window__header::before {
  content: '●';
  margin-right: 8px;
  font-size: 0.5rem;
  color: var(--color-danger);
  animation: hashPulse 0.5s ease-in-out infinite;
}

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

.demo-hash-window__body {
  height: 120px;
  overflow-y: hidden;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.4;
}

.demo-hash-line {
  color: var(--color-text-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease-out, transform 0.2s var(--ease-out-expo);
}

.demo-hash-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.demo-hash-line__user {
  color: var(--color-warning);
}

.demo-hash-line__rid {
  color: var(--color-text-subtle);
}

.demo-hash-line__hash {
  color: var(--color-text-muted);
}

.demo-hash-window__footer {
  padding: 6px 10px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-success);
}

/* Final pwned message */
.demo-line--pwned {
  color: var(--color-danger);
  font-weight: 600;
  font-size: 1.1rem;
  padding-left: 0;
  text-shadow: 0 0 10px var(--color-danger);
  animation: pwnedGlow 0.5s ease-in-out 3;
}

@keyframes pwnedGlow {
  0%, 100% { text-shadow: 0 0 10px var(--color-danger); }
  50% { text-shadow: 0 0 20px var(--color-danger), 0 0 30px var(--color-danger); }
}

/* Terminal body expands during demo */
.terminal__body.demo-scrollable {
  /* Allow terminal to expand naturally - no max-height constraint */
  overflow-y: visible;
  transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .terminal__demo-btn {
    padding: 6px 10px;
    font-size: 0.6rem;
    min-height: 28px;
  }

  .terminal__split {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .terminal__pane--left,
  .terminal__pane--right {
    min-height: 120px;
    max-height: 150px;
  }

  .terminal__demo-output {
    font-size: 0.8rem;
  }

  .demo-line {
    font-size: 0.75rem;
    padding-left: var(--space-md);
  }

  .demo-line--hash {
    font-size: 0.65rem;
    padding-left: calc(var(--space-md) + 1ch);
  }

  .demo-phase {
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-md) 0 var(--space-sm) 0;
  }

  .demo-phase__title {
    font-size: 0.75rem;
  }

  .demo-phase__subtitle {
    font-size: 0.65rem;
  }

  .demo-phase__explanation {
    font-size: 0.75rem;
  }

  .demo-phase__detail {
    font-size: 0.65rem;
  }

  .pane-line {
    font-size: 0.65rem;
  }

  .terminal__body.demo-scrollable {
    /* Allow expansion on mobile too */
    overflow-y: visible;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .terminal__cursor {
    animation: none;
    opacity: 1;
  }

  .typing-init {
    animation: none;
    width: auto;
  }

  .demo-line,
  .pane-line,
  .demo-phase {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .demo-line--pwned {
    animation: none;
  }

  .terminal__demo-btn.running .terminal__demo-text {
    animation: none;
  }
}

/* ============================================
   END PENTEST DEMO STYLES
   ============================================ */

.hero__content {
  max-width: 600px;
}

.hero__intro {
  font-size: 0.875rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) forwards 0.2s;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.hero__title-line {
  display: block;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) forwards;
}

.hero__title-line:nth-child(1) { animation-delay: 0.3s; }
.hero__title-line:nth-child(2) { animation-delay: 0.4s; }
.hero__title-line:nth-child(3) { animation-delay: 0.5s; }

.hero__title-line--accent {
  color: var(--color-accent);
  text-shadow: var(--glow-accent);
  cursor: default;
}

.hero__description {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 480px;
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) forwards 0.6s;
}

.hero__cta {
  display: flex;
  gap: var(--space-md);
  opacity: 0;
  animation: slideUp 0.8s var(--ease-out-expo) forwards 0.7s;
}

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

.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero__scroll-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, var(--color-text-subtle), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(0.5); opacity: 0.5; }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

.btn--primary .btn__icon {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.btn--primary:hover .btn__icon {
  transform: translateX(4px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  border-color: var(--color-text);
  background: var(--color-surface);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
}

/* ASCII-style section dividers */
.section::before {
  content: '═══════════════════════════════════════════════════════════════';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-border);
  letter-spacing: 0;
  overflow: hidden;
  white-space: nowrap;
  max-width: calc(100% - 4rem);
  opacity: 0.5;
}

/* ASCII corner decorations on odd sections */
.section--about::after,
.section--experience::after,
.section--contact::after {
  content: '┌──────────────────────────────────────────────────────────────┐';
  position: absolute;
  top: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--color-accent-dim);
  letter-spacing: 0;
  white-space: nowrap;
  max-width: calc(100% - 6rem);
  overflow: hidden;
  opacity: 0.3;
}

/* Hide dividers on first section */
.hero + .section::before {
  display: none;
}

.section__grid {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
}

.section__label {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  height: fit-content;
}

.section__number {
  display: block;
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about__content {
  display: grid;
  gap: var(--space-xl);
}

.about__lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.about__body {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  max-width: 600px;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.stat {
  text-align: center;
  white-space: nowrap;
}

.stat__number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1;
}

.stat__plus {
  font-size: 2rem;
  color: var(--color-accent);
}

.stat__label {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-sm);
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.section--skills {
  background: var(--color-bg-elevated);
}

.skills__content {
  display: grid;
  gap: var(--space-xl);
}

.skills__category {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.skills__heading {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: var(--space-lg);
}

.skills__heading-icon {
  font-size: 1.25rem;
}

.skills__list {
  list-style: none;
  display: grid;
  gap: var(--space-md);
}

.skill {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: center;
  gap: var(--space-lg);
}

.skill__name {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.skill__bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.skill__fill {
  display: block;
  height: 100%;
  width: var(--fill);
  background: linear-gradient(to right, var(--color-accent), var(--color-warning));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: fillBar 1s var(--ease-out-expo) forwards;
  position: relative;
  overflow: hidden;
}

/* Shimmer effect */
.skill__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 2s ease-in-out infinite;
  animation-delay: 1s;
}

@keyframes fillBar {
  to { transform: scaleX(1); }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 2px;
  transition: all var(--duration-fast) ease;
}

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

.tag--small {
  font-size: 0.7rem;
  padding: 2px var(--space-sm);
}

.certs {
  display: grid;
  gap: var(--space-md);
}

.cert {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cert__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--color-accent-dim);
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
  transition: all var(--duration-normal) ease;
}

.cert:hover .cert__badge {
  background: var(--color-accent);
  color: var(--color-bg);
  box-shadow: var(--glow-accent);
}

/* Scan line effect on hover */
.cert__badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 255, 245, 0.1) 50%
  );
  background-size: 100% 4px;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
}

.cert:hover .cert__badge::after {
  opacity: 1;
}

.cert__name {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) ease;
}

.cert:hover .cert__name {
  color: var(--color-text);
}

/* ============================================
   METHODOLOGY SECTION
   ============================================ */

.section--methodology {
  background: var(--color-bg);
}

.methodology__content {
  display: grid;
  gap: var(--space-xl);
}

.methodology__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
}

.methodology__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: var(--space-lg);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
  transition: border-color var(--duration-normal) ease, transform var(--duration-normal) ease;
}

.methodology__card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.methodology__card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.methodology__chevron {
  display: none;
}

.methodology__coverage-toggle {
  display: none;
}

.methodology__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.methodology__title {
  font-size: 1.1rem;
  font-weight: 500;
}

.methodology__list {
  display: grid;
  gap: var(--space-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  list-style: none;
  margin: 0 0 var(--space-md) 0;
  padding: 0;
}

.methodology__list li {
  position: relative;
  padding-left: 1.25rem;
}

.methodology__list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  opacity: 0.8;
}

.methodology__meta {
  font-size: 0.8rem;
  color: var(--color-text-subtle);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
}

.methodology__coverage {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.methodology__coverage-header h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.methodology__coverage-header p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.methodology__coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.methodology__pill {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-sm) var(--space-md);
  display: grid;
  gap: var(--space-xs);
}

.methodology__pill-label {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.methodology__pill-detail {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.methodology__qa h4 {
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.methodology__qa-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-xs);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.methodology__qa-list li {
  position: relative;
  padding-left: 1.25rem;
}

.methodology__qa-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-size: 0.75rem;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */

.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-xl);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__marker {
  position: absolute;
  left: calc(-1 * var(--space-xl) - 5px);
  top: 0;
  width: 11px;
  height: 11px;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  border-radius: 50%;
  transition: all var(--duration-normal) ease;
}

.timeline__item:hover .timeline__marker {
  background: var(--color-accent);
  box-shadow: var(--glow-accent);
}

.timeline__content {
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: all var(--duration-normal) ease;
}

.timeline__item:hover .timeline__content {
  border-color: var(--color-accent);
  transform: translateX(10px);
}

.timeline__date {
  font-size: 0.75rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.timeline__title {
  font-size: 1.25rem;
  font-weight: 500;
  margin: var(--space-sm) 0;
}

.timeline__company {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.timeline__description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.timeline__tags {
  display: flex;
  gap: var(--space-xs);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.section--projects {
  background: var(--color-bg-elevated);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.project {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--duration-normal) ease;
  position: relative;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Terminal-style header decoration */
.project::before {
  content: '// PROJECT_FILE';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.65rem;
  color: var(--color-text-subtle);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  z-index: 1;
}

.project:hover {
  border-color: var(--color-accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5),
              0 0 30px var(--color-accent-dim);
}

.project:hover::before {
  color: var(--color-accent);
  background: var(--color-bg-elevated);
}

.project--featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project--featured::before {
  content: '// FEATURED_PROJECT';
  color: var(--color-warning);
}

.project__image {
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

/* Code-like background pattern */
.project__image::before {
  content: '</>';
  position: absolute;
  font-family: var(--font-mono);
  font-size: 8rem;
  color: var(--color-border);
  opacity: 0.1;
  transform: rotate(-15deg);
}

.project__placeholder {
  font-size: 4rem;
  opacity: 0.5;
  z-index: 1;
  transition: all var(--duration-normal) ease;
}

.project:hover .project__placeholder {
  transform: scale(1.1);
  opacity: 0.7;
}

.project__info {
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + 1.5rem); /* Account for header decoration */
}

.project__category {
  font-size: 0.7rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project__title {
  font-size: 1.25rem;
  font-weight: 500;
  margin: var(--space-sm) 0 var(--space-md);
}

.project__description {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project__tech {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.project__tech span::before {
  content: '#';
  color: var(--color-accent);
}

.project__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  transition: gap var(--duration-normal) var(--ease-out-expo);
}

.project__cta-arrow {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.project:hover .project__cta-arrow {
  transform: translateX(4px);
}

.project__links {
  display: flex;
  gap: var(--space-md);
}

.project__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--color-text);
  transition: color var(--duration-fast) ease;
}

.project__link:hover {
  color: var(--color-accent);
}

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

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact__content {
  display: grid;
  gap: var(--space-xl);
}

.contact__heading {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.contact__description {
  color: var(--color-text-muted);
  max-width: 500px;
}

.contact__methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.contact__method {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: all var(--duration-normal) ease;
}

.contact__method:hover {
  border-color: var(--color-accent);
  transform: translateY(-5px);
}

.contact__method-icon {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-accent);
}

.contact__method-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact__method-value {
  font-size: 0.875rem;
  color: var(--color-text);
}

.contact__terminal {
  max-width: 400px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: var(--space-xl);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  position: relative;
}

/* Status bar style accent */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--color-accent) 0%,
    var(--color-warning) 25%,
    var(--color-success) 50%,
    var(--color-danger) 75%,
    var(--color-accent) 100%
  );
  opacity: 0.5;
}

.footer__content {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

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

.footer__divider {
  color: var(--color-text-subtle);
}

.footer__pgp {
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.footer__pgp code {
  color: var(--color-text-muted);
  padding: 2px 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

/* ============================================
   BOTTOM NAV / PULL-REFRESH / FAB - Hidden on Desktop
   ============================================ */

.bottom-nav {
  display: none;
}

.pull-refresh {
  display: none;
}

.fab {
  display: none;
}

/* ============================================
   RESPONSIVE - TABLET (1024px)
   ============================================ */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__terminal {
    max-width: 400px;
    margin: 0 auto;
    order: -1;
  }

  .hero__content {
    max-width: none;
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .section__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .section__label {
    position: static;
    display: flex;
    align-items: center;
    gap: var(--space-md);
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project--featured {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .contact__methods {
    grid-template-columns: repeat(2, 1fr);
  }

  .about__stats {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .skill {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .methodology__cards {
    grid-template-columns: 1fr;
  }

  .methodology__coverage-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE - MOBILE (768px)
   Enhanced mobile experience
   ============================================ */

@media (max-width: 768px) {
  /* Mobile CSS Custom Properties Override */
  :root {
    --space-xl: 2rem;
    --space-2xl: 4rem;
    --nav-height: 64px;
    --mobile-tap-target: 44px;
    --mobile-bottom-nav-height: 72px;
  }

  /* Base mobile typography scaling */
  body {
    font-size: 15px;
    line-height: 1.65;
    padding-bottom: var(--mobile-bottom-nav-height);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }

  /* Disable cursor glow on touch devices */
  .cursor-glow {
    display: none;
  }

  /* ============================================
     MOBILE NAVIGATION - Top Bar
     ============================================ */
  .nav {
    padding: 0 var(--space-md);
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .nav__logo {
    font-size: 1.25rem;
  }

  /* Mobile hamburger menu - Enhanced */
  .nav__toggle {
    display: none;
    width: var(--mobile-tap-target);
    height: var(--mobile-tap-target);
    align-items: center;
    justify-content: center;
    z-index: 1001;
    border-radius: 8px;
    transition: background var(--duration-fast) ease;
  }

  .nav__toggle:active {
    background: var(--color-accent-dim);
  }

  .nav__toggle span {
    width: 20px;
    height: 2px;
    transition: all var(--duration-normal) var(--ease-out-expo);
  }

  /* Hamburger animation when active */
  .nav__toggle.active span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .nav__toggle.active span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Mobile slide-out menu */
  .nav__links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    flex-direction: column;
    gap: 0;
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
    background: var(--color-bg-elevated);
    border-left: 1px solid var(--color-border);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out-expo);
    z-index: 999;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav__links.active {
    transform: translateX(0);
  }

  /* Mobile nav link styling - Touch friendly */
  .nav__links li {
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .nav__links li:last-child {
    border-bottom: none;
    margin-top: var(--space-md);
  }

  .nav__link {
    display: flex;
    align-items: center;
    min-height: var(--mobile-tap-target);
    padding: var(--space-md) 0;
    font-size: 1rem;
    color: var(--color-text);
  }

  .nav__link::after {
    display: none;
  }

  .nav__link::before {
    content: '>';
    margin-right: var(--space-md);
    color: var(--color-accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--duration-fast) ease;
  }

  .nav__link:active::before {
    opacity: 1;
    transform: translateX(0);
  }

  .nav__link--accent {
    display: flex;
    justify-content: center;
    margin-top: var(--space-sm);
    padding: var(--space-md);
    text-align: center;
    border-radius: 4px;
  }

  /* Mobile nav overlay */
  .nav__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) ease;
    z-index: 998;
  }

  .nav__overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* ============================================
     MOBILE BOTTOM NAVIGATION - Enhanced
     ============================================ */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-bottom-nav-height);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    background: linear-gradient(
      to top,
      rgba(10, 10, 10, 0.98) 0%,
      rgba(10, 10, 10, 0.95) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-border);
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 900;
  }

  /* Top border glow effect */
  .bottom-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      var(--color-accent) 50%,
      transparent 100%
    );
    opacity: 0.3;
  }

  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: var(--mobile-tap-target);
    padding: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all var(--duration-fast) ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  /* Active indicator dot */
  .bottom-nav__item::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    transition: transform var(--duration-normal) var(--ease-out-back);
    box-shadow: 0 0 8px var(--color-accent);
  }

  .bottom-nav__item:active {
    color: var(--color-accent);
    background: var(--color-accent-dim);
  }

  .bottom-nav__item.active {
    color: var(--color-accent);
  }

  .bottom-nav__item.active::after {
    transform: translateX(-50%) scale(1);
  }

  .bottom-nav__icon {
    font-size: 1.25rem;
    margin-bottom: 6px;
    transition: all var(--duration-fast) var(--ease-out-back);
    position: relative;
  }

  .bottom-nav__item:active .bottom-nav__icon {
    transform: scale(1.15) translateY(-2px);
  }

  .bottom-nav__item.active .bottom-nav__icon {
    text-shadow: 0 0 12px var(--color-accent), 0 0 24px var(--color-accent-glow);
    transform: translateY(-2px);
  }

  .bottom-nav__label {
    transition: opacity var(--duration-fast) ease;
  }

  .bottom-nav__item.active .bottom-nav__label {
    font-weight: 500;
  }

  /* ============================================
     PULL TO REFRESH INDICATOR
     ============================================ */
  .pull-refresh {
    position: fixed;
    top: var(--nav-height);
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    opacity: 0;
    transition: all var(--duration-normal) ease;
    z-index: 100;
  }

  .pull-refresh.visible {
    transform: translateX(-50%) translateY(var(--space-md));
    opacity: 1;
  }

  .pull-refresh__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  .pull-refresh__text {
    color: var(--color-accent);
  }

  /* ============================================
     MOBILE HERO SECTION
     ============================================ */
  .hero {
    min-height: auto;
    padding: calc(var(--nav-height) + var(--space-sm)) var(--space-md) var(--space-md);
    gap: 0.625rem;
  }

  .hero__terminal {
    max-width: 100%;
    animation: none;
  }

  .terminal__header {
    padding: var(--space-sm) var(--space-md);
  }

  .terminal__dot {
    width: 10px;
    height: 10px;
  }

  .terminal__title {
    font-size: 0.7rem;
  }

  .terminal__body {
    padding: var(--space-md);
    font-size: 0.85rem;
  }

  .terminal__name {
    font-size: 1.1rem;
  }

  .hero__intro {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.375rem;
  }

  .hero__title {
    font-size: clamp(1.4rem, 7vw, 2rem);
    line-height: 1.15;
    margin-bottom: 0.625rem;
  }

  /* Allow "Before the bad actors" to share a line on wider mobiles */
  .hero__title-line {
    display: inline;
  }

  .hero__title-line--accent {
    display: inline;
  }

  /* Line break before "do." only */
  .hero__title-line:nth-child(3) {
    display: block;
  }

  .hero__description {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-width: 100%;
  }

  .hero__cta {
    flex-wrap: wrap;
    gap: var(--space-sm);
    width: 100%;
  }

  .hero__cta .btn {
    justify-content: center;
    min-height: 44px;
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero__scroll {
    display: none;
  }

  /* ============================================
     MOBILE BUTTONS - Touch Friendly
     ============================================ */
  .btn {
    min-height: var(--mobile-tap-target);
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
    border-radius: 4px;
  }

  .btn--primary:active {
    transform: scale(0.98);
    box-shadow: var(--glow-accent);
  }

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

  /* ============================================
     MOBILE SECTIONS
     ============================================ */
  .section {
    padding: var(--space-xl) var(--space-md);
  }

  .section__grid {
    gap: var(--space-md);
  }

  .section__label {
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-border-subtle);
    margin-bottom: var(--space-sm);
  }

  .section__number {
    font-size: 0.7rem;
  }

  .section__title {
    font-size: 1.25rem;
  }

  /* Simplify ASCII dividers on mobile */
  .section::before {
    content: '────────────────────────';
    font-size: 0.5rem;
    opacity: 0.3;
  }

  .section--about::after,
  .section--experience::after,
  .section--contact::after {
    display: none;
  }

  /* ============================================
     MOBILE ABOUT SECTION
     ============================================ */
  .about__lead {
    font-size: 1.2rem;
    line-height: 1.5;
  }

  .about__body {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .about__stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding-top: var(--space-lg);
  }

  .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
  }

  .stat__number {
    font-size: 2.5rem;
  }

  .stat__plus {
    font-size: 1.5rem;
  }

  .stat__label {
    font-size: 0.7rem;
    text-align: center;
  }

  /* ============================================
     MOBILE SKILLS SECTION
     ============================================ */
  .skills__content {
    gap: var(--space-md);
  }

  .skills__category {
    padding: var(--space-md);
    border-radius: 8px;
  }

  .skills__heading {
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
  }

  .skills__heading-icon {
    font-size: 1.1rem;
  }

  .skills__list {
    gap: var(--space-md);
  }

  .skill {
    gap: var(--space-xs);
  }

  .skill__name {
    font-size: 0.8rem;
  }

  .skill__bar {
    height: 6px;
    border-radius: 3px;
  }

  /* Mobile skill tags - Compact wrapped layout */
  .skills__tags {
    gap: var(--space-xs);
    flex-wrap: wrap;
  }

  .skills__tags .tag {
    white-space: nowrap;
  }

  .tag {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.75rem;
    border-radius: 4px;
  }

  .tag:active {
    background: var(--color-accent-dim);
    border-color: var(--color-accent);
    color: var(--color-accent);
  }

  /* Mobile certifications */
  .certs {
    gap: var(--space-md);
  }

  .cert {
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    gap: var(--space-md);
  }

  .cert__badge {
    min-width: var(--mobile-tap-target);
    min-height: var(--mobile-tap-target);
    font-size: 0.7rem;
  }

  .cert__name {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* ============================================
     MOBILE METHODOLOGY ACCORDION
     ============================================ */
  .methodology__card-header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
  }

  .methodology__chevron {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-accent);
    font-size: 0.75rem;
    transition: transform var(--duration-normal) ease;
  }

  .methodology__chevron::before {
    content: '\25BE';
  }

  .methodology__card.is-open .methodology__chevron {
    transform: translateY(-50%) rotate(180deg);
  }

  .methodology__card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out-expo);
  }

  .methodology__card.is-open .methodology__card-body {
    max-height: 500px;
  }

  .methodology__coverage-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--duration-slow) var(--ease-out-expo);
  }

  .methodology__coverage.is-open .methodology__coverage-body {
    max-height: 1200px;
  }

  .methodology__coverage.is-open .methodology__coverage-toggle .methodology__chevron {
    transform: rotate(180deg);
  }

  .methodology__coverage-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: var(--space-sm) var(--space-md);
    color: var(--color-accent);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    margin-top: var(--space-sm);
    width: 100%;
    min-height: 44px;
  }

  .methodology__coverage-toggle .methodology__chevron {
    position: static;
    transform: none;
    transition: transform var(--duration-normal) ease;
  }

  /* ============================================
     MOBILE EXPERIENCE / TIMELINE
     ============================================ */
  .timeline {
    padding-left: var(--space-lg);
  }

  .timeline::before {
    left: 4px;
  }

  .timeline__marker {
    left: calc(-1 * var(--space-lg) + 0px);
    width: 9px;
    height: 9px;
  }

  .timeline__item {
    padding-bottom: var(--space-lg);
  }

  .timeline__content {
    padding: var(--space-md);
    border-radius: 8px;
  }

  .timeline__item:active .timeline__content {
    border-color: var(--color-accent);
    transform: none;
  }

  .timeline__date {
    font-size: 0.7rem;
  }

  .timeline__title {
    font-size: 1.1rem;
    margin: var(--space-xs) 0;
  }

  .timeline__company {
    font-size: 0.8rem;
    margin-bottom: var(--space-sm);
  }

  .timeline__description {
    font-size: 0.8rem;
    line-height: 1.6;
  }

  .timeline__tags {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }

  .tag--small {
    font-size: 0.65rem;
    padding: 4px var(--space-sm);
    min-height: auto;
  }

  /* ============================================
     MOBILE PROJECTS SECTION
     ============================================ */
  .projects__grid {
    gap: var(--space-md);
  }

  .project {
    border-radius: 8px;
    overflow: hidden;
  }

  .project:active {
    border-color: var(--color-accent);
    transform: none;
    box-shadow: 0 0 20px var(--color-accent-dim);
  }

  .project--featured {
    grid-template-columns: 1fr;
  }

  .project__image {
    min-height: 150px;
  }

  .project__placeholder {
    font-size: 3rem;
  }

  .project__info {
    padding: var(--space-md);
  }

  .project__category {
    font-size: 0.65rem;
  }

  .project__title {
    font-size: 1.1rem;
    margin: var(--space-xs) 0 var(--space-sm);
  }

  .project__description {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: var(--space-sm);
  }

  .project__tech {
    font-size: 0.7rem;
    margin-bottom: var(--space-sm);
    flex-wrap: wrap;
  }

  .project__links {
    gap: var(--space-md);
  }

  .project__link {
    min-height: var(--mobile-tap-target);
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    padding: var(--space-sm) 0;
  }

  .project__link:active {
    color: var(--color-accent);
  }

  /* ============================================
     MOBILE CONTACT SECTION
     ============================================ */
  .contact__content {
    gap: var(--space-lg);
  }

  .contact__heading {
    font-size: 1.5rem;
  }

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

  .contact__methods {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .contact__method {
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    min-height: 60px;
    border-radius: 8px;
  }

  .contact__method:active {
    border-color: var(--color-accent);
    background: var(--color-accent-dim);
    transform: none;
  }

  .contact__method-icon {
    font-size: 1.25rem;
    min-width: 32px;
    text-align: center;
  }

  .contact__method-label {
    font-size: 0.65rem;
    margin-bottom: 2px;
  }

  .contact__method-value {
    font-size: 0.85rem;
  }

  .contact__terminal {
    max-width: 100%;
  }

  /* ============================================
     MOBILE FOOTER
     ============================================ */
  .footer {
    padding: var(--space-lg) var(--space-md);
    padding-bottom: calc(var(--space-lg) + var(--mobile-bottom-nav-height));
  }

  .footer__content {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .footer__copyright {
    font-size: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer__pgp {
    font-size: 0.7rem;
  }

  .footer__pgp code {
    font-size: 0.65rem;
  }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (480px)
   Extra refinements for small screens
   ============================================ */

@media (max-width: 480px) {
  :root {
    --space-lg: 1.5rem;
    --space-md: 0.875rem;
  }

  body {
    font-size: 14px;
  }

  .hero__title {
    font-size: clamp(1.25rem, 7vw, 1.75rem);
  }

  .hero__description {
    font-size: 0.75rem;
  }

  .hero__cta .btn {
    font-size: 0.78rem;
    padding: 0.5rem 1rem;
  }

  .stat__number {
    font-size: 2rem;
  }

  .about__lead {
    font-size: 1.1rem;
  }

  .terminal__body {
    font-size: 0.8rem;
  }

  .terminal__name {
    font-size: 1rem;
  }

  .terminal__role {
    font-size: 0.8rem;
  }

  /* Tighter spacing on very small screens */
  .section {
    padding: var(--space-lg) var(--space-md);
  }

  .skills__category,
  .timeline__content,
  .project__info,
  .contact__method,
  .cert {
    padding: var(--space-md);
  }

  /* Bottom nav adjustments */
  .bottom-nav__item {
    font-size: 0.6rem;
  }

  .bottom-nav__icon {
    font-size: 1.1rem;
  }
}

/* ============================================
   MOBILE-SPECIFIC ANIMATIONS
   Subtle, performant, respects reduce-motion
   ============================================ */

@media (max-width: 768px) {
  /* Smooth touch feedback animations */
  @keyframes touchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.97); }
    100% { transform: scale(1); }
  }

  @keyframes slideInRight {
    from {
      opacity: 0;
      transform: translateX(20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

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

  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  /* Staggered entrance for mobile sections */
  .section__label {
    animation: slideInUp 0.5s var(--ease-out-expo) both;
  }

  .about__content,
  .skills__content,
  .experience__content,
  .projects__content,
  .contact__content {
    animation: fadeInScale 0.6s var(--ease-out-expo) 0.1s both;
  }

  /* Mobile card entrance animations */
  .skills__category,
  .timeline__item,
  .project,
  .contact__method,
  .stat {
    animation: slideInUp 0.5s var(--ease-out-expo) both;
  }

  .skills__category:nth-child(1) { animation-delay: 0.1s; }
  .skills__category:nth-child(2) { animation-delay: 0.15s; }
  .skills__category:nth-child(3) { animation-delay: 0.2s; }

  .timeline__item:nth-child(1) { animation-delay: 0.1s; }
  .timeline__item:nth-child(2) { animation-delay: 0.15s; }
  .timeline__item:nth-child(3) { animation-delay: 0.2s; }

  .project:nth-child(1) { animation-delay: 0.1s; }
  .project:nth-child(2) { animation-delay: 0.15s; }
  .project:nth-child(3) { animation-delay: 0.2s; }
  .project:nth-child(4) { animation-delay: 0.25s; }

  .contact__method:nth-child(1) { animation-delay: 0.1s; }
  .contact__method:nth-child(2) { animation-delay: 0.15s; }
  .contact__method:nth-child(3) { animation-delay: 0.2s; }
  .contact__method:nth-child(4) { animation-delay: 0.25s; }

  .stat:nth-child(1) { animation-delay: 0.1s; }
  .stat:nth-child(2) { animation-delay: 0.15s; }
  .stat:nth-child(3) { animation-delay: 0.2s; }

  /* Disable float animation on mobile for performance */
  .hero__terminal {
    animation: fadeInScale 0.6s var(--ease-out-expo) both;
  }

  /* Hero content staggered animation */
  .hero__intro { animation-delay: 0.3s; }
  .hero__title-line:nth-child(1) { animation-delay: 0.35s; }
  .hero__title-line:nth-child(2) { animation-delay: 0.4s; }
  .hero__title-line:nth-child(3) { animation-delay: 0.45s; }
  .hero__description { animation-delay: 0.5s; }
  .hero__cta { animation-delay: 0.55s; }

  /* Bottom nav item animation */
  .bottom-nav__item {
    animation: slideInUp 0.4s var(--ease-out-expo) both;
  }
  .bottom-nav__item:nth-child(1) { animation-delay: 0.1s; }
  .bottom-nav__item:nth-child(2) { animation-delay: 0.15s; }
  .bottom-nav__item:nth-child(3) { animation-delay: 0.2s; }
  .bottom-nav__item:nth-child(4) { animation-delay: 0.25s; }
  .bottom-nav__item:nth-child(5) { animation-delay: 0.3s; }
  .bottom-nav__item:nth-child(6) { animation-delay: 0.35s; }
}

/* ============================================
   LANDSCAPE MOBILE OPTIMIZATION
   ============================================ */

@media (max-width: 768px) and (orientation: landscape) {
  :root {
    --nav-height: 56px;
    --mobile-bottom-nav-height: 56px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-md));
    padding-bottom: var(--space-lg);
  }

  .hero__terminal {
    max-width: 320px;
  }

  .hero__title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .bottom-nav {
    height: var(--mobile-bottom-nav-height);
  }

  .bottom-nav__item {
    flex-direction: row;
    gap: var(--space-sm);
  }

  .bottom-nav__icon {
    margin-bottom: 0;
    font-size: 1rem;
  }
}

/* ============================================
   SAFE AREA INSETS (Notched devices)
   ============================================ */

@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    body {
      padding-bottom: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }

    .bottom-nav {
      padding-bottom: env(safe-area-inset-bottom);
      height: calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }

    .nav {
      padding-left: max(var(--space-md), env(safe-area-inset-left));
      padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .section {
      padding-left: max(var(--space-md), env(safe-area-inset-left));
      padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .footer {
      padding-bottom: calc(var(--space-lg) + var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom));
    }
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: var(--color-bg);
  z-index: 10000;
}

.skip-link:focus {
  top: var(--space-md);
}

@media (max-width: 768px) {
  .fab {
    display: flex;
    position: fixed;
    right: var(--space-md);
    bottom: calc(var(--mobile-bottom-nav-height) + var(--space-md) + env(safe-area-inset-bottom, 0));
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border-radius: 50%;
    color: var(--color-bg);
    font-size: 1.5rem;
    font-weight: 600;
    z-index: 800;
    box-shadow:
      0 4px 12px rgba(0, 255, 245, 0.3),
      0 0 24px var(--color-accent-dim);
    transition: all var(--duration-normal) var(--ease-out-expo);
  }

  .fab:active {
    transform: scale(0.95);
    box-shadow:
      0 2px 8px rgba(0, 255, 245, 0.4),
      0 0 32px var(--color-accent-glow);
  }

  .fab__icon {
    font-family: var(--font-mono);
    transition: transform var(--duration-fast) ease;
  }

  .fab:active .fab__icon {
    transform: rotate(15deg);
  }

  /* Pulse animation */
  .fab__pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-accent);
    animation: fabPulse 2s ease-in-out infinite;
    z-index: -1;
  }

  @keyframes fabPulse {
    0%, 100% {
      transform: scale(1);
      opacity: 0.5;
    }
    50% {
      transform: scale(1.15);
      opacity: 0;
    }
  }

  /* Hide FAB when at contact section */
  .fab.hidden {
    transform: scale(0);
    opacity: 0;
  }
}

/* ============================================
   TOUCH DEVICE STATES
   ============================================ */

.touch-active {
  opacity: 0.8;
}

/* Touch device body class */
.touch-device .cursor-glow {
  display: none !important;
}
