/* =========================================
   Cinematic Luxury Variables
   ========================================= */
:root {
  /* Minimalist Deep Navy Base */
  --bg-color: #000000;
  --bg-secondary: #030812;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;

  /* Crisp Glowing Accents */
  --accent-blue: #0ea5e9;
  --accent-green: #10b981;
  --accent-color: var(--accent-blue);
  --accent-secondary: var(--accent-green);
  --accent-glow: rgba(14, 165, 233, 0.5);

  /* Clean Glassmorphism */
  --card-bg: rgba(5, 11, 20, 0.6);
  --card-border: rgba(15, 23, 42, 0.4);
  --card-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);

  /* Apple-Esque Premium Typography */
  --font-base: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --tracking-display: -0.04em;
  --base-radius: 20px;
  --card-radius: 24px;

  /* Smooth Cinematic Easing */
  --transition-cinematic: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --cursor-size: 16px;
  --cursor-glow-color: rgba(255, 255, 255, 0.7);
  --nav-offset: 6.5rem;
}

/* =========================================
   Gen Z Mode Override (Original Brutalist Restoration)
   ========================================= */
[data-theme="gen-z"] {
  --bg-color: #000000;
  --bg-secondary: #000000;
  --text-primary: #ccff00;
  /* Toxic Lime */
  --text-secondary: #ff00ff;
  /* Hot Magenta */
  --accent-blue: #00ffff;
  /* Cyan */
  --accent-green: #ff00ff;
  --accent-color: var(--accent-blue);
  --accent-secondary: var(--accent-green);
  --accent-glow: rgba(204, 255, 0, 0.8);
  --card-bg: #000000;
  --card-border: var(--text-primary);
  --card-shadow: 10px 10px 0 var(--accent-green);
  --font-base: 'Space Mono', monospace;
  --font-display: 'Rubik Glitch', cursive;
  --tracking-display: 0em;
  --base-radius: 0px;
  --card-radius: 0px;
  --transition-cinematic: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* Bouncy */
  --cursor-size: 24px;
  --cursor-glow-color: transparent;
}

/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (hover: hover) and (pointer: fine) {
  html {
    cursor: none;
  }
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-base);
  line-height: 1.6;
  overflow-x: hidden;
  /* Note: The physical background changing is handled by .water-effect now */
}

/* Interactive Canvas Water Effect */
.water-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  transition: opacity 0.5s ease;
  background-color: var(--bg-color);
  /* Fallback */
}

[data-theme="gen-z"] .water-canvas {
  opacity: 0;
}

/* Base Typo */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: var(--tracking-display);
  font-weight: 800;
  transition: color var(--transition-fast);
}

/* Utility Classes */
.content-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  padding: 0 5%;
}

.section-padding {
  padding: 10rem 0;
}

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

[data-theme="gen-z"] .section-title {
  font-family: 'Rubik Glitch', cursive;
  text-shadow: 4px 4px 0 var(--text-secondary);
  font-size: 4rem;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-title {
  font-size: 3.5rem;
  margin-bottom: 4rem;
  text-transform: tight;
}

/* Custom Cursor (Liquid Glow for Pro, Crosshair for Gen-Z) */
.cursor-dot,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: none;
}

.cursor-dot {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, rgba(224, 242, 254, 0.95), rgba(56, 189, 248, 0.4));
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6), 0 0 28px rgba(56, 189, 248, 0.25);
  transition: transform 0.2s ease, opacity 0.2s ease;
  mix-blend-mode: screen;
}

.cursor-outline {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0));
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.18);
  transition: transform 0.18s ease, opacity 0.2s ease, background 0.2s ease;
}

/* Gen Z Cursor - Brutalist Crosshair inside a square box */
[data-theme="gen-z"] .cursor-dot {
  border-radius: 0;
  width: 24px;
  height: 24px;
  background-color: transparent;
  mix-blend-mode: normal;
  background-image:
    linear-gradient(var(--text-primary), var(--text-primary)),
    linear-gradient(var(--text-primary), var(--text-primary));
  background-size: 100% 4px, 4px 100%;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: none;
}

