/* CSS Variables - Refined Minimal Palette */
:root {
  --color-primary: #1a1a1a;
  --color-secondary: #fafafa;
  --color-accent: #4a4a4a;
  --color-text: #2d2d2d;
  --color-text-light: #6b6b6b;
  --color-white: #ffffff;
  --color-warm: #fdfdfd;
  --color-subtle: #f8f8f8;
  --color-border: #e8e8e8;

  --font-primary: "Inter", sans-serif; /* Default for body and hero */
  --font-secondary: "Crimson Text", serif; /* For specific hero title line */
  --font-body-text: "Manrope", sans-serif; /* New font for other sections */
  --font-playful: "Fredoka", sans-serif; /* New playful font */
  --color-vibe-accent: #ff6b6b; /* Vibrant coral for "Vibe with me" */

  --border-radius: 12px;
  --border-radius-small: 6px;
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.06);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* App Demo Screen Colors */
  /* Home Screen Theme */
  --app-home-bg: #f0f2f5; /* Light grey background for home screen */
  --app-widget-bg: #ffffff;
  --app-widget-text: #333333;
  --app-widget-text-light: #888888;
  --app-widget-accent: #ff0055; /* Vibrant Pink for music */
  --app-widget-progress: #e0e0e0;
  --app-widget-border: #e5e7eb;

  /* CV Viewer Theme (retained for overlay, though now external) */
  --app-profile-bg: #ffffff;
  --app-profile-header-bg: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  --app-profile-text: #333333;
  --app-profile-text-light: #666666;
  --app-profile-card-bg: #f8f8f8;
  --app-profile-button-bg: #3b82f6;
  --app-profile-button-text: #ffffff;
  --app-profile-border: #e0e0e0;

  --paper:#ffffff;
  --ink:#1a1a1a;
  --grey:#6b6b6b;
  --pop:#ff6b6b;
  --shadow-light:0 8px 24px rgba(0,0,0,.04);
}

/* Import Manrope and Fredoka fonts */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap");

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

html {
  scroll-behavior: smooth;
  overflow-y: auto !important; /* Ensure normal scrolling */
  overscroll-behavior-y: auto !important; /* Ensure normal scrolling */
  touch-action: auto !important; /* Ensure normal scrolling */
}

body {
  font-family: var(--font-primary); /* Default font for the entire body, including hero */
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-warm);
  overflow-x: hidden;
  background: linear-gradient(135deg, #ffeef8 0%, #f0f8ff 25%, #faf0e6 50%, #f5f0ff 75%, #fff0f5 100%);
  overflow-y: auto !important; /* Ensure normal scrolling */
  overscroll-behavior-y: auto !important; /* Ensure normal scrolling */
  touch-action: auto !important; /* Ensure normal scrolling */
}

/* Apply Manrope to specific sections and footer */
#about,
#skills,
#work,
#contact,
.footer {
  font-family: var(--font-body-text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Subtle Grain Texture */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.08) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.02;
  pointer-events: none;
  z-index: 1000;
}

/* New Blurry Overlay for content behind navbar */
.navbar-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: var(--color-white);
  mask-image: linear-gradient(to top, rgba(55, 23, 23, 0) 0%, rgb(255, 255, 255) 100%);
  z-index: 99;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
}

/* Floating Navigation - More Minimal */
.floating-nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 100%);
  backdrop-filter: blur(200px);
  border-radius: 50px;
  padding: 0.4rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.nav-blob {
  position: absolute;
  /* These properties will be set by JavaScript for precise alignment */
  /* top: 0.4rem; */
  /* height: 36px; */
  left: 0; /* This is now dynamically set by JS */
  width: 80px; /* This will be overridden by JS */
  background: var(--color-primary);
  border-radius: 50px;
  transition: var(--transition);
  opacity: 0.08;
}

.floating-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 2;
}

.nav-link {
  display: block;
  padding: 0.7rem 1.4rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

/* Hero Section - Refined */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(74, 74, 74, 0.03), rgba(74, 74, 74, 0.06));
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 280px;
  height: 280px;
  top: 15%;
  right: 10%;
  animation-delay: 0s;
  background: transparent;
}

.shape-2 {
  background: #ffd8dd;
  width: 180px;
  height: 180px;
  bottom: 25%;
  left: 8%;
  animation-delay: 3s;
}

.shape-3 {
  background: #d0f3ff;
  width: 120px;
  height: 120px;
  top: 65%;
  right: 35%;
  animation-delay: 6s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-15px) rotate(3deg);
  }
  50% {
    transform: translateY(0px) rotate(0deg);
  }
  75% {
    transform: translateY(15px) rotate(-3deg);
  }
}

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

.greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wave {
  font-size: 1.4rem;
  animation: wave 2.5s ease-in-out infinite;
}

@keyframes wave {
  0%,
  100% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(20deg);
  }
  30% {
    transform: rotate(-15deg);
  }
  45% {
    transform: rotate(10deg);
  }
  60% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(2deg);
  }
}

.greeting-text {
  color: var(--color-text-light);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Hero Text Animation */
.hero-title,
.hero-description {
  opacity: 0;
  transform: translateY(20px);
}

.hero-title.is-visible,
.hero-description.is-visible {
  animation: slideUpFade 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation-delay: 0.2s; /* Stagger animation */
}

.name-line {
  display: block;
  color: var(--color-primary);
}

.title-line {
  display: block;
  color: var(--color-accent);
  font-family: var(--font-secondary); /* This will keep Crimson Text */
  font-style: italic;
  font-weight: 400;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-bottom: 2.5rem;
  max-width: 500px;
  font-weight: 400;
  animation-delay: 0.4s; /* Stagger animation */
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: scale(0.9);
}

.hero-actions.is-visible {
  animation: popInSmall 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.6s; /* Stagger after text */
}

/* Buttons - More Minimal */
.btn-primary,
.btn-secondary {
  position: relative;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
  background: #2a2a2a;
  color: var(--color-white);
}

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

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-subtle);
}

.btn-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:active .btn-ripple {
  width: 300px;
  height: 300px;
}

/* Hero Visual - Refined */
.hero-visual {
  display: flex;
  flex-direction: column; /* Changed to column to stack phone and text */
  justify-content: center;
  align-items: center;
  perspective: 1000px; /* Defines the depth of the 3D scene */
}

/* iPhone 16 Frame Styling */
.phone-mockup {
  width: 260px;
  height: 520px;
  background: #000; /* Solid black for the phone body */
  border-radius: 35px;
  padding: 10px; /* Thinner bezel */
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  opacity: 0;
  transform-style: preserve-3d; /* Enable 3D transformations for children */
  /* Add side buttons and notch */
}

.phone-mockup::before,
.phone-mockup::after {
  content: "";
  position: absolute;
  background: #333; /* Button color */
  border-radius: 2px;
}

/* Volume buttons */
.phone-mockup::before {
  width: 3px;
  height: 30px;
  left: -4px;
  top: 120px;
  box-shadow: 0 40px 0 #333, 0 80px 0 #333; /* Two volume buttons */
}

/* Power button */
.phone-mockup::after {
  width: 3px;
  height: 50px;
  right: -4px;
  top: 180px;
}

.phone-mockup.is-visible {
  animation: rotateIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  /* No animation-delay here, it's triggered by JS */
}

.phone-mockup:hover {
  /* Adjust hover to use perspective for a more natural 3D tilt */
  transform: rotateX(var(--hover-rotate-x, 0deg)) rotateY(var(--hover-rotate-y, 0deg)) scale(1.03);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--app-home-bg); /* Default background */
  border-radius: 25px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1); /* Slight inset for screen */
  /* Dynamic Island / Notch */
}

.phone-screen::before {
  content: "";
  position: absolute;
  top: 10px; /* Position from top */
  left: 50%;
  transform: translateX(-50%);
  width: 100px; /* Width of the notch */
  height: 25px; /* Height of the notch */
  background: #000; /* Black for the notch */
  border-radius: 15px; /* Rounded corners for the notch */
  z-index: 1; /* Ensure it's above app content */
}

/* App Demo Home Screen */
.app-demo-home-screen {
  background: var(--app-home-bg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 3.5rem 1rem 1rem; /* Adjusted padding-top for Dynamic Island */
  align-items: center;
  justify-content: flex-start; /* Align items to the top */
  opacity: 0; /* Initial state */
  transform: translateY(20px); /* Initial state for slideUpFade */
}

.app-demo-home-screen.animate-in {
  animation: slideUpFade 0.6s ease-out forwards;
  /* Delay handled by JS */
}

/* Music Player Widget */
.music-widget {
  width: 100%;
  background: var(--app-widget-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  opacity: 0; /* Initial state */
  transform: scale(0.9); /* Initial state for popInSmall */
}

.music-widget.animate-in {
  animation: popInSmall 0.6s ease-out forwards;
  /* Delay handled by JS */
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.widget-header svg {
  color: var(--app-widget-text-light);
}
.widget-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-widget-text);
}

.album-art-small {
  width: 100px;
  height: 100px;
  background: var(--app-widget-accent);
  border-radius: var(--border-radius-small);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
  animation: none; /* Controlled by JS */
}
.album-art-small.playing {
  animation: pulse 2s infinite alternate ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.05);
  }
}

