:root {
  color-scheme: dark;
  --bg: #0d1213;
  --surface: #151d1f;
  --surface-raised: #1b2528;
  --text: #f2f5f3;
  --muted: #aab8b4;
  --line: rgba(165, 240, 220, 0.13);
  --accent: #58c7a8;
  --accent-dark: #a5f0dc;
  --blue: #83a9ff;
  --amber: #ffc766;
  --pink: #ff8eb3;
  --soft: #1b2f2b;
  --mist: rgba(165, 240, 220, 0.08);
  --glass: rgba(17, 25, 27, 0.58);
  --shadow: 0 34px 110px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 26px 90px rgba(5, 10, 12, 0.3);
}

* {
  box-sizing: border-box;
}

@media (pointer: fine) {
  *,
  *::before,
  *::after {
    cursor: none !important;
  }
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.posts-scroller::-webkit-scrollbar,
.news-marquee::-webkit-scrollbar {
  display: none;
}

body,
.posts-scroller,
.news-marquee {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background:
    radial-gradient(ellipse at 22% 3%, rgba(165, 240, 220, 0.18), transparent 36rem),
    radial-gradient(ellipse at 82% 22%, rgba(131, 169, 255, 0.12), transparent 42rem),
    linear-gradient(180deg, #0d1213 0%, #11191b 46%, #0a0e10 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 46%, rgba(255, 255, 255, 0.035) 48%, transparent 52%),
    radial-gradient(circle at calc(20% + var(--journey-progress, 0) * 55%) 18%, rgba(88, 199, 168, 0.09), transparent 22rem);
  opacity: 0.86;
}

.cursor-diamond {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(178, 119, 255, 0.92);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: normal;
  box-shadow: 0 0 22px rgba(178, 119, 255, 0.35);
  transform: translate3d(-50%, -50%, 0) rotate(45deg) scale(0.9);
  transition: opacity 160ms ease, width 160ms ease, height 160ms ease, border-color 160ms ease;
}

.cursor-diamond.is-visible {
  opacity: 1;
}

.cursor-diamond.is-active {
  width: 38px;
  height: 38px;
  border-color: rgba(216, 191, 255, 0.98);
  box-shadow: 0 0 32px rgba(178, 119, 255, 0.5);
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  width: 96px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #07110e;
  font-size: 1.45rem;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 22px 76px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(7, 17, 14, 0.2);
  backdrop-filter: blur(18px) saturate(1.12);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), background 240ms ease, box-shadow 240ms ease;
}

.back-to-top span {
  display: inline-block;
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1;
  transform: scaleX(1.35);
  transform-origin: center;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-4px);
  background: var(--amber);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(7, 17, 14, 0.24);
}

a {
  color: inherit;
}

.site-header,
.site-footer,
main {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border-bottom: 0;
  border-radius: 0 0 14px 14px;
  background: rgba(12, 17, 18, 0.58);
  box-shadow: inset 0 -1px 0 rgba(165, 240, 220, 0.08), 0 18px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(22px) saturate(1.15);
}

.brand {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.main-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 680;
  text-decoration: none;
  transition: color 220ms ease, opacity 220ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-dark);
}

.news-feed {
  width: 100%;
  margin: 0;
  overflow: hidden;
}

.news-feed-inner {
  position: relative;
  display: block;
  min-height: 48px;
  overflow: hidden;
  border-radius: 0;
  background:
    radial-gradient(circle at 12% 0, rgba(165, 240, 220, 0.13), transparent 18rem),
    rgba(13, 19, 21, 0.48);
  box-shadow: inset 0 0 0 1px rgba(165, 240, 220, 0.07), 0 20px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(1.1);
}

.news-marquee {
  width: 100vw;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.news-track {
  display: flex;
  width: max-content;
  min-width: 100%;
  gap: 12px;
  padding: 7px 12px 7px 0;
  animation: newsMarquee 34s linear infinite;
  will-change: transform;
}

.news-feed:hover .news-track {
  animation-play-state: paused;
}

.news-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(165, 240, 220, 0.08);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), background 240ms ease;
}

