:root {
  color-scheme: dark;
  --bg: #07100f;
  --ink: #f4fbf7;
  --muted: #a9b9b2;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(8, 21, 22, 0.74);
  --panel-strong: rgba(16, 35, 36, 0.9);
  --aqua: #66e3d1;
  --gold: #f2c45b;
  --rose: #ff7a90;
  --green: #8fdd78;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 8%, rgba(102, 227, 209, 0.16), transparent 28rem),
    linear-gradient(135deg, #07100f 0%, #10211d 42%, #1a1715 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 92%);
}

a {
  color: inherit;
  text-decoration: none;
}

#journey-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  display: none;
  width: 26px;
  height: 30px;
  background: #ffd800;
  clip-path: polygon(0 0, 0 85%, 27% 64%, 43% 100%, 59% 93%, 43% 58%, 78% 58%);
  filter:
    drop-shadow(0 0 1px #111300)
    drop-shadow(0 0 8px rgba(255, 216, 0, 0.72))
    drop-shadow(0 0 16px rgba(255, 216, 0, 0.38));
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition:
    width 150ms ease,
    height 150ms ease,
    filter 150ms ease,
    background 150ms ease;
}

.has-custom-cursor .custom-cursor {
  display: block;
}

.custom-cursor.is-hovering {
  width: 29px;
  height: 33px;
  background: #ffe45c;
  filter:
    drop-shadow(0 0 1px #111300)
    drop-shadow(0 0 10px rgba(255, 216, 0, 0.86))
    drop-shadow(0 0 24px rgba(255, 216, 0, 0.52));
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 16, 15, 0.66);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(102, 227, 209, 0.42);
  border-radius: 50%;
  background: rgba(102, 227, 209, 0.1);
  color: var(--aqua);
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

nav a {
  position: relative;
  transition: color 180ms ease;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, var(--aqua), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

nav a:hover {
  color: var(--ink);
}

nav a:hover::after {
  transform: scaleX(1);
}

.section {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: clamp(30px, 6vw, 82px);
  padding: 132px 0 72px;
}

.hero-copy {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--aqua);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(3.15rem, 7vw, 6.9rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 12px;
  font-size: clamp(1.16rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.hero-text,
.intro-band > p,
.contact p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.65vw, 1.3rem);
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 45%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 520ms ease;
}

.button:hover::before {
  transform: translateX(120%);
}

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

.button.primary {
  border-color: transparent;
  background: var(--aqua);
  color: #06211d;
  box-shadow: 0 0 0 rgba(102, 227, 209, 0);
}

.button.primary:hover {
  box-shadow: 0 18px 46px rgba(102, 227, 209, 0.24);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: rgba(242, 196, 91, 0.38);
  background: rgba(255, 255, 255, 0.1);
}

.signal-panel {
  display: grid;
  gap: 12px;
  align-self: end;
  margin-bottom: 6vh;
}

.signal-panel div,
.timeline-card,
.project-card,
.lane {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-panel div::before,
.timeline-card::before,
.project-card::before,
.lane::before {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at var(--hover-x, 50%) var(--hover-y, 0%), rgba(102, 227, 209, 0.18), transparent 34%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.signal-panel div:hover::before,
.timeline-card:hover::before,
.project-card:hover::before,
.lane:hover::before {
  opacity: 1;
}

.signal-panel div {
  padding: 22px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.signal-panel div:hover {
  transform: translateY(-4px);
  border-color: rgba(102, 227, 209, 0.38);
  background: rgba(16, 35, 36, 0.86);
}

.metric {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 2.1rem;
  font-weight: 800;
}

.signal-panel p,
.timeline-card p,
.timeline-card li,
.project-card p,
.lane p {
  color: var(--muted);
  line-height: 1.62;
}

.intro-band {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(28px, 7vw, 92px);
  padding: 96px 0 130px;
}

.section-heading {
  max-width: 780px;
}

.timeline-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.48fr) minmax(0, 1fr);
  gap: clamp(30px, 7vw, 96px);
  padding: 88px 0 120px;
}

.sticky-title {
  position: sticky;
  top: 118px;
  align-self: start;
}

.timeline {
  position: relative;
  display: grid;
  gap: 70px;
  padding-left: 34px;
}

.timeline::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 2px;
  content: "";
  background: linear-gradient(var(--aqua), var(--gold), var(--rose), var(--green));
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 16px;
}

.timeline-item::before {
  position: absolute;
  top: 8px;
  left: -40px;
  width: 14px;
  height: 14px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 7px rgba(102, 227, 209, 0.16);
  content: "";
}

.year {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline-card {
  padding: clamp(22px, 4vw, 34px);
  transform: translateY(28px);
  opacity: 0;
  transition:
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 700ms ease,
    border-color 250ms ease;
}

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

.timeline-card:hover {
  transform: translateY(-3px);
  border-color: rgba(102, 227, 209, 0.44);
  background: rgba(16, 35, 36, 0.86);
}

.timeline-card ul {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding-left: 19px;
}

.projects,
.skills,
.contact {
  padding: 100px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.project-card {
  min-height: 280px;
  padding: 24px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 196, 91, 0.4);
  background: var(--panel-strong);
}

.project-card:hover h3,
.lane:hover h3 {
  color: var(--aqua);
}

.project-card h3,
.lane h3 {
  transition: color 180ms ease;
}

.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(102, 227, 209, 0.17), rgba(255, 122, 144, 0.08));
}

.project-card span {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--aqua);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.lane {
  min-height: 220px;
  padding: 24px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.lane:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 221, 120, 0.38);
  background: rgba(16, 35, 36, 0.86);
}

.lane:nth-child(2) h3 {
  color: var(--gold);
}

.lane:nth-child(3) h3 {
  color: var(--rose);
}

.lane:nth-child(4) h3 {
  color: var(--green);
}

.contact {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.46fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  min-height: 60svh;
}

.contact-actions {
  justify-content: flex-start;
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    gap: 14px;
  }

  nav {
    max-width: 54vw;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 8px;
  }

  .hero,
  .intro-band,
  .timeline-section,
  .contact {
    grid-template-columns: 1fr;
  }

  .signal-panel {
    margin-bottom: 0;
  }

  .sticky-title {
    position: relative;
    top: auto;
  }

  .project-grid,
  .skill-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    position: absolute;
    padding: 16px 18px;
  }

  .brand strong {
    display: none;
  }

  nav {
    max-width: calc(100vw - 88px);
    gap: 12px;
    font-size: 0.82rem;
  }

  .section {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding-top: 118px;
  }

  h1 {
    font-size: clamp(2.55rem, 14vw, 4.6rem);
  }

  .project-grid,
  .skill-lanes {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: span 1;
  }

  .button {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (pointer: coarse) {
  .custom-cursor {
    display: none !important;
  }
}
