:root {
  --bg: #f7f7f3;
  --ink: #08090a;
  --muted: #a7a7a7;
  --soft: #ecece6;
  --blue: #2f78ff;
  --purple: #a68de8;
  --acid: #b7ff00;
  --yellow: #ffd23c;
  --radius: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", Arial, sans-serif;
  overflow-x: hidden;
  transition: background 240ms ease, color 240ms ease;
}

body.dark-mode {
  --bg: #08090a;
  --ink: #f7f7f3;
  --muted: #777;
  --soft: #17181a;
}

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

.cursor-dot {
  position: fixed;
  z-index: 100;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--acid);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 180ms ease, width 180ms ease, height 180ms ease;
}

.cursor-dot.is-active {
  opacity: 1;
}

.cursor-dot.is-hovering {
  width: 54px;
  height: 54px;
}

.corner-controls {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 30;
  display: flex;
  gap: 8px;
}

.theme-toggle,
.lang-toggle {
  min-width: 68px;
  height: 38px;
  border: 1px solid rgba(8, 9, 10, 0.14);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.14);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.lang-toggle:hover,
.lang-toggle:focus-visible {
  transform: translateY(-3px);
}

.site-header {
  position: fixed;
  top: 16px;
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  color: #fff;
  mix-blend-mode: difference;
}

.corner-avatar {
  position: fixed;
  top: 16px;
  left: 18px;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.24)),
    radial-gradient(circle at 35% 24%, var(--purple), transparent 32%),
    #111;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
  box-shadow: inset 0 -18px 30px rgba(255, 255, 255, 0.12);
}

.nav {
  position: fixed;
  top: 17px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 26.25px;
}

.nav a {
  position: relative;
  display: flex;
  height: 28.5px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
  transition: transform 180ms ease;
}

.nav-label {
  display: block;
  font-size: 1.6125rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.07em;
  white-space: nowrap;
}

.nav-char,
.wave-char {
  display: inline-block;
  transform: translateY(0) scale(1);
}

.nav a:hover .nav-char,
.nav a:focus-visible .nav-char,
a:hover .wave-char,
a:focus-visible .wave-char,
button:hover .wave-char,
button:focus-visible .wave-char {
  animation: nav-wave 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--char-index) * 30ms);
}

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

.hero {
  min-height: 100vh;
  padding: 128px 24px 0;
  text-align: center;
}

.hero-content {
  max-width: 1080px;
  margin: 0 auto;
}

.eyebrow,
.hero-meta,
.section-kicker {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-family: "Archivo", Arial, sans-serif;
  font-weight: 900;
  margin: 0;
  font-size: clamp(4.2rem, 11vw, 10.5rem);
  line-height: 0.82;
  letter-spacing: -0.095em;
  text-wrap: balance;
}

[data-scramble] {
  display: block;
  min-height: var(--scramble-height, auto);
}

[data-scramble].is-scrambling {
  height: var(--scramble-height, auto);
  overflow: hidden;
}

.hero-copy {
  max-width: 620px;
  margin: 26px auto 12px;
  color: #a7a7a7;
  font-size: clamp(1.35rem, 3.2vw, 2.35rem);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.primary-button {
  display: inline-flex;
  margin-top: 24px;
  padding: 20px 36px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  box-shadow: 0 18px 35px rgba(47, 120, 255, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 24px 48px rgba(47, 120, 255, 0.35);
}

.showcase-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(320px, 31vw, 540px);
  grid-template-columns: none;
  gap: 42px;
  width: max-content;
  margin: 88px 0 0 50%;
  transform: translateX(-50%);
}

.browser-card,
.project-card {
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease;
  will-change: transform;
}

.browser-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(8, 9, 10, 0.16);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

body.dark-mode .browser-card {
  border-color: #17181a;
  background: #08090a;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.58);
}

.browser-card.featured {
  min-height: 520px;
}

.browser-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: #111827;
  color: #fff;
}

.browser-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff6b35;
}

.browser-top span:nth-child(2) {
  background: var(--yellow);
}

.browser-top span:nth-child(3) {
  background: var(--acid);
}

.browser-top strong {
  margin-left: auto;
  font-size: 0.8rem;
  letter-spacing: -0.02em;
}

.browser-body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
  color: #fff;
  text-align: left;
}

.browser-body p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 900;
}

.browser-body h2 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