.news-item:hover,
.news-item:focus-visible {
  transform: translateY(-1px);
  background: rgba(165, 240, 220, 0.11);
}

.news-item span {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.news-item strong {
  font-size: 0.88rem;
  font-weight: 760;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(34px, 6vw, 78px);
  min-height: calc(100svh - 78px);
  padding: 34px 0 72px;
}

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

.eyebrow,
.section-kicker,
.project-label {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 6.7vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.lead {
  max-width: 680px;
  margin-bottom: 30px;
  color: #d3dbd8;
  font-size: clamp(1.12rem, 2vw, 1.38rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 17px;
  border: 0;
  border-radius: 8px;
  font-weight: 760;
  text-decoration: none;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), background 240ms ease, box-shadow 240ms ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #07110e;
  box-shadow: 0 14px 42px rgba(88, 199, 168, 0.2);
}

.button.primary:hover,
.button.primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(88, 199, 168, 0.28);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px rgba(165, 240, 220, 0.1);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  transform: translateY(-2px);
  background: rgba(165, 240, 220, 0.1);
}

.hero-media {
  position: relative;
  margin: 0;
  aspect-ratio: 0.92;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(165, 240, 220, 0.08);
  transform: translate3d(0, calc(var(--journey-progress, 0) * -10px), 0);
}

.hero-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 39% center;
  transform: scale(1.025);
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-media:hover img {
  transform: scale(1.055);
}

.journey-section {
  --journey-progress: 0;
  position: relative;
  min-height: 205vh;
  border-top: 0;
  margin-top: 26px;
}

.journey-sticky {
  position: sticky;
  top: 78px;
  min-height: calc(100svh - 78px);
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: 56px 0;
}

.journey-copy {
  max-width: 500px;
}

.journey-copy h2 {
  margin-bottom: 20px;
}

.journey-copy p:not(.section-kicker) {
  color: #d1dad6;
  font-size: clamp(1.02rem, 1.45vw, 1.17rem);
}

.journey-stage {
  position: relative;
  min-height: min(650px, calc(100svh - 140px));
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at calc(18% + var(--journey-progress) * 46%) 24%, rgba(165, 240, 220, 0.19), transparent 18rem),
    linear-gradient(115deg, rgba(88, 199, 168, 0.14), transparent 38%),
    linear-gradient(245deg, rgba(131, 169, 255, 0.13), transparent 42%),
    rgba(17, 23, 25, 0.72);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(165, 240, 220, 0.1);
  backdrop-filter: blur(18px) saturate(1.08);
  isolation: isolate;
}

.journey-stage::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: translate3d(
    calc(var(--journey-progress) * -76px),
    calc(var(--journey-progress) * -48px),
    0
  );
}

.journey-stage::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(165, 240, 220, 0.08);
  border-radius: 50%;
  opacity: calc(0.16 + var(--journey-progress) * 0.32);
  transform: rotate(calc(var(--journey-progress) * 128deg)) scale(calc(0.74 + var(--journey-progress) * 0.48));
}

