: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%;
  opacity: var(--canvas-opacity, 1);
  pointer-events: none;
  transition: opacity 260ms ease;
}

.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;
  width: min(1320px, calc(100% - 64px));
  grid-template-columns: minmax(0, 560px);
  align-items: center;
  gap: clamp(24px, 3.4vw, 52px);
  padding: 126px 0 58px;
  isolation: isolate;
}

.hero-copy {
  max-width: 560px;
  z-index: 2;
  justify-self: start;
}

.hero-portrait {
  position: absolute;
  top: -168px;
  right: 0;
  z-index: 1;
  display: grid;
  width: 941px;
  min-width: 0;
  padding-bottom: 0;
  overflow: clip;
}

.portrait-frame {
  position: relative;
  overflow: visible;
  width: 941px;
  height: 1672px;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 32px 80px rgba(0, 0, 0, 0.38));
  isolation: isolate;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 6%, rgba(0, 0, 0, 0.72) 18%, #000 34%, #000 78%, rgba(0, 0, 0, 0.72) 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 9%, #000 22%, #000 82%, rgba(0, 0, 0, 0.55) 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 6%, rgba(0, 0, 0, 0.72) 18%, #000 34%, #000 78%, rgba(0, 0, 0, 0.72) 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 9%, #000 22%, #000 82%, rgba(0, 0, 0, 0.55) 92%, transparent 100%);
  mask-composite: intersect;
}

.portrait-frame::before,
.portrait-frame::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.portrait-frame::before {
  inset: -14% -10% -8%;
  z-index: -1;
  background:
    radial-gradient(ellipse at 56% 44%, rgba(102, 227, 209, 0.2), transparent 54%),
    radial-gradient(ellipse at 50% 58%, rgba(7, 16, 15, 0.92), transparent 68%);
  filter: blur(20px);
}

.portrait-frame::after {
  inset: -1px;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 16, 15, 1) 0%, rgba(7, 16, 15, 0.82) 10%, transparent 30%, transparent 76%, rgba(7, 16, 15, 0.72) 90%, rgba(7, 16, 15, 1) 100%),
    linear-gradient(to bottom, rgba(7, 16, 15, 0.88) 0%, transparent 18%, transparent 74%, rgba(7, 16, 15, 0.96) 100%);
  mix-blend-mode: normal;
}

.portrait-frame img {
  display: block;
  width: 941px;
  height: 1672px;
  object-fit: fill;
  object-position: center;
  filter: saturate(0.96) contrast(1.05);
  opacity: calc(1 - var(--portrait-dissolve, 0) * 0.98);
  transition: opacity 80ms linear;
}

.portrait-dissolve-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  opacity: var(--portrait-dissolve, 0);
  pointer-events: none;
}

.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;
}

.hero h1 {
  font-size: clamp(3.3rem, 4.4vw, 5.15rem);
}

@media (min-width: 1500px) {
  .hero {
    transform: translateX(clamp(80px, 7vw, 150px));
  }

  .hero-copy {
    transform: translateY(clamp(90px, 11vh, 145px));
  }

}

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;
  position: absolute;
  right: -18px;
  bottom: 22px;
  left: -18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-portrait > .signal-panel {
  display: none;
}

.intro-signal-panel {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  grid-column: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-self: end;
  margin-top: 36px;
}

.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: 16px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.intro-signal-panel div {
  min-height: 148px;
  padding: 22px;
}

.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: 6px;
  color: var(--gold);
  font-size: 1.48rem;
  font-weight: 800;
}

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

.signal-panel p {
  margin: 0;
  font-size: 0.78rem;
}

.intro-signal-panel p {
  font-size: 0.9rem;
}

.intro-signal-panel .metric {
  font-size: 1.85rem;
}

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

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

.memory-section {
  padding: 92px 0 130px;
}

.memory-heading {
  display: grid;
  gap: 16px;
}

.memory-heading p:last-child {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
}

.memory-group {
  margin-top: clamp(54px, 8vw, 92px);
}

.memory-group-heading {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.memory-group-heading h3 {
  color: rgba(235, 246, 243, 0.82);
  font-size: clamp(1.35rem, 2.4vw, 2.3rem);
  line-height: 1.08;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(14px, 2vw, 22px);
  margin-top: 24px;
}

.memory-card {
  --hover-x: 50%;
  --hover-y: 50%;
  position: relative;
  grid-column: span 4;
  min-height: clamp(340px, 30vw, 470px);
  overflow: hidden;
  border: 1px solid rgba(102, 227, 209, 0.16);
  border-radius: 8px;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  isolation: isolate;
  background:
    radial-gradient(circle at var(--hover-x) var(--hover-y), rgba(102, 227, 209, 0.2), transparent 28%),
    rgba(5, 17, 16, 0.62);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  filter: blur(10px) saturate(0.7);
  transition:
    transform 820ms cubic-bezier(0.2, 0.8, 0.2, 1) var(--delay, 0ms),
    opacity 820ms ease var(--delay, 0ms),
    filter 820ms ease var(--delay, 0ms),
    border-color 260ms ease;
}

.memory-card.wide {
  grid-column: span 8;
}

.memory-card.tall {
  grid-row: span 2;
  min-height: clamp(520px, 50vw, 710px);
}

.memory-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0) saturate(1);
}

