/* ============================================
   Mohammad Ammar Portfolio — Design System
   Institutional Analytics Command Center
   ============================================ */

:root {
  --bg: #071018;
  --surface: #0d1721;
  --card: #101c28;
  --card-hover: #152232;
  --primary: #4ade80;
  --primary-dim: rgba(74, 222, 128, 0.15);
  --secondary: #22d3ee;
  --secondary-dim: rgba(34, 211, 238, 0.12);
  --highlight: #818cf8;
  --highlight-dim: rgba(129, 140, 248, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(74, 222, 128, 0.3);
  --glass: rgba(16, 28, 40, 0.65);
  --glass-border: rgba(255, 255, 255, 0.06);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --radius-lg: 20px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', var(--font-body);
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
}

*, *::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-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.loading {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.text-accent { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-highlight { color: var(--highlight); }

/* ============================================
   Loading Screen
   ============================================ */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
}

.loader-ring {
  width: 56px;
  height: 56px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}

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

.loader-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.loader-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.loader-progress {
  width: 200px;
  height: 2px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.1s ease;
}

/* ============================================
   Scroll Progress
   ============================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--highlight));
  z-index: 9999;
  transition: width 0.05s linear;
}

/* ============================================
   Mouse Glow
   ============================================ */

.mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
  opacity: 0;
}

body.hero-visible .mouse-glow {
  opacity: 1;
}

/* ============================================
   Navigation
   ============================================ */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
}

.nav-header.scrolled {
  background: rgba(7, 16, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-dim);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.logo-text {
  display: none;
}

@media (min-width: 640px) {
  .logo-text { display: inline; }
}

.nav-links {
  display: none;
  list-style: none;
  align-items: center;
  gap: 8px;
}

.nav-links.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(7, 16, 24, 0.95);
  backdrop-filter: blur(20px);
  padding: 24px;
  border-bottom: 1px solid var(--border);
  gap: 4px;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    border: none;
  }
}

.nav-links a {
  padding: 8px 16px;
  font-size: 0.875rem;
  color: var(--muted);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  background: var(--primary-dim) !important;
  color: var(--primary) !important;
  border: 1px solid var(--border-hover) !important;
}

.nav-cta:hover {
  background: rgba(74, 222, 128, 0.25) !important;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #3ecf70;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

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

.btn-secondary:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  transform: translateY(-2px);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid var(--border-hover);
}

.btn-sm:hover {
  background: rgba(74, 222, 128, 0.25);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
}

/* ============================================
   Section Shared
   ============================================ */

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

.section-header {
  margin-bottom: 56px;
  max-width: 640px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
  z-index: 0;
}

.hero-environment {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.float-card {
  position: absolute;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: float 8s ease-in-out infinite;
}

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

.kpi-card {
  padding: 12px 16px;
  min-width: 130px;
}

.kpi-label {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.kpi-1 { top: 18%; left: 5%; animation-delay: 0s; }
.kpi-2 { top: 12%; right: 8%; animation-delay: -2s; }
.kpi-3 { bottom: 28%; left: 3%; animation-delay: -4s; }
.kpi-4 { bottom: 22%; right: 5%; animation-delay: -1s; }

.sql-terminal {
  top: 30%;
  right: 12%;
  width: 280px;
  animation-delay: -3s;
  display: none;
}

@media (min-width: 1100px) {
  .sql-terminal { display: block; }
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: var(--primary); }

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.terminal-body {
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.5;
  color: var(--secondary);
  min-height: 80px;
  overflow: hidden;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--primary);
}

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

.bi-card {
  top: 55%;
  left: 8%;
  padding: 12px;
  width: 140px;
  animation-delay: -5s;
  display: none;
}

@media (min-width: 900px) {
  .bi-card { display: block; }
}

.bi-header {
  font-size: 0.65rem;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bi-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 50px;
}

.bi-bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--primary), var(--secondary));
  border-radius: 3px 3px 0 0;
  opacity: 0.7;
  animation: barPulse 3s ease-in-out infinite;
}

.bi-bar:nth-child(2) { animation-delay: 0.3s; }
.bi-bar:nth-child(3) { animation-delay: 0.6s; }
.bi-bar:nth-child(4) { animation-delay: 0.9s; }
.bi-bar:nth-child(5) { animation-delay: 1.2s; }

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

.chart-widget {
  top: 20%;
  left: 15%;
  width: 160px;
  padding: 8px;
  animation-delay: -2.5s;
  display: none;
}

@media (min-width: 1200px) {
  .chart-widget { display: block; }
}

.mini-chart {
  width: 100%;
  height: auto;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#chartGradient);
  opacity: 0.15;
}

.cohort-heatmap {
  bottom: 15%;
  right: 15%;
  padding: 8px;
  animation-delay: -6s;
  display: none;
}

@media (min-width: 1000px) {
  .cohort-heatmap { display: block; }
}

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

.heat-cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  animation: heatPulse 4s ease-in-out infinite;
}

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

.network-graph {
  top: 45%;
  right: 25%;
  width: 100px;
  padding: 8px;
  animation-delay: -4.5s;
  display: none;
}

@media (min-width: 1300px) {
  .network-graph { display: block; }
}

.net-edge {
  stroke: var(--border);
  stroke-width: 1;
}

.net-node {
  fill: var(--muted);
}

.net-node.primary { fill: var(--primary); }
.net-node.secondary { fill: var(--secondary); }

.network-svg {
  animation: networkPulse 6s ease-in-out infinite;
}

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

.dashboard-grid {
  bottom: 35%;
  left: 20%;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 8px;
  animation-delay: -1.5s;
  display: none;
}

