/* ================================================================
   NIKHIL SANKHLA — PORTFOLIO CSS
   Dark-first cybersecurity portfolio
================================================================ */

/* === CSS VARIABLES === */
:root {
  /* Dark theme (default) */
  --bg-primary: #060b14;
  --bg-secondary: #0a1628;
  --bg-tertiary: #0d1e38;
  --surface: #111827;
  --surface-elevated: #1a2742;
  --surface-hover: #1f3050;
  --border: #1e3a5f;
  --border-subtle: #162d4a;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-hover: #00b8e0;
  --accent-2: #8b5cf6;
  --accent-2-dim: rgba(139, 92, 246, 0.15);
  --accent-3: #10b981;
  --accent-3-dim: rgba(16, 185, 129, 0.15);
  --accent-warn: #f59e0b;
  --accent-red: #ef4444;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 24px rgba(0, 212, 255, 0.2);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;

  --nav-height: 70px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8f0fe;
  --surface: #ffffff;
  --surface-elevated: #f8fafc;
  --surface-hover: #f1f5f9;
  --border: #cbd5e1;
  --border-subtle: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #0077b6;
  --accent-dim: rgba(0, 119, 182, 0.12);
  --accent-hover: #005f99;
  --accent-2: #7c3aed;
  --accent-2-dim: rgba(124, 58, 237, 0.12);
  --accent-3: #059669;
  --accent-3-dim: rgba(5, 150, 105, 0.12);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 24px rgba(0, 119, 182, 0.15);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

body.loading { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

::selection { background: var(--accent-dim); color: var(--accent); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.section-label span { color: var(--accent-2); }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

.section-cta { text-align: center; margin-top: 2.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.ml-2 { margin-left: 0.5rem; }
.accent-text { color: var(--accent); }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 600; }
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-elevated);
  color: var(--accent);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}

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

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
}
.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}
.btn-full { width: 100%; justify-content: center; }

/* === LOADING SCREEN === */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }

.loader-content { text-align: center; }
.loader-terminal {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.loader-prompt { color: var(--accent); }
.loader-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}
.loader-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.1s ease;
}

/* === SCROLL PROGRESS === */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1001;
  background: transparent;
}
#scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent);
}

/* === NAVBAR === */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition);
  background: transparent;
}

#navbar.scrolled {
  background: rgba(6, 11, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}
[data-theme="light"] #navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.logo-bracket { color: var(--accent-2); }
.logo-name { color: var(--text-primary); }
.logo-at { color: var(--accent); margin: 0 1px; }
.logo-host { color: var(--accent-3); }
.logo-cursor {
  color: var(--accent);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0.8;
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

#theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid var(--border);
}
#theme-toggle:hover {
  color: var(--accent-warn);
  border-color: var(--accent-warn);
  background: rgba(245, 158, 11, 0.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  margin-left: auto;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-toggle.open .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .hamburger-line:nth-child(2) { opacity: 0; }
.nav-toggle.open .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === FLOATING BUTTONS === */
#scroll-top {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all var(--transition);
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#scroll-top:hover {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent);
}

#theme-toggle-float {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  transition: all var(--transition);
  display: none;
}

/* === PAGE HERO === */
.page-hero {
  position: relative;
  padding: calc(var(--nav-height) + 4rem) 0 3.5rem;
  overflow: hidden;
  background: var(--bg-secondary);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-subtle);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0.5rem 0 0.75rem;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb i { font-size: 0.65rem; }

/* === HERO SECTION === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
#matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}
.hero-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, var(--bg-primary) 100%);
}

.hero-container {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-top: calc(var(--nav-height) + 5rem);
  padding-bottom: 6rem;
}

.hero-greeting {
  display: none;
}
.terminal-prompt { color: var(--accent); }

.hero-name {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.name-line { display: block; }
.name-line.accent-text { color: var(--accent); }

.hero-roles {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  min-height: 2em;
}
.role-static { color: var(--text-muted); }
.typed-roles { color: var(--text-primary); font-weight: 600; }
.typed-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
  font-weight: 400;
}

.hero-bio {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero-bio strong { color: var(--text-primary); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-social a {
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.hero-social a:hover { color: var(--accent); transform: translateY(-2px); }
.social-line {
  flex: 1;
  max-width: 100px;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* Hero Terminal */
