/* ============================================================
   BALLISTIC MISSILE FYP — STYLESHEET
   Theme: Military Tactical Operations / War Room Dark
   Palette: Deep olive black + danger red + amber gold
   Fonts: Black Ops One + Exo 2 + Courier Prime
   ============================================================ */

:root {
  --bg0: #0a0a0f;
  --bg1: #0e0e14;
  --bg2: #14141c;
  --bg3: #1a1a24;
  --bg4: #22222e;
  --red:     #e04030;
  --red-hot: #ff5544;
  --amber:   #ffaa33;
  --gold:    #ffdd44;
  --olive:   #556b2f;
  --olive-lt:#8a9a5b;
  --text1: #eeeef2;
  --text2: #c0c0cc;
  --text3: #9090a0;
  --text4: #686878;
  --border-r: rgba(224,64,48,0.22);
  --border-a: rgba(255,170,51,0.2);
  --glow-r: 0 0 16px rgba(204,51,0,0.35);
  --glow-a: 0 0 16px rgba(255,153,0,0.3);
  --glow-g: 0 0 16px rgba(255,204,0,0.25);
  --shadow: 0 8px 40px rgba(0,0,0,0.7);
  --font-display: 'Black Ops One', cursive;
  --font-body: 'Exo 2', sans-serif;
  --font-mono: 'Courier Prime', monospace;
  --r: 10px;
  --rl: 16px;
  --t: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ---- BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--text1);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: var(--amber); text-decoration: none; transition: var(--t); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(204,51,0,0.3); color: #fff; }

/* Scanlines */
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 4px
  );
}

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

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }

/* ---- VERTICAL NAVIGATION SIDEBAR ---- */
.vertical-nav-toggle {
  position: fixed;
  top: 20px;
  right: 0;
  z-index: 1001;
  width: 50px;
  height: 50px;
  background: rgba(204, 51, 0, 0.2);
  border: 1px solid rgba(204, 51, 0, 0.5);
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--t);
  backdrop-filter: blur(10px);
}

.vertical-nav-toggle:hover {
  background: rgba(204, 51, 0, 0.35);
  border-color: var(--red-hot);
  box-shadow: 0 0 20px rgba(204, 51, 0, 0.4);
}

.vertical-nav-toggle .bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  position: relative;
  transition: var(--t);
}

.vertical-nav-toggle .bar::before,
.vertical-nav-toggle .bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  transition: var(--t);
}

.vertical-nav-toggle .bar::before { top: -7px; }
.vertical-nav-toggle .bar::after { top: 7px; }

.vertical-nav-toggle.active .bar { background: transparent; }
.vertical-nav-toggle.active .bar::before { top: 0; transform: rotate(45deg); }
.vertical-nav-toggle.active .bar::after { top: 0; transform: rotate(-45deg); }

.vertical-nav-sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  left: auto;
  z-index: 1000;
  width: 320px;
  height: 100vh;
  background: rgba(10, 8, 5, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(204, 51, 0, 0.4);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 80px 0 40px;
}

.vertical-nav-sidebar.active {
  right: 0;
}

.vertical-nav-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(204, 51, 0, 0.15), transparent);
  pointer-events: none;
}

.vertical-nav-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(204, 51, 0, 0.2);
  background: rgba(10, 8, 5, 0.9);
  backdrop-filter: blur(10px);
}

.vertical-nav-header .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vertical-nav-close {
  width: 36px;
  height: 36px;
  background: rgba(204, 51, 0, 0.15);
  border: 1px solid rgba(204, 51, 0, 0.4);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--t);
  color: var(--red-hot);
  font-size: 1.2rem;
}

.vertical-nav-close:hover {
  background: rgba(204, 51, 0, 0.3);
  border-color: var(--red-hot);
  transform: rotate(90deg);
}

.vertical-nav-links {
  list-style: none;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vertical-nav-links li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.vertical-nav-sidebar.active .vertical-nav-links li {
  opacity: 1;
  transform: translateX(0);
}

.vertical-nav-links li:nth-child(1) { transition-delay: 0.05s; }
.vertical-nav-links li:nth-child(2) { transition-delay: 0.1s; }
.vertical-nav-links li:nth-child(3) { transition-delay: 0.15s; }
.vertical-nav-links li:nth-child(4) { transition-delay: 0.2s; }
.vertical-nav-links li:nth-child(5) { transition-delay: 0.25s; }
.vertical-nav-links li:nth-child(6) { transition-delay: 0.3s; }
.vertical-nav-links li:nth-child(7) { transition-delay: 0.35s; }
.vertical-nav-links li:nth-child(8) { transition-delay: 0.4s; }
.vertical-nav-links li:nth-child(9) { transition-delay: 0.45s; }
.vertical-nav-links li:nth-child(10) { transition-delay: 0.5s; }
.vertical-nav-links li:nth-child(11) { transition-delay: 0.55s; }
.vertical-nav-links li:nth-child(12) { transition-delay: 0.6s; }
.vertical-nav-links li:nth-child(13) { transition-delay: 0.65s; }

.vertical-nav-links a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 14px 18px;
  background: rgba(255, 153, 0, 0.05);
  border: 1px solid rgba(255, 153, 0, 0.1);
  border-radius: 8px;
  color: var(--text2);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: var(--t);
}

.vertical-nav-links a:hover {
  background: rgba(204, 51, 0, 0.2);
  border-color: rgba(204, 51, 0, 0.5);
  color: var(--amber);
  padding-left: 24px;
  box-shadow: 0 4px 20px rgba(204, 51, 0, 0.25);
}

.vertical-nav-links a i {
  width: 24px;
  text-align: center;
  font-size: 1rem;
  color: var(--amber);
}

.vertical-nav-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 25px;
  border-top: 1px solid rgba(204, 51, 0, 0.2);
  background: rgba(10, 8, 5, 0.9);
  backdrop-filter: blur(10px);
  text-align: center;
}