@media (min-width: 1400px) {
  .dashboard-grid { display: grid; }
}

.dash-cell {
  width: 28px;
  height: 20px;
  background: var(--surface);
  border-radius: 3px;
  border: 1px solid var(--border);
}

.dash-cell.active {
  background: var(--primary-dim);
  border-color: var(--border-hover);
  animation: dashBlink 3s ease-in-out infinite;
}

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

/* Ticker */
.ticker-wrap {
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 2;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.ticker {
  display: flex;
  gap: 32px;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}

.ticker span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.ticker-dot {
  color: var(--primary) !important;
  font-size: 0.5rem !important;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Live Metrics */
.live-metrics {
  position: absolute;
  top: calc(var(--nav-height) + 16px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  z-index: 2;
  padding: 8px 20px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  display: none;
}

@media (min-width: 768px) {
  .live-metrics { display: flex; }
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.metric-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.metric-dot.live {
  background: var(--primary);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.metric-value {
  color: var(--text);
  font-weight: 500;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 3;
  padding: 60px 0 120px;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--primary-dim);
  border: 1px solid var(--border-hover);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero-title {
  margin-bottom: 16px;
}

.hero-greeting {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-headline {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--primary);
  line-height: 1.3;
}

.hero-tags {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--secondary);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-desc {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 560px;
}

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

.hero-profile {
  display: flex;
}

.profile-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  object-fit: cover;
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.15);
}

@media (min-width: 640px) {
  .profile-img {
    width: 100px;
    height: 100px;
  }
}

/* Hide floating cards on mobile */
@media (max-width: 767px) {
  .kpi-card { display: none; }
}

@media (max-width: 899px) {
  .kpi-3, .kpi-4 { display: none; }
}

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

.about {
  background: var(--surface);
}

.about-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.about-story p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 24px;
}

.focus-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.focus-list li {
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: border-color var(--transition), transform var(--transition);
}

.focus-list li:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--highlight));
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

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

.timeline-marker {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 13px;
  height: 13px;
  background: var(--bg);
  border: 2px solid var(--primary);
  border-radius: 50%;
}

.timeline-content {
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

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

.timeline-step {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--muted);
}

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

.skills-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.skill-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

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

.skill-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

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

.skill-tags span {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--muted);
  transition: all var(--transition);
}

.skill-card:hover .skill-tags span {
  border-color: rgba(74, 222, 128, 0.2);
}

/* ============================================
   Projects Section
   ============================================ */

.projects {
  background: var(--surface);
}

.projects-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

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

.project-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image-wrap img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 16, 24, 0.6), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-body {
  padding: 24px;
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.project-body > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.project-impact {
  padding: 12px;
  background: var(--primary-dim);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.project-impact strong {
  color: var(--primary);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-tech span {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--secondary);
}

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

.experience-card {
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--highlight), var(--secondary), var(--primary));
}

.confidential-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--highlight-dim);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--highlight);
  margin-bottom: 20px;
}

.experience-note {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  font-style: italic;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.experience-tags span {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.experience-tags span:hover {
  border-color: var(--highlight);
  color: var(--highlight);
}

/* ============================================
   Focus Section
   ============================================ */

.focus {
  background: var(--surface);
}

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

@media (min-width: 640px) {
  .focus-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.focus-card {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: default;
}

.focus-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74, 222, 128, 0.1);
}

/* ============================================
   Readiness Section
   ============================================ */

.readiness-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .readiness-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .readiness-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.readiness-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

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

.readiness-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.readiness-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 8px;
}

.readiness-card p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ============================================
   Analytics Lab
   ============================================ */

.lab {
  background: var(--surface);
}

.lab-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 640px) {
  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .lab-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.lab-card {
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

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

.lab-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--primary-dim) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
}

.lab-card:hover .lab-glow {
  opacity: 1;
}

.lab-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 12px;
  position: relative;
}

.lab-card p {
  font-size: 0.9rem;
  color: var(--muted);
  position: relative;
}

/* ============================================
   Career Mission / Roadmap
   ============================================ */

.roadmap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 40px 0;
}

@media (min-width: 768px) {
  .roadmap {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
  }
}

.roadmap-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
}

.roadmap-node {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  margin-bottom: 12px;
  transition: all var(--transition);
}

.roadmap-step.active .roadmap-node {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.4);
}

.roadmap-label {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 120px;
}

.roadmap-step.active .roadmap-label {
  color: var(--primary);
  font-weight: 500;
}

.roadmap-connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--primary), var(--border));
}

@media (min-width: 768px) {
  .roadmap-connector {
    width: 48px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--border));
    align-self: center;
    margin-bottom: 28px;
  }
}

/* ============================================
   Resume Section
   ============================================ */

.resume-section {
  background: var(--surface);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.resume-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card);
}

.resume-preview iframe {
  width: 100%;
  height: 600px;
  border: none;
}

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

.contact-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.contact-opportunity {
  color: var(--primary);
  font-weight: 500;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.contact-item a {
  color: var(--text);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.contact-item a:hover {
  color: var(--primary);
}

.copy-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  font-size: 0.75rem;
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: rgba(74, 222, 128, 0.25);
}

.copy-btn.copied {
  color: var(--secondary);
  border-color: var(--secondary);
}

.contact-form {
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

.form-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  background: var(--primary-dim);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  color: var(--primary);
}

.form-success svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.form-success p {
  font-size: 0.9rem;
}

#submitBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

@media (min-width: 768px) {
  .footer-links {
    justify-content: flex-end;
  }
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.back-to-top {
  color: var(--primary);
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Reduced Motion
   ============================================ */

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