.song-info-small {
  text-align: center;
  margin-bottom: 0.5rem;
}
.song-title-small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--app-widget-text);
  margin-bottom: 0.2rem;
}
.artist-name-small {
  font-size: 0.8rem;
  color: var(--app-widget-text-light);
}
.progress-bar-music-small {
  width: 90%;
  height: 3px;
  background: var(--app-widget-progress);
  border-radius: 1.5px;
  margin-bottom: 0.5rem;
  cursor: pointer; /* Indicate clickable */
}
.progress-fill {
  width: 0%; /* Initial width */
  height: 100%;
  background: var(--app-widget-accent);
  border-radius: 1.5px;
  transition: width 0.1s linear; /* Smooth progress update */
}
.controls-small {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}
.control-button-small {
  width: 30px;
  height: 30px;
  background: var(--app-widget-progress);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  color: var(--app-widget-text);
  transition: background 0.3s ease, transform 0.1s ease;
}
.control-button-small:hover {
  background: #d0d0d0;
}
.control-button-small:active {
  transform: scale(0.95);
}
.control-button-small.large {
  width: 40px;
  height: 40px;
  background: var(--app-widget-accent);
  color: var(--color-white);
}
.control-button-small.large:hover {
  background: #e0004c;
}

/* CV Home Section (Button Widget) */
.cv-home-section {
  width: 100%;
  background: var(--app-widget-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center content vertically */
  gap: 0.8rem;
  margin-top: 1rem;
  opacity: 0; /* Initial state */
  transform: scale(0.9); /* Initial state for popInSmall */
  cursor: pointer; /* Indicate it's clickable */
  border: none; /* Remove default button border */
  transition: background 0.3s ease, transform 0.1s ease;
}

.cv-home-section.animate-in {
  animation: popInSmall 0.6s ease-out forwards;
  /* Delay handled by JS */
}

.cv-home-section:hover {
  background: var(--color-subtle);
  transform: translateY(-2px);
}
.cv-home-section:active {
  transform: scale(0.98);
}

.cv-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
  margin-bottom: 0; /* No margin-bottom for single button */
}
.cv-section-header svg {
  color: var(--app-widget-text-light);
}
.cv-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--app-widget-text);
}

/* Phone Screen Navigation Dots (simplified) */
.phone-screen-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.nav-dot {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-dot.active {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

/* Section Styles */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-number {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

/* Elements animated on scroll */
.animated-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* About Section */
.about {
  background: var(--color-white);
}


.about-content {
  display: flex;
  gap: 4rem;
  align-items: flex-start;
}

.about-visual {
  flex: 0 0 350px;
  position: sticky;
  top: 100px; /* Adjust based on fixed nav height */
  align-self: flex-start;
}

.lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--color-text-light);
  font-weight: 400;
}


/* Updated Profile Card - ID Card Style */
.profile-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: none;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 248, 248, 0.9) 100%);
}

/* ID Card Header */
.profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #e7f4f8 0%, #f0f4f8 60%, #ffffff 100%);
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
}

/* ID Card Footer */
.profile-card::after {
  content: "DEVELOPER ID";
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-light);
  opacity: 0.6;
  letter-spacing: 1px;

}

/* Profile Image */
.profile-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  border: 4px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
  background: white;

}

.profile-photo{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.profile-image::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  z-index: -1;
}

/* Profile Info */
.profile-info h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.profile-info h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background: var(--color-accent);
}

.profile-info ul {
  list-style: none;
  padding-left: 0;
}

.profile-info li {
  margin-bottom: 0.8rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
  position: relative;
  padding-left: 1.5rem;
}

.profile-info li::before {
  position: absolute;
  left: 0;
  color: var(--color-text-light);
  font-weight: bold;
}

/* Education Section */
.profile-info h3:nth-of-type(2) {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--color-border);
}

/* Hover Effects */
.profile-card:hover {
  transform: translateY(-5px) rotate(1deg);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.profile-card:hover::before {
  background: linear-gradient(135deg, #d6ecf2 0%, #e2e8f0 60%, #ffffff 100%);
}

/* Experience Timeline */
.experience-timeline {
  margin-top: 3rem;
}

.experience-timeline h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 2rem;
  position: relative;
}

.experience-timeline h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

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

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
}

.timeline::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  border-radius: 2px;
  animation: timelineProgress 3s ease-in-out infinite;
}

@keyframes timelineProgress {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(300px);
    opacity: 0;
  }
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.75rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--color-white);
  border: 3px solid var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-white);
  animation: dotGlow 2s ease-in-out infinite alternate;
}

