:root {
  --color-bg: #030305;
  --color-text-main: #f0f0f5;
  --color-text-muted: #a0a0ab;
  --color-accent: #5e6ad2;
  --color-glow: rgba(94, 106, 210, 0.4);
  --color-glass: rgba(15, 15, 20, 0.6);
  --color-glass-border: rgba(255, 255, 255, 0.08);

  --font-primary: 'Inter', sans-serif;
  
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --spacing-xxl: 8rem;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  color: var(--color-text-main);
  background-color: var(--color-bg);
}

body {
  overflow-x: hidden;
  line-height: 1.7;
}

/* Background Video */
.bg-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: var(--color-bg);
}

#cinematic-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85; /* Brighter, more natural */
  filter: brightness(1.05) contrast(1.1); /* Sharp and clear, no blur */
  transform: scale(1.05); /* Slight zoom for parallax */
  transition: transform 0.5s ease-out, filter 1s ease;
}

@keyframes subtleGlowPulse {
  0% { filter: brightness(1.05) contrast(1.1) drop-shadow(0 0 0 transparent); opacity: 0.85; }
  50% { filter: brightness(1.05) contrast(1.1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.15)); opacity: 0.95; }
  100% { filter: brightness(1.05) contrast(1.1) drop-shadow(0 0 0 transparent); opacity: 0.85; }
}

#cinematic-video.idle-anim {
  animation: subtleGlowPulse 6s ease-in-out infinite;
}

/* Premium soft vignette overlay for clean text contrast */
.vignette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(to right, rgba(3, 3, 5, 0.85) 0%, rgba(3, 3, 5, 0.3) 45%, transparent 100%),
    radial-gradient(circle at center, transparent 15%, rgba(3, 3, 5, 0.4) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.content-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-xxl) 0;
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

p, body, .body-text {
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
}

.category-title, .badge, .project-subtitle, h3 {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}

.hero {
  align-items: flex-start;
}

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

.hero-title {
  font-size: clamp(4rem, 10vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: var(--spacing-sm);
  animation: premiumFadeSlide 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  margin-bottom: var(--spacing-md);
  opacity: 0;
  animation: premiumFadeSlide 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.divider {
  color: var(--color-accent);
  margin: 0 0.75rem;
  opacity: 0.8;
  filter: drop-shadow(0 0 5px var(--color-accent));
}

.hero-tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: rgba(255, 255, 255, 0.70);
  font-weight: 300;
  font-style: italic;
  opacity: 0;
  animation: taglineFadeSlide 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

/* Glassmorphism Cards */
.glass-card {
  position: relative;
  background: rgba(10, 10, 12, 0.4); /* Premium dark tinted glass */
  backdrop-filter: blur(32px) saturate(1.2); 
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.08); /* Crisp translucent edge */
  border-radius: 20px;
  padding: clamp(3rem, 5vw, 4rem);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1); /* Deep drop shadow and subtle inner highlight */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
}

.card-glow {
  display: none;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: var(--spacing-lg);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  box-shadow: 0 0 10px var(--color-accent);
}

.body-text {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 800px;
  margin-bottom: var(--spacing-md);
}

/* Highlights */
.highlight-quote {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-main);
  border-left: 3px solid var(--color-accent);
  padding-left: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.highlight-points {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  margin-top: var(--spacing-lg);
}

.point, .tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-glass-border);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--color-text-main);
  transition: all 0.2s ease;
}

.point:hover, .tag:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-glow);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
}

.category-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-main);
}

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

.skill-list li {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
  padding-left: 1.5rem;
  position: relative;
}

.skill-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

/* Projects */
.project-header {
  margin-bottom: var(--spacing-lg);
}

.badge {
  display: inline-block;
  background: rgba(94, 106, 210, 0.2);
  color: #8c9bf0;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--spacing-md);
  border: 1px solid var(--color-glow);
}

.project-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-sm);
}

.project-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.project-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.feature-item h4 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-main);
}

.feature-item p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.engineering-focus {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-glass-border);
}

.engineering-focus h4 {
  margin-bottom: var(--spacing-md);
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

/* Contacts */
.text-center {
  text-align: center;
  align-items: center;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
  flex-wrap: wrap;
}

.contact-link {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.25rem;
  padding: 1rem 2.5rem;
  border: 1px solid #ffffff;
  border-radius: 9999px;
  background: transparent;
  transition: all 200ms ease;
}

.contact-link:hover {
  background: #ffffff;
  color: #000000;
}

/* Scroll Animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes premiumFadeSlide {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes taglineFadeSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .section {
    padding: var(--spacing-xl) 0;
  }
  .contact-links {
    flex-direction: column;
    gap: var(--spacing-md);
  }
}