.journey-progress {
  position: absolute;
  left: clamp(18px, 4vw, 42px);
  right: clamp(18px, 4vw, 42px);
  bottom: clamp(18px, 4vw, 36px);
  z-index: 5;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.journey-progress::before {
  content: attr(data-journey-label);
  position: absolute;
  left: 0;
  bottom: 13px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.journey-progress span {
  display: block;
  width: calc(var(--journey-progress) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--amber), var(--blue));
  border-radius: inherit;
  box-shadow: 0 0 22px rgba(165, 240, 220, 0.28);
}

.motion-card {
  position: absolute;
  z-index: 3;
  width: clamp(190px, 22vw, 260px);
  min-height: clamp(210px, 26vw, 300px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 0;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(19, 27, 29, 0.78);
  box-shadow: 0 28px 94px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(165, 240, 220, 0.09);
  backdrop-filter: blur(20px) saturate(1.12);
  transition: transform 340ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 260ms ease;
}

.motion-card:hover {
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(165, 240, 220, 0.18);
}

.motion-label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sport-card {
  left: calc(8% + var(--journey-progress) * 20%);
  top: calc(13% + var(--journey-progress) * 17%);
  opacity: calc(1 - max(0, var(--journey-progress) - 0.34) * 2.5);
  transform:
    translate3d(calc(var(--journey-progress) * 18px), calc(var(--journey-progress) * -8px), 0)
    rotate(calc(-8deg + var(--journey-progress) * 15deg))
    scale(calc(1 - var(--journey-progress) * 0.12));
}

.piano-card {
  left: calc(38% - var(--journey-progress) * 10%);
  top: calc(30% - var(--journey-progress) * 7%);
  opacity: calc(0.08 + min(var(--journey-progress), 0.62) * 1.55 - max(0, var(--journey-progress) - 0.78) * 2);
  transform:
    translate3d(calc((0.5 - var(--journey-progress)) * 16px), calc((0.5 - var(--journey-progress)) * 12px), 0)
    rotate(calc(7deg - var(--journey-progress) * 12deg))
    scale(calc(0.86 + var(--journey-progress) * 0.18));
}

.code-card {
  right: calc(6% + (1 - var(--journey-progress)) * 16%);
  top: calc(15% + (1 - var(--journey-progress)) * 18%);
  opacity: calc(max(0, var(--journey-progress) - 0.62) * 3);
  transform:
    translate3d(calc((1 - var(--journey-progress)) * 26px), calc((1 - var(--journey-progress)) * 18px), 0)
    rotate(calc(10deg - var(--journey-progress) * 10deg))
    scale(calc(0.78 + var(--journey-progress) * 0.25));
}

.weight-room {
  position: relative;
  flex: 1;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(88, 199, 168, 0.18), rgba(88, 199, 168, 0.04)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: auto, 34px 100%;
  box-shadow: inset 0 0 0 1px rgba(165, 240, 220, 0.12);
}

.barbell,
.barbell span,
.lifter,
.lifter span,
.platform {
  position: absolute;
  display: block;
}

.barbell {
  left: 50%;
  top: 22%;
  width: 78%;
  height: 48px;
  transform: translateX(-50%);
  animation: barbellLift 1.8s ease-in-out infinite alternate;
}

.bar {
  left: 12%;
  right: 12%;
  top: 21px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dark), #f2f5f3, var(--accent-dark));
}

.plate {
  top: 5px;
  width: 14px;
  height: 38px;
  border-radius: 4px;
  background: var(--amber);
  box-shadow: 0 0 24px rgba(255, 199, 102, 0.18);
}

.plate.outer {
  width: 18px;
  height: 46px;
  top: 1px;
  background: var(--accent);
}

.plate-left.outer {
  left: 3%;
}

.plate-left.inner {
  left: 14%;
}

.plate-right.inner {
  right: 14%;
}

.plate-right.outer {
  right: 3%;
}

.lifter {
  left: 50%;
  bottom: 22%;
  width: 110px;
  height: 116px;
  transform: translateX(-50%);
}

.head {
  left: 43px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-dark);
}

.torso {
  left: 48px;
  top: 31px;
  width: 15px;
  height: 45px;
  border-radius: 999px;
  background: #dfe9e5;
}

.arm,
.leg {
  width: 12px;
  border-radius: 999px;
  background: var(--accent-dark);
  transform-origin: top center;
}

.arm {
  top: 34px;
  height: 58px;
}

.arm-left {
  left: 31px;
  transform: rotate(34deg);
}

.arm-right {
  right: 31px;
  transform: rotate(-34deg);
}

.leg {
  top: 75px;
  height: 50px;
  background: var(--blue);
}

.leg-left {
  left: 39px;
  transform: rotate(22deg);
}