.vertical-nav-footer p {
  font-size: 0.75rem;
  color: var(--text4);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.vertical-nav-footer .status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--red-hot);
}

.vertical-nav-footer .status-dot {
  width: 6px;
  height: 6px;
  background: var(--red-hot);
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

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

/* 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);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--t);
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
  .vertical-nav-toggle {
    top: 15px;
    width: 45px;
    height: 45px;
  }
  
  .vertical-nav-sidebar {
    width: 280px;
    right: -280px;
  }
}

@media (max-width: 480px) {
  .vertical-nav-toggle {
    top: 10px;
    width: 40px;
    height: 40px;
  }
  
  .vertical-nav-sidebar {
    width: 100%;
    right: -100%;
  }
}

/* ---- PROGRESS BAR ---- */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 999;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--red), var(--amber), var(--gold));
  box-shadow: 0 0 8px rgba(255,153,0,0.6);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---- HERO ---- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 60px 2.5rem;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 75% 50%, rgba(100,30,0,0.15) 0%, transparent 70%),
              linear-gradient(135deg, #080500 0%, #0f0900 60%, #080500 100%);
}

/* Radar */
.hero-radar {
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 600px; height: 600px;
}

.radar-circle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  border-radius: 50%; border: 1px solid;
}

.r1 { width: 150px; height: 150px; border-color: rgba(204,51,0,0.25); animation: rPulse 3s ease-in-out infinite; }
.r2 { width: 280px; height: 280px; border-color: rgba(204,51,0,0.15); animation: rPulse 3s 0.5s ease-in-out infinite; }
.r3 { width: 420px; height: 420px; border-color: rgba(204,51,0,0.1); animation: rPulse 3s 1s ease-in-out infinite; }
.r4 { width: 560px; height: 560px; border-color: rgba(204,51,0,0.06); }

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

.radar-sweep {
  position: absolute; top: 50%; left: 50%;
  width: 280px; height: 2px;
  transform-origin: left center;
  animation: radarSpin 4s linear infinite;
  background: linear-gradient(90deg, rgba(204,51,0,0.8), transparent);
}

.radar-sweep::before {
  content: '';
  position: absolute; top: 50%; left: 0;
  width: 8px; height: 8px;
  background: var(--red-hot);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 10px var(--red-hot);
}

@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.radar-dot {
  position: absolute; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: dotBlink 2s ease-in-out infinite;
}

.d1 { width: 6px; height: 6px; top: 35%; left: 58%; animation-delay: 0.3s; }
.d2 { width: 5px; height: 5px; top: 62%; left: 45%; animation-delay: 1.1s; }
.d3 { width: 7px; height: 7px; top: 48%; left: 70%; animation-delay: 0.7s; }

@keyframes dotBlink {
  0%,100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

.hero-grid-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,100,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,100,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content { position: relative; z-index: 2; max-width: 680px; }

.status-bar {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text3); letter-spacing: 0.15em;
  margin-bottom: 1rem;
  animation: fadeUp 0.5s ease both;
}

.status-dot {
  width: 8px; height: 8px;
  background: var(--red-hot); border-radius: 50%;
  box-shadow: 0 0 8px var(--red-hot);
  animation: statusBlink 1.2s ease-in-out infinite;
}

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

.status-classify {
  margin-left: auto;
  color: var(--red);
  border: 1px solid rgba(204,51,0,0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
}

.classify-stamp {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--red);
  border: 2px solid rgba(204,51,0,0.4);
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  transform: rotate(-1.5deg);
  opacity: 0.85;
  animation: fadeUp 0.5s 0.05s ease both;
}

.hero-title {
  display: flex; flex-direction: column;
  gap: 0.1rem;
  margin-bottom: 1rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

.title-line-1 {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  color: var(--text2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title-line-2 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--red-hot);
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 0 40px rgba(255,68,0,0.4), 2px 2px 0px rgba(100,0,0,0.5);
}

.title-line-3 {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--amber);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text2);
  margin-bottom: 1rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.bracket { color: var(--amber); }

.hero-desc {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 500px;
  margin-bottom: 2rem;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-btns {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s 0.4s ease both;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, #991100, #cc3300);
  color: var(--text1);
  font-family: var(--font-display); font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-radius: 8px;
  border: 1px solid rgba(255,100,0,0.4);
  box-shadow: 0 0 24px rgba(204,51,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: var(--t);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #bb2200, #ff4400);
  transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(255,68,0,0.5);
  color: #fff;
}

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text2);
  font-family: var(--font-display); font-size: 0.78rem;
  letter-spacing: 0.08em;
  border-radius: 8px;
  border: 1px solid var(--border-a);
  transition: var(--t);
}

.btn-ghost:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(255,153,0,0.07);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex; align-items: center; gap: 1.25rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.5s ease both;
}

.stat-box { display: flex; flex-direction: column; align-items: center; }

.s-val {
  font-family: var(--font-display);
  font-size: 2rem; color: var(--amber);
  line-height: 1;
  text-shadow: var(--glow-a);
}

.s-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem; color: var(--text4);
  text-transform: uppercase; letter-spacing: 0.15em;
}

.stat-sep { color: var(--text4); font-size: 1.5rem; line-height: 1; }

/* Missile */
.hero-missile-wrap {
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  z-index: 3;
}

.missile-container {
  position: relative;
  animation: missileBob 5s ease-in-out infinite;
}

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

.missile-svg { width: 120px; filter: drop-shadow(0 0 18px rgba(255,100,0,0.5)); }

.m-flame { animation: flameFlick 0.3s ease-in-out infinite alternate; transform-origin: 70px 460px; }
.m-exhaust { animation: flameFlick 0.5s ease-in-out infinite alternate; transform-origin: 70px 480px; }