@keyframes dotGlow {
  0% {
    box-shadow: 0 0 0 4px var(--color-white), 0 0 0 0 rgba(74, 74, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 4px var(--color-white), 0 0 0 6px rgba(74, 74, 74, 0.3);
  }
}

/* Stagger the dot animations */
.timeline-item:nth-child(1) .timeline-dot {
  animation-delay: 0s;
}

.timeline-item:nth-child(2) .timeline-dot {
  animation-delay: 0.7s;
}

.timeline-item:nth-child(3) .timeline-dot {
  animation-delay: 1.4s;
}

.timeline-content {
  background: var(--color-subtle);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.timeline-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.timeline-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.timeline-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.3rem; /* Reduced margin since company name follows */
}

.company-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
  font-style: italic;
  position: relative;
  padding-left: 1rem;
}

.company-name::before {
  content: "@";
  position: absolute;
  left: 0;
  color: var(--color-text-light);
  font-weight: 400;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Responsive adjustments for timeline */
@media (max-width: 768px) {
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline::before {
    left: 6px;
  }

  .timeline-dot {
    left: -1.5rem;
    width: 10px;
    height: 10px;
  }

  .timeline-item {
    padding-left: 1rem;
  }

  .timeline-content {
    padding: 1rem;
  }
}

/* Skills Section */
.skills {
  background: var(--color-subtle); /* Slightly different background for contrast */
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-item {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.skill-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  position: relative;
}

.skill-item h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background-color: var(--color-accent);
}

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

.skill-item li {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  opacity: 0;
  transform: translateX(-20px); /* Slide in from left */
}

.skill-item li:last-child {
  margin-bottom: 0;
}

.skill-logo {
  width: 24px; /* Adjust size as needed */
  height: 24px;
  flex-shrink: 0; /* Prevent shrinking */
}

/* Work Section - Clean 3-Column Grid Layout */
.work {
  position: relative;
  background: linear-gradient(135deg, var(--color-subtle) 0%, var(--color-white) 100%);
  overflow: visible; /* Changed from hidden */
}

.work .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.projects-container {
  position: relative;
  margin-top: 3rem;
  width: 100%;
  padding: 0; /* Remove padding */
  /* Fix scroll issue - ensure normal scrolling works */
  pointer-events: auto;
}

.projects-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  padding: 2rem 0 !important;
  overflow: visible !important;
  /* Fix scroll issue - ensure normal scrolling works */
  pointer-events: auto;
}

.project-card {
  width: auto !important;
  min-width: auto !important;
  flex: none !important;
  background: var(--color-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-border);
  position: relative;
  display: flex;
  flex-direction: column;
  /* Fix scroll issue - ensure normal scrolling works */
  pointer-events: auto;
}

.project-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  /* Ensure hover doesn't interfere with scrolling */
  pointer-events: auto;
}

/* Remove any CSS that might interfere with scrolling */
.project-card,
.project-image,
.project-content,
.phone-preview {
  /* Ensure these elements don't capture scroll events */
  pointer-events: auto;
}

/* Make sure no element is preventing scroll */
.work * {
  /* Allow normal scrolling behavior */
  overscroll-behavior: auto;
}

/* Enhanced hover effects for grid */
.project-card:nth-child(1):hover {
  transform: translateY(-8px) scale(1.02) rotate(-1deg);
}

.project-card:nth-child(2):hover {
  transform: translateY(-8px) scale(1.02);
}

.project-card:nth-child(3):hover {
  transform: translateY(-8px) scale(1.02) rotate(1deg);
}

/* Project image section */
.project-image {
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  position: relative;
}

/* Phone mockup */
.phone-preview {
  width: 100px;
  height: 200px;
  background: linear-gradient(145deg, #1a1a1a, #2d2d2d);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.phone-preview::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

.phone-preview::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 2px;
  background: #333;
  border-radius: 2px;
}

.project-card:hover .phone-preview {
  transform: scale(1.05) rotateY(5deg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.phone-screen-small {
  width: 100%;
  height: 100%;
  background: var(--color-white);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-preview {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: contain;
  background: var(--color-white);
}

/* Project content styling */
.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

/* Elegant project type design */
.project-type {
  background: linear-gradient(135deg, rgba(74, 74, 74, 0.08), rgba(74, 74, 74, 0.12));
  color: var(--color-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid rgba(74, 74, 74, 0.1);
  backdrop-filter: blur(10px);
  flex: 1;
  text-align: center;
  line-height: 1.2;
  max-width: 200px;
}

.project-year {
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-vibe-accent), #ff8a8a);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.project-description {
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  flex-grow: 1;
  font-size: 0.9rem;
}

/* Tech tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: var(--color-subtle);
  color: var(--color-text);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tech-tag:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Project links */
.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  background: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: #2a2a2a;
}

/* Hide scroll elements for grid layout */
.scroll-indicator {
  display: none;
}

.scroll-progress {
  display: none;
}

/* Responsive for grid layout */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr !important;
  }

  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-type {
    max-width: none;
    text-align: left;
  }
}

/* Contact Section */
.contact {
  background: var(--color-white);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  background: var(--color-subtle);
  padding: 1.8rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--color-border);
}