.memory-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(102, 227, 209, 0.36);
}

.memory-card:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 4px;
}

.memory-media {
  position: absolute;
  inset: -2px;
  z-index: -2;
}

.memory-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.08) brightness(0.74);
  transform: scale(1.04);
  transition:
    filter 500ms ease,
    transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 12%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 78%, transparent 100%),
    radial-gradient(circle at center, #000 0%, #000 54%, transparent 92%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 12%, #000 86%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 78%, transparent 100%),
    radial-gradient(circle at center, #000 0%, #000 54%, transparent 92%);
  mask-composite: intersect;
}

.memory-card:hover .memory-media img {
  filter: saturate(0.95) contrast(1.08) brightness(0.84);
  transform: scale(1.08);
}

.memory-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(5, 17, 16, 0.04) 0%, rgba(5, 17, 16, 0.32) 48%, rgba(3, 11, 10, 0.94) 100%),
    radial-gradient(circle at 14% 16%, rgba(102, 227, 209, 0.16), transparent 34%),
    radial-gradient(circle at 92% 18%, rgba(242, 196, 91, 0.12), transparent 24%);
}

.memory-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 18% 20%, rgba(102, 227, 209, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 62%, rgba(255, 255, 255, 0.17) 0 1px, transparent 2px);
  background-size: 11px 11px, 17px 17px;
  mix-blend-mode: screen;
  opacity: 0.18;
  transition: opacity 350ms ease;
}

.memory-card:hover::before {
  opacity: 0.32;
}

.memory-copy {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  display: grid;
  gap: 8px;
}

.memory-copy > span:first-child {
  width: fit-content;
  border: 1px solid rgba(102, 227, 209, 0.38);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--aqua);
  background: rgba(5, 17, 16, 0.56);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-copy strong {
  max-width: 520px;
  color: var(--text);
  font-size: clamp(1.45rem, 2.4vw, 2.7rem);
  font-weight: 900;
  line-height: 0.98;
}

.memory-storyline {
  max-width: 560px;
  color: rgba(235, 246, 243, 0.74);
  font-size: 0.95rem;
  line-height: 1.45;
}

.memory-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 46px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}

.memory-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.memory-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background:
    radial-gradient(circle at 62% 20%, rgba(102, 227, 209, 0.16), transparent 34%),
    rgba(2, 10, 9, 0.82);
  cursor: pointer;
  backdrop-filter: blur(18px);
}

.memory-lightbox-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.55fr);
  overflow: hidden;
  width: min(1180px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  border: 1px solid rgba(102, 227, 209, 0.26);
  border-radius: 8px;
  background: rgba(5, 17, 16, 0.94);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.98);
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memory-lightbox.is-open .memory-lightbox-panel {
  transform: translateY(0) scale(1);
}

.memory-lightbox-media {
  min-height: min(62vw, 720px);
  background: rgba(0, 0, 0, 0.32);
}

.memory-lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.memory-lightbox-copy {
  display: grid;
  align-content: end;
  gap: 14px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(180deg, rgba(8, 26, 25, 0.5), rgba(3, 11, 10, 0.96)),
    radial-gradient(circle at 12% 10%, rgba(102, 227, 209, 0.18), transparent 40%);
}

.memory-lightbox-copy span {
  width: fit-content;
  border: 1px solid rgba(102, 227, 209, 0.36);
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--aqua);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.memory-lightbox-copy h3 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
}

.memory-lightbox-copy p {
  color: rgba(235, 246, 243, 0.76);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.62;
}

.memory-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--text);
  background: rgba(2, 10, 9, 0.74);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}

body.memory-lightbox-open {
  overflow: hidden;
}

.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-showcase {
  position: relative;
  margin-top: 34px;
}

.showcase-viewport {
  display: grid;
  position: relative;
  overflow: hidden;
  min-height: clamp(480px, 64vw, 720px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 21, 22, 0.74);
  box-shadow: var(--shadow);
  outline: none;
  backdrop-filter: blur(18px);
}

.showcase-viewport:focus-visible {
  border-color: rgba(102, 227, 209, 0.62);
  box-shadow:
    var(--shadow),
    0 0 0 4px rgba(102, 227, 209, 0.14);
}

