:root {
  /* Modern Dark Palette */
  --bg-deep: #050507;
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-surface-hover: rgba(255, 255, 255, 0.07);

  --primary-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
  --secondary-gradient: linear-gradient(135deg, #7F00FF 0%, #E100FF 100%);
  --text-gradient: linear-gradient(90deg, #fff, #a5b4fc);

  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-light: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 198, 255, 0.3);

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 40px -10px rgba(0,0,0,0.5);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  cursor: none; /* Hide default cursor for custom one */
}

/* Fallback for touch devices */
@media (pointer: coarse) {
  html { cursor: auto; }
  .cursor, .cursor-follower { display: none; }
}

body {
  margin: 0;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Custom Cursor --- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s;
  mix-blend-mode: difference;
}

.cursor-follower {
  position: fixed;
  top: 0; left: 0;
  width: 30px; height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s, width 0.3s, height 0.3s, background 0.3s;
}

.cursor.active {
  transform: translate(-50%, -50%) scale(0.5);
}

.cursor-follower.active {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 1.5rem 0;
}

.navbar.scrolled {
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(12px);
  padding: 0.8rem 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-sm);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -1px;
  color: var(--text-main);
  position: relative;
  z-index: 101;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.btn-small {
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  transition: all 0.2s;
}

.btn-small:hover {
  background: var(--text-main);
  color: var(--bg-deep) !important;
}

/* Hamburger Menu (Mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 102;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s ease;
}

/* Mobile Nav Overlay */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100vh;
    background: rgba(5, 5, 7, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 99; /* Below logo/hamburger */
  }

  .nav-links.active {
    transform: translateX(0);
  }

  /* Hamburger Animation when Active */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
}

/* --- Animated Background --- */
.background-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-deep);
}

.blob {
  position: absolute;
  filter: blur(80px);
  opacity: 0.4;
  border-radius: 50%;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #004e92, transparent 70%);
}

.blob-2 {
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #4a00e0, transparent 70%);
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 40%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, #8E2DE2, transparent 70%);
  animation-delay: -10s;
  opacity: 0.2;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 50px) scale(1.1); }
}

/* --- Layout --- */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section-spacing {
  padding: var(--spacing-lg) 0;
}

/* --- Typography --- */
h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p {
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

/* --- Components --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

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

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(255,255,255,0.3);
}

.btn-outline {
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-main);
}

.glass-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255,255,255,0.2);
}

.hover-lift:hover {
  transform: translateY(-5px);
  background: var(--bg-surface-hover);
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
  width: 100%;
}

.hero__text-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.badge-pill {
  align-self: flex-start;
  padding: 0.4rem 1rem;
  background: rgba(0, 198, 255, 0.1);
  color: #00c6ff;
  border: 1px solid rgba(0, 198, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero__subtitle {
  font-size: 1.15rem;
  max-width: 500px;
  margin-bottom: var(--spacing-sm);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-bottom: var(--spacing-sm);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: var(--spacing-sm);
}

.meta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-link:hover {
  color: var(--text-main);
}

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

.tech-icon {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.tech-icon:hover {
  color: var(--text-main);
  border-color: var(--text-main);
}

/* Hero Visual & Profile Image */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-avatar-wrapper {
  position: relative;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  padding: 8px;
  background: linear-gradient(135deg, rgba(0,198,255,0.5), rgba(127,0,255,0.5));
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-deep);
  position: relative;
  z-index: 2;
}

.profile-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #00C6FF, #0072FF);
  filter: blur(40px);
  opacity: 0.5;
  z-index: 1;
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% { opacity: 0.4; transform: scale(0.95); }
  100% { opacity: 0.7; transform: scale(1.05); }
}

.floating-stat {
  position: absolute;
  background: var(--bg-deep);
  border: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 3;
  display: flex;
  flex-direction: column;
  min-width: 120px;
  text-align: center;
}

.floating-stat strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text-main);
}

.floating-stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-1 {
  top: 10%;
  right: 0;
  animation: float-slow 6s infinite ease-in-out;
}

.stat-2 {
  bottom: 10%;
  left: 0;
  animation: float-slow 7s infinite ease-in-out reverse;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* --- Content Sections --- */
.section-header {
  margin-bottom: var(--spacing-lg);
  text-align: left;
}

.section-title {
  display: inline-block;
  background: linear-gradient(90deg, #fff, #888);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
}

.line-decorator {
  width: 60px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.section-intro .section-desc {
  font-size: 1.1rem;
  line-height: 1.8;
}

.styled-list {
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.styled-list li {
  color: var(--text-muted);
}

.styled-list li::marker {
  color: #00C6FF;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--border-light);
}

.timeline-item {
  position: relative;
  opacity: 0; /* Hidden initially for staggered animation */
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.timeline-marker {
  position: absolute;
  left: -2.6rem;
  top: 1.5rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--bg-deep);
  border: 2px solid #00C6FF;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 198, 255, 0.1);
}

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

.company-badge {
  font-size: 0.85rem;
  color: #a5b4fc;
  font-weight: 500;
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.compact-list {
  padding-left: 1.2rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.skill-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skill-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.skill-card h3 {
  color: #00C6FF;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.project-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  color: var(--text-dim);
}

.project-content h3 {
  margin-bottom: 0.75rem;
}

.project-content p {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

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

.tech-pill {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  color: var(--text-muted);
}

/* Education & Languages */
.grid-dual {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

.small-heading {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.highlight-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.sub-text {
  color: var(--text-muted);
  margin: 0;
}

.sub-text.block {
  margin-top: 0.25rem;
}

.lang-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.divider-vertical {
  width: 1px;
  height: 40px;
  background: var(--border-light);
}

/* Footer */
.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(180deg, var(--bg-surface), rgba(0,0,0,0.4));
}

.footer-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.copyright {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- Scroll To Top --- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

.scroll-top-btn:hover {
  background: var(--text-main);
  color: var(--bg-deep);
  transform: translateY(-3px);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* --- Entry Animations --- */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.delay-200 {
  animation-delay: 0.2s;
}

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

/* Scroll Animation Class */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero__layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__text-content {
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__meta {
    justify-content: center;
  }

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

  .hero__visual {
    margin-top: 2rem;
  }

  .timeline {
    border-left: none;
    padding-left: 0;
  }

  .timeline-marker {
    display: none;
  }

  .floating-stat {
    display: none;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.5rem; }
  .profile-avatar-wrapper {
    width: 250px;
    height: 250px;
  }
}
