:root {
  --bg: #0b1b2b;
  --bg-2: #0f2236;
  --fg: #e9f5ff;
  --muted: #b8d0e3;
  --primary: #6fd3ff;
  --primary-2: #9be7ff;
  --glass: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 10px 30px rgba(0, 40, 70, 0.35);
  --accent-ice: #c8f1ff;
  --glow: 0 0 24px rgba(111, 211, 255, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--fg);
  background: radial-gradient(1200px 800px at 10% 0%, #0c2844 0%, transparent 60%),
              radial-gradient(1000px 700px at 90% 10%, #0a3a55 0%, transparent 55%),
              linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  line-height: 1.7;
}

/* Ambient Aurora layer and snow canvas */
.aurora {
  position: fixed;
  inset: -20% -10% -10% -10%;
  pointer-events: none;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(111,211,255,0.18), transparent 60%),
              radial-gradient(900px 500px at 80% 15%, rgba(155,231,255,0.16), transparent 65%),
              radial-gradient(1000px 500px at 60% 0%, rgba(121,231,255,0.12), transparent 60%);
  filter: blur(20px) saturate(120%);
  z-index: -1;
}

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(2, 12, 22, 0.75), rgba(2, 12, 22, 0.35));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  color: var(--fg);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 24px);
  letter-spacing: 0.5px;
  text-decoration: none;
  text-shadow: 0 0 22px rgba(111,211,255,0.2);
}

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
}

.site-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  transition: color 150ms ease, background 150ms ease;
}

.site-nav a:hover {
  color: var(--primary-2);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a.active {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.09);
}

/* Sections */
.section {
  padding: 96px 0;
}

.section-title {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 28px;
  letter-spacing: 0.5px;
  margin: 0 0 28px;
}

p {
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Hero */
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 600" opacity="0.14"><defs><linearGradient id="g" x1="0" x2="1" y1="0" y2="1"><stop stop-color="%23b9ecff"/><stop offset="1" stop-color="%236fd3ff"/></linearGradient></defs><g fill="none" stroke="url(%23g)" stroke-width="1.2"><path d="M0 520 C 120 470, 240 570, 360 520 S 600 470, 800 520"/><path d="M0 420 C 120 370, 240 470, 360 420 S 600 370, 800 420"/></g></svg>') center/cover no-repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.hero-content { text-align: left; }

.hero-title {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(36px, 8vw, 52px);
  line-height: 1.05;
  margin: 0 0 12px;
  background: linear-gradient(90deg, var(--accent-ice), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--glow);
}

.hero-subtitle {
  color: var(--muted);
  margin: 0 0 28px;
}

.hero-cta { display: flex; gap: 16px; justify-content: flex-start; }

/* Social Media Buttons */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-2);
  box-shadow: 0 8px 25px rgba(111, 211, 255, 0.25);
}

.social-btn i {
  font-size: 18px;
}

.hero-photo {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
}

.photo-carousel {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
}

.hero-photo img {
  width: min(560px, 95%);
  height: auto;
  display: block;
  border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(155, 231, 255, 0.95),
              0 6px 20px rgba(111, 211, 255, 0.25),
              0 0 28px rgba(111, 211, 255, 0.22);
  transition: opacity 0.5s ease-in-out;
  will-change: transform, opacity, filter;
}

/* Carousel Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--fg);
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 10;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.carousel-btn:hover {
  color: var(--primary-2);
  transform: translateY(-50%) scale(1.2);
  text-shadow: 0 2px 12px rgba(111, 211, 255, 0.8);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.indicator.active {
  background: var(--primary);
  border-color: var(--primary-2);
  box-shadow: 0 0 10px rgba(111, 211, 255, 0.5);
}

/* Cards / Glass */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  outline: 1px solid rgba(200, 241, 255, 0.06);
}

/* About */
.vision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.vision-card { padding: 20px; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.tags li {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
}

.tags li i {
  font-size: 1em;
  margin-right: 8px;
  vertical-align: middle;
  color: var(--primary-2);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  padding: 18px;
  min-height: 200px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.22);
  transform-style: preserve-3d;
  transition: transform 300ms ease;
}

.project-card.glass { background: transparent; }

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--project-bg);
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.03);
  transition: transform 300ms ease, filter 300ms ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(1, 10, 18, 0.15), rgba(1, 10, 18, 0.5));
  z-index: -1;
}

.project-card:hover::before {
  transform: scale(1.07);
  filter: brightness(0.95) saturate(1.05);
}

.project-card:hover {
  transform: perspective(800px) rotateX(3deg) rotateY(-3deg);
}

.project-card h3, .project-card p { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); }

.link {
  color: var(--primary);
  text-decoration: none;
}

.link:hover { color: var(--primary-2); }

/* Education & Experience Grid */
.education-experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.subsection-title {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 22px;
  margin: 0 0 20px;
  color: var(--primary-2);
  text-shadow: var(--glow);
}

/* Timeline */
.timeline {
  position: relative;
  margin-left: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--primary), transparent);
}

.timeline-item {
  position: relative;
  margin: 0 0 18px 24px;
}

.timeline-item .dot {
  position: absolute;
  left: -24px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(111, 211, 255, 0.15);
}

.timeline-item .content { padding: 14px 16px; }

/* Contact */
.contact-form {
  padding: 18px;
}

.form-row { display: grid; gap: 6px; margin-bottom: 12px; }

label { color: var(--muted); font-size: 14px; }

input, textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--fg);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(155,231,255,0.05);
}

input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(111, 211, 255, 0.15); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform 120ms ease, background 150ms ease, border-color 150ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary { background: linear-gradient(180deg, var(--primary-2), var(--primary)); color: #00131f; border-color: transparent; }
.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Footer */
.site-footer {
  padding: 32px 0 48px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: linear-gradient(0deg, rgba(2, 12, 22, 0.6), rgba(2, 12, 22, 0.2));
}

/* Responsive */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-content { text-align: center; }
  .vision-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .education-experience-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-toggle { display: inline-block; }
  .site-nav { position: absolute; inset: 64px 0 auto 0; background: rgba(2, 12, 22, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); transform: translateY(-100%); transition: transform 180ms ease; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 24px; border-radius: 0; border-top: 1px solid rgba(255,255,255,0.04); }
  .nav-open .site-nav { transform: translateY(0); }
  
  .social-btn {
    width: 32px;
    height: 32px;
  }
  
  .social-btn i {
    font-size: 16px;
  }
  
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .carousel-indicators {
    bottom: 10px;
  }
  
  .indicator {
    width: 8px;
    height: 8px;
  }
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