[data-theme="gen-z"] .cursor-outline {
  border-radius: 0;
  border: 3px solid var(--accent-green);
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%) rotate(45deg);
  /* Diamond shape outline */
}

[data-theme="gen-z"] a:hover~.cursor-outline,
[data-theme="gen-z"] button:hover~.cursor-outline {
  border-style: dashed;
  border-color: var(--text-primary);
  transform: translate(-50%, -50%) rotate(0deg) scale(1.2);
  /* Snap to square on hover */
}

/* Loading Overlay */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease-in-out, visibility 1s;
}

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

.loader-text {
  font-size: 2rem;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.loader-bar {
  width: 0;
  height: 2px;
  background: var(--accent-blue);
  margin-top: 1rem;
  transition: width 0.4s;
}

/* Navigation & Cmd+K Trigger */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(8, 14, 24, 0.72), rgba(8, 14, 24, 0.46));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
  overflow: hidden;
}

nav::before,
.glass-card::before,
.hero-portrait-glass::before,
.glass-portrait::before,
.btn-toggle::before,
.cmdk-trigger::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.14) 42%, transparent 70%);
  transform: translateX(-130%);
  animation: liquidSheen 11s ease-in-out infinite;
  pointer-events: none;
}

@keyframes liquidSheen {
  0%,
  70%,
  100% {
    transform: translateX(-130%);
  }

  35% {
    transform: translateX(130%);
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-logo-img {
  height: 35px;
  border-radius: 4px;
}

.logo-text {
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  font-weight: bold;
}

.cmdk-trigger {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-base);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.cmdk-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.cmdk-trigger kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

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

.btn-toggle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.toggle-hint-arrow {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  animation: toggleArrowBlink 0.5s step-end infinite;
}

.btn-toggle:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}

[data-theme="gen-z"] .btn-toggle {
  background: var(--text-primary);
  color: #000;
  border-radius: 0;
  border-color: #000;
}

[data-theme="gen-z"] .toggle-hint-arrow {
  color: #000;
}

@keyframes toggleArrowBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0.2;
  }
}

/* Command Palette Modal Layer */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

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

.cmdk-container {
  width: 100%;
  max-width: 600px;
  padding: 0;
  border: 1px solid var(--accent-glow);
  box-shadow: 0 25px 50px -12px rgba(56, 189, 248, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s;
}

.cmdk-overlay.active .cmdk-container {
  transform: scale(1);
}

.cmdk-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
  gap: 1rem;
}

.cmdk-header i {
  color: var(--accent-blue);
}

#cmdk-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.2rem;
  outline: none;
  font-family: var(--font-base);
}

.cmdk-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.cmdk-results {
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.cmdk-results li {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  border-radius: 8px;
  margin-bottom: 0.2rem;
  transition: all 0.1s;
}

.cmdk-results li.selected {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text-primary);
  border-left: 3px solid var(--accent-blue);
}

.cmdk-shortcut {
  opacity: 0;
  font-size: 0.8rem;
}

.cmdk-results li.selected .cmdk-shortcut {
  opacity: 1;
}

[data-theme="gen-z"] .cmdk-container {
  border-radius: 0;
  border: 4px solid var(--text-primary);
  box-shadow: 10px 10px 0 var(--accent-green);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-color) !important;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--accent-blue);
  box-shadow: 0 0 30px var(--accent-glow);
}

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

.btn-secondary:hover {
  border-color: var(--accent-blue);
  background: rgba(56, 189, 248, 0.05);
}

[data-theme="gen-z"] .btn-primary,
[data-theme="gen-z"] .btn-secondary {
  border-radius: 0;
  border: 3px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary) !important;
}

[data-theme="gen-z"] .btn-primary:hover,
[data-theme="gen-z"] .btn-secondary:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--accent-green);
}

/* Glass Card */
.glass-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 32%, transparent),
    var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: var(--nav-offset);
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 0 5%;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, var(--accent-blue), transparent 60%);
  width: 600px;
  height: 600px;
  filter: blur(80px);
  opacity: 0.15;
  animation: shift 15s infinite alternate ease-in-out;
}