.leg-right {
  right: 39px;
  transform: rotate(-22deg);
}

.platform {
  left: 14%;
  right: 14%;
  bottom: 14%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.piano {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 150px;
  padding: 16px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 142, 179, 0.1), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.white-key {
  flex: 1;
  border-radius: 4px;
  background: #eef4ef;
  transform-origin: top;
  animation: keyPulse 1.15s ease-in-out infinite;
}

.white-key:nth-child(2n) {
  animation-delay: 120ms;
}

.white-key:nth-child(3n) {
  animation-delay: 260ms;
}

.black-key {
  position: absolute;
  top: 16px;
  width: 9%;
  height: 56%;
  border-radius: 0 0 4px 4px;
  background: #101416;
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.08);
  animation: keyPulse 1.3s ease-in-out infinite;
  transform-origin: top;
}

.key-cs {
  left: 19%;
}

.key-ds {
  left: 31.5%;
  animation-delay: 120ms;
}

.key-fs {
  left: 56.5%;
  animation-delay: 260ms;
}

.key-gs {
  left: 69%;
  animation-delay: 380ms;
}

.key-as {
  left: 81.5%;
  animation-delay: 500ms;
}

.note {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  opacity: 0.9;
  animation: noteFloat 2.2s ease-in-out infinite;
}

.note::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 2px;
  height: 34px;
  background: var(--pink);
}

.note-a {
  left: 28%;
  top: 22%;
}

.note-b {
  left: 58%;
  top: 13%;
  animation-delay: 360ms;
}

.note-c {
  left: 76%;
  top: 34%;
  animation-delay: 720ms;
}

.monitor {
  flex: 1;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(131, 169, 255, 0.16), transparent 32%),
    #090d0f;
  box-shadow: inset 0 0 0 1px rgba(131, 169, 255, 0.18), 0 20px 70px rgba(0, 0, 0, 0.18);
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.terminal-bar span:nth-child(2) {
  background: var(--amber);
}

.terminal-bar span:nth-child(3) {
  background: var(--pink);
}

.monitor pre {
  margin: 0;
  padding: 18px;
  color: var(--accent-dark);
  font: 700 clamp(0.86rem, 1.4vw, 1.05rem) / 1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.monitor code {
  display: block;
  transform: translateY(calc((1 - var(--journey-progress)) * 28px));
  animation: codeBlink 1.6s steps(2, end) infinite;
}

.code-tunnel {
  position: absolute;
  inset: 0;
  z-index: 2;
  perspective: 700px;
  pointer-events: none;
}

.code-tunnel span {
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(242, 245, 243, 0.52);
  font: 800 clamp(0.76rem, 1.25vw, 0.95rem) / 1 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
  opacity: calc(var(--journey-progress) * 0.62);
  transform:
    translate(-50%, -50%)
    rotate(var(--tunnel-rotation))
    translateY(var(--tunnel-y))
    translateZ(calc(-560px + var(--journey-progress) * 760px));
}

.code-tunnel span:nth-child(1) {
  --tunnel-rotation: -28deg;
  --tunnel-y: -210px;
}

.code-tunnel span:nth-child(2) {
  --tunnel-rotation: 18deg;
  --tunnel-y: -128px;
}

.code-tunnel span:nth-child(3) {
  --tunnel-rotation: -8deg;
  --tunnel-y: -42px;
}

.code-tunnel span:nth-child(4) {
  --tunnel-rotation: 24deg;
  --tunnel-y: 48px;
}

.code-tunnel span:nth-child(5) {
  --tunnel-rotation: -18deg;
  --tunnel-y: 132px;
}

.code-tunnel span:nth-child(6) {
  --tunnel-rotation: 10deg;
  --tunnel-y: 214px;
}

@keyframes barbellLift {
  from {
    transform: translate3d(-50%, 18px, 0) rotate(-1deg);
  }

  to {
    transform: translate3d(-50%, -10px, 0) rotate(1deg);
  }
}

@keyframes keyPulse {
  0%,
  100% {
    transform: scaleY(1);
    filter: brightness(1);
  }

  45% {
    transform: scaleY(0.9);
    filter: brightness(0.82);
  }
}

@keyframes noteFloat {
  0%,
  100% {
    transform: translate3d(0, 8px, 0) rotate(-8deg);
  }

  50% {
    transform: translate3d(0, -12px, 0) rotate(8deg);
  }
}

@keyframes codeBlink {
  50% {
    opacity: 0.72;
  }
}

@keyframes newsMarquee {
  from {
    transform: translate3d(-50%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

.profile-section,
.projects-section,
.posts-section,
.contact-section,
.lounge-section {
  border-top: 0;
  padding: 70px 0;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  filter: blur(5px);
  transition: opacity 860ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 860ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 860ms ease;
}

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

.profile-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 68px);
  align-items: start;
}

h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4.2vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: 0;
}

.profile-text {
  color: #d1dad6;
  font-size: clamp(1.04rem, 1.65vw, 1.18rem);
}

.profile-text p:last-child,
.project-card p:last-child,
.legal-document p:last-child {
  margin-bottom: 0;
}

.section-heading {
  margin-bottom: 26px;
}

.posts-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--accent-dark);
}

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