@keyframes flameFlick {
  from { transform: scaleY(0.8) scaleX(0.9); opacity: 0.8; }
  to { transform: scaleY(1.3) scaleX(1.1); opacity: 1; }
}

.missile-glow {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  width: 60px; height: 60px;
  background: radial-gradient(circle, rgba(255,100,0,0.6) 0%, transparent 70%);
  animation: glowPulse 0.4s ease-in-out infinite alternate;
}

@keyframes glowPulse { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.4); } }

.target-lock {
  position: absolute; top: 50%; left: 50%;
  border: 1px solid; border-color: rgba(204,51,0,0.4);
  border-radius: 50%;
  animation: lockRotate 6s linear infinite;
}

.tl-outer { width: 180px; height: 180px; transform: translate(-50%,-50%); }
.tl-inner { width: 100px; height: 100px; transform: translate(-50%,-50%); animation-direction: reverse; animation-duration: 4s; }

@keyframes lockRotate {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to { transform: translate(-50%,-50%) rotate(360deg); }
}

.trajectory-line {
  position: absolute;
  bottom: 50%; right: 100%;
  width: 80px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(204,51,0,0.4));
  transform: rotate(-30deg);
  transform-origin: right bottom;
}

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.6rem;
  color: var(--text4); letter-spacing: 0.2em;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ---- SECTIONS ---- */
.section { padding: 100px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section-header { text-align: center; margin-bottom: 4rem; }

.header-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 1rem;
  background: rgba(204,51,0,0.1);
  border: 1px solid rgba(204,51,0,0.25);
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--red); letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text1); line-height: 1.1; margin-bottom: 0.75rem;
}

.head-accent {
  color: var(--amber);
  text-shadow: 0 0 24px rgba(255,153,0,0.3);
}

.section-header p { font-size: 1.05rem; color: var(--text2); max-width: 640px; margin: 0 auto; line-height: 1.75; }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- OVERVIEW ---- */
.overview-section { background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%); }

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem; margin-bottom: 2.5rem;
}

.ov-card {
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--r);
  padding: 1.75rem 1.5rem;
  position: relative; overflow: hidden;
  transition: var(--t);
}

.ov-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ic, var(--red));
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.4s ease;
}

.ov-card:hover { border-color: rgba(255,153,0,0.3); transform: translateY(-4px); background: var(--bg3); }
.ov-card:hover::before { transform: scaleY(1); }

.ov-icon {
  width: 48px; height: 48px;
  background: rgba(255,100,0,0.08);
  border: 1px solid rgba(255,100,0,0.2);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--ic, var(--red));
  margin-bottom: 1rem;
}

.ov-card h3 {
  font-family: var(--font-display); font-size: 0.9rem;
  color: var(--text1); margin-bottom: 0.5rem;
}

.ov-card p { font-size: 0.92rem; color: var(--text2); line-height: 1.7; }

.tools-bar {
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--r);
  padding: 1.25rem 1.75rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}

.tools-label {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--red); letter-spacing: 0.15em;
  white-space: nowrap;
  display: flex; align-items: center; gap: 0.4rem;
}

.tools-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tools-list span {
  padding: 0.25rem 0.75rem;
  background: rgba(255,153,0,0.06);
  border: 1px solid rgba(255,153,0,0.15);
  border-radius: 5px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text2);
  transition: var(--t);
}

.tools-list span:hover { color: var(--amber); border-color: rgba(255,153,0,0.35); background: rgba(255,153,0,0.1); }

/* ---- FLOWCHART ---- */
.flowchart-section { background: linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%); }

.flowchart {
  display: flex; flex-direction: column; align-items: center;
  max-width: 920px; margin: 0 auto;
  gap: 0;
}

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

.flow-node {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--r);
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  cursor: pointer; transition: var(--t);
  position: relative; overflow: hidden;
}

.flow-node::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(204,51,0,0.04), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.flow-node:hover::after,
.flow-item.active .flow-node::after { opacity: 1; }

.flow-node:hover,
.flow-item.active .flow-node {
  border-color: rgba(255,100,0,0.4);
  box-shadow: var(--glow-r);
  background: var(--bg3);
}

.fn-badge {
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text4); letter-spacing: 0.1em; min-width: 24px;
}

.fn-icon {
  width: 42px; height: 42px;
  background: rgba(204,51,0,0.1);
  border: 1px solid rgba(204,51,0,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--nc, var(--red));
  flex-shrink: 0; transition: var(--t);
}

.flow-node:hover .fn-icon,
.flow-item.active .fn-icon {
  box-shadow: 0 0 14px color-mix(in srgb, var(--nc) 40%, transparent);
  background: rgba(204,51,0,0.18);
}

.fn-text { flex: 1; }

.fn-text h3 {
  font-family: var(--font-display); font-size: 0.88rem;
  color: var(--text1); margin-bottom: 0.15rem;
}

.fn-text p { font-size: 0.88rem; color: var(--text3); }

.fn-expand {
  width: 28px; height: 28px;
  border: 1px solid var(--border-r);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--red);
  flex-shrink: 0; transition: var(--t);
}

.flow-item.active .fn-expand { transform: rotate(45deg); background: rgba(204,51,0,0.15); }

/* Flow detail */
.flow-detail {
  width: 100%; max-height: 0; overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4,0,0.2,1);
}

.flow-item.active .flow-detail { max-height: 1200px; }

.detail-panel {
  display: grid; grid-template-columns: 260px 1fr; gap: 1.75rem;
  background: rgba(15,9,0,0.95);
  border: 1px solid var(--border-r); border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  padding: 1.75rem; margin-top: -1px;
}

.dp-img {
  position: relative; border-radius: 8px;
  overflow: hidden; height: 180px; flex-shrink: 0;
}