.hero-visual { display: flex; flex-direction: column; gap: 1.5rem; }

.hero-terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,212,255,0.05);
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 auto;
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
}
.t-line { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--text-secondary); min-width: 0; }
.t-blank { height: 0.5rem; }
.t-prompt { color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.t-cmd { color: var(--text-primary); }
.t-output { color: var(--text-secondary); padding-left: 1rem; margin-bottom: 0.25rem; }
.t-list { display: flex; flex-direction: column; gap: 0.15rem; }
.t-item { color: var(--accent-3); }
.t-item::before { content: '  '; }
.t-blink { animation: blink 0.8s step-end infinite; color: var(--accent); }
.t-error { color: var(--accent-red); }
.t-comment { color: var(--text-muted); }

/* Interactive terminal embedded in hero */
.hero-interactive-terminal {
  width: 100%;
}
.hero-interactive-terminal .terminal-output {
  height: 280px;
}
.hero-terminal-hint {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.hero-terminal-hint code { font-size: 0.75rem; }

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
  line-height: 1;
}
.stat-unit { color: var(--accent); font-weight: 700; font-size: 1.2rem; }
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero Scroll */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.scroll-arrow span {
  display: block;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  animation: scroll-chevron 1.5s ease-in-out infinite;
  opacity: 0;
}
.scroll-arrow span:nth-child(1) { animation-delay: 0s; }
.scroll-arrow span:nth-child(2) { animation-delay: 0.2s; }
.scroll-arrow span:nth-child(3) { animation-delay: 0.4s; }

/* === ABOUT PREVIEW === */
.about-preview { background: var(--bg-secondary); }
.about-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-preview-text p { color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8; }

.about-preview-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}
.info-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.info-card-icon {
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.info-card h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.info-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

/* === PROJECT CARDS === */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card-header {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.project-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-elevated), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.project-icon {
  font-size: 2.5rem;
  opacity: 0.2;
  color: var(--project-color, var(--accent));
}
.project-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-card-overlay { opacity: 1; }

.project-category-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  background: var(--surface);
  color: var(--accent);
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.project-card-body {
  padding: 1.25rem;
  flex: 1;
}
.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.project-title a:hover { color: var(--accent); }
.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* === SKILLS PREVIEW === */
.skills-preview { background: var(--bg-secondary); }
.skills-snapshot { display: flex; justify-content: center; }
.skill-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  max-width: 800px;
}
.skill-pill {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid;
  transition: all var(--transition);
}
.pill-cyan { color: var(--accent); border-color: rgba(0,212,255,0.3); background: rgba(0,212,255,0.06); }
.pill-cyan:hover { background: rgba(0,212,255,0.15); }
.pill-purple { color: var(--accent-2); border-color: rgba(139,92,246,0.3); background: rgba(139,92,246,0.06); }
.pill-purple:hover { background: rgba(139,92,246,0.15); }
.pill-green { color: var(--accent-3); border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.06); }
.pill-green:hover { background: rgba(16,185,129,0.15); }

/* === TECH BADGES === */
.tech-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  background: var(--surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.tech-badge:hover { border-color: var(--accent); color: var(--accent); }
.tech-badge-outline {
  background: transparent;
  border-color: var(--border);
}
.tech-more { color: var(--text-muted); }

/* === CTA SECTION === */
.cta-section { background: var(--bg-secondary); }
.cta-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 4rem 2rem;
  text-align: center;
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.cta-card h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}
.cta-card p { color: var(--text-secondary); max-width: 500px; margin: 0 auto 2rem; }
.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === INTERACTIVE TERMINAL === */
.terminal-section { background: var(--bg-primary); }
.terminal-wrapper { max-width: 800px; margin: 0 auto; }

.terminal {
  background: #0a0f1a;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 212, 255, 0.05);
}

.terminal-output {
  height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary);
  scroll-behavior: smooth;
}
.terminal-output::-webkit-scrollbar { width: 4px; }
.terminal-output::-webkit-scrollbar-track { background: transparent; }
.terminal-output::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  min-width: 0;
}
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  caret-color: var(--accent);
}
.terminal-input::placeholder { color: var(--text-muted); }

