/* ==========================================================================
   Chloe Zoey Portfolio - Design System & Modern Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  /* Font Families */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Color Palette (Dark Theme First - Default) */
  --color-bg-dark: #0b0f19;
  --color-bg-dark-alt: #111827;
  --color-card-bg-dark: rgba(255, 255, 255, 0.03);
  --color-card-border-dark: rgba(255, 255, 255, 0.08);
  --color-text-primary-dark: #ffffff;
  --color-text-secondary-dark: #9ca3af;
  --color-text-muted-dark: #6b7280;

  /* Color Palette (Light Theme - Auto System Adaptive) */
  --color-bg-light: #f3f4f6;
  --color-bg-light-alt: #ffffff;
  --color-card-bg-light: rgba(0, 0, 0, 0.02);
  --color-card-border-light: rgba(0, 0, 0, 0.06);
  --color-text-primary-light: #111827;
  --color-text-secondary-light: #4b5563;
  --color-text-muted-light: #9ca3af;

  /* Brand Accents & Gradients */
  --color-accent-blue: #3b82f6;
  --color-accent-purple: #8b5cf6;
  --gradient-accent: linear-gradient(135deg, var(--color-accent-blue), var(--color-accent-purple));
  --gradient-accent-hover: linear-gradient(135deg, #60a5fa, #a78bfa);
  
  /* Adaptive Semantic Mapping (Using light-dark() CSS function) */
  color-scheme: light dark;
  --surface-bg: light-dark(var(--color-bg-light), var(--color-bg-dark));
  --surface-bg-alt: light-dark(var(--color-bg-light-alt), var(--color-bg-dark-alt));
  --card-bg: light-dark(var(--color-card-bg-light), var(--color-card-bg-dark));
  --card-border: light-dark(var(--color-card-border-light), var(--color-card-border-dark));
  --text-primary: light-dark(var(--color-text-primary-light), var(--color-text-primary-dark));
  --text-secondary: light-dark(var(--color-text-secondary-light), var(--color-text-secondary-dark));
  --text-muted: light-dark(var(--color-text-muted-light), var(--color-text-muted-dark));
  --glass-blur: blur(16px);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);

  /* Layout and Spacing */
  --container-max-width: 1200px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Gradient Interpolation Helper */
  --in-oklab: in oklab;
}

/* --------------------------------------------------------------------------
   2. Modern Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--surface-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.6s ease, color 0.6s ease;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* Accessibility Focus Indicator */
:focus-visible {
  outline: 3px solid var(--color-accent-purple);
  outline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
.project-card:focus-visible {
  outline: 3px solid var(--color-accent-purple);
  outline-offset: 4px;
  border-radius: 12px;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent-purple);
  outline-offset: 2px;
}

li {
  list-style: none;
}

/* Base Headings styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--surface-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 5px;
  border: 2px solid var(--surface-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --------------------------------------------------------------------------
   3. Global Layout Utilities & Shapes
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 7rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 5rem 0;
  }
}

/* Ambient Glow Lights in Background */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}

.glow-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  right: -100px;
  background: var(--color-accent-blue);
  animation: glowFloat 12s infinite alternate ease-in-out;
}

.glow-2 {
  width: 500px;
  height: 500px;
  top: 40%;
  left: -200px;
  background: var(--color-accent-purple);
  animation: glowFloat 16s infinite alternate-reverse ease-in-out;
}

.glow-3 {
  width: 350px;
  height: 350px;
  bottom: 10%;
  right: 10%;
  background: var(--color-accent-blue);
  animation: glowFloat 10s infinite alternate ease-in-out;
}

@keyframes glowFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(50px) scale(1.15); }
}

/* Glassmorphism utility card */
.card.glass {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

/* Gradient Text */
.gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Header Styles */
.section-header {
  margin-bottom: 4rem;
}

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

.section-title {
  font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
  background: var(--gradient-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.btn-primary svg {
  transition: transform 0.3s ease;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-secondary {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--card-border);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation Menu
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  padding: 0.85rem 0;
  background: light-dark(rgba(243, 244, 246, 0.7), rgba(11, 15, 25, 0.7));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--gradient-accent);
  border-radius: 50%;
  animation: logoPulse 2s infinite alternate ease-in-out;
}

@keyframes logoPulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 1; }
}