.dp-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.4) hue-rotate(-20deg) saturate(1.2);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.dp-img:hover img { transform: scale(1.05); filter: sepia(0.2) hue-rotate(-10deg) saturate(1.3); }

.dp-img-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.62rem;
  color: var(--amber); letter-spacing: 0.15em;
}

.dp-body h4 {
  font-family: var(--font-display); font-size: 0.95rem;
  color: var(--red-hot);
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.dp-body > p {
  font-size: 0.93rem; color: var(--text2);
  margin-bottom: 0.9rem; line-height: 1.75;
}

.dp-points { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.9rem; }

.dp-pt {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-size: 0.91rem; color: var(--text2);
}

.pt-bullet { color: var(--amber); font-size: 0.65rem; margin-top: 4px; flex-shrink: 0; }
.dp-pt strong { color: var(--text1); }

.dp-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.dp-tags span {
  padding: 0.18rem 0.6rem;
  background: rgba(255,153,0,0.07);
  border: 1px solid rgba(255,153,0,0.18);
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--amber);
}

/* Materials grid */
.mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-bottom: 0.9rem; }

.mat-item {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-r);
  border-radius: 8px; padding: 0.8rem;
  transition: var(--t);
}

.mat-item:hover { border-color: rgba(255,153,0,0.3); }

.mat-tag { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.15em; margin-bottom: 0.3rem; }

.mat-item strong { display: block; font-size: 0.78rem; color: var(--text1); margin-bottom: 0.25rem; }
.mat-item p { font-size: 0.77rem; color: var(--text3); line-height: 1.5; }

/* Flow arrow connector */
.flow-arrow {
  font-size: 0.8rem; color: var(--red);
  padding: 0.3rem 0;
  animation: arrowPulse 1.5s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%,100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(4px); }
}

.flow-item:last-child .flow-arrow { display: none; }

/* ---- TIMELINE ---- */
.timeline-section { background: var(--bg0); }

.timeline-wrap { max-width: 820px; margin: 0 auto; }

.tl-item {
  display: flex; align-items: flex-start; gap: 1.25rem;
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--r);
  padding: 1.1rem 1.5rem;
  margin-bottom: 0.85rem;
  transition: var(--t);
}

.tl-item:hover { border-color: rgba(255,153,0,0.3); transform: translateX(5px); }

.tl-num {
  font-family: var(--font-display); font-size: 1.4rem;
  color: rgba(204,51,0,0.25); line-height: 1; flex-shrink: 0;
  min-width: 40px;
}

.tl-body { flex: 1; }

.tl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }

.tl-title {
  font-family: var(--font-display); font-size: 0.85rem;
  color: var(--text1);
  display: flex; align-items: center; gap: 0.5rem;
}

.tl-title i { color: var(--amber); font-size: 0.8rem; }

.tl-days {
  font-family: var(--font-display); font-size: 0.78rem;
  color: var(--amber);
  background: rgba(255,153,0,0.1);
  border: 1px solid rgba(255,153,0,0.2);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
}

.tl-body p { font-size: 0.9rem; color: var(--text2); margin-bottom: 0.6rem; }

.tl-track {
  height: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px; overflow: hidden;
}

.tl-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--red), var(--amber));
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 6px rgba(255,153,0,0.5);
}

.tl-fill.go { width: var(--w); }

.tl-total {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  padding: 1rem 2rem;
  background: rgba(204,51,0,0.08);
  border: 1px solid rgba(204,51,0,0.25);
  border-radius: var(--r);
  font-family: var(--font-display); font-size: 0.9rem;
  color: var(--text2); margin-top: 0.5rem;
}

.tl-total i { color: var(--amber); }
.tl-total strong { color: var(--amber); }

/* ---- COST TABLE ---- */
.cost-section { background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--rl);
  border: 1px solid var(--border-r);
  box-shadow: var(--shadow);
}

.cost-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }

.cost-table thead tr {
  background: rgba(204,51,0,0.08);
  border-bottom: 1px solid rgba(204,51,0,0.3);
}

.cost-table th {
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--red); text-align: left; white-space: nowrap;
}

.cost-table td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text2); vertical-align: middle;
}

.cost-table td i { margin-right: 0.5rem; }

.cost-table tbody tr { background: var(--bg2); transition: background 0.2s; }
.cost-table tbody tr:hover { background: var(--bg3); }

.cv { font-family: var(--font-mono); color: var(--amber) !important; font-weight: 700; white-space: nowrap; }

.total-row { background: rgba(204,51,0,0.06) !important; border-top: 1px solid rgba(204,51,0,0.3) !important; }
.total-row td { color: var(--text1) !important; font-size: 0.92rem; }
.total-cv { color: var(--gold) !important; font-size: 1rem; text-shadow: var(--glow-g); }

/* ---- TEAM ---- */
.team-section { background: var(--bg1); }

.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }

.team-card {
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--rl);
  padding: 1.75rem 1.25rem;
  text-align: center;
  position: relative; overflow: hidden;
  transition: var(--t);
}

.team-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tc, var(--red));
  transform: scaleX(0); transition: transform 0.4s ease;
}

.team-card:hover { border-color: rgba(255,153,0,0.25); transform: translateY(-5px); }
.team-card:hover::before { transform: scaleX(1); }

.tc-rank {
  position: absolute; top: 0.75rem; right: 0.75rem;
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--text4); letter-spacing: 0.1em;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-r);
  padding: 0.1rem 0.4rem; border-radius: 4px;
}

.tc-icon {
  width: 60px; height: 60px;
  border: 2px solid var(--tc, var(--red));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--tc, var(--red));
  margin: 0 auto 0.9rem;
  background: rgba(204,51,0,0.08);
  box-shadow: 0 0 16px color-mix(in srgb, var(--tc) 25%, transparent);
}

.team-card h4 {
  font-family: var(--font-display); font-size: 0.8rem;
  color: var(--text1); margin-bottom: 0.5rem; line-height: 1.3;
}