.terminal-actions {
  margin-left: auto;
  display: flex;
  gap: 0.25rem;
}
.t-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.t-action-btn:hover { color: var(--accent); background: var(--accent-dim); }

.terminal-hint {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.terminal-hint code { font-size: 0.8rem; }

/* Terminal output styles */
.t-output-block { margin: 0.15rem 0 0.15rem 0; }
.t-key { color: var(--accent); min-width: 140px; display: inline-block; }
.t-val { color: var(--text-secondary); }
.t-section-title { color: var(--accent-2); font-weight: 600; margin-top: 0.5rem; }
.t-item-green { color: var(--accent-3); }
.t-item-blue { color: var(--accent); }
.t-item-purple { color: var(--accent-2); }
.t-divider { color: var(--border); }
.t-success { color: var(--accent-3); }
.t-warn { color: var(--accent-warn); }
.t-info { color: var(--accent); }

/* === ABOUT PAGE === */
.about-section { background: var(--bg-primary); }
.about-main-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.profile-image-wrapper { text-align: center; margin-bottom: 1.5rem; position: relative; }
.profile-image-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  border: 2px solid var(--border);
}
.profile-initials {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}
.profile-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid;
  border-color: var(--accent) transparent var(--accent-2) transparent;
  animation: spin 8s linear infinite;
}
.ring-2 {
  inset: -18px;
  border-color: transparent var(--accent-2) transparent var(--accent-3);
  animation-duration: 12s;
  animation-direction: reverse;
}
.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--accent-3);
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-3);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
.profile-links { display: flex; flex-direction: column; gap: 0.5rem; }
.profile-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
  word-break: break-all;
}
.profile-link:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.profile-link i { width: 16px; color: var(--accent); flex-shrink: 0; }

.about-bio h2 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.bio-lead { font-size: 1.1rem; color: var(--text-primary); font-weight: 500; margin-bottom: 1rem; line-height: 1.7; }
.about-bio p { color: var(--text-secondary); margin-bottom: 0.875rem; line-height: 1.8; }
.about-bio strong { color: var(--text-primary); }
.wave { display: inline-block; animation: wave 2.5s ease-in-out infinite; transform-origin: 70% 70%; }

.bio-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
.highlight-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
}
.highlight-icon { color: var(--accent); font-size: 1rem; flex-shrink: 0; padding-top: 2px; }
.highlight-text h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.2rem; }
.highlight-text p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

.what-i-do { background: var(--bg-secondary); }
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition);
}
.expertise-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.expertise-icon {
  font-size: 1.5rem;
  color: var(--color, var(--accent));
  margin-bottom: 1rem;
  width: 48px;
  height: 48px;
  background: rgba(var(--color, 0,212,255), 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color, var(--accent)) 10%, transparent);
}
.expertise-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.expertise-card p { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.6; }
.expertise-list { font-size: 0.82rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.3rem; }
.expertise-list li::before { content: '▸ '; color: var(--accent); }

.interests-section { background: var(--bg-primary); }
.interests-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.interest-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }
.interest-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.interest-item i { color: var(--accent); width: 18px; text-align: center; }
.fun-facts-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.fun-fact {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.fact-emoji { font-size: 1.5rem; flex-shrink: 0; }
.fun-fact p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }

/* === EXPERIENCE / TIMELINE === */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color, var(--accent));
  z-index: 1;
  box-shadow: 0 0 12px color-mix(in srgb, var(--color, var(--accent)) 30%, transparent);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition);
}
.timeline-content:hover { border-color: var(--border); }

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.timeline-role { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.2rem; }
.timeline-company { font-size: 0.9rem; color: var(--text-secondary); }
.timeline-client { color: var(--accent); }
.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  flex-shrink: 0;
}
.timeline-period, .timeline-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
}
.timeline-period i, .timeline-location i { color: var(--accent); font-size: 0.75rem; }

.timeline-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.7; }

.timeline-achievements {
  list-style: none;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.timeline-achievements li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  line-height: 1.5;
}
.achievement-bullet { flex-shrink: 0; font-size: 0.8rem; padding-top: 2px; }