.nav-list {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Toggle Hamburger */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}

.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-smooth);
}

.hamburger::before, .hamburger::after {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  left: 0;
  transition: var(--transition-smooth);
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Hamburger Open States */
.menu-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}
.menu-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: light-dark(rgba(243, 244, 246, 0.95), rgba(11, 15, 25, 0.95));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--card-border);
    padding: 7rem 2.5rem;
    z-index: 105;
    transition: var(--transition-smooth);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  
  .nav-link {
    font-size: 1.15rem;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section (Home)
   -------------------------------------------------------------------------- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: 30px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #10b981;
  border-radius: 50%;
  animation: pulseScale 1.8s infinite ease-out;
}

@keyframes pulseScale {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.hero-title {
  font-size: clamp(2.5rem, 2rem + 3.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 550px;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Avatar Showcase Card */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.avatar-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1;
}

.avatar-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  background: var(--gradient-accent);
  border-radius: 32px;
  opacity: 0.25;
  filter: blur(20px);
  animation: avatarFloat 6s infinite alternate ease-in-out;
}

.avatar-container {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 2;
  background: var(--color-bg-dark);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-wrapper:hover .avatar-img {
  transform: scale(1.05);
}

/* Floating interactive badges */
.floating-badge {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: floating 4s infinite alternate ease-in-out;
  color: #ffffff;
}

.floating-badge.badge-1 {
  top: 15%;
  left: -40px;
  animation-delay: 0.5s;
}

.floating-badge.badge-2 {
  bottom: 20%;
  right: -30px;
  animation-delay: 1.2s;
}

@keyframes avatarFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(12px); }
}

@keyframes floating {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-10px) rotate(2deg); }
}

@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }
  
  .hero-desc {
    margin: 0 auto 2.5rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   6. About Section
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
}

.about-info {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-info h3 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-info p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Stats dashboard */
.stats-container {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  flex: 1;
}

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Skills Categories cards */
.skills-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-category {
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.skill-category:hover {
  transform: translateX(6px);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.08);
}

.category-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.category-icon {
  color: var(--color-accent-blue);
}

.skill-category:nth-child(2) .category-icon {
  color: var(--color-accent-purple);
}

.skill-category:nth-child(3) .category-icon {
  color: #10b981;
}

.category-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tags li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  background: light-dark(rgba(0,0,0,0.03), rgba(255,255,255,0.04));
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-secondary);
}

@media (max-width: 991px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-info {
    padding: 2rem;
  }
}

/* --------------------------------------------------------------------------
   7. Projects Gallery Section
   -------------------------------------------------------------------------- */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  padding: 0.6rem 1.35rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: var(--card-border);
}

.filter-btn.active {
  background: var(--gradient-accent);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 16px 40px rgba(139, 92, 246, 0.12);
}

.project-image-container {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--card-border);
  background: #000;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
  transform: scale(1.06);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 15, 25, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 3;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(15px);
  transition: var(--transition-bounce);
}

.project-card:hover .project-link {
  transform: translateY(0);
}

.project-link:hover {
  background: var(--gradient-accent);
  color: #ffffff;
  transform: scale(1.1);
}

.project-info {
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-meta {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-blue);
  background: light-dark(rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.15));
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.project-card:nth-child(even) .project-tag {
  color: var(--color-accent-purple);
  background: light-dark(rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.15));
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  transition: var(--transition-smooth);
}

.project-card:hover .project-title {
  color: var(--color-accent-purple);
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tech span {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--card-border);
}

/* Filtering Animations with @starting-style */
.project-card {
  transition: display 0.4s allow-discrete, opacity 0.4s ease, transform 0.4s ease;
}

.project-card.filtered-out {
  display: none !important;
  opacity: 0;
  transform: scale(0.9);
}

@starting-style {
  .project-card {
    opacity: 0;
    transform: scale(0.9);
  }
}

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