.team-card p { font-size: 0.88rem; color: var(--text2); margin-bottom: 0.9rem; line-height: 1.6; }

.tc-skills { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; }

.tc-skills span {
  padding: 0.15rem 0.5rem;
  background: rgba(255,100,0,0.07);
  border: 1px solid rgba(255,100,0,0.15);
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 0.68rem; color: var(--text4);
}

/* ---- BOOKS ---- */
.books-section { background: var(--bg0); }

.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }

.book-card {
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--r);
  padding: 1.25rem;
  display: flex; gap: 1.1rem;
  transition: var(--t);
}

.book-card:hover {
  border-color: rgba(255,153,0,0.3);
  transform: translateY(-3px);
  box-shadow: var(--glow-r);
}

.bk-icon {
  flex-shrink: 0; width: 70px; height: 100px;
  background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(255,100,0,0.1));
  border: 1px solid var(--bc, var(--red));
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.3rem;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.5), 0 0 12px color-mix(in srgb, var(--bc) 20%, transparent);
}

.bk-icon i { font-size: 1.3rem; color: var(--bc); }

.bk-icon span {
  font-family: var(--font-display); font-size: 0.55rem;
  color: var(--bc); letter-spacing: 0.1em;
}

.bk-body { flex: 1; min-width: 0; }

.bk-body h4 {
  font-family: var(--font-display); font-size: 0.82rem;
  color: var(--text1); margin-bottom: 0.3rem; line-height: 1.3;
}

.bk-auth {
  font-family: var(--font-mono); font-size: 0.73rem;
  color: var(--text3); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.3rem;
}

.bk-desc { font-size: 0.88rem; color: var(--text2); margin-bottom: 0.6rem; line-height: 1.65; }

.bk-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.7rem; }

.bk-tags span {
  padding: 0.15rem 0.5rem;
  background: rgba(204,51,0,0.07);
  border: 1px solid rgba(204,51,0,0.15);
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 0.67rem; color: var(--text4);
}

.bk-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255,153,0,0.07);
  border: 1px solid rgba(255,153,0,0.22);
  border-radius: 5px;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--amber); letter-spacing: 0.08em; text-transform: uppercase;
  transition: var(--t);
}

.bk-btn:hover {
  background: rgba(255,153,0,0.14);
  color: var(--gold);
  transform: translateY(-1px);
}

/* ---- FYP ---- */
.fyp-section { background: linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%); }

.fyp-wrap {
  max-width: 920px; margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border-r);
  border-radius: var(--rl); overflow: hidden;
}

.fyp-top {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(204,51,0,0.07), rgba(255,153,0,0.04));
  border-bottom: 1px solid var(--border-r);
}

.fv-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0,200,50,0.1);
  border: 1px solid rgba(0,200,50,0.3);
  border-radius: 100px;
  font-family: var(--font-display); font-size: 0.75rem;
  color: #00cc44; margin-bottom: 0.75rem;
}

.fyp-verdict-box h3 {
  font-family: var(--font-display); font-size: 1.1rem;
  color: var(--text1); margin-bottom: 0.6rem;
}

.fyp-verdict-box p { font-size: 0.9rem; color: var(--text2); line-height: 1.7; }
.fyp-verdict-box p strong { color: var(--text1); }

.fyp-score-box { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.score-ring { position: relative; width: 100px; height: 100px; }
.score-ring svg { width: 100%; height: 100%; }

.score-arc { stroke-dashoffset: 264; transition: stroke-dashoffset 1.5s ease; }
.score-arc.animated { stroke-dashoffset: 26; }

.score-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  display: flex; align-items: baseline; gap: 1px;
}

.score-num { font-family: var(--font-display); font-size: 1.7rem; color: var(--amber); line-height: 1; }
.score-pct { font-family: var(--font-display); font-size: 0.9rem; color: var(--amber); }

.fyp-score-box p { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text4); letter-spacing: 0.1em; text-align: center; }

.fyp-grid { display: grid; grid-template-columns: 1fr 1fr; }

.fyp-item {
  display: flex; gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-r);
  border-right: 1px solid var(--border-r);
  transition: var(--t);
}

.fyp-item:nth-child(2n) { border-right: none; }
.fyp-item:nth-last-child(-n+2) { border-bottom: none; }
.fyp-item:hover { background: rgba(255,100,0,0.03); }

.fi-icon {
  width: 36px; height: 36px;
  background: rgba(204,51,0,0.1);
  border: 1px solid rgba(204,51,0,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--amber); flex-shrink: 0;
}

.fyp-item h5 { font-family: var(--font-display); font-size: 0.78rem; color: var(--text1); margin-bottom: 0.3rem; }
.fyp-item p { font-size: 0.88rem; color: var(--text2); line-height: 1.65; }

/* ---- FOOTER ---- */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border-r);
  padding: 3rem 2rem;
}

.footer-inner { max-width: 800px; margin: 0 auto; text-align: center; }

.footer-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: 1.2rem;
  color: var(--red-hot); margin-bottom: 0.4rem;
}

.footer-brand i { font-size: 1.1rem; }

.footer-sub { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text3); margin-bottom: 1rem; }

.classify-footer {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--red); letter-spacing: 0.2em;
  border: 1px solid rgba(204,51,0,0.3);
  padding: 0.25rem 1rem; border-radius: 4px;
  margin-bottom: 1.25rem;
}

.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.25rem; }

.footer-nav a {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text4); letter-spacing: 0.12em; text-transform: uppercase;
}

.footer-nav a:hover { color: var(--amber); }

/* Footer Social Section */
.footer-section {
  margin: 1.5rem 0;
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--red-hot);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(204, 51, 0, 0.1);
  border: 1px solid rgba(204, 51, 0, 0.3);
  border-radius: 8px;
  color: var(--amber);
  font-size: 1.1rem;
  transition: var(--t);
}

