:root {
  /* Premium Dark Space Palette */
  --bg-space: #050814;
  --bg-deep: #0a0b12;
  
  --accent: #00f0ff;      /* Cyan */
  --accent-glow: rgba(0, 240, 255, 0.4);
  --secondary: #b026ff;   /* Magenta/Purple */
  --secondary-glow: rgba(176, 38, 255, 0.4);
  
  --glass-bg: rgba(10, 16, 30, 0.45);
  --glass-border: rgba(0, 240, 255, 0.15);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  
  --text-main: #e2e8f0;
  --text-muted: #8ba0b5;
  --font-sys: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout */
  --max-w: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-space);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* Typography */
h1, h2, h3, h4, .nav-link, .cyber-btn {
  font-family: var(--font-sys);
  text-transform: uppercase;
}

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

/* Container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* =========================================
   BACKGROUND & LOADER
   ========================================= */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  background: radial-gradient(circle at center, #0a0d1f 0%, #030408 100%);
}

.space-dust {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
  z-index: -2;
  pointer-events: none;
}

.glass-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(176, 38, 255, 0.05), transparent 40%),
              radial-gradient(circle at 100% 50%, rgba(0, 240, 255, 0.05), transparent 40%);
  z-index: -1;
  pointer-events: none;
}

/* Loader */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-space);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-text {
  font-family: var(--font-sys);
  color: var(--accent);
  letter-spacing: 0.3em;
  font-size: 1.2rem;
  animation: pulseText 1.5s infinite alternate;
}

.progress-bar {
  width: 300px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress {
  width: 0%;
  height: 100%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.2s;
}

@keyframes pulseText {
  from { opacity: 0.5; text-shadow: none; }
  to { opacity: 1; text-shadow: 0 0 15px var(--accent-glow); }
}

/* =========================================
   HEADER / HUD NAV
   ========================================= */
.hud-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  background: linear-gradient(to bottom, rgba(5,8,20,0.9), transparent);
}

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

.logo-orbit {
  font-family: var(--font-sys);
  color: var(--accent);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  display: inline-block;
  border-right: 2px solid var(--accent);
  padding-right: 8px;
  animation: typingCursor 1s infinite step-end;
}

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

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  position: relative;
  transition: color 0.3s;
}

.nav-link::before {
  content: attr(data-text);
  position: absolute;
  color: var(--accent);
  width: 0;
  overflow: hidden;
  transition: width 0.3s;
  white-space: nowrap;
  border-right: 2px solid var(--accent);
}

.nav-link:hover { color: transparent; }
.nav-link:hover::before { width: 100%; }

/* =========================================
   UI COMPONENTS
   ========================================= */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 0 0 1px var(--glass-highlight),
              0 20px 40px rgba(0,0,0,0.4);
  border-radius: 20px;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.cyber-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  overflow: hidden;
}

.cyber-btn.primary {
  background: rgba(0, 240, 255, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

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

.cyber-btn.secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-muted);
}

.cyber-btn.secondary:hover {
  border-color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* =========================================
   CINEMATIC HERO SECTION
   ========================================= */
.cinematic-hero {
  height: 300vh; /* Extremely tall to allow a long scroll sequence */
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%); /* Break out of container constraints */
}

/* Interactive ISS Canvas Background */
#iss-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2; /* Behind glass overlay, in front of starfield */
  opacity: 0; /* Animated in via GSAP */
}

.scroll-prompt {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-family: var(--font-sys);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  opacity: 0; /* Animated in via GSAP */
  z-index: 10;
}

.sticky-profile {
  position: sticky;
  top: 15vh;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  opacity: 0; /* Base opacity manipulated by GSAP scrolltrigger */
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 100px;
  margin-bottom: 2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 10px rgba(0,240,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,240,255,0); }
}

.status-text {
  font-family: var(--font-sys);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
}

h1.glitch {
  font-size: clamp(3rem, 5vw, 5.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: #fff;
  position: relative;
}

/* Simple CSS Glitch Effect on Hover */
h1.glitch:hover::before, h1.glitch:hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
}
h1.glitch:hover::before {
  left: 3px;
  text-shadow: -2px 0 red;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}
h1.glitch:hover::after {
  left: -3px;
  text-shadow: -2px 0 blue;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(26px, 9999px, 83px, 0); }
  20% { clip: rect(69px, 9999px, 4px, 0); }
  40% { clip: rect(11px, 9999px, 98px, 0); }
  60% { clip: rect(51px, 9999px, 13px, 0); }
  80% { clip: rect(89px, 9999px, 43px, 0); }
  100% { clip: rect(38px, 9999px, 72px, 0); }
}