.p1 {
  top: -20%;
  right: -10%;
}

.p2 {
  bottom: -20%;
  left: -10%;
  background: radial-gradient(circle, var(--accent-green), transparent 60%);
  animation-delay: -5s;
}

@keyframes shift {
  0% {
    transform: scale(1) translate(0);
  }

  100% {
    transform: scale(1.2) translate(-100px, 50px);
  }
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 2rem;
  background: rgba(56, 189, 248, 0.05);
}

.name-title {
  font-size: 6rem;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
}

.role-container {
  font-size: 2.5rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 300;
}

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

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

.personal-statement {
  font-size: 1.5rem;
  color: var(--text-primary);
  max-width: 800px;
  margin-bottom: 3rem;
  opacity: 0.9;
}

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

/* Hero Layout Updates for Photo Integration */
.hero-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.hero-text-col {
  flex: 1;
}

.hero-photo-col {
  flex-shrink: 0;
  width: 380px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 11;
}

.hero-portrait-glass {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: var(--card-shadow);
  transform: rotate(2deg);
  transition: transform var(--transition-cinematic);
}

.hero-portrait-glass:hover {
  transform: rotate(0deg) scale(1.02);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  /* This prevents the head from being cut off at the top */
  filter: grayscale(15%) contrast(1.1);
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.hero-portrait-glass:hover .hero-photo {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.05);
  /* Slight zoom in on hover */
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-primary);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--text-primary);
  border-radius: 2px;
  animation: scrollDown 2s infinite ease-in-out;
}

@keyframes scrollDown {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  100% {
    transform: translateY(15px);
    opacity: 0;
  }
}

/* About / Narrative Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
  line-height: 1.7;
}

.glass-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--card-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02) 46%, transparent);
  overflow: hidden;
}

.about-figure {
  margin: 0;
}

.builder-portrait {
  box-shadow: var(--card-shadow);
}

.builder-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  background-image: linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.08)), url('../images/about/build.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.builder-caption {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.holo-ring {
  position: absolute;
  width: 150%;
  height: 150%;
  border: 1px solid var(--accent-blue);
  border-radius: 50%;
  opacity: 0.2;
  transform: rotate(X) scale(1);
  animation: spinSpace 30s linear infinite;
}

@keyframes spinSpace {
  100% {
    transform: rotate(50deg) scale(1.1);
  }
}

.portrait-placeholder i {
  font-size: 5rem;
  color: var(--accent-blue);
  opacity: 0.5;
  filter: drop-shadow(0 0 20px var(--accent-blue));
}

/* Impact Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.metric-card {
  padding: 3rem 2rem;
  text-align: center;
}

.metric-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.metric-label {
  font-size: 1rem;
  color: var(--accent-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Projects Section */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  align-items: start;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-cinematic);
  min-width: 0;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.project-img {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--card-border);
}

.project-img-fin {
  background-image: url('../images/projects/fin.png');
}

.project-img-att {
  background-image: url('../images/projects/att.png');
}

.project-img-mis {
  background-image: url('../images/projects/mis.png');
}