/* --------------------------------------------------------------------------
   8. Experience Timeline Section
   -------------------------------------------------------------------------- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 2.5rem;
}

.timeline-line {
  position: absolute;
  top: 0;
  left: 11px;
  height: 100%;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
}

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

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-bg);
  border: 4px solid var(--color-accent-blue);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  transition: var(--transition-bounce);
  z-index: 2;
}

.timeline-item:nth-child(even) .timeline-dot {
  border-color: var(--color-accent-purple);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  background: var(--text-primary);
}

.timeline-date {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent-blue);
  margin-bottom: 0.65rem;
}

.timeline-item:nth-child(even) .timeline-date {
  color: var(--color-accent-purple);
}

.timeline-content {
  padding: 2rem;
}

.timeline-role {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.timeline-company {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   9. Contact Form & Section
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
}

.contact-card {
  padding: 3rem;
  display: flex;
  flex-direction: column;
}

.contact-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-grow: 1;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.detail-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: light-dark(rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.15));
  color: var(--color-accent-blue);
  display: flex;
  justify-content: center;
  align-items: center;
}

.detail-item:nth-child(even) .detail-icon {
  background: light-dark(rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.15));
  color: var(--color-accent-purple);
}

.detail-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.social-links-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 0.85rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-bounce);
}

.social-btn:hover {
  transform: translateY(-4px) scale(1.1);
  border-color: var(--color-accent-blue);
  color: var(--color-accent-blue);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.social-btn:nth-child(2):hover {
  border-color: var(--color-accent-purple);
  color: var(--color-accent-purple);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.social-btn:nth-child(3):hover {
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Glassmorphic Contact Form with Floating Labels */
.contact-form-container {
  padding: 3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  position: relative;
  margin-bottom: 1.85rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  background: light-dark(rgba(0,0,0,0.01), rgba(255,255,255,0.02));
  border: 1.5px solid var(--card-border);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-group label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  pointer-events: none;
  transition: var(--transition-smooth);
  transform-origin: left top;
}

/* Floating logic: trigger when focused or not showing placeholder */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.6rem) scale(0.8);
  color: var(--color-accent-purple);
  font-weight: 600;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--color-accent-purple);
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.04));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

/* Error message styling */
.error-message {
  position: absolute;
  bottom: -1.2rem;
  left: 0.25rem;
  font-size: 0.78rem;
  color: #ef4444;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-5px);
  transition: var(--transition-smooth);
  pointer-events: none;
}

/* Validity feedback with :user-invalid */
.form-group input:user-invalid, .form-group textarea:user-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.form-group input:user-invalid ~ .error-message,
.form-group textarea:user-invalid ~ .error-message {
  opacity: 1;
  transform: translateY(0);
}

/* Submission Loading Spinner states */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.btn.submitting {
  pointer-events: none;
  opacity: 0.8;
}

.btn.submitting .btn-text {
  display: none;
}

.btn.submitting .btn-spinner {
  display: inline-block;
}

@media (max-width: 991px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-card, .contact-form-container {
    padding: 2.25rem;
  }
}

/* --------------------------------------------------------------------------
   10. Footer Section
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--card-border);
  background: light-dark(rgba(243, 244, 246, 0.5), rgba(11, 15, 25, 0.5));
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.copyright {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--color-accent-purple);
}

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

/* --------------------------------------------------------------------------
   11. Scroll To Top & Toast notification
   -------------------------------------------------------------------------- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-bounce);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--gradient-accent-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 100px);
  z-index: 1000;
  padding: 1rem 2rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: var(--transition-bounce);
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast-icon {
  font-size: 1.25rem;
}

/* --------------------------------------------------------------------------
   12. Intersection Scroll Reveal Animations
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

[data-reveal="fade-up"] {
  transform: translateY(30px);
}

[data-reveal="fade-left"] {
  transform: translateX(30px);
}

[data-reveal="fade-right"] {
  transform: translateX(-30px);
}

[data-reveal].visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }

/* Accessibility: Graceful degradation for reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  .ambient-glow, .pulse-icon::after, .logo-dot, .floating-badge, .avatar-glow {
    animation: none !important;
  }
  
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .project-card, .btn, .filter-btn, .timeline-dot, .social-btn, .scroll-top-btn {
    transition: none !important;
  }
  
  .project-card:hover {
    transform: none !important;
  }
}