.role-title {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  max-width: 90%;
  margin-bottom: 2rem;
  color: #a0aec0;
}

.telemetry-bar {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
  border-left: 2px solid var(--accent);
  font-family: var(--font-sys);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.telemetry-bar i { color: var(--accent); margin-right: 0.5rem; }

.action-bay {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.social-bay {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s;
  background: rgba(255,255,255,0.02);
}

.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-3px);
}

/* =========================================
   HERO AVATAR (HOLOGRAPHIC HUD)
   ========================================= */
.hero-visual-area {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-container {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  background: rgba(0,0,0,0.5);
  margin-left: auto;
  margin-right: auto;
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.avatar-container:hover .hero-avatar {
  transform: scale(1.05);
}

/* HUD Overlay Elements */
.scanner-line {
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 20px 5px var(--accent-glow);
  opacity: 0.6;
  animation: scan 4s linear infinite;
  z-index: 5;
}

@keyframes scan {
  0% { top: -10px; }
  50% { top: 100%; }
  100% { top: -10px; }
}

.crosshairs div {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  z-index: 5;
  opacity: 0.5;
}
.tl { top: 15px; left: 15px; border-right: none !important; border-bottom: none !important; }
.tr { top: 15px; right: 15px; border-left: none !important; border-bottom: none !important; }
.bl { bottom: 15px; left: 15px; border-right: none !important; border-top: none !important; }
.br { bottom: 15px; right: 15px; border-left: none !important; border-top: none !important; }

/* Floating Tags */
.floating-tech-tags {
  position: absolute;
  inset: -30px;
  pointer-events: none;
}

.tech-tag {
  position: absolute;
  background: rgba(10, 16, 30, 0.8);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(5px);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-sys);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-main);
  animation: floatTag 6s ease-in-out infinite;
  animation-delay: var(--d);
}

.tech-tag:nth-child(1) { top: 10%; left: -5%; }
.tech-tag:nth-child(2) { top: 25%; right: -10%; border-color: var(--secondary); color: var(--secondary); }
.tech-tag:nth-child(3) { bottom: 30%; left: -10%; }
.tech-tag:nth-child(4) { bottom: 15%; right: -5%; border-color: var(--accent); color: var(--accent); }

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

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .telemetry-bar { justify-content: center; }
  .action-bay { justify-content: center; }
  .social-bay { margin-left: auto; margin-right: auto; }
  .avatar-container { margin: 0 auto; width: 100%; max-width: 350px; }
}

/* =========================================
   GRID LAYOUTS & DATA COLUMNS (Timeline)
   ========================================= */
.data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 4rem 0;
}

@media (max-width: 900px) {
  .data-grid { grid-template-columns: 1fr; }
}

.section-title {
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  opacity: 0.3;
}

.timeline-container {
  position: relative;
  padding-left: 2rem;
}

.timeline-track {
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 0;
  width: 2px;
  background: var(--glass-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
}

.timeline-item.small { padding: 1.2rem 1.5rem; }

.timeline-node {
  position: absolute;
  left: -2.35rem;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-space);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.timeline-header h4 {
  font-size: 1rem;
  color: #fff;
  line-height: 1.3;
}

.time-stamp {
  font-family: var(--font-sys);
  font-size: 0.75rem;
  color: var(--secondary);
  white-space: nowrap;
}

.timeline-org {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.timeline-details {
  list-style-type: none;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.timeline-details li {
  position: relative;
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
}

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

/* =========================================
   PROJECT CARDS & SKILLS
   ========================================= */
.project-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0,240,255,0.1);
}

.project-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.project-top h4 {
  font-size: 1.1rem;
  color: #fff;
}

.icon-accent {
  color: var(--accent);
  font-size: 1.2rem;
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-stack span {
  font-family: var(--font-sys);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(176, 38, 255, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 4px;
}

.mt-4 { margin-top: 3rem; }

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-chip {
  padding: 0.5rem 1rem;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all 0.3s;
  cursor: default;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

/* =========================================
   FOOTER
   ========================================= */
.cyber-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  background: rgba(5,8,20,0.8);
  backdrop-filter: blur(10px);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sys);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.system-status {
  color: #00ff66;
  text-shadow: 0 0 10px rgba(0,255,102,0.4);
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