.project-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(23px, 3vw, 32px);
  border: 0;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(165, 240, 220, 0.13), transparent 17rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--surface);
  box-shadow: var(--soft-shadow), inset 0 0 0 1px rgba(165, 240, 220, 0.08);
  text-decoration: none;
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 360ms ease, background 360ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(165, 240, 220, 0.16);
}

.project-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.project-card p {
  max-width: 500px;
  color: var(--muted);
  font-size: 1.02rem;
}

.lounge-section {
  padding-top: 34px;
}

.lounge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.lounge-card {
  min-height: 250px;
  padding: clamp(22px, 3vw, 30px);
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 12%, rgba(131, 169, 255, 0.13), transparent 17rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02)),
    var(--surface);
  box-shadow: var(--soft-shadow), inset 0 0 0 1px rgba(165, 240, 220, 0.08);
}

.lounge-card h3 {
  margin-bottom: 13px;
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  line-height: 1.04;
}

.lounge-card p {
  color: var(--muted);
  font-size: 1.02rem;
}

.lounge-button {
  width: fit-content;
}

.project-link {
  color: var(--blue);
  font-weight: 820;
}

.posts-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  margin-inline: 0;
  padding: 4px 2px 18px;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.posts-scrollbar {
  --scrollbar-thumb-left: 0px;
  --scrollbar-thumb-width: 120px;
  position: relative;
  width: 100%;
  height: 34px;
  margin: 6px 0 0;
  padding: 15px 0;
  cursor: none !important;
}

.posts-scrollbar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(165, 240, 220, 0.16), rgba(131, 169, 255, 0.34), rgba(255, 142, 179, 0.18));
  transform: translateY(-50%);
}

.posts-scrollbar-thumb {
  position: absolute;
  left: var(--scrollbar-thumb-left);
  top: 50%;
  width: var(--scrollbar-thumb-width);
  min-width: 58px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dark), var(--blue));
  box-shadow: 0 0 24px rgba(131, 169, 255, 0.28);
  transform: translateY(-50%);
  cursor: none !important;
}

.posts-scrollbar-thumb:active {
  height: 14px;
}

.posts-scrollbar.is-hidden {
  display: none;
}

.post-card {
  flex: 0 0 clamp(250px, 31vw, 340px);
  aspect-ratio: 0.8;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  scroll-snap-align: start;
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(165, 240, 220, 0.08);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 360ms ease, filter 360ms ease;
}

.post-card:hover,
.post-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(165, 240, 220, 0.15);
  filter: saturate(1.05);
}

.post-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.posts-fallback {
  color: var(--muted);
}

