/* Import fonts from Google Fonts */
@import url(https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&family=Inter:wght@400;500;600;700;800&display=swap);
/* Nice UI/heading font just for contact details content */
@import url(https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap);

/* Ensure fonts display quickly with fallback */
@font-face {
  font-family: "Inter-fallback";
  font-style: normal;
  font-weight: 400;
  src: local("Arial");
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

/* CSS Variables for easy theme management */
:root {
  /* Light theme variables */
  /* Typography */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-heading: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;

  /* Glassy text colors for light mode */
  --heading-color: color-mix(
    in oklab,
    var(--text-color) 84%,
    var(--accent, #4fd1c5) 16%
  );
  --subheading-color: color-mix(
    in oklab,
    var(--text-color) 78%,
    var(--accent, #4fd1c5) 22%
  );
  --muted-color: color-mix(
    in oklab,
    var(--text-color) 70%,
    var(--accent, #4fd1c5) 30%
  );

  /* Soft Cream to Pale Peach */
  --background: linear-gradient(180deg, #095c6b, #a4d7e1);

  /* Soft Cream to Light Gray */
  --background-gray: linear-gradient(135deg, #fffefc, #e0e0e0);

  /* Soft Cream to Pastel Blue */
  --background-blue: linear-gradient(135deg, #fffefc, #dceeff);

  --text-color: #1a202c;
  --link-color: #2563eb;
  --button-bg-color: rgba(255, 255, 255, 0.9);
  --button-text-color: #1a202c;

  /* Dark theme variables (override in dark theme) */
  /* Dark to Soft Purple */
  /* --background-dark: linear-gradient(180deg, #020617, #1c2a3a); */

  /*  Dark to Teal */
  /* --background-dark: linear-gradient(180deg, #020617, #1a4d5d); */

  /* Dark to Darker Gray-Blue */
  /* --background-dark: linear-gradient(135deg, #020617, #2c3a47); */

  --text-color-dark: #d2d2d2;
  --link-color-dark: #9a9aff;
  --button-bg-color-dark: #424242;
  --button-text-color-dark: #f0f0f0;

  /* Button Style */
  /* --slide-ease: cubic-bezier(0.4, -0.3, 0.6, 1.3); */
  --slide-ease: cubic-bezier(0.8, -0.3, 0.2, 1.3);
  --easing: var(--slide-ease);
  --speed: 0.5s;
  --width: clamp(50px, 25vmin, 100px);
  --ar: 8 / 3;
  --ray: hsl(0 0% 100% / 0.5);
  --sun: hsl(47, 91%, 58%);
  --moon: hsl(212, 13%, 82%);
  --crater: hsl(221, 16%, 68%);
  --bg: hsl(219, 30%, 88%);
  --bear-speed: 10s;
  --color: hsl(219 30% 20%);
}

/* Base styles */
/* Dark Mode Theme Styles */
body.dark-mode {
  background: linear-gradient(
    135deg,
    #020617,
    #2c3a47
  ); /* Use CSS variable for dark mode */
  color: var(--text-color-dark);
  --link-color: var(--link-color-dark);
  --button-bg-color: var(--button-bg-color-dark);
  --button-text-color: var(--button-text-color-dark);
}

/* Base styles with theme variables */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  background-color: #000;
}

/* Lock page scrolling while intro overlay is active */
html.no-scroll,
html.no-scroll body {
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-align: center;
  padding: 0;
  background: var(--background);
  color: var(--text-color);
  transition: background 0.7s ease-in-out, color 0.7s ease-in-out;
  overflow: hidden;
}

/* Keep monospace where appropriate */
code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

/* Dark Theme Styles */
[data-theme="dark"] {
  --background: var(--background-dark);
  --text-color: var(--text-color-dark);
  --link-color: var(--link-color-dark);
  --button-bg-color: var(--button-bg-color-dark);
  --button-text-color: var(--button-text-color-dark);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for fixed navigation */
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

*,
*:after,
*:before {
  box-sizing: border-box;
}

/* Default to dark mode on initial load */
body:not(.light-mode-initialized) {
  background: linear-gradient(
    180deg,
    rgb(2, 6, 23),
    rgb(44, 58, 71)
  ) !important;
}

/* Page Loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgb(2, 6, 23), rgb(44, 58, 71));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(79, 209, 197, 0.2);
  border-top-color: #4fd1c5;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

.loader-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

@keyframes loaderSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty State Styles */
.empty-state,
.error-state,
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: clamp(40px, 8vw, 80px) 20px;
  text-align: center;
  min-height: 300px;
}

.empty-state i,
.error-state i {
  font-size: clamp(48px, 8vw, 64px);
  opacity: 0.3;
}

.error-state i {
  color: #ff6b6b;
  opacity: 0.6;
}

.empty-state p,
.error-state p,
.loading-state p {
  margin: 0;
  font-size: clamp(16px, 3vw, 18px);
  color: rgba(255, 255, 255, 0.7);
  max-width: 400px;
}

.error-state .btn {
  margin-top: 10px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(79, 209, 197, 0.2);
  border-top-color: #4fd1c5;
  border-radius: 50%;
  animation: loaderSpin 0.8s linear infinite;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent, #4fd1c5);
  color: #000;
  padding: 10px 20px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10001;
  transition: top 0.2s ease;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Accessible focus indicators that match the glass theme */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enhanced focus styles for interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 85%, white 15%);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px
      color-mix(in oklab, var(--accent, #4fd1c5) 20%, transparent),
    0 0 12px color-mix(in oklab, var(--accent, #4fd1c5) 40%, transparent);
  transition: box-shadow 0.2s ease, outline-color 0.2s ease;
}

/* Glass-themed focus for glass elements */
.glass:focus-visible,
.btn:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 90%, white 10%);
  outline-offset: 2px;
  box-shadow: var(--glass-shadow),
    0 0 0 4px color-mix(in oklab, var(--accent, #4fd1c5) 25%, transparent),
    0 0 16px color-mix(in oklab, var(--accent, #4fd1c5) 50%, transparent);
}

/* Focus styles for form elements */
input:focus-visible,
textarea:focus-visible {
  border-color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
  background: color-mix(in oklab, var(--accent, #4fd1c5) 12%, transparent);
}

/* Focus styles for navigation */
.hamburger:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 85%, white 15%);
  outline-offset: 4px;
  border-radius: 8px;
}

/* Focus styles for project cards */
.project-card:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
  outline-offset: 4px;
  box-shadow: var(--glass-shadow),
    0 0 0 6px color-mix(in oklab, var(--accent, #4fd1c5) 20%, transparent),
    0 0 20px color-mix(in oklab, var(--accent, #4fd1c5) 40%, transparent);
}

/* Timeline card focus */
.tl-card:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
  outline-offset: 3px;
  box-shadow: var(--glass-shadow),
    0 0 0 5px color-mix(in oklab, var(--accent, #4fd1c5) 25%, transparent),
    0 0 16px color-mix(in oklab, var(--accent, #4fd1c5) 45%, transparent);
}

/* Dark mode focus adjustments */
body.dark-mode :focus-visible,
body.dark-mode button:focus-visible,
body.dark-mode a:focus-visible,
body.dark-mode input:focus-visible,
body.dark-mode textarea:focus-visible {
  outline-color: color-mix(in oklab, var(--accent, #4fd1c5) 90%, white 10%);
  box-shadow: 0 0 0 4px
      color-mix(in oklab, var(--accent, #4fd1c5) 30%, transparent),
    0 0 12px color-mix(in oklab, var(--accent, #4fd1c5) 60%, transparent);
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  :focus-visible,
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible {
    transition: none;
  }
}

[data-dark-mode="true"] {
  --bg: hsl(219, 30%, 12%);
  --color: hsl(219 30% 98%);
  color-scheme: dark only;
}

/* Hero Section */
.hero {
  /* position: relative; */
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0; /* allow video to reach viewport edges */
  overflow: hidden; /* avoid horizontal scroll during intro scale */
}

/* Background image element */
.hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  transition: opacity 700ms ease, visibility 700ms ease;
}

body.intro-active .hero .hero-bg {
  opacity: 0;
  visibility: hidden;
}

body.intro-complete .hero .hero-bg {
  opacity: 1;
  visibility: visible;
}

/* Overlay gradient for readability */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35));
  /* Reveal the video at the very top so pills blur true video, not overlay */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 80px,
    black 140px,
    black 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    transparent 80px,
    black 140px,
    black 100%
  );
}
body.dark-mode .hero::before {
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0.55),
    rgba(44, 58, 71, 0.65)
  );
}

.hero-card {
  max-width: min(900px, 92vw);
  padding: clamp(20px, 4vw, 36px);
  text-align: center;
  position: relative;
  z-index: 2; /* above bg + overlay */
}

/* Initial hidden states for animation sequence */
.hero-card-hidden {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  visibility: hidden;
}

.hero-text-hidden {
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
}

.hero-title {
  margin: 0 0 4px;
  font-size: clamp(28px, 6vw, 48px);
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--heading-color);
}

/* Smoothly reveal the intro video only after the first frame is painted */
.intro-video {
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}
.intro-video.is-ready {
  opacity: 1;
  visibility: visible;
}
.hero-subtitle {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-weight: 650;
  font-size: clamp(16px, 3.2vw, 22px);
  opacity: 0.9;
  color: var(--subheading-color);
}
.hero-tagline {
  margin: 4px 0 18px;
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 450;
  opacity: 0.85;
  color: var(--muted-color);
}

/* Short about line in hero */
.hero-about {
  margin: 6px 0 18px;
  font-size: clamp(14px, 3vw, 18px);
  font-weight: 450;
  opacity: 0.92;
  max-width: 70ch;
  margin-inline: auto;
  color: var(--muted-color);
}

.hero-skills {
  margin: 6px 0 18px;
  font-size: clamp(14px, 3.2vw, 18px);
  color: var(--text-color);
}

.hero-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Dark mode hero text colors for better visibility */
body.dark-mode .hero-title {
  color: #ffffff;
}

body.dark-mode .hero-subtitle {
  color: #e2e8f0;
}

body.dark-mode .hero-tagline {
  color: #cbd5e1;
}

body.dark-mode .hero-about {
  color: #cbd5e1;
}

body.dark-mode .hero-skills {
  color: #e2e8f0;
}

/* Mobile-specific hero improvements */
@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    padding: 14px 24px;
  }

  .hero-card {
    padding: clamp(20px, 5vw, 28px);
  }

  .hero-title {
    margin-bottom: 6px;
  }

  .hero-subtitle {
    margin-bottom: 8px;
  }

  .hero-tagline,
  .hero-about {
    margin-bottom: 16px;
  }

  .hero-skills {
    margin-bottom: 20px;
  }
}
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 180ms var(--easing), background-color 180ms ease,
    color 180ms ease, border-color 180ms ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: white;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 80%, black 20%);
  border: 1px solid color-mix(in oklab, var(--accent, #4fd1c5) 60%, white 40%);
}
.btn-primary:hover {
  background: color-mix(in oklab, var(--accent, #4fd1c5) 86%, black 14%);
}
.btn-secondary {
  color: var(--button-text-color);
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--accent, #4fd1c5) 55%, white 45%);
}
.btn-secondary:hover {
  background: color-mix(in oklab, var(--accent, #4fd1c5) 10%, transparent);
}

/* Minimal button style - similar to callout buttons */
.btn-minimal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  background: transparent;
  /* border: 1px solid color-mix(in oklab, var(--accent, #4fd1c5) 25%, white 75%); */
  border-radius: 999px;
  opacity: 0.75;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease,
    background 0.2s ease, font-weight 0.2s ease;
}

/* Primary minimal variant - for main CTAs like View Timeline */
.btn-minimal-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: white;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 70%, black 30%);
  border-radius: 999px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease,
    font-weight 0.2s ease;
}

.btn-minimal:hover,
.btn-minimal:focus {
  opacity: 1;
  font-weight: 700;
  transform: translateX(3px);
  border-color: color-mix(in oklab, var(--accent, #4fd1c5) 45%, white 55%);
  background: color-mix(in oklab, var(--accent, #4fd1c5) 8%, transparent);
}

.btn-minimal-primary:hover,
.btn-minimal-primary:focus {
  opacity: 1;
  font-weight: 700;
  transform: translateX(3px);
  background: color-mix(in oklab, var(--accent, #4fd1c5) 80%, black 20%);
}

.btn-minimal i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.btn-minimal:hover i,
.btn-minimal:focus i {
  transform: translateX(2px);
}

.btn-minimal-primary i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.btn-minimal-primary:hover i,
.btn-minimal-primary:focus i {
  transform: translateX(2px);
}

/* Intro overlay (landing) */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit; /* Gradient behind video; a dark veil is added via ::before */
  opacity: 1;
  transition: opacity 700ms ease;
  overflow: hidden; /* prevent scaled video from creating scrollbars */
}

#intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}

.intro-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
  animation: introContentIn 600ms var(--easing) 80ms both;
  position: relative;
  z-index: 2; /* above background video */
}

@keyframes introContentIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Intro overlay background video */
#intro-overlay .intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
#intro-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.45));
}

.intro-cta {
  margin-top: 0.25rem;
  opacity: 0;
  pointer-events: none;
  font-family: "Fira Code", monospace;
  font-weight: 700;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--button-text-color);
  background: transparent;
  border: 2px solid var(--button-text-color);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  transition: opacity 400ms ease, transform 250ms var(--easing),
    background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.intro-cta.show {
  opacity: 1;
  pointer-events: auto;
}

.intro-cta:hover {
  transform: translateY(-2px);
  background-color: var(--button-bg-color);
  color: var(--button-text-color);
  border-color: var(--button-text-color);
}

@media (prefers-reduced-motion: reduce) {
  #intro-overlay,
  #intro-overlay.hidden,
  .intro-content,
  .intro-cta {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Generic sections & containers ---------- */
.section {
  width: 100%;
  padding: clamp(48px, 8vw, 96px) 16px;
}
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}
.section-title {
  margin: 0 0 8px;
  font-size: clamp(22px, 4.6vw, 34px);
}
.section-subtitle {
  margin: 0 auto 26px;
  max-width: 720px;
  opacity: 0.8;
  font-size: clamp(14px, 3.2vw, 16px);
}

/* ---------- Timeline ---------- */
.timeline-section {
  position: relative;
}

.timeline-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-top: 6px;
}

.timeline-hint__arrow {
  font-size: 1rem;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 75%, white 25%);
  animation: timelineHintPulse 2.4s ease-in-out infinite;
}

.timeline-grid {
  position: relative;
  margin-top: 32px;
  padding-bottom: 16px;
}

.timeline-axis,
.timeline-axis--progress {
  position: absolute;
  left: 50%;
  top: 0;
  width: 6px;
  height: 100%;
  transform: translateX(-50%);
  border-radius: 999px;
}

.timeline-axis {
  background: linear-gradient(
    180deg,
    rgba(79, 209, 197, 0.2),
    rgba(15, 98, 110, 0.55)
  );
  box-shadow: 0 0 18px rgba(79, 209, 197, 0.28);
  background-size: 100% 180%;
  animation: timelineAxisPulse 6s linear infinite;
}

.timeline-axis--progress {
  background: linear-gradient(
    180deg,
    rgba(79, 209, 197, 0.95),
    rgba(59, 130, 246, 0.85)
  );
  box-shadow: 0 0 26px rgba(79, 209, 197, 0.65);
  transform-origin: top center;
  transform: translateX(-50%) scaleY(0);
  opacity: 0.95;
  will-change: transform;
}

.tl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
  grid-template-areas: "left center right";
  gap: clamp(20px, 5vw, 34px);
  align-items: stretch;
  position: relative;
  margin: clamp(26px, 6vw, 44px) 0;
}

/* If only one side has entries, align the center marker towards the top
   so the year label appears visually closer to the first card. */
.tl-row.tl-row--top .tl-center {
  align-self: start;
}

.tl-side.left {
  grid-area: left;
}

.tl-side.right {
  grid-area: right;
}

.tl-center {
  grid-area: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 78px;
}

.tl-center::after {
  content: attr(data-year);
  position: absolute;
  top: -18px;
  transform: translateY(-100%);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
  opacity: 0.9;
  white-space: nowrap;
}

.timeline-marker {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 85%, black 15%);
  border: 2px solid color-mix(in oklab, var(--accent, #4fd1c5) 65%, white 35%);
  box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.25),
    0 0 22px rgba(79, 209, 197, 0.55);
  opacity: 0.55;
}

.timeline-marker::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    rgba(79, 209, 197, 0.4) 0%,
    transparent 65%
  );
  opacity: 0;
}
.timeline-marker.is-active {
  opacity: 1;
}

.timeline-marker.is-active::after {
  animation: timelineMarkerPing 1.1s ease-out forwards;
}

.timeline-marker--current {
  box-shadow: 0 0 0 4px rgba(79, 209, 197, 0.35),
    0 0 28px rgba(59, 130, 246, 0.8);
}

.timeline-marker--current::after {
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.45) 0%,
    transparent 65%
  );
}

.tl-side {
  position: relative;
}

.tl-card {
  position: relative;
  border-radius: 18px;
  padding: clamp(18px, 3.8vw, 26px) clamp(18px, 4vw, 28px);
  text-align: left;
  opacity: 0.85;
  transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  backdrop-filter: blur(calc(var(--glass-blur, 18px) * 1.05));
  cursor: pointer;
}

.tl-card:hover {
  opacity: 1;
}

.tl-card::before {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 2px;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
  box-shadow: 0 0 12px rgba(79, 209, 197, 0.45);
  opacity: 0.75;
}

.tl-side.left .tl-card {
  margin-right: auto;
  margin-left: min(12px, 2vw);
  text-align: right;
}

.tl-side.left .tl-card::before {
  right: -32px;
}

.tl-side.right .tl-card {
  margin-left: auto;
  margin-right: min(12px, 2vw);
}

.tl-side.right .tl-card::before {
  left: -32px;
}

.tl-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 20%, transparent);
  /* Darker, more readable text while keeping the accent look */
  color: color-mix(
    in oklab,
    var(--accent, #4fd1c5) 55%,
    var(--text-color, #1a202c) 45%
  );
  box-shadow: inset 0 0 0 1px
    color-mix(in oklab, var(--accent, #4fd1c5) 40%, transparent);
  margin-bottom: 10px;
}

.tl-current {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  background: color-mix(in oklab, rgba(16, 185, 129, 0.25) 50%, transparent);
  color: color-mix(in oklab, rgba(16, 185, 129, 0.95) 85%, white 15%);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.45);
}

.tl-meta i {
  font-size: 0.9rem;
  filter: drop-shadow(0 0 4px rgba(79, 209, 197, 0.65));
}

.tl-title {
  margin: 0 0 8px;
  font-size: clamp(17px, 3.6vw, 21px);
  line-height: 1.3;
}

.tl-note {
  margin: 0;
  font-size: clamp(14px, 3.2vw, 16px);
  opacity: 0.92;
}

.timeline-item[data-variant="project"] .tl-meta {
  background: color-mix(in oklab, rgba(59, 130, 246, 0.75) 40%, transparent);
  /* Darker text in light mode for readability while matching style */
  color: color-mix(
    in oklab,
    rgba(59, 130, 246, 0.95) 60%,
    var(--text-color, #1a202c) 40%
  );
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.timeline-item[data-variant="education"] .tl-meta {
  background: color-mix(in oklab, rgba(249, 115, 22, 0.8) 38%, transparent);
  /* Darker text in light mode for readability while matching style */
  color: color-mix(
    in oklab,
    rgba(249, 115, 22, 0.95) 60%,
    var(--text-color, #1a202c) 40%
  );
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.45);
}

/* Dark mode: keep accent-forward color on pills */
body.dark-mode .tl-meta {
  color: color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
}

body.dark-mode .timeline-item[data-variant="project"] .tl-meta {
  color: color-mix(in oklab, rgba(59, 130, 246, 0.95) 85%, white 15%);
}

body.dark-mode .timeline-item[data-variant="education"] .tl-meta {
  color: color-mix(in oklab, rgba(249, 115, 22, 0.95) 85%, white 15%);
}

/* Match .projects-divider label dark mode text style with .tl-meta */
body.dark-mode .projects-divider-label {
  color: color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
}

.tl-card--project {
  backdrop-filter: blur(calc(var(--glass-blur, 18px) * 1.15));
  /* Optimized for more project entries */
  padding: clamp(14px, 3vw, 20px) clamp(16px, 3.5vw, 22px);
  min-height: auto; /* Allow natural height */
}

/* Compact project styling */
.tl-card--project .tl-title {
  font-size: clamp(15px, 3.2vw, 18px);
  margin: 0 0 6px;
  line-height: 1.2;
}

.tl-card--project .tl-note {
  font-size: clamp(13px, 2.8vw, 14px);
  line-height: 1.4;
  opacity: 0.88;
}

.tl-card--project .tl-meta {
  font-size: 0.72rem;
  padding: 4px 10px;
  margin-bottom: 8px;
}

.tl-card--project .tl-meta i {
  font-size: 0.8rem;
}

.tl-card--highlight {
  opacity: 1;
  box-shadow: 0 18px 50px rgba(59, 130, 246, 0.35),
    inset 0 0 0 1px rgba(79, 209, 197, 0.4);
}

.tl-card--highlight .tl-title {
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
}

.tl-card--tall {
  min-height: clamp(210px, 30vw, 260px);
}

@keyframes timelineHintPulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

@keyframes timelineAxisPulse {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 0% 100%;
  }
  100% {
    background-position: 0% 0%;
  }
}
@keyframes timelineMarkerPing {
  0% {
    transform: scale(0.6);
    opacity: 0.75;
  }
  60% {
    transform: scale(1.3);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@media (max-width: 1000px) {
  .tl-card--tall {
    min-height: clamp(200px, 36vw, 240px);
  }
}

@media (max-width: 800px) {
  .timeline-grid {
    margin-top: 26px;
  }
  .timeline-axis,
  .timeline-axis--progress {
    left: 22px;
    width: 4px;
  }
  .tl-row {
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "center left"
      "center right";
    gap: 18px;
    margin: clamp(22px, 10vw, 34px) 0;
  }
  .tl-center {
    align-self: stretch;
    min-height: 100px;
  }
  .tl-center::after {
    left: 50%;
    transform: translate(-50%, -110%);
    font-size: 0.72rem;
  }
  .timeline-marker {
    width: 16px;
    height: 16px;
  }
  .tl-side.left .tl-card,
  .tl-side.right .tl-card {
    margin: 0;
    text-align: left;
  }
  .tl-side.left .tl-card::before,
  .tl-side.right .tl-card::before {
    left: -26px;
    right: auto;
    width: 26px;
  }

  /* Better mobile card spacing */
  .tl-card {
    padding: clamp(16px, 4vw, 20px);
  }

  .tl-title {
    font-size: clamp(17px, 4vw, 19px);
    margin-bottom: 6px;
  }

  .tl-note {
    font-size: clamp(14px, 3.2vw, 15px);
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-axis--progress {
    animation: none;
    transform: translateX(-50%) scaleY(1) !important;
  }
  .timeline-hint__arrow {
    animation: none;
  }
}

/* Reveal animation */ /* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 700ms var(--easing), transform 650ms var(--easing);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Override for timeline cards - make them visible immediately */
.timeline-section .tl-card.reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.in {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Projects Grid ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 3vw, 28px);
  align-items: stretch;
}

.projects-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  margin: clamp(18px, 3vw, 30px) 0 clamp(10px, 2.5vw, 24px);
  /* Subtle but readable label color in light mode */
  color: color-mix(
    in oklab,
    var(--text-color, #1a202c) 70%,
    var(--accent, #4fd1c5) 30%
  );
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.78rem, 0.9vw, 0.92rem);
  font-weight: 700;
  opacity: 1;
}

.projects-divider:first-of-type {
  margin-top: clamp(8px, 2vw, 14px);
}

.projects-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--accent, #4fd1c5) 40%, transparent) 0%,
    transparent 100%
  );
  opacity: 0.55;
}

.projects-divider-label {
  /* Match .tl-meta pill styling */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: color-mix(in oklab, var(--accent, #4fd1c5) 20%, transparent);
  /* Darker, more readable text similar to .tl-meta */
  color: color-mix(
    in oklab,
    var(--accent, #4fd1c5) 55%,
    var(--text-color, #1a202c) 45%
  );
  box-shadow: inset 0 0 0 1px
    color-mix(in oklab, var(--accent, #4fd1c5) 40%, transparent);
}

.projects-divider-label i {
  font-size: 0.9em;
  opacity: 0.9;
  /* Match the subtle glow used in .tl-meta icons */
  filter: drop-shadow(0 0 4px rgba(79, 209, 197, 0.65));
}

.projects-divider-count {
  font-size: clamp(0.72rem, 0.8vw, 0.85rem);
  letter-spacing: 0;
  text-transform: none;
  /* Subtler count text in light mode while maintaining legibility */
  color: color-mix(
    in oklab,
    var(--text-color, #1a202c) 70%,
    var(--accent, #4fd1c5) 30%
  );
}

/* Dark mode: keep accent-forward look while ensuring readability */
body.dark-mode .projects-divider {
  color: color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
}

body.dark-mode .projects-divider-count {
  color: color-mix(
    in oklab,
    var(--accent, #4fd1c5) 55%,
    rgba(255, 255, 255, 0.85) 45%
  );
}

@media (max-width: 640px) {
  .projects-divider {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .projects-divider::after {
    width: 100%;
  }
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  will-change: transform, opacity, filter;
  transition: filter 0.3s ease;
  perspective: 1100px;
}

.project-card:hover {
  filter: brightness(1.05);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -140% -60%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 42%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 62%
  );
  transform: translateX(-120%);
  transition: transform 0.75s ease;
  pointer-events: none;
}

.project-card:hover::after {
  transform: translateX(120%);
}

.project-media {
  position: relative;
  overflow: hidden;
  border-radius: clamp(12px, 3vw, 16px);
  transform: scale(1.05);
  transition: transform 0.6s ease, filter 0.4s ease;
  will-change: transform;
  transform-style: preserve-3d;
}

.project-card:hover .project-media {
  transform: scale(1.12);
}

.project-media img,
.project-thumb {
  width: 100%;
  height: clamp(180px, 34vw, 220px);
  object-fit: cover;
  display: block;
  transform: translateZ(0);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 24, 43, 0) 45%,
    rgba(8, 24, 43, 0.55) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-body {
  padding: clamp(18px, 4vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.18rem);
}

.project-desc {
  margin: 0;
  opacity: 0.9;
  line-height: 1.55;
}

.project-actions {
  margin-top: auto;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.project-card .btn {
  position: relative;
  will-change: transform;
}

/* Project callout button styles */
.project-callout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: clamp(12px, 3vw, 18px);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.45;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-callout i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.project-card {
  cursor: pointer;
}

.project-card:hover .project-callout,
.project-card:focus-within .project-callout {
  opacity: 0.85;
  transform: translateX(3px);
}

.project-card:hover .project-callout i,
.project-card:focus-within .project-callout i {
  transform: translateX(2px);
}

@media (max-width: 720px) {
  .projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .project-media img,
  .project-thumb {
    height: clamp(180px, 52vw, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card::after,
  .project-media,
  .project-card:hover .project-media,
  .project-overlay {
    transition: none !important;
    animation: none !important;
  }
  .project-card {
    transform: none !important;
    opacity: 1 !important;
  }
}
/* ---------- Contact ---------- */
.contact-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.contact-section .container {
  position: relative;
  z-index: 1;
}

.contact-aurora {
  position: absolute;
  top: 55%;
  left: 50%;
  width: clamp(260px, 56vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.55;
  transform: translate(-50%, -55%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.contact-aurora__orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.8;
}

.contact-aurora__orb--teal {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(56, 189, 248, 0.9) 0%,
    rgba(56, 189, 248, 0.3) 34%,
    rgba(13, 148, 136, 0) 75%
  );
}

.contact-aurora__orb--sunset {
  background: radial-gradient(
    circle at 70% 70%,
    rgba(236, 72, 153, 0.9) 0%,
    rgba(245, 158, 11, 0.35) 34%,
    rgba(251, 191, 36, 0) 72%
  );
}

@media (max-width: 900px) {
  .contact-aurora {
    top: 48%;
    width: clamp(220px, 72vw, 420px);
    filter: blur(70px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-aurora__orb {
    opacity: 0.72;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(60px, 12vw, 140px);
  padding: 0;
  color: color-mix(in oklab, var(--text-color, #0f172a) 82%, white 18%);
}

.site-footer::before {
  content: none;
}

.footer-bottom {
  position: relative;
  margin-top: 0;
  border-top: 1px solid
    color-mix(in oklab, var(--accent, #4fd1c5) 35%, rgba(255, 255, 255, 0.24));
  background: linear-gradient(
    180deg,
    rgba(2, 6, 23, 0) 0%,
    rgba(2, 6, 23, 0.55) 48%,
    rgba(2, 6, 23, 0.88) 100%
  );
  backdrop-filter: blur(18px);
  overflow: hidden;
  padding-bottom: clamp(22px, 5vw, 40px);
}
.footer-bottom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 18% 0%,
      rgba(56, 189, 248, 0.22),
      transparent 55%
    ),
    radial-gradient(
      circle at 82% 15%,
      rgba(236, 72, 153, 0.18),
      transparent 58%
    );
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

.footer-bottom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3vw, 24px) 0 0;
  color: rgba(226, 232, 240, 0.85);
  position: relative;
  z-index: 1;
}

.footer-bottom small {
  opacity: 0.75;
}

.footer-backtotop {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 180ms ease, transform 200ms ease;
}

.footer-backtotop:hover,
.footer-backtotop:focus-visible {
  color: color-mix(in oklab, var(--accent, #4fd1c5) 90%, white 10%);
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .footer-bottom__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-backtotop {
    transition: none;
  }
}
.contact-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.contact-section .container {
  position: relative;
  z-index: 1;
}

.contact-aurora {
  position: absolute;
  top: 55%;
  left: 50%;
  width: clamp(260px, 56vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.55;
  transform: translate(-50%, -55%);
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.contact-aurora__orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.8;
}

.contact-aurora__orb--teal {
  background: radial-gradient(
    circle at 30% 30%,
    rgba(56, 189, 248, 0.9) 0%,
    rgba(56, 189, 248, 0.3) 34%,
    rgba(13, 148, 136, 0) 75%
  );
}

.contact-aurora__orb--sunset {
  background: radial-gradient(
    circle at 70% 70%,
    rgba(236, 72, 153, 0.9) 0%,
    rgba(245, 158, 11, 0.35) 34%,
    rgba(251, 191, 36, 0) 72%
  );
}

@media (max-width: 900px) {
  .contact-aurora {
    top: 48%;
    width: clamp(220px, 72vw, 420px);
    filter: blur(70px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-aurora__orb {
    opacity: 0.72;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-grid > .glass {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: clamp(320px, 28vw, 380px);
}

.contact-card,
.contact-details {
  padding: 16px;
}

.contact-card {
  text-align: left;
}

.contact-card .contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Draft Notification */
.draft-notification {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: rgba(79, 209, 197, 0.1);
  border: 1px solid rgba(79, 209, 197, 0.3);
  border-radius: 12px;
  animation: slideIn 0.3s ease;
}

.draft-notification__content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.draft-notification__content i {
  font-size: 20px;
  color: var(--accent, #4fd1c5);
}

.draft-notification__content p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.draft-notification__actions {
  display: flex;
  gap: 10px;
}

.draft-notification button {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-restore {
  background: var(--accent, #4fd1c5);
  color: #000;
}

.btn-restore:hover {
  background: color-mix(in oklab, var(--accent, #4fd1c5) 85%, white);
  transform: translateY(-1px);
}

.btn-dismiss {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 16px;
}

/* Make the glass hotspot slightly stronger on the Details card for a nicer effect */
.contact-details.glass {
  /* Slightly stronger hotspot for the glass sheen */
  --glass-highlight-strength: 0.28;
  /* Light theme: gently tint with brand accent for better match */
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #ffffff 92%, var(--accent, #4fd1c5) 8%),
    color-mix(in oklab, #ffffff 96%, var(--accent, #4fd1c5) 4%)
  );
  border-color: color-mix(in oklab, #ffffff 70%, var(--accent, #4fd1c5) 30%);
}

/* Dark theme palette for Details card: deeper slate with subtle accent tint */
body.dark-mode .contact-details.glass {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, #0b1624 85%, var(--accent, #4fd1c5) 15%),
    color-mix(in oklab, #0f1a2a 90%, var(--accent, #4fd1c5) 10%)
  );
  border-color: color-mix(in oklab, #cbd5e1 25%, var(--accent, #4fd1c5) 75%);
}

.contact-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  width: 100%;
}

/* Use the default body font for consistency */
.contact-details ul,
.contact-details li,
.contact-details a,
.contact-details .contact-details__name-value,
.contact-details .contact-details__name-label {
  font-family: var(--font-body);
}

/* Refined hover effect for links: dual lines that grow from the center */
.contact-details ul li a {
  position: relative;
  text-decoration: none;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 85%, white 15%);
  transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 6px 0; /* Add padding to make space for the lines */
}

/* Dual-line animation: top grows left -> right, bottom grows right -> left */
.contact-details ul li a::before,
.contact-details ul li a::after {
  content: "";
  position: absolute;
  height: 1px;
  background: var(--accent, #4fd1c5);
  width: 0;
  transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-details ul li a::before {
  top: 0;
  left: 0;
  right: auto;
  transform-origin: left center; /* grow outward toward right */
}
.contact-details ul li a::after {
  bottom: 0;
  right: 0;
  left: auto;
  transform-origin: right center; /* grow outward toward left */
}
.contact-details ul li a:hover::before,
.contact-details ul li a:focus-visible::before {
  width: 100%; /* full sweep left -> right */
}
.contact-details ul li a:hover::after,
.contact-details ul li a:focus-visible::after {
  width: 100%; /* full sweep right -> left */
}

.contact-details ul li a:hover::before,
.contact-details ul li a:hover::after,
.contact-details ul li a:focus-visible::before,
.contact-details ul li a:focus-visible::after {
  width: 100%;
}

/* Accessibility: clear focus outline */
.contact-details ul li a:focus-visible {
  outline: none; /* The lines provide a clear indicator */
  color: color-mix(in oklab, var(--accent, #4fd1c5) 95%, white 5%);
}

.contact-details li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.contact-details i {
  width: 18px;
  margin: 0;
  opacity: 0.9;
}

.contact-details__name {
  flex-direction: column;
  gap: 10px;
}

.contact-details__name i {
  font-size: clamp(20px, 4vw, 26px);
}

.contact-details__name-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.contact-details__name-label {
  font-size: clamp(12px, 2vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.65;
}

.contact-details__name-value {
  font-size: clamp(20px, 4.2vw, 26px);
  font-weight: 600;
  letter-spacing: 0.03em;
}
@media (max-width: 720px) {
  .contact-grid > .glass {
    min-height: auto;
  }

  .contact-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .contact-form .field {
    margin: 10px 0;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* Prevent zoom on iOS Safari */
    padding: 14px 16px;
    border-radius: 8px;
  }

  .contact-form textarea {
    min-height: 100px;
    resize: vertical;
  }

  .contact-form button {
    padding: 14px 20px;
    font-size: 16px;
    margin-top: 8px;
  }

  .contact-details {
    padding: 20px 16px;
  }

  .contact-details li {
    padding: 8px 0;
    font-size: clamp(14px, 3.5vw, 15px);
  }
}

.contact-form .field {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
}
.contact-form .field.full {
  grid-column: 1 / -1;
}

/* Form error styling */
.contact-form .error-message {
  display: none;
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 4px;
  padding: 4px 8px;
  background: color-mix(in oklab, #ef4444 10%, transparent);
  border-radius: 4px;
  border-left: 3px solid #ef4444;
}

.contact-form input.error,
.contact-form textarea.error {
  border-color: #ef4444;
  background: color-mix(in oklab, #ef4444 8%, transparent);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  color: inherit;
  border: 1px solid color-mix(in oklab, var(--accent, #4fd1c5) 25%, white 75%);
  background: color-mix(in oklab, var(--accent, #4fd1c5) 6%, transparent);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 200ms ease, background-color 200ms ease,
    box-shadow 200ms ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: color-mix(in oklab, var(--accent, #4fd1c5) 55%, white 45%);
  box-shadow: 0 0 0 3px
    color-mix(in oklab, var(--accent, #4fd1c5) 25%, transparent);
}
.contact-status {
  margin-top: 8px;
  min-height: 1.1em;
  opacity: 0.9;
}

.tl-card:focus-visible {
  opacity: 1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.35),
    0 18px 40px rgba(79, 209, 197, 0.25);
}

.tl-callout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: clamp(12px, 3vw, 18px);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tl-callout i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.timeline-item:hover .tl-callout,
.timeline-item:focus-within .tl-callout {
  opacity: 0.92;
  transform: translateX(3px);
}

.timeline-item:hover .tl-callout i,
.timeline-item:focus-within .tl-callout i {
  transform: translateX(2px);
}
/* Timeline details enhancements */
.tl-range {
  margin: 4px 0 12px;
  font-size: clamp(13px, 3vw, 15px);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
}

.timeline-details {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  z-index: 1200;
  background: rgba(8, 18, 32, 0.7);
  backdrop-filter: blur(12px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.timeline-details.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.timeline-details__dialog {
  position: relative;
  width: min(640px, 100%);
  padding: clamp(24px, 4vw, 36px);
  border-radius: 20px;
  background: rgba(11, 25, 38, 0.92);
  box-shadow: 0 28px 70px rgba(6, 18, 34, 0.6);
  color: inherit;
}

.timeline-details__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.timeline-details__close:hover,
.timeline-details__close:focus-visible {
  transform: rotate(4deg) scale(1.05);
  border-color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.timeline-details__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.timeline-details__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(
    in oklab,
    var(--accent, #4fd1c5) 25%,
    rgba(255, 255, 255, 0.08) 75%
  );
  box-shadow: 0 0 16px rgba(79, 209, 197, 0.3);
}

.timeline-details__icon i {
  font-size: 1rem;
}

.timeline-details__title {
  margin: 18px 0 6px;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
}

.timeline-details__range {
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
}

.timeline-details__description {
  margin: 0 0 18px;
  opacity: 0.9;
  line-height: 1.6;
}

.timeline-details__body {
  text-align: left;
}

.timeline-details__body ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.timeline-details__body li {
  line-height: 1.5;
}

.timeline-details__body p {
  margin: 0;
  line-height: 1.6;
}

.timeline-details__backdrop {
  position: absolute;
  inset: 0;
}

body.timeline-details-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .timeline-details__dialog {
    padding: clamp(18px, 6vw, 28px);
  }
}
/* Project Details Overlay */
.project-details {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  z-index: 1200;
  background: rgba(8, 18, 32, 0.7);
  backdrop-filter: blur(12px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-details.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.project-details__dialog {
  position: relative;
  width: min(700px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(24px, 4vw, 36px);
  border-radius: 20px;
  background: rgba(11, 25, 38, 0.92);
  box-shadow: 0 28px 70px rgba(6, 18, 34, 0.6);
  color: inherit;
}

.project-details__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-details__close:hover,
.project-details__close:focus-visible {
  transform: rotate(4deg) scale(1.05);
  border-color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.project-details__meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 10px;
}

.project-details__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(
    in oklab,
    var(--accent, #4fd1c5) 25%,
    rgba(255, 255, 255, 0.08) 75%
  );
  box-shadow: 0 0 16px rgba(79, 209, 197, 0.3);
}

.project-details__icon i {
  font-size: 1rem;
}

.project-details__title {
  margin: 18px 0 6px;
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
}

.project-details__tags {
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-details__tag {
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(79, 209, 197, 0.15);
  border: 1px solid rgba(79, 209, 197, 0.3);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 80%, white 20%);
}

.project-details__description {
  margin: 0 0 18px;
  opacity: 0.9;
  line-height: 1.6;
}

.project-details__body {
  text-align: left;
}

.project-details__body ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.project-details__body li {
  line-height: 1.5;
}

.project-details__body p {
  margin: 0 0 16px;
  line-height: 1.6;
}

.project-details__body h3,
.project-details__body h4 {
  margin: 24px 0 12px;
  color: color-mix(in oklab, var(--accent, #4fd1c5) 70%, white 30%);
}

.project-details__body strong {
  color: color-mix(in oklab, var(--accent, #4fd1c5) 60%, white 40%);
}

.project-details__body a {
  color: var(--accent, #4fd1c5);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.project-details__body a:hover,
.project-details__body a:focus {
  border-bottom-color: var(--accent, #4fd1c5);
}

.project-details__backdrop {
  position: absolute;
  inset: 0;
}

body.project-details-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .project-details__dialog {
    padding: clamp(18px, 6vw, 28px);
    max-height: 95vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-callout,
  .timeline-details,
  .timeline-details__close,
  .timeline-details__dialog,
  .project-details,
  .project-details__close,
  .project-details__dialog {
    transition: none !important;
  }
}