.game-preview {
  background: linear-gradient(160deg, #101936, #40408b);
}

.app-preview {
  background:
    radial-gradient(circle at 78% 68%, rgba(183, 255, 0, 0.28), transparent 28%),
    linear-gradient(160deg, #07101f, #111827 58%, #12123b);
}

.ai-preview {
  background: linear-gradient(160deg, #0e0e0f, #422777);
}

.future-preview {
  background:
    radial-gradient(circle at 82% 18%, rgba(183, 255, 0, 0.3), transparent 28%),
    linear-gradient(160deg, #141414, #46327f);
}

.future-preview.alt {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 210, 60, 0.35), transparent 26%),
    linear-gradient(160deg, #08111f, #213b65);
}

.future-preview.dark {
  background:
    radial-gradient(circle at 74% 70%, rgba(166, 141, 232, 0.32), transparent 28%),
    linear-gradient(160deg, #08090a, #1c1c1f);
}

.section {
  padding: 130px 6vw;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 64px;
  align-items: start;
}

.intro h2,
.section-heading h2,
.skills h2 {
  margin: 18px 0 0;
  font-size: clamp(3.4rem, 8vw, 8.8rem);
  line-height: 0.85;
  letter-spacing: -0.085em;
}

.intro-copy {
  padding-top: 32px;
  color: #555;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.info-list span {
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--soft);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 42px;
}

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

.project-card {
  min-height: 430px;
  padding: 28px;
  border: 1px solid rgba(8, 9, 10, 0.1);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 50px rgba(8, 9, 10, 0.08);
  cursor: pointer;
}

body.dark-mode .project-card:not(.accent) {
  border-color: #1f2024;
  background: #101113;
  color: #f7f7f3;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: 0 28px 70px rgba(8, 9, 10, 0.16);
}

.project-card.accent {
  background: var(--ink);
  color: #fff;
}

body.dark-mode .project-card.accent {
  border-color: #f7f7f3;
  background: #f7f7f3;
  color: #08090a;
}

.project-card.future {
  border-style: dashed;
  background:
    radial-gradient(circle at 80% 20%, rgba(166, 141, 232, 0.22), transparent 26%),
    #fff;
}

body.dark-mode .project-card.future {
  border-color: #2a2b31;
  background:
    radial-gradient(circle at 80% 20%, rgba(166, 141, 232, 0.18), transparent 26%),
    #101113;
}

.project-card.future .project-number {
  background: var(--purple);
  color: #fff;
}

.project-number {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font-weight: 900;
}

.project-card h3 {
  margin: 80px 0 18px;
  font-size: clamp(2rem, 3.5vw, 4.2rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.project-card p {
  color: #777;
  font-size: 1.05rem;
  line-height: 1.35;
}

body.dark-mode .project-card:not(.accent) p {
  color: #b7b7b7;
}

.project-card.accent p {
  color: #c9c9c9;
}

body.dark-mode .project-card.accent p {
  color: #555;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tags span {
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
}

body.dark-mode .project-card:not(.accent) .tags span {
  background: #f7f7f3;
  color: #08090a;
}

.project-card.accent .tags span {
  background: #fff;
}

body.dark-mode .project-card.accent .tags span {
  background: #08090a;
  color: #f7f7f3;
}

.skill-marquee {
  overflow: hidden;
  margin-top: 42px;
  border-block: 1px solid rgba(8, 9, 10, 0.12);
}

.skill-track {
  display: flex;
  width: max-content;
  gap: 18px;
  padding: 30px 0;
  animation: marquee 24s linear infinite;
}

.skill-track span {
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.055em;
}

body.dark-mode .skill-track span {
  background: #f7f7f3;
  color: #08090a;
}

.footer {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px 34px 0 0;
  background: #08090a;
  color: #fff;
}

body.dark-mode .footer {
  border-color: rgba(8, 9, 10, 0.16);
  background: #f7f7f3;
  color: #08090a;
}

.footer-top {
  min-height: 64vh;
  padding: 6vw 8vw;
}

.footer-top p {
  margin: 0 0 48px;
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.09em;
}

.footer-top a {
  display: inline-block;
  font-size: clamp(4rem, 12vw, 14rem);
  font-weight: 900;
  line-height: 0.77;
  letter-spacing: -0.105em;
}

.footer-top span:first-of-type {
  color: var(--purple);
}

.footer-top span:last-of-type {
  color: var(--yellow);
}

.footer-top a::selection,
.footer-top span::selection {
  background: var(--acid);
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px 6vw;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

body.dark-mode .footer-bottom {
  border-top-color: rgba(8, 9, 10, 0.14);
}

.footer-bottom p {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 2rem);
  letter-spacing: -0.045em;
}

.footer-bottom p span {
  color: #a020ff;
}

.socials {
  display: flex;
  gap: 28px;
  align-items: center;
}

.socials a {
  font-size: clamp(1.3rem, 2vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  transition: color 180ms ease, transform 180ms ease;
}

.socials a:first-child {
  font-family: "Pacifico", cursive;
  font-weight: 400;
  letter-spacing: 0;
}

.socials a:hover,
.socials a:focus-visible {
  color: var(--acid);
  transform: translateY(-3px);
}

body.dark-mode .socials a:hover,
body.dark-mode .socials a:focus-visible {
  color: var(--purple);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(42px) scale(0.98);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes nav-wave {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-4px) scale(1.2);
  }
}

@media (max-width: 920px) {
  .corner-controls {
    left: 14px;
    bottom: 14px;
  }

  .theme-toggle,
  .lang-toggle {
    min-width: 58px;
    height: 34px;
    font-size: 0.82rem;
  }

  .site-header {
    top: 12px;
  }

  .corner-avatar {
    top: 12px;
    left: 14px;
    width: 51px;
    height: 51px;
    border-radius: 17px;
    font-size: 1.125rem;
  }

  .nav {
    top: 17px;
    right: 14px;
    gap: 14px;
  }

  .nav a {
    padding: 0;
  }

  .nav-label {
    font-size: 1.16rem;
    letter-spacing: -0.06em;
  }

  .hero {
    padding: 112px 20px 0;
  }

  .hero h1 {
    font-size: clamp(4rem, 14vw, 8rem);
    letter-spacing: -0.085em;
  }

  .hero-copy {
    font-size: clamp(1.15rem, 3.6vw, 1.75rem);
  }

  .showcase-strip,
  .intro-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .showcase-strip {
    width: calc(100% - 32px);
    gap: 18px;
    grid-auto-flow: row;
    grid-auto-columns: initial;
    grid-template-columns: 1fr;
  }

  .browser-card,
  .browser-card.featured {
    min-height: 340px;
  }

  .browser-body h2 {
    font-size: clamp(2.4rem, 9vw, 4.6rem);
  }

  .intro h2,
  .section-heading h2,
  .skills h2 {
    font-size: clamp(3.4rem, 12vw, 7rem);
  }

  .section,
  .footer-top {
    padding-inline: 24px;
  }

  .section {
    padding-block: 96px;
  }

  .footer-top {
    min-height: 58vh;
    padding-block: 72px;
  }

  .footer-top a {
    font-size: clamp(3.6rem, 13vw, 8rem);
  }

  .section-heading,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .corner-controls {
    left: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .theme-toggle,
  .lang-toggle {
    min-width: 48px;
    height: 30px;
    font-size: 0.74rem;
  }

  .hero {
    min-height: auto;
    padding: 96px 14px 0;
  }

  .site-header {
    justify-content: center;
  }

  .corner-avatar {
    left: 10px;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 0.86rem;
  }

  .nav {
    top: 18px;
    right: 10px;
    gap: 8px;
  }

  .nav a {
    height: 25.5px;
  }

  .nav-label {
    font-size: 0.92rem;
    letter-spacing: -0.055em;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 17vw, 5.5rem);
    line-height: 0.86;
    letter-spacing: -0.075em;
  }

  .eyebrow,
  .hero-meta {
    font-size: 0.88rem;
  }

  .hero-copy {
    max-width: 340px;
    margin-top: 18px;
    font-size: 1.08rem;
    line-height: 1.14;
  }

  .primary-button {
    padding: 15px 24px;
    font-size: 1rem;
  }

  .showcase-strip {
    width: calc(100% - 24px);
    margin-top: 56px;
  }

  .browser-card,
  .browser-card.featured {
    min-height: 410px;
  }

  .browser-body {
    padding: 26px;
  }

  .browser-body h2 {
    font-size: clamp(2.35rem, 13vw, 4.2rem);
  }

  .browser-top {
    padding: 11px 14px;
  }

  .browser-top strong {
    font-size: 0.72rem;
  }

  .section {
    padding: 78px 16px;
  }

  .intro-grid {
    gap: 24px;
  }

  .intro h2,
  .section-heading h2,
  .skills h2 {
    font-size: clamp(3rem, 15vw, 5.3rem);
  }

  .intro-copy {
    padding-top: 0;
    font-size: 1.05rem;
  }

  .project-card {
    min-height: 360px;
    padding: 22px;
    border-radius: 24px;
  }

  .project-card h3 {
    margin-top: 58px;
    font-size: clamp(2.4rem, 12vw, 4.1rem);
  }

  .project-card p {
    font-size: 1rem;
  }

  .project-number {
    width: 48px;
    height: 48px;
  }

  .skill-track {
    padding: 22px 0;
  }

  .skill-track span {
    padding: 12px 18px;
    font-size: 1rem;
  }

  .footer-top {
    min-height: 52vh;
    padding: 64px 16px;
  }

  .footer-top p {
    margin-bottom: 34px;
    font-size: clamp(3rem, 17vw, 5.4rem);
  }

  .footer-top a {
    font-size: clamp(3rem, 16vw, 5rem);
    line-height: 0.82;
  }

  .footer-bottom {
    gap: 22px;
    padding: 28px 16px 58px;
  }

  .socials {
    flex-wrap: wrap;
    gap: 16px;
  }

  .socials a {
    font-size: 1.25rem;
  }
}

@media (max-width: 380px) {
  .corner-avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .nav {
    gap: 6px;
  }

  .nav-label {
    font-size: 0.78rem;
  }

  .hero h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }
}

@media (pointer: coarse) {
  .cursor-dot {
    display: none;
  }
}

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

  .cursor-dot {
    display: none;
  }
}