.footer-social a:hover {
  background: rgba(204, 51, 0, 0.25);
  border-color: var(--red-hot);
  color: var(--red-hot);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(255, 68, 0, 0.3);
}

/* Back to Portfolio Button */
.btn-back-portfolio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(204, 51, 0, 0.15), rgba(255, 102, 0, 0.1));
  border: 1px solid rgba(204, 51, 0, 0.4);
  border-radius: 8px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: var(--t);
  margin: 1rem 0;
}

.btn-back-portfolio:hover {
  background: linear-gradient(135deg, rgba(204, 51, 0, 0.3), rgba(255, 102, 0, 0.2));
  border-color: var(--red-hot);
  color: var(--red-hot);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 68, 0, 0.35);
}

.btn-back-portfolio i {
  transition: var(--t);
}

.btn-back-portfolio:hover i {
  transform: translateX(-3px);
}

.footer-copy { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text4); }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ---- TOUCH INTERACTIONS ---- */
.touch-hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* ---- SCROLLABLE TABLE INDICATOR ---- */
.scrollable-table {
  position: relative;
}

.scrollable-table::after {
  content: '→';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255,100,0,0.2));
  padding: 0.5rem;
  color: var(--amber);
  font-size: 1.2rem;
  pointer-events: none;
  animation: pulseArrow 2s ease-in-out infinite;
}

@keyframes pulseArrow {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) translateX(0); }
  50% { opacity: 1; transform: translateY(-50%) translateX(4px); }
}

/* ---- ACCESSIBILITY IMPROVEMENTS ---- */
@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 for better keyboard navigation */
a:focus, button:focus, .flow-node:focus, .team-card:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-r: rgba(255,255,255,0.5);
    --border-a: rgba(255,200,100,0.5);
  }
  
  .ov-card, .team-card, .flow-node {
    border-width: 2px;
  }
}

/* ---- RESPONSIVE ---- */

/* ==== LARGE TABLETS & SMALL LAPTOPS (1024px) ==== */
@media (max-width: 1024px) {
  .hero-missile-wrap { right: 2%; }
  .missile-svg { width: 90px; }
  .hero-radar { width: 440px; height: 440px; right: -80px; }
  .tl-outer { width: 130px; height: 130px; }
  .tl-inner { width: 70px; height: 70px; }
  
  /* Missile Types Section */
  .range-table { min-width: 650px; }
  .phases-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Structural Design Section */
  .design-category h3 { font-size: 1.3rem !important; }
  
  /* Automation Section */
  .automation-category h3 { font-size: 1.3rem !important; }
}