.posts-fallback a {
  color: var(--blue);
  font-weight: 800;
}

.contact-section {
  padding-bottom: 82px;
  align-items: center;
}

.contact-copy {
  max-width: 560px;
  color: #d1dad6;
  font-size: clamp(1.04rem, 1.65vw, 1.18rem);
}

.contact-copy p {
  margin-bottom: 24px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 24px 0 36px;
  color: var(--muted);
}

.site-footer span {
  color: var(--accent-dark);
  font-weight: 850;
}

.legal-page {
  width: min(880px, calc(100% - 40px));
  max-width: none;
  padding: clamp(34px, 6vw, 72px) 0 96px;
}

.not-found-page {
  min-height: calc(100svh - 82px);
  display: grid;
  align-items: center;
  padding: 56px 0 92px;
}

.not-found-panel {
  max-width: 760px;
}

.not-found-panel h1 {
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.98;
}

.not-found-panel p {
  max-width: 620px;
  margin-bottom: 30px;
  color: #d1dad6;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
}

.legal-document {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.legal-document h1 {
  margin-bottom: 32px;
  font-size: clamp(2.9rem, 7vw, 5.75rem);
  line-height: 0.98;
}

.legal-document h2 {
  margin: 32px 0 10px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.legal-document p,
.legal-document li {
  color: #d1dad6;
  line-height: 1.65;
}

.legal-document a {
  color: var(--blue);
  font-weight: 800;
}

.legal-document ul {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

@media (max-width: 880px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, 920px);
  }

  .site-header {
    padding-inline: 14px;
  }

  .main-nav,
  .site-footer nav {
    gap: 12px;
  }

  .news-feed-inner {
    min-height: 54px;
  }

  .news-track {
    padding-block: 10px;
  }

  .hero,
  .journey-sticky,
  .profile-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

  .hero-media {
    order: -1;
    width: min(100%, 440px);
    aspect-ratio: 0.98;
  }

  .journey-section {
    --journey-progress: 0.72;
    min-height: auto;
  }

  .journey-sticky {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 56px 0 68px;
  }

  .journey-stage {
    display: grid;
    gap: 14px;
    min-height: auto;
    padding: 14px;
    overflow: visible;
    background: rgba(17, 23, 25, 0.86);
    box-shadow: inset 0 0 0 1px rgba(165, 240, 220, 0.1);
    backdrop-filter: none;
  }

  .journey-stage::before {
    transform: none;
  }

  .journey-stage::after {
    display: none;
  }

  .motion-card {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    min-height: 230px;
    opacity: 1;
    transform: none;
    backdrop-filter: none;
  }

  .journey-stage .motion-card.reveal {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.98);
    transition: opacity 620ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .journey-stage .motion-card.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  .journey-stage .motion-card.reveal:nth-of-type(3) {
    transition-delay: 70ms;
  }

  .journey-stage .motion-card.reveal:nth-of-type(4) {
    transition-delay: 140ms;
  }

  .sport-card {
    order: 1;
  }

  .piano-card {
    order: 2;
  }

  .code-card {
    order: 3;
  }

  .code-tunnel {
    display: none;
  }

  .journey-progress {
    position: relative;
    order: 4;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 2px 4px 4px;
  }

  .journey-progress span {
    width: 100%;
  }

  .barbell,
  .white-key,
  .black-key,
  .note,
  .monitor code {
    animation: none;
  }

  .monitor code {
    transform: none;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.9rem);
  }

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

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

  .posts-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .main-nav a {
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(2.35rem, 11.6vw, 3.35rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 78px;
    height: 50px;
  }

  .back-to-top span {
    font-size: 1.45rem;
    transform: none;
  }

  .journey-stage {
    padding: 10px;
  }
}

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

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

  .journey-section {
    --journey-progress: 0.82;
    min-height: auto;
  }

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

  .news-marquee {
    width: auto;
    overflow-x: auto;
  }

  .news-track {
    width: max-content;
    animation: none;
  }
}