.timeline-tech { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.coursework-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
}
.coursework-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
}
.platform-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.platform-icon { font-size: 1.75rem; color: var(--accent); margin-bottom: 0.75rem; }
.platform-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.platform-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* === SKILLS PAGE === */
.skills-category { margin-bottom: 3.5rem; }
.skills-cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}
.skills-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--cat-color) 12%, transparent);
  color: var(--cat-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.skills-cat-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cat-color);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}
.skill-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.skill-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; }
.skill-name { font-size: 0.9rem; font-weight: 600; }
.skill-level-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; }
.skill-bar-track {
  height: 6px;
  background: var(--surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--bar-color, var(--accent)), color-mix(in srgb, var(--bar-color, var(--accent)) 70%, white));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px color-mix(in srgb, var(--bar-color, var(--accent)) 40%, transparent);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  background: color-mix(in srgb, var(--tag-color, var(--accent)) 8%, transparent);
  color: var(--tag-color, var(--accent));
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--accent)) 20%, transparent);
  border-radius: 4px;
}

.tools-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}
.tool-chip {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: default;
}
.tool-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* === PORTFOLIO PAGE === */
.portfolio-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.portfolio-search-wrap {
  position: relative;
  max-width: 400px;
}
.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.portfolio-search {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}
.portfolio-search:focus { border-color: var(--accent); }
.portfolio-search::placeholder { color: var(--text-muted); }

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--surface);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.filter-btn.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); font-weight: 600; }
.filter-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(255,255,255,0.15);
  padding: 0 0.35rem;
  border-radius: var(--radius-sm);
}
.filter-btn.active .filter-count { background: rgba(0,0,0,0.2); }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.portfolio-card.hidden { display: none; }

.portfolio-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.portfolio-card-thumb-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-elevated), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.portfolio-card-thumb-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%);
}
.portfolio-thumb-icon {
  font-size: 2.5rem;
  color: var(--accent);
  opacity: 0.15;
  position: relative;
}
.portfolio-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 20, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-card:hover .portfolio-card-overlay { opacity: 1; }

.portfolio-featured-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  background: var(--accent-warn);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #000;
}

.portfolio-card-body {
  padding: 1.25rem;
  flex: 1;
}
.portfolio-cat-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.portfolio-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.portfolio-card-title a:hover { color: var(--accent); }
.portfolio-card-desc {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.portfolio-tech-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.portfolio-card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.portfolio-view-link {
  font-size: 0.85rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap var(--transition);
}
.portfolio-view-link:hover { gap: 0.7rem; }
.portfolio-gh-link { color: var(--text-muted); font-size: 1.1rem; transition: color var(--transition); }
.portfolio-gh-link:hover { color: var(--text-primary); }

.portfolio-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.portfolio-empty i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; display: block; }
.portfolio-empty h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.portfolio-empty p { margin-bottom: 1.5rem; }

/* === PROJECTS LIST === */
.projects-list { display: flex; flex-direction: column; gap: 1px; }
.project-list-item {
  display: grid;
  grid-template-columns: 60px 1fr 40px;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  transition: all var(--transition);
}
.project-list-item:hover { border-color: var(--accent); transform: translateX(4px); box-shadow: var(--shadow-sm); }
.project-list-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  opacity: 0.3;
  line-height: 1;
}
.project-list-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.4rem; }
.project-list-title { font-size: 1.1rem; font-weight: 600; }
.project-list-title a:hover { color: var(--accent); }
.project-list-links { display: flex; gap: 0.75rem; }
.project-icon-link { color: var(--text-muted); font-size: 1rem; transition: color var(--transition); }
.project-icon-link:hover { color: var(--accent); }
.project-list-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.project-list-tech { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.project-list-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  flex-shrink: 0;
}
.project-list-item:hover .project-list-arrow { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* === PROJECT DETAIL === */
.project-detail-section { background: var(--bg-primary); }
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

.project-detail-image {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--surface), var(--bg-tertiary));
  position: relative;
}
.project-detail-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--color, var(--accent)) 15%, transparent), transparent 60%);
}
.project-img-placeholder { font-size: 4rem; color: var(--accent); opacity: 0.2; position: relative; }