/* Generative Placeholders */
.placeholder-1 {
  background: radial-gradient(circle at top left, #1e1b4b, #312e81);
}

.placeholder-2 {
  background: linear-gradient(45deg, #064e3b, #047857);
}

.placeholder-misinfo {
  background: repeating-linear-gradient(45deg, #4c1d95, #7c3aed 20px);
}

.project-info {
  padding: 1.75rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-info h3 {
  font-size: 1.45rem;
  margin-bottom: 1rem;
}

.project-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.tech-stack span {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-primary-small {
  background: var(--text-primary);
  color: var(--bg-color) !important;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
}

/* Leadership Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-blue), transparent);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}

.timeline-item {
  padding: 20px 50px;
  position: relative;
  width: 50%;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-dot {
  position: absolute;
  width: 16px;
  height: 16px;
  right: -8px;
  background: var(--bg-color);
  border: 2px solid var(--accent-blue);
  border-radius: 50%;
  top: 40px;
  z-index: 10;
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
}

.timeline-content {
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
}

.timeline-item:nth-child(even) .timeline-content:hover {
  transform: translateX(-5px);
}

.timeline-content h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-date {
  color: var(--accent-blue);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Research Section */
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.research-card {
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.research-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  align-items: center;
}

.paper-number {
  font-family: monospace;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.glow-badge {
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  box-shadow: inset 0 0 10px rgba(74, 222, 128, 0.2);
}

.research-card h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.research-card .hook {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 3rem;
}

/* Tech Stack Interactive Grid */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.tech-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s;
  width: calc(20% - 1.5rem);
  min-width: 150px;
}

.tech-item i {
  font-size: 2.5rem;
  color: var(--text-secondary);
  transition: color 0.3s, filter 0.3s;
}

.tech-item span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tech-item:hover {
  border-color: var(--text-primary);
  transform: translateY(-5px);
}

.tech-item:hover i {
  color: var(--text-primary);
  filter: drop-shadow(0 0 10px var(--text-primary));
}

.tech-item:hover span {
  color: var(--text-primary);
}

/* Community Section */
.community-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.community-list {
  list-style: none;
}

.community-list li {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.community-list i {
  color: var(--accent-blue);
  font-size: 1.5rem;
}

.cinematic-frame {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
  border-radius: var(--base-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.community-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.frame-content {
  position: relative;
  align-self: flex-end;
  margin: 0 0 1.25rem 1.25rem;
  color: var(--text-primary);
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 10;
}

.frame-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 70%);
  z-index: 1;
}

/* Photo Hall Marquee */
.photo-hall {
  overflow: hidden;
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-bottom: 5rem;
  content-visibility: auto;
  contain-intrinsic-size: 1200px;
}

.marquee-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  padding: 0 1.5rem;
  transform: none;
}

.marquee-track {
  display: flex;
  width: 100%;
  overflow: hidden;
  contain: layout paint;
}

.marquee-content {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  will-change: transform;
}

.track-left .marquee-content {
  animation: scrollLeft 55s linear infinite;
}

.track-right .marquee-content {
  animation: scrollRight 55s linear infinite;
}

/* In case of hover, pause */
.marquee-track:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

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

  100% {
    transform: translateX(0);
  }
}

.photo-card {
  flex: 0 0 350px;
  min-width: 350px;
  height: 250px;
  border-radius: var(--card-radius);
  background-color: rgba(255, 255, 255, 0.03);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px -18px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.photo-card:hover img {
  filter: grayscale(0%);
}

[data-theme="gen-z"] .marquee-wrapper {
  transform: none;
  gap: 2rem;
}

[data-theme="gen-z"] .photo-card {
  border-radius: 0;
  border: 4px solid var(--text-primary);
  box-shadow: 10px 10px 0 var(--accent-green);
}

[data-theme="gen-z"] .photo-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: -12px 12px 0 var(--text-secondary);
}

[data-theme="gen-z"] .photo-card:hover img {
  filter: grayscale(0%);
}

/* Contact Section */
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

/* Final Visual Signature Footer */
.visual-signature {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#signature-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0.5;
  /* Lower opacity so text pops */
  filter: brightness(0.8) contrast(1.1);
  /* Enhance contrast of video */
  z-index: 1;
}

/* Liquid Chrome SVG Fallback Effect using CSS mix-blend and SVG filters */
.css-liquid-text {
  font-size: 12vw;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  color: transparent;
  background: linear-gradient(-45deg, #1e293b, #f8fafc, #38bdf8, #0f172a, #f8fafc);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: chromeFlow 6s ease infinite;
  z-index: 10;
  position: relative;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

@keyframes chromeFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.fade-to-black {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, #000, transparent);
  z-index: 20;
}


/* Cinematic Reveal Classes (Apple Scale-In Style) */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.slide-up {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================
   Glitch Transition Animation
   ========================================= */
.glitching {
  animation: hardcoreGlitch 0.4s cubic-bezier(.25, .46, .45, .94) both;
  filter: contrast(150%) brightness(120%);
}

.glitching::before,
.glitching::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  background: inherit;
}

.glitching::before {
  animation: hardcoreGlitchLayer 0.4s infinite alternate-reverse;
  mix-blend-mode: screen;
  filter: hue-rotate(90deg);
  opacity: 0.5;
}

.glitching::after {
  animation: hardcoreGlitchLayer 0.3s infinite alternate;
  mix-blend-mode: color-burn;
  filter: hue-rotate(-90deg);
  opacity: 0.3;
}

@keyframes hardcoreGlitch {
  0% {
    transform: translate(0);
    filter: invert(0);
  }

  10% {
    transform: translate(-10px, 5px) skewX(5deg);
    filter: invert(1);
  }

  20% {
    transform: translate(10px, -5px) skewX(-5deg);
    filter: invert(0);
  }

  30% {
    transform: translate(-20px, 10px);
  }

  40% {
    transform: translate(20px, -10px);
  }

  50% {
    transform: translate(-5px, 20px);
    filter: saturate(400%) hue-rotate(180deg);
  }

  60% {
    transform: translate(5px, -20px);
  }

  70% {
    transform: translate(-10px, 5px) scale(1.05);
  }

  80% {
    transform: translate(10px, -5px);
    filter: invert(1);
  }

  90% {
    transform: translate(0);
    filter: invert(0);
  }

  100% {
    transform: translate(0) scale(1);
    filter: none;
  }
}

@keyframes hardcoreGlitchLayer {
  0% {
    clip-path: inset(10% 0 80% 0);
    transform: translateX(-20px);
  }

  20% {
    clip-path: inset(80% 0 5% 0);
    transform: translateX(20px);
  }

  40% {
    clip-path: inset(40% 0 20% 0);
    transform: translateX(-10px);
  }

  60% {
    clip-path: inset(20% 0 60% 0);
    transform: translateX(30px);
  }

  80% {
    clip-path: inset(60% 0 10% 0);
    transform: translateX(-20px);
  }

  100% {
    clip-path: inset(30% 0 50% 0);
    transform: translateX(10px);
  }
}

/* Responsive Adjustments */
@media (max-width: 900px) {

  :root {
    --nav-offset: 5.75rem;
  }

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

  .section-padding {
    padding: 6rem 0;
  }

  .about-grid,
  .research-grid,
  .community-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .name-title {
    font-size: 3.35rem;
  }

  .role-container {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .section-title,
  [data-theme="gen-z"] .section-title {
    font-size: 2.4rem;
    margin-bottom: 2.5rem;
  }

  .personal-statement {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .about-text p,
  .community-list li,
  .project-info p,
  .hook,
  .contact-heading {
    font-size: 1rem;
  }

  .hero-main-row {
    flex-direction: column-reverse;
    /* Text below or photo above depending, photo below text is better */
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-photo-col {
    width: 250px;
  }

  .hero-cta {
    justify-content: center;
  }

  .nav-links,
  .nav-center {
    display: none;
  }

  .timeline::after {
    left: 31px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
    left: 0 !important;
  }

  .timeline-dot {
    left: 23px !important;
  }

  .tech-item {
    width: calc(33% - 1.5rem);
  }

  .marquee-wrapper {
    gap: 0.85rem;
    padding: 0 1rem;
    transform: none;
  }

  .marquee-track {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .marquee-track::-webkit-scrollbar {
    display: none;
  }

  .marquee-content {
    gap: 1rem;
    animation: none !important;
  }

  .photo-card {
    flex-basis: 280px;
    min-width: 280px;
    height: 200px;
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  :root {
    --nav-offset: 5.25rem;
  }

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

  .section-padding {
    padding: 4.5rem 0;
  }

  .content-wrapper {
    padding: 0 1.25rem;
  }

  nav {
    padding: 1rem 1.25rem;
  }

  .name-title {
    font-size: 2.7rem;
  }

  .hero-badge {
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
  }

  .hero-photo-col {
    width: 220px;
  }

  .section-title,
  [data-theme="gen-z"] .section-title {
    font-size: 2rem;
  }

  .project-info {
    padding: 1.5rem;
  }

  .tech-item {
    width: calc(50% - 1rem);
    min-width: 0;
    padding: 1rem;
  }

  .photo-card {
    flex-basis: 240px;
    min-width: 240px;
    height: 170px;
  }
}

/* Print Layout (Cube Net) */
@page {
  size: A4;
  margin: 5mm;
}

.print-cube-net {
  display: none;
}

@media print {
  * {
    animation: none !important;
    transition: none !important;
    text-shadow: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  html,
  body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11pt;
    line-height: 1.35;
    cursor: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > * {
    display: none !important;
  }

  .print-cube-net {
    display: block !important;
    width: 186mm;
    max-width: 186mm;
    margin: 0 auto;
  }

  .cube-net-grid {
    display: grid;
    grid-template-columns: repeat(3, 62mm);
    grid-template-rows: repeat(4, 62mm);
    justify-content: center;
    gap: 0;
  }

  .cube-face {
    position: relative;
    border: 1px dashed #0f172a;
    padding: 5mm;
    background: #0b1220;
    color: #f8fafc;
    overflow: visible;
    font-size: 9.6pt;
    line-height: 1.28;
    z-index: 2;
  }

  .cube-face h2 {
    font-size: 14pt;
    margin-bottom: 2.2mm;
  }

  .cube-face h3,
  .cube-face h4 {
    font-size: 11pt;
    margin-bottom: 1.8mm;
  }

  .cube-face p {
    margin-bottom: 1.4mm;
  }

  .cube-face ul,
  .cube-face ol {
    margin: 0;
    padding-left: 4.5mm;
  }

  .cube-face li {
    margin-bottom: 1.2mm;
  }

  .cube-face.top,
  .cube-face.left,
  .cube-face.front,
  .cube-face.right,
  .cube-face.bottom {
    background: linear-gradient(160deg, #1e3a8a, #0b1220);
    color: #f8fafc;
  }

  .cube-face.back {
    background: #ffffff;
    color: #111111;
  }

  .cube-face.front {
    background: #0a0a0a;
    border-color: #0f172a;
  }

  .cube-face.top {
    border-top-style: solid;
    border-left-style: solid;
    border-right-style: solid;
  }

  .cube-face.left {
    border-top-style: solid;
    border-left-style: solid;
    border-bottom-style: solid;
  }

  .cube-face.right {
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
  }

  .cube-face.bottom {
    border-left-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
  }

  .cube-face.back {
    border-left-style: solid;
    border-right-style: solid;
    border-bottom-style: solid;
  }

  .cube-tab {
    position: absolute;
    background: #ffffff;
    border: 1px solid #111111;
    z-index: 1;
  }

  .cube-tab.tab-top {
    width: 34mm;
    height: 7mm;
    top: -7mm;
    left: 13mm;
    clip-path: polygon(8% 100%, 92% 100%, 100% 0, 0 0);
  }

  .cube-tab.tab-bottom {
    width: 34mm;
    height: 7mm;
    bottom: -7mm;
    left: 13mm;
    clip-path: polygon(0 100%, 100% 100%, 92% 0, 8% 0);
  }

  .cube-tab.tab-left {
    width: 7mm;
    height: 34mm;
    left: -7mm;
    top: 13mm;
    clip-path: polygon(100% 0, 100% 100%, 0 92%, 0 8%);
  }

  .cube-tab.tab-right {
    width: 7mm;
    height: 34mm;
    right: -7mm;
    top: 13mm;
    clip-path: polygon(0 0, 0 100%, 100% 92%, 100% 8%);
  }

  .cube-face.top {
    grid-column: 2;
    grid-row: 1;
  }

  .cube-face.left {
    grid-column: 1;
    grid-row: 2;
  }

  .cube-face.front {
    grid-column: 2;
    grid-row: 2;
  }

  .cube-face.right {
    grid-column: 3;
    grid-row: 2;
  }

  .cube-face.bottom {
    grid-column: 2;
    grid-row: 3;
  }

  .cube-face.back {
    grid-column: 2;
    grid-row: 4;
  }
}