/* ==== TABLETS (768px) ==== */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links {
    display: none; position: fixed;
    top: 66px; left: 0; right: 0;
    background: rgba(8,5,0,0.98);
    flex-direction: column; padding: 0.75rem;
    border-bottom: 1px solid var(--border-r); gap: 0.15rem;
    max-height: calc(100vh - 66px);
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }

  .hero { flex-direction: column; padding: 90px 1.5rem 60px; }
  .hero-missile-wrap { position: static; transform: none; margin: 0 auto; }
  .missile-svg { width: 80px; }
  .hero-radar { display: none; }
  .target-lock { display: none; }
  .trajectory-line { display: none; }

  .detail-panel { grid-template-columns: 1fr; }
  .dp-img { height: 150px; }

  .fyp-top { grid-template-columns: 1fr; }
  .fyp-grid { grid-template-columns: 1fr; }
  .fyp-item:nth-child(2n) { border-right: 1px solid var(--border-r); }
  .fyp-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border-r); }
  .fyp-item:last-child { border-bottom: none; }

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

  .footer-social a {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .btn-back-portfolio {
    padding: 0.65rem 1.25rem;
    font-size: 0.75rem;
  }
  
  /* ==== MISSILE TYPES SECTION ==== */
  .range-table-wrap { overflow-x: auto; }
  .range-table { min-width: 600px; font-size: 0.85rem; }
  .range-table th, .range-table td { padding: 0.75rem 0.5rem; }
  
  .phases-grid { grid-template-columns: 1fr; gap: 1rem; }
  .phase-card { padding: 1.25rem !important; }
  
  .specs-grid { grid-template-columns: 1fr; }
  .spec-card { padding: 1.25rem !important; }
  
  /* ==== STRUCTURAL DESIGN SECTION ==== */
  .design-category { margin-top: 2rem !important; }
  .design-category > h3 { 
    font-size: 1.25rem !important; 
    flex-direction: column;
    text-align: center;
  }
  
  .design-category .design-category > div {
    grid-template-columns: 1fr !important;
  }
  
  /* Nose cone table */
  .design-category table { min-width: 550px; font-size: 0.8rem; }
  .design-category table th, .design-category table td { padding: 0.6rem 0.4rem; }
  
  /* Assembly procedure */
  .design-category ol { padding-left: 1.2rem; }
  .design-category li { font-size: 0.9rem; }
  
  /* ==== AUTOMATION SECTION ==== */
  .automation-category { margin-top: 2rem !important; }
  .automation-category > h3 { 
    font-size: 1.25rem !important;
    flex-direction: column;
    text-align: center;
  }
  
  .automation-category .automation-category > div {
    grid-template-columns: 1fr !important;
  }
  
  /* Sensor tables */
  .automation-category table { font-size: 0.8rem; }
  .automation-category table td { padding: 0.25rem; }
  
  /* PID control */
  .automation-category .automation-category > div > div {
    grid-template-columns: 1fr !important;
  }
  
  /* Code blocks */
  .automation-category code { font-size: 0.75rem !important; }
  .automation-category .automation-category pre { overflow-x: auto; }
  
  /* Sensor fusion diagram */
  .automation-category .automation-category > div > div > div {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* References section */
  .references-grid { grid-template-columns: 1fr !important; }
  .ref-category { padding: 1.25rem !important; }
  .ref-category ul li { font-size: 0.85rem; }
  
  /* Online resources */
  .online-resources > div {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ==== MOBILE PHONES (480px) ==== */
@media (max-width: 480px) {
  html { font-size: 14px; }
  
  .title-line-2 { font-size: 2rem; }
  .hero-btns { flex-direction: column; }
  .hero-stats { gap: 0.75rem; }
  .team-grid { grid-template-columns: 1fr; }
  .cost-table td, .cost-table th { padding: 0.6rem 0.75rem; font-size: 0.78rem; }
  .flow-node { flex-wrap: wrap; gap: 0.6rem; }

  .footer-social {
    gap: 0.5rem;
  }

  .footer-social a {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }

  .footer-section h3 {
    font-size: 0.9rem;
  }

  .btn-back-portfolio {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  /* ==== GENERAL MOBILE ADJUSTMENTS ==== */
  .section { padding: 60px 0; }
  .container { padding: 0 1rem; }
  
  .section-header h2 { font-size: 1.5rem !important; }
  .section-header p { font-size: 0.95rem; }
  
  /* Hero section */
  .hero { padding: 80px 1rem 40px; }
  .hero-title { gap: 0.05rem; }
  .title-line-1 { font-size: 1rem; }
  .title-line-2 { font-size: 1.8rem; }
  .title-line-3 { font-size: 0.8rem; }
  .hero-tagline { font-size: 0.75rem; }
  .hero-desc { font-size: 0.9rem; }
  .hero-btns { gap: 0.75rem; }
  .btn-primary, .btn-ghost { 
    padding: 0.65rem 1.25rem; 
    font-size: 0.7rem;
    width: 100%;
    justify-content: center;
  }
  .hero-stats { justify-content: center; }
  .s-val { font-size: 1.5rem; }
  .s-lbl { font-size: 0.6rem; }
  
  /* Overview grid */
  .overview-grid { grid-template-columns: 1fr; }
  .ov-card { padding: 1.5rem 1.25rem; }
  
  /* Flowchart */
  .flow-node { padding: 1rem; }
  .fn-icon { width: 38px; height: 38px; }
  .fn-text h3 { font-size: 0.8rem; }
  .fn-text p { font-size: 0.8rem; }
  
  /* Timeline */
  .tl-item { padding: 1rem; gap: 1rem; }
  .tl-num { font-size: 1.2rem; min-width: 35px; }
  .tl-title { font-size: 0.8rem; }
  .tl-days { font-size: 0.7rem; }
  .tl-body p { font-size: 0.85rem; }
  
  /* Cost table */
  .cost-table { font-size: 0.75rem; }
  .cost-table th { font-size: 0.6rem; }
  .cost-table td { padding: 0.5rem 0.4rem; }
  
  /* Team cards */
  .team-card { padding: 1.5rem 1rem; }
  .tc-icon { width: 50px; height: 50px; font-size: 1.2rem; }
  .team-card h4 { font-size: 0.75rem; }
  .team-card p { font-size: 0.8rem; }
  .tc-skills span { font-size: 0.6rem; }
  
  /* FYP section */
  .fyp-wrap { border-radius: 10px; }
  .fyp-top { padding: 1.5rem; }
  .fv-badge { font-size: 0.65rem; padding: 0.3rem 0.75rem; }
  .fyp-verdict-box h3 { font-size: 1rem; }
  .fyp-verdict-box p { font-size: 0.85rem; }
  .score-ring { width: 80px; height: 80px; }
  .score-num { font-size: 1.4rem; }
  .fyp-item { padding: 1rem; gap: 0.75rem; }
  .fi-icon { width: 32px; height: 32px; font-size: 0.8rem; }
  .fyp-item h5 { font-size: 0.72rem; }
  .fyp-item p { font-size: 0.8rem; }
  
  /* ==== MISSILE TYPES SECTION ==== */
  .range-table { min-width: 500px; font-size: 0.75rem; }
  .range-table th { padding: 0.5rem 0.3rem; }
  .range-table td { padding: 0.5rem 0.3rem; }
  
  .phase-card { padding: 1rem !important; }
  .phase-card h4 { font-size: 0.9rem; }
  .phase-card p { font-size: 0.85rem; }
  .phase-card ul { font-size: 0.8rem; }
  .phase-card > div { 
    width: 40px !important; 
    height: 40px !important;
    font-size: 1.2rem !important;
  }
  
  .spec-card { padding: 1rem !important; }
  .spec-card h4 { font-size: 0.9rem; }
  .spec-card p { font-size: 0.85rem; }
  .spec-card > div { padding: 0.5rem; font-size: 0.8rem; }
  
  /* ==== STRUCTURAL DESIGN SECTION ==== */
  .design-category > div {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .design-category > div > div {
    padding: 1rem !important;
  }
  
  .design-category h4 { font-size: 0.9rem !important; }
  .design-category ul { font-size: 0.85rem; line-height: 1.8; }
  .design-category table { min-width: 450px; font-size: 0.7rem; }
  .design-category table th, .design-category table td { padding: 0.5rem 0.3rem; }
  
  .design-category .mat-grid { 
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  
  .design-category .mat-item { padding: 0.75rem !important; }
  .design-category .mat-tag { font-size: 0.55rem; }
  .design-category .mat-item strong { font-size: 0.7rem; }
  .design-category .mat-item p { font-size: 0.75rem; }
  
  /* Assembly procedure boxes */
  .design-category .design-category > div > div > div {
    padding: 1rem !important;
  }
  .design-category .design-category > div > div > div h4 {
    font-size: 0.9rem !important;
  }
  .design-category ol { 
    padding-left: 1rem;
    font-size: 0.85rem;
  }
  .design-category li { 
    line-height: 1.8 !important;
    font-size: 0.85rem;
  }
  
  /* Code blocks in design section */
  .design-category code { 
    font-size: 0.7rem !important;
    word-break: break-all;
  }
  
  /* Info boxes */
  .design-category > div > div > div[style*="border-left"] {
    padding: 0.75rem !important;
  }
  .design-category > div > div > div[style*="border-left"] strong {
    font-size: 0.8rem !important;
  }
  .design-category > div > div > div[style*="border-left"] p,
  .design-category > div > div > div[style*="border-left"] code {
    font-size: 0.75rem !important;
  }
  
  /* ==== AUTOMATION SECTION ==== */
  .automation-category > div {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .automation-category > div > div {
    padding: 1rem !important;
  }
  
  .automation-category h4 { font-size: 0.9rem !important; }
  .automation-category p { font-size: 0.85rem; }
  .automation-category ul { font-size: 0.85rem; }
  .automation-category table { font-size: 0.75rem; }
  .automation-category table td { padding: 0.3rem 0.2rem; }
  
  /* STM32 recommendation box */
  .automation-category > div > div[style*="rgba(0,50,100"] {
    padding: 1rem !important;
  }
  .automation-category > div > div[style*="rgba(0,50,100"] h4 {
    font-size: 0.9rem !important;
  }
  .automation-category > div > div[style*="rgba(0,50,100"] > div {
    grid-template-columns: 1fr 1fr !important;
  }
  .automation-category > div > div[style*="rgba(0,50,100"] strong {
    font-size: 0.8rem !important;
  }
  .automation-category > div > div[style*="rgba(0,50,100"] p {
    font-size: 0.8rem !important;
  }
  
  /* Sensor fusion diagram */
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] > div {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] > div > div {
    padding: 0.75rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] i {
    font-size: 1.5rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] p {
    font-size: 0.75rem !important;
  }
  
  /* PID tuning guide */
  .automation-category .automation-category > div > div[style*="rgba(0,50,100,0.15)"] > div {
    grid-template-columns: 1fr !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(0,50,100,0.15)"] h5 {
    font-size: 0.85rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(0,50,100,0.15)"] p {
    font-size: 0.8rem !important;
  }
  
  /* Code blocks */
  .automation-category pre, 
  .automation-category div[style*="rgba(0,0,0,0.3)"] {
    padding: 0.6rem !important;
    overflow-x: auto;
  }
  .automation-category code { 
    font-size: 0.65rem !important;
    word-break: break-all;
  }
  
  /* Launch detection section */
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] {
    padding: 1rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] > div {
    grid-template-columns: 1fr !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] h5 {
    font-size: 0.85rem !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] p {
    font-size: 0.8rem !important;
  }
  
  /* Development environment */
  .automation-category .automation-category > div > div[style*="rgba(0,50,100,0.15)"] > div {
    grid-template-columns: 1fr 1fr !important;
  }
  
  /* Ground station software */
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] > div {
    grid-template-columns: 1fr 1fr !important;
  }
  .automation-category .automation-category > div > div[style*="rgba(255,255,255,0.03)"] > div > div {
    padding: 0.75rem !important;
  }
  
  /* ==== REFERENCES SECTION ==== */
  .references-grid { 
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .ref-category { 
    padding: 1rem !important;
  }
  
  .ref-category h4 { 
    font-size: 0.9rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  .ref-category ul li { 
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .ref-category ul li span {
    font-size: 0.7rem;
  }
  
  /* Online resources */
  .online-resources > div {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
  .online-resources > div > div {
    padding: 0.75rem !important;
  }
  .online-resources > div > div a {
    font-size: 0.85rem;
  }
  
  /* Academic disclaimer */
  .academic-disclaimer {
    padding: 1rem !important;
  }
  .academic-disclaimer p {
    font-size: 0.85rem !important;
  }
  
  /* Contact form */
  #contactForm {
    gap: 0.75rem !important;
  }
  #contactForm input,
  #contactForm textarea {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.9rem !important;
  }
  #contactForm button {
    padding: 0.75rem !important;
    font-size: 0.85rem !important;
  }
}

/* ==== EXTRA SMALL PHONES (360px) ==== */
@media (max-width: 360px) {
  html { font-size: 13px; }
  
  .title-line-2 { font-size: 1.5rem; }
  .hero-btns { gap: 0.5rem; }
  
  .overview-grid { gap: 1rem; }
  .ov-card { padding: 1.25rem 1rem; }
  
  .team-grid { gap: 1rem; }
  
  .range-table { min-width: 400px; font-size: 0.7rem; }
  
  .phase-card, .spec-card { padding: 0.9rem !important; }
  .phase-card h4, .spec-card h4 { font-size: 0.85rem; }
  .phase-card p, .spec-card p { font-size: 0.8rem; }
  
  .design-category table { min-width: 400px; }
  .automation-category table { min-width: 350px; }
  
  .footer-social a {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
}

/* ==== LANDSCAPE ORIENTATION ==== */
@media (max-width: 896px) and (orientation: landscape) {
  .hero { min-height: 100vh; padding-top: 80px; }
  .hero-content { max-width: 100%; text-align: center; }
  .hero-desc { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-missile-wrap { 
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
  }
  .missile-svg { width: 70px; }
}

/* ==== PRINT STYLES ==== */
@media print {
  .navbar, .hero-missile-wrap, .hero-radar, .scanlines, .noise-overlay,
  .scroll-hint, #scroll-progress, .hamburger, .footer-social,
  .btn-back-portfolio { display: none !important; }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .section { padding: 20px 0; }
  
  a { color: black; text-decoration: underline; }
  
  .flow-node, .tl-item, .ov-card, .team-card, .book-card,
  .phase-card, .spec-card, .ref-category {
    break-inside: avoid;
    border: 1px solid #ccc;
  }
}