.contact-card:hover {
  transform: translateY(-5px); /* More pronounced lift */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Stronger shadow */
}

.contact-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-size: 1.1rem;
}

.contact-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.contact-form-container {
  background: var(--color-subtle);
  padding: 2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-primary);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--border-radius-small);
  background: var(--color-white);
  font-family: var(--font-body-text); /* Apply Manrope to form inputs */
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Footer */
.footer {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 2rem 0;
}

.footer p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Vibe Text Styling */
.vibe-text {
  font-family: var(--font-secondary);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--color-vibe-accent);
  margin-top: 2.5rem; /* More space below phone */
  text-align: center;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  text-shadow: 0 2px 8px rgba(255, 107, 107, 0.3); /* Soft shadow */
  opacity: 0; /* Initial state for animation */
  transform: scale(0.9); /* Initial state for animation */
  animation: float 8s ease-in-out infinite; /* Continuous float animation */
}

.vibe-text .emoji {
  font-size: 1.2em; /* Relative to parent font size */
  /* Removed vibeBounce from here, as the whole text floats */
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .floating-nav {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    margin: 1rem;
    border-radius: var(--border-radius);
  }

  .floating-nav ul {
    flex-direction: column;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
    transform: none;
  }
  .phone-mockup::before {
    /* Adjust volume buttons for smaller size */
    top: 80px;
    height: 20px;
    box-shadow: 0 30px 0 #333, 0 60px 0 #333;
  }
  .phone-mockup::after {
    /* Adjust power button for smaller size */
    top: 130px;
    height: 35px;
  }
  .phone-screen::before {
    /* Adjust notch for smaller size */
    width: 70px;
    height: 20px;
    border-radius: 10px;
  }

  .about-content,
  .contact-content,
  .skills-grid {
    /* Added skills-grid for responsiveness */
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-grid .skill-item ul li {
    justify-content: center; /* Center align items in mobile */
  }

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

  section {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .btn-primary,
  .btn-secondary {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}


@keyframes imageLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* New Keyframes for more distinct animations */
@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDownFade {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popInSmall {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  0% {
    opacity: 0;
    transform: rotateX(-90deg) rotateY(20deg) scale(0.8);
  }
  80% {
    opacity: 1;
    transform: rotateX(0deg) rotateY(0deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg) rotateY(0deg) scale(1);
  }
}

@keyframes slideInLeftFade {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}


/* Project Modal Styles */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.project-modal.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.modal-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.project-modal.active .modal-container {
  transform: scale(1);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-subtle);
  border: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: rotate(90deg);
}

.modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 2rem;
}

.modal-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.modal-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-type {
  background: linear-gradient(135deg, rgba(74, 74, 74, 0.08), rgba(74, 74, 74, 0.12));
  color: var(--color-primary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid rgba(74, 74, 74, 0.1);
  line-height: 1.2;
}

.modal-year {
  color: var(--color-white);
  font-size: 0.85rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--color-vibe-accent), #ff8a8a);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.modal-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.modal-gallery {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.main-image-container {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--color-subtle);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.main-image:hover {
  transform: scale(1.02);
}

.thumbnail-container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail.active {
  border-color: var(--color-primary);
}

.modal-details {
  display: flex;
  flex-direction: column;
}

.modal-description {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1rem;
}

.tech-stack-container h4 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

.tech-stack .tech-tag {
  background: var(--color-subtle);
  color: var(--color-text);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.tech-stack .tech-tag:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-1px);
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.project-links .project-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-white);
  background: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-links .project-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: #2a2a2a;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.5rem;
  }
  
  .project-links {
    flex-direction: column;
  }
}

/* Animation for modal content */
@keyframes slideUpContent {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header,
.modal-gallery,
.modal-details {
  animation: slideUpContent 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.modal-header {
  animation-delay: 0.1s;
}

.modal-gallery {
  animation-delay: 0.2s;
}

.modal-details {
  animation-delay: 0.3s;
}