.project-detail-body h2 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.project-detail-lead { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 2rem; }
.project-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.project-feature-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  align-items: flex-start;
}
.feature-bullet { flex-shrink: 0; padding-top: 2px; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.sidebar-card h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-card h3 i { color: var(--accent); }
.sidebar-tech-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sidebar-link-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--surface-elevated);
  transition: all var(--transition);
  margin-bottom: 0.5rem;
  width: 100%;
}
.sidebar-link-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.sidebar-link-demo:hover { border-color: var(--accent-3); color: var(--accent-3); background: var(--accent-3-dim); }
.sidebar-no-demo {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

/* === BLOG === */
.blog-section { background: var(--bg-primary); }
.blog-coming-soon-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--accent-2-dim);
  border: 1px solid rgba(139,92,246,0.25);
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  color: var(--accent-2);
}
.coming-soon-icon { font-size: 1.5rem; flex-shrink: 0; }
.blog-coming-soon-banner h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.blog-coming-soon-banner p { font-size: 0.875rem; opacity: 0.85; margin: 0; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { border-color: var(--accent-2); transform: translateY(-3px); }
.blog-card-header { position: relative; aspect-ratio: 16/7; overflow: hidden; }
.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface-elevated), var(--bg-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-2);
  opacity: 0.2;
}
.blog-card-date {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}
.blog-card-body { padding: 1.25rem; flex: 1; }
.blog-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  display: block;
  margin-bottom: 0.4rem;
}
.blog-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-footer { display: flex; justify-content: space-between; align-items: center; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.blog-tag {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
}
.blog-read-time { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem; }
.blog-card-draft-overlay {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(6,11,20,0.85);
  backdrop-filter: blur(4px);
  color: var(--accent-warn);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245,158,11,0.3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-subscribe {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  text-align: center;
}
.blog-subscribe h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.blog-subscribe p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.subscribe-form { display: flex; gap: 0.5rem; max-width: 400px; margin: 0 auto; flex-wrap: wrap; }
.subscribe-input {
  flex: 1;
  padding: 0.65rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  min-width: 200px;
}
.subscribe-input:focus { border-color: var(--accent); }

/* === CONTACT PAGE === */
.contact-section { background: var(--bg-primary); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 { font-size: 1.75rem; margin: 0.5rem 0 1rem; }
.contact-desc { color: var(--text-secondary); line-height: 1.8; margin-bottom: 0.75rem; font-size: 0.95rem; }

.contact-channels { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0; }
.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.contact-channel:hover { border-color: var(--accent); transform: translateX(4px); }
.channel-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.channel-text { display: flex; flex-direction: column; }
.channel-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.channel-value { font-size: 0.875rem; color: var(--text-secondary); word-break: break-word; }

.contact-social { display: flex; gap: 0.75rem; }
.social-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition);
}
.social-icon-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }

/* Contact Form */
.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label { font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.required { color: var(--accent-red); }
.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.form-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-textarea {
  padding-left: 1rem;
  resize: vertical;
  min-height: 140px;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input.error { border-color: var(--accent-red); }
.form-input::placeholder { color: var(--text-muted); }
.field-error { font-size: 0.8rem; color: var(--accent-red); min-height: 1rem; }

.form-feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
.form-success { background: var(--accent-3-dim); color: var(--accent-3); border: 1px solid rgba(16,185,129,0.25); }
.form-error-msg { background: rgba(239,68,68,0.1); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.25); }

/* === ERROR PAGE === */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 2rem) 0 4rem;
}
.error-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
.error-terminal {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.error-code {
  font-size: clamp(4rem, 15vw, 8rem);
  font-family: var(--font-mono);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}
.error-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.error-text p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* === FOOTER === */
#footer {
  position: relative;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0 1.5rem;
  overflow: hidden;
}
.footer-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.3;
  pointer-events: none;
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  margin-bottom: 2rem;
  position: relative;
}
.footer-brand { max-width: 260px; }
.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.footer-nav { display: flex; gap: 3rem; }
.footer-nav-col h4 { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.75rem; }
.footer-nav-col ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav-col a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-nav-col a:hover { color: var(--accent); }
.footer-nav-col i { font-size: 0.75rem; }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
}
.footer-terminal-line {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.terminal-cmd { color: var(--accent-3); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* === ANIMATIONS === */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(14deg); }
  50% { transform: rotate(-4deg); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}
@keyframes scroll-chevron {
  0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 4rem; }
  .hero-container { padding-top: calc(var(--nav-height) + 3rem); }
  .hero-name { font-size: clamp(2rem, 8vw, 3.5rem); }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .about-main-grid { grid-template-columns: 1fr; }
  .project-detail-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .about-preview-grid { grid-template-columns: 1fr; }
  .interests-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-nav { flex-wrap: wrap; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 0.25rem;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    z-index: 999;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-link { font-size: 1.1rem; padding: 0.75rem 0; width: 100%; }
  .nav-toggle { display: flex; }
  .nav-actions .btn { display: none; }

  /* Resume link shown only in mobile menu */
  .nav-resume-mobile {
    display: block;
    width: 100%;
    padding-top: 1rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-link-resume { color: var(--accent) !important; gap: 0.6rem; }

  .section { padding: 3.5rem 0; }
  .page-hero { padding: calc(var(--nav-height) + 2rem) 0 2rem; }
  .about-preview-cards { grid-template-columns: 1fr; }
  .bio-highlights { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: 0.65rem; }
  .project-list-item { grid-template-columns: 1fr; }
  .project-list-num { display: none; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .timeline-marker { display: none; }
  .timeline-header { flex-direction: column; }
  .timeline-meta { text-align: left; }
  .timeline-period, .timeline-location { justify-content: flex-start; }
  .footer-nav { flex-direction: column; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-terminal-line { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { text-align: center; justify-content: center; }
  .cta-card { padding: 2.5rem 1.5rem; }
  .project-detail-meta { flex-wrap: wrap; gap: 0.5rem; }
  .project-list-arrow { display: none; }
  .contact-grid { gap: 2rem; }
  .dfs-complete-badge { flex-wrap: wrap; gap: 0.65rem; }
  .dfs-rescan-btn { margin-left: 0; }
}

/* Hide resume link in desktop nav */
.nav-resume-mobile { display: none; }

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .page-hero { padding: calc(var(--nav-height) + 1.25rem) 0 1.75rem; }
  .page-title { font-size: clamp(1.6rem, 8vw, 2.5rem); }

  /* Hero */
  .hero-bio { max-width: 100%; }
  .hero-interactive-terminal .terminal-output { height: 200px; }
  .hero-container { padding-top: calc(var(--nav-height) + 2rem); }
  .hero-terminal-hint { font-size: 0.72rem; overflow-wrap: break-word; }
  .hero-stats { gap: 0.4rem; }
  .stat-num { font-size: 1.25rem; }
  .stat-label { font-size: 0.6rem; }
  .stat-item { padding: 0.6rem 0.4rem; }
  .hero-social { flex-wrap: wrap; gap: 0.75rem; }
  .social-line { display: none; }

  /* About */
  .bio-highlights { grid-template-columns: 1fr; }

  /* Experience */
  .timeline-content { padding: 1.1rem; }

  /* Portfolio / grid */
  .projects-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .platform-cards { grid-template-columns: 1fr; }
  .coursework-grid { grid-template-columns: 1fr 1fr; }

  /* CTA */
  .cta-card { padding: 2rem 1.1rem; }
  .cta-actions { flex-direction: column; }
  .cta-actions .btn { width: 100%; justify-content: center; }

  /* Contact */
  .contact-form-wrap { padding: 1.25rem; }
  .contact-channels { gap: 0.5rem; }

  /* Footer */
  .footer-brand { max-width: 100%; }
  .subscribe-form { flex-direction: column; }
  .subscribe-input { min-width: 0; width: 100%; }
}

@media (max-width: 360px) {
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 0.35rem; }
  .stat-num { font-size: 1.1rem; }
  .stat-label { font-size: 0.55rem; }
  .terminal-body { font-size: 0.75rem; }
  .nav-logo { font-size: 0.9rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
  .page-title { font-size: clamp(1.4rem, 7vw, 2rem); }
  .cta-card { padding: 1.75rem 1rem; }
  .footer-terminal-line { font-size: 0.65rem; }
}

/* AOS overrides */
[data-aos] { will-change: transform, opacity; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

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

/* Print */
@media print {
  #navbar, #scroll-progress, #scroll-top, #theme-toggle-float, #loading-screen { display: none !important; }
}