.showcase-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(34px) scale(0.985);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.showcase-card.is-current {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.showcase-card.is-exiting-left {
  transform: translateX(-34px) scale(0.985);
}

.showcase-card::before,
.showcase-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
}

.showcase-card::before {
  background:
    linear-gradient(90deg, rgba(7, 16, 15, 0.9) 0%, rgba(7, 16, 15, 0.42) 36%, transparent 68%),
    linear-gradient(to top, rgba(7, 16, 15, 0.78), transparent 48%);
}

.showcase-card::after {
  background: radial-gradient(circle at var(--hover-x, 72%) var(--hover-y, 18%), rgba(102, 227, 209, 0.18), transparent 30%);
  opacity: 0;
  transition: opacity 220ms ease;
}

.showcase-card:hover::after {
  opacity: 1;
}

.showcase-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.96) contrast(1.03);
  transform: scale(1.02);
  transition: transform 900ms ease;
}

.showcase-card.is-current img {
  transform: scale(1);
}

.showcase-copy {
  position: absolute;
  bottom: clamp(26px, 6vw, 58px);
  left: clamp(22px, 5vw, 58px);
  z-index: 2;
  width: min(440px, calc(100% - 44px));
}

.showcase-copy span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.showcase-copy h3 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.showcase-copy p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.62;
}

.showcase-controls {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.showcase-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.showcase-button:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 227, 209, 0.42);
  background: rgba(102, 227, 209, 0.12);
}

.showcase-dots {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.showcase-dot {
  position: relative;
  overflow: hidden;
  width: min(96px, 14vw);
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.showcase-dot::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--aqua), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms ease;
}

.showcase-dot.is-active::before {
  transform: scaleX(1);
}

.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;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 34px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
  font-weight: 700;
}

.site-footer a {
  transition: color 180ms ease;
}

.site-footer a:hover {
  color: var(--aqua);
}

@media (max-width: 1180px) {
  .hero {
    width: min(100% - 40px, 1180px);
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
    justify-self: start;
  }

  .hero-portrait {
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    width: min(100%, 680px);
    min-width: 0;
    margin-right: auto;
    margin-left: 0;
  }

  .portrait-frame {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 0.68;
  }

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

@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,
  .memory-section,
  .contact,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero {
    width: min(100% - 40px, 1180px);
  }

  .hero-copy {
    max-width: 760px;
    justify-self: start;
  }

  .site-footer {
    align-items: flex-start;
  }

  .site-footer div {
    justify-content: flex-start;
  }

  .signal-panel {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    margin-top: 12px;
  }

  .intro-signal-panel {
    grid-column: auto;
    margin-top: 28px;
  }

  .hero-portrait {
    width: min(100%, 680px);
    min-width: 0;
    margin-right: auto;
    margin-left: 0;
    padding-bottom: 0;
  }

  .portrait-frame {
    height: auto;
    min-height: 0;
    aspect-ratio: 0.68;
  }

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

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

  .memory-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .memory-card,
  .memory-card.wide {
    grid-column: span 3;
  }

  .memory-card.tall {
    min-height: 520px;
  }

  .memory-lightbox-panel {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .memory-lightbox-media {
    min-height: 48vh;
  }

  .showcase-viewport {
    min-height: 560px;
  }

  .showcase-card::before {
    background:
      linear-gradient(to top, rgba(7, 16, 15, 0.92) 0%, rgba(7, 16, 15, 0.62) 44%, transparent 78%),
      linear-gradient(90deg, rgba(7, 16, 15, 0.38), transparent 58%);
  }

  .showcase-copy {
    bottom: 28px;
  }
}

@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 {
    width: min(100% - 28px, 1180px);
    padding-top: 118px;
  }

  .hero-portrait {
    width: 100%;
  }

  .portrait-frame {
    aspect-ratio: 0.74;
  }

  .signal-panel {
    grid-template-columns: 1fr;
  }

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

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

  .memory-section {
    padding: 74px 0 96px;
  }

  .memory-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .memory-card,
  .memory-card.wide,
  .memory-card.tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 420px;
  }

  .memory-copy {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .memory-lightbox {
    padding: 12px;
  }

  .memory-lightbox-panel {
    max-height: calc(100vh - 24px);
  }

  .memory-lightbox-media {
    min-height: 46vh;
  }

  .memory-lightbox-copy {
    padding: 22px;
  }

  .showcase-viewport {
    min-height: 520px;
  }

  .showcase-card img {
    object-position: 64% center;
  }

  .showcase-copy h3 {
    font-size: clamp(2rem, 11vw, 3.4rem);
  }

  .showcase-controls {
    grid-template-columns: 42px 1fr 42px;
    gap: 10px;
  }

  .showcase-button {
    width: 42px;
    height: 42px;
    font-size: 1.7rem;
  }

  .showcase-dot {
    width: min(54px, 12vw);
  }

  .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;
  }
}
