:root {
  --bg: #070a12;
  --bg-alt: #0b1020;
  --panel: rgba(15, 19, 32, 0.72);
  --panel-strong: rgba(17, 22, 38, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f7fb;
  --muted: #a7b0c3;
  --accent: #8be9ff;
  --accent-2: #ffb86b;
  --accent-3: #9d7bff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max: 1180px;
}

/* (Light theme removed — this project uses a dark-only theme) */

/* Mobile touch improvements */
button, a.button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(157, 123, 255, 0.22), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(139, 233, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255, 184, 107, 0.12), transparent 24%),
    linear-gradient(180deg, #05070d 0%, #070a12 45%, #05070d 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  pointer-events: none;
  opacity: 0.22;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.8;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}

.orb-a {
  top: 8vh;
  left: -4vw;
  width: 240px;
  height: 240px;
  background: rgba(157, 123, 255, 0.3);
}

.orb-b {
  right: -6vw;
  bottom: 10vh;
  width: 300px;
  height: 300px;
  background: rgba(139, 233, 255, 0.22);
  animation-delay: -5s;
}

.topbar,
.section,
.footer {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 20;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 10, 18, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.brand,
.nav a,
.inline-link {
  color: var(--text);
  text-decoration: none;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  transition: color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
}

main {
  padding-bottom: 64px;
}

.section {
  padding-top: 92px;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 28px;
  align-items: center;
  min-height: calc(100vh - 120px);
}

.hero-copy,
.hero-card,
.project-panel,
.contact-card,
.timeline-item,
.card-shell {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 8px 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

h1 {
  max-width: 9ch;
  font-size: clamp(3.9rem, 9vw, 7.4rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.55rem);
}

h3 {
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
}

.lede,
.section-heading p,
.project-panel p,
.timeline-content p,
.contact-card p,
.card-shell p,
.hero-stats p,
.list-panel li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.lede {
  max-width: 62ch;
  margin: 22px 0 0;
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button .material-symbols-outlined,
.inline-link .material-symbols-outlined,
.stat-icon,
.status-dot .material-symbols-outlined,
.chip .material-symbols-outlined,
.list-panel li .material-symbols-outlined,
.timeline-icon .material-symbols-outlined {
  font-size: 1.05rem;
  line-height: 1;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  color: #07111d;
  background: linear-gradient(135deg, var(--accent), #e0fbff);
  box-shadow: 0 18px 40px rgba(139, 233, 255, 0.22);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.hero-tag-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.chip,
.pill,
.status-dot,
.panel-label,
.timeline-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.chip {
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.92rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.hero-stats article,
.mini-grid div {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats article {
  display: grid;
  gap: 8px;
}

.hero-stats span:first-of-type {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.stat-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #07111d;
  background: linear-gradient(135deg, var(--accent-2), #ffe0ad);
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: 16px;
}

.card-shell {
  border-radius: calc(var(--radius-xl) - 8px);
  padding: 24px;
  overflow: hidden;
}

.card-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(139, 233, 255, 0.14), transparent 34%),
    radial-gradient(circle at bottom left, rgba(157, 123, 255, 0.16), transparent 26%);
  pointer-events: none;
}

.card-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pill,
.status-dot,
.panel-label,
.timeline-year {
  padding: 8px 12px;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  color: #dffbff;
}

.status-dot .material-symbols-outlined {
  color: var(--accent);
}

.card-shell h2 {
  position: relative;
  max-width: 13ch;
  margin-bottom: 16px;
}

.card-shell p {
  position: relative;
  max-width: 40ch;
}

.mini-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.mini-grid strong,
.timeline-content h3,
.project-panel h3,
.contact-card h2 {
  display: block;
  margin-bottom: 8px;
}

.mini-grid strong {
  color: var(--text);
  font-size: 0.88rem;
}

.mini-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.section-heading {
  max-width: 68ch;
  margin-bottom: 26px;
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.timeline {
  position: relative;
  padding-left: 26px;
  display: grid;
  gap: 16px;
}

/* Mobile vertical timeline hidden by default (only shown on small screens) */
.timeline-vertical {
  display: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139, 233, 255, 0.18), rgba(157, 123, 255, 0.75), rgba(255, 184, 107, 0.22));
  box-shadow: 0 0 24px rgba(157, 123, 255, 0.16);
}

.timeline-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 22px 22px 20px;
  border-radius: var(--radius-lg);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.timeline-item:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
}

.timeline-icon {
  position: relative;
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  color: #08131f;
  background: linear-gradient(135deg, #b1f3ff, #8be9ff);
}

.timeline-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(139, 233, 255, 0.12);
}

.timeline-item:first-child .timeline-icon {
  background: linear-gradient(135deg, #e8f9ff, #8be9ff);
}

.timeline-item:last-child .timeline-icon {
  background: linear-gradient(135deg, #ffe0ad, #ffb86b);
}

.timeline-item:last-child .timeline-icon::after {
  display: none;
}

.timeline-year {
  align-self: center;
  color: var(--accent);
  border-color: rgba(139, 233, 255, 0.24);
  background: rgba(139, 233, 255, 0.06);
}

.timeline-content {
  padding-top: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.project-panel,
.contact-card {
  border-radius: var(--radius-xl);
  padding: 26px;
}

.feature-panel {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(255, 184, 107, 0.16), transparent 26%),
    radial-gradient(circle at left center, rgba(157, 123, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.panel-label {
  width: fit-content;
  margin-bottom: 20px;
  color: var(--accent-2);
  border-color: rgba(255, 184, 107, 0.2);
  background: rgba(255, 184, 107, 0.08);
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-weight: 700;
  color: var(--accent);
}

.list-panel {
  background: rgba(255, 255, 255, 0.04);
}

.list-panel ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.list-panel li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.list-panel li .material-symbols-outlined {
  margin-top: 2px;
  color: var(--accent);
}

.contact-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background:
    radial-gradient(circle at top right, rgba(139, 233, 255, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  transition: transform 160ms ease, box-shadow 160ms ease, color 160ms ease, border-color 160ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  color: var(--text);
  border-color: var(--line-strong);
}

.social-button .icon { width: 18px; height: 18px; }

.social-email { color: var(--accent); }
.social-github { color: var(--accent-3); }
.social-youtube { color: #ff3b30; border-color: rgba(255,59,48,0.12); }

.footer {
  padding: 24px 0 42px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 120ms;
}

.delay-2 {
  transition-delay: 240ms;
}

.journey-path {
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 40px auto;
  display: block;
  animation: pathDraw 1.8s ease-out forwards;
}

.path-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  fill: var(--text);
  letter-spacing: 0.02em;
}

.path-year {
  font-size: 18px;
  font-weight: 700;
}

.path-event {
  font-size: 14px;
  fill: var(--muted);
}

/* Add a dark outline behind SVG text so labels remain readable over the path */
.path-label {
  paint-order: stroke;
  stroke: var(--bg);
  stroke-width: 6px;
  stroke-linejoin: round;
}

/* No light-theme overrides — dark mode only */

@keyframes pathDraw {
  from {
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    opacity: 1;
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -16px, 0) scale(1.05);
  }
}

@media (max-width: 980px) {
  .hero,
  .project-grid,
  .contact-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-year {
    width: fit-content;
  }

  .contact-card {
    justify-content: start;
  }
}

@media (max-width: 640px) {
  .topbar {
    width: min(var(--max), calc(100% - 24px));
    top: 10px;
    padding: 14px 16px;
    border-radius: 22px;
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    width: min(var(--max), calc(100% - 24px));
    padding-top: 72px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.4rem);
  }

  .hero-actions,
  .hero-tag-row {
    flex-direction: column;
    align-items: stretch;
  }

  .button,
  .chip {
    justify-content: center;
  }

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

  .project-panel,
  .contact-card,
  .card-shell {
    padding: 20px;
  }

  /* Make the journey SVG and its labels more legible on small screens */
  .journey-path {
    /* give the SVG more vertical space so labels and points scale up visually */
    height: 420px;
    max-width: 100%;
    margin: 24px auto;
  }

  /* Use responsive font sizing for SVG text so it remains readable when scaled */
  .path-year {
    font-size: 20px;
  }

  .path-event {
    font-size: 16px;
  }

  /* Slightly scale up circles/markers to make them easier to tap */
  .journey-path circle {
    transform-origin: center;
    transform: scale(1.15);
  }

  /* Hide the decorative SVG on small screens and show a clear vertical timeline */
  .journey-path {
    display: none;
  }

  .timeline-vertical {
    display: block;
    position: relative;
    padding-left: 36px;
    margin: 8px auto 28px;
    max-width: 720px;
  }

  .timeline-vertical::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(139, 233, 255, 0.18), rgba(157, 123, 255, 0.75), rgba(255, 184, 107, 0.22));
    box-shadow: 0 0 12px rgba(157, 123, 255, 0.12);
  }

  .timeline-vertical-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 6px;
  }

  .timeline-vertical-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(255,255,255,0.02);
    flex: 0 0 18px;
    transform: translateX(-2px);
  }

  .timeline-vertical-content {
    display: block;
  }

  .timeline-vertical-year {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
  }

  .timeline-vertical-event {
    color: var(--muted);
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
