:root {
  --bg-color: #f5f5ef;
  --bg-grid: #ebe9df;
  --text-color: #171717;
  --muted-text: #4b4b4b;
  --surface: #ffffff;
  --surface-alt: #efeee7;
  --border: #111111;
  --accent: #2f4f78;
  --accent-soft: #d6e1ef;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-color);
  font-family: "Jersey 25", monospace;
  line-height: 1.5;
  letter-spacing: 0.3px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@keyframes nav-drop-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes content-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes footer-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
h1 {
  font-family: "Jersey 10", monospace;
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: 1.2px;
}

h2,
h3,
h4,
h5,
h6,
.subheading {
  font-family: "Jersey 15", monospace;
  letter-spacing: 0.8px;
}

p,
li,
a,
button,
input,
textarea,
label,
span {
  font-family: "Jersey 25", monospace;
}

a {
  color: inherit;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 3px solid var(--border);
  animation: nav-drop-in 0.45s ease-out both;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  text-decoration: none;
  font-family: "Jersey 10", monospace;
  font-size: 2rem;
  color: var(--text-color);
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-item {
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border: 2px solid transparent;
  transition: 0.15s ease-in-out;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--border);
  background: var(--surface-alt);
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.2rem 3rem;
  width: 100%;
  flex: 1;
}

.main-content > * {
  opacity: 0;
  animation: content-fade-up 0.55s ease-out forwards;
}

.main-content > *:nth-child(2) {
  animation-delay: 0.08s;
}

.main-content > *:nth-child(3) {
  animation-delay: 0.14s;
}

.main-content > *:nth-child(4) {
  animation-delay: 0.2s;
}

.main-content > *:nth-child(5) {
  animation-delay: 0.26s;
}

.main-content > *:nth-child(6) {
  animation-delay: 0.32s;
}

.hero {
  position: relative;
  min-height: 58vh;
  display: grid;
  place-items: center;
  padding: 3rem 1rem;
  border: 3px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-image-wrap {
  margin: 0 auto 1.3rem;
  max-width: 520px;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  box-shadow: 4px 4px 0 var(--border);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.hero-image-wrap:hover .hero-image {
  transform: scale(1.025);
}

.hero h2 {
  font-size: clamp(1.3rem, 4vw, 2rem);
  margin-top: 0.35rem;
}

.hero-name {
  position: relative;
  display: inline-block;
  color: #edf2f8;
  background-image: linear-gradient(90deg, #c2d3e4 0%, #7f9bbb 45%, #355375 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 4px rgba(47, 79, 120, 0.22));
  text-shadow: 0 0 6px rgba(137, 173, 211, 0.34), 2px 2px 0 rgba(17, 17, 17, 0.28);
  animation: hero-name-idle 6s ease-in-out infinite;
}

.hero-name::before,
.hero-name::after {
  content: attr(data-name);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-name::before {
  color: rgba(182, 203, 227, 0.24);
  transform: translate(0.05em, 0.028em);
  animation: hero-name-layer-a 8s ease-in-out infinite;
  z-index: -1;
}

.hero-name::after {
  content: none;
}

.hero p {
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: var(--muted-text);
  margin: 1rem 0 2rem;
}

#particle-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  opacity: 0.45;
}

.particle:nth-child(1) {
  left: 3.3333333333%;
  top: 11%;
  animation: drift-1 31.6s infinite linear;
  animation-delay: -0.25s;
}

@keyframes drift-1 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(2) {
  left: 6.6666666667%;
  top: 89%;
  animation: drift-2 33.2s infinite linear;
  animation-delay: -0.5s;
}

@keyframes drift-2 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(3) {
  left: 10%;
  top: 23%;
  animation: drift-3 34.8s infinite linear;
  animation-delay: -0.75s;
}

@keyframes drift-3 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(4) {
  left: 13.3333333333%;
  top: 85%;
  animation: drift-4 36.4s infinite linear;
  animation-delay: -1s;
}

@keyframes drift-4 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(5) {
  left: 16.6666666667%;
  top: 74%;
  animation: drift-5 38s infinite linear;
  animation-delay: -1.25s;
}

@keyframes drift-5 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(6) {
  left: 20%;
  top: 2%;
  animation: drift-6 39.6s infinite linear;
  animation-delay: -1.5s;
}

@keyframes drift-6 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(7) {
  left: 23.3333333333%;
  top: 85%;
  animation: drift-7 41.2s infinite linear;
  animation-delay: -1.75s;
}

@keyframes drift-7 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(8) {
  left: 26.6666666667%;
  top: 84%;
  animation: drift-8 42.8s infinite linear;
  animation-delay: -2s;
}

@keyframes drift-8 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(9) {
  left: 30%;
  top: 64%;
  animation: drift-9 44.4s infinite linear;
  animation-delay: -2.25s;
}

@keyframes drift-9 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(10) {
  left: 33.3333333333%;
  top: 47%;
  animation: drift-10 46s infinite linear;
  animation-delay: -2.5s;
}

@keyframes drift-10 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(11) {
  left: 36.6666666667%;
  top: 11%;
  animation: drift-11 47.6s infinite linear;
  animation-delay: -2.75s;
}

@keyframes drift-11 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(12) {
  left: 40%;
  top: 76%;
  animation: drift-12 49.2s infinite linear;
  animation-delay: -3s;
}

@keyframes drift-12 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(13) {
  left: 43.3333333333%;
  top: 80%;
  animation: drift-13 50.8s infinite linear;
  animation-delay: -3.25s;
}

@keyframes drift-13 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(14) {
  left: 46.6666666667%;
  top: 27%;
  animation: drift-14 52.4s infinite linear;
  animation-delay: -3.5s;
}

@keyframes drift-14 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(15) {
  left: 50%;
  top: 20%;
  animation: drift-15 54s infinite linear;
  animation-delay: -3.75s;
}

@keyframes drift-15 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(16) {
  left: 53.3333333333%;
  top: 71%;
  animation: drift-16 55.6s infinite linear;
  animation-delay: -4s;
}

@keyframes drift-16 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(17) {
  left: 56.6666666667%;
  top: 60%;
  animation: drift-17 57.2s infinite linear;
  animation-delay: -4.25s;
}

@keyframes drift-17 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(18) {
  left: 60%;
  top: 35%;
  animation: drift-18 58.8s infinite linear;
  animation-delay: -4.5s;
}

@keyframes drift-18 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(19) {
  left: 63.3333333333%;
  top: 12%;
  animation: drift-19 60.4s infinite linear;
  animation-delay: -4.75s;
}

@keyframes drift-19 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(20) {
  left: 66.6666666667%;
  top: 27%;
  animation: drift-20 62s infinite linear;
  animation-delay: -5s;
}

@keyframes drift-20 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(21) {
  left: 70%;
  top: 54%;
  animation: drift-21 63.6s infinite linear;
  animation-delay: -5.25s;
}

@keyframes drift-21 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(22) {
  left: 73.3333333333%;
  top: 60%;
  animation: drift-22 65.2s infinite linear;
  animation-delay: -5.5s;
}

@keyframes drift-22 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(23) {
  left: 76.6666666667%;
  top: 33%;
  animation: drift-23 66.8s infinite linear;
  animation-delay: -5.75s;
}

@keyframes drift-23 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(24) {
  left: 80%;
  top: 17%;
  animation: drift-24 68.4s infinite linear;
  animation-delay: -6s;
}

@keyframes drift-24 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(25) {
  left: 83.3333333333%;
  top: 55%;
  animation: drift-25 70s infinite linear;
  animation-delay: -6.25s;
}

@keyframes drift-25 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(26) {
  left: 86.6666666667%;
  top: 79%;
  animation: drift-26 71.6s infinite linear;
  animation-delay: -6.5s;
}

@keyframes drift-26 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(27) {
  left: 90%;
  top: 76%;
  animation: drift-27 73.2s infinite linear;
  animation-delay: -6.75s;
}

@keyframes drift-27 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(28) {
  left: 93.3333333333%;
  top: 75%;
  animation: drift-28 74.8s infinite linear;
  animation-delay: -7s;
}

@keyframes drift-28 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(29) {
  left: 96.6666666667%;
  top: 44%;
  animation: drift-29 76.4s infinite linear;
  animation-delay: -7.25s;
}

@keyframes drift-29 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.particle:nth-child(30) {
  left: 100%;
  top: 8%;
  animation: drift-30 78s infinite linear;
  animation-delay: -7.5s;
}

@keyframes drift-30 {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(8vw, -12vh);
  }
  66% {
    transform: translate(-6vw, 11vh);
  }
  100% {
    transform: translate(0, 0);
  }
}
.status-line {
  margin: 1.1rem 0;
}

.status-line strong {
  color: var(--accent);
}

.cta-buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary,
.cta-secondary {
  text-decoration: none;
  border: 2px solid var(--border);
  padding: 0.55rem 1rem;
  min-width: 170px;
  transition: 0.15s ease-in-out;
}

.cta-primary {
  background: var(--accent);
  color: #fff;
}

.cta-secondary {
  background: var(--surface-alt);
}

.cta-primary:hover,
.cta-secondary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--border);
}

.experiment-card,
.metric,
pre.highlight {
  background: var(--surface);
  border: 2px solid var(--border);
  box-shadow: 4px 4px 0 var(--border);
}

.experiment-card {
  padding: 1.2rem;
  margin: 1.2rem 0;
}

.metric {
  margin: 1.2rem 0;
  padding: 1rem;
}

pre.highlight {
  margin: 1.2rem 0;
  padding: 1rem;
  overflow-x: auto;
}

.site-footer {
  margin-top: 3rem;
  text-align: center;
  background: var(--surface);
  border-top: 3px solid var(--border);
  padding: 1.2rem;
  color: var(--muted-text);
  animation: footer-rise 0.45s ease-out both;
  animation-delay: 0.18s;
}

.home-about {
  margin-top: 1.4rem;
  padding: 1.2rem;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
}
.home-about h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.4rem;
}
.home-about h3 {
  margin-top: 1rem;
  font-size: 1.5rem;
}
.home-about p {
  color: var(--muted-text);
  margin-top: 0.35rem;
}
.home-about ul {
  margin: 0.35rem 0 0 1.1rem;
}
.home-about li {
  color: var(--muted-text);
}

.connect-links {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.connect-link {
  text-decoration: none;
  border: 2px solid var(--border);
  background: var(--accent-soft);
  padding: 0.5rem 0.95rem;
  font-family: "Jersey 15", monospace;
  font-size: 1.35rem;
  line-height: 1;
  transition: 0.15s ease-in-out;
}

.connect-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--border);
}

.hobbies-section,
.fun-facts-section {
  margin-top: 1.3rem;
  padding: 1.2rem;
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
}

.hobbies-section {
  position: relative;
  overflow: visible;
  isolation: isolate;
}

.hobbies-section > * {
  position: relative;
  z-index: 2;
}

.hobbies-bg-icons {
  position: absolute;
  inset: -78px;
  pointer-events: none;
  z-index: 0;
}

.pixel-bg-icon {
  position: absolute;
  --icon-base-transform: translate(0, 0);
  width: clamp(66px, 8vw, 108px);
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0.62;
  filter: drop-shadow(2px 2px 0 rgba(17, 17, 17, 0.22));
  animation: pixel-icon-float 6.2s ease-in-out infinite;
}

.icon-dumbbell {
  left: -152px;
  top: 7%;
  animation-delay: -0.8s;
  animation-duration: 5.9s;
}

.icon-sushi {
  right: -142px;
  top: 35%;
  animation-delay: -2.6s;
  animation-duration: 6.4s;
}

.icon-piano {
  right: -132px;
  bottom: 9%;
  animation-delay: -3.4s;
  animation-duration: 6.8s;
}

.icon-book {
  left: -154px;
  bottom: 42%;
  animation-delay: -1.5s;
  animation-duration: 5.7s;
}

.icon-soccer {
  left: 73%;
  bottom: -122px;
  --icon-base-transform: translate(-50%, 0);
  animation-delay: -4.7s;
  animation-duration: 6.6s;
}

.hobbies-section h2,
.fun-facts-section h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.4rem;
}

.hobbies-section p,
.fun-facts-section p {
  color: var(--muted-text);
}

.hobby-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hobby-card {
  border: 2px solid var(--border);
  background: var(--surface-alt);
  padding: 0.9rem;
  box-shadow: 3px 3px 0 var(--border);
  transition: transform 0.16s ease-in-out, box-shadow 0.16s ease-in-out;
}

.hobby-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--border);
}

.hobby-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.hobby-card p {
  color: var(--muted-text);
}

.facts-divider {
  margin: 0.15rem 0 0.35rem;
  color: var(--text-color);
}

.fun-facts-list {
  margin-left: 1.1rem;
}

.fun-facts-list li {
  color: var(--muted-text);
  margin: 0.15rem 0;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3000;
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  background: radial-gradient(circle, rgba(47, 79, 120, 0.5) 0%, rgba(214, 225, 239, 0.25) 45%, rgba(214, 225, 239, 0) 72%);
  box-shadow: 0 0 16px rgba(47, 79, 120, 0.45);
  transition: opacity 0.16s ease-out, transform 0.1s ease-out;
}

.cursor-glow.is-visible {
  opacity: 0.95;
}

.cursor-glow.is-pressed {
  transform: translate(-50%, -50%) scale(0.75);
}

.pixel-trail {
  position: fixed;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  pointer-events: none;
  z-index: 2999;
  transform: translate(-50%, -50%) rotate(var(--pixel-rotate, 0deg));
  background: var(--accent-soft);
  border: 1px solid var(--border);
  animation: pixel-trail-fade 460ms steps(5, end) forwards;
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    gap: 0.5rem;
  }

  .nav-item {
    width: 100%;
  }

  .main-content {
    padding: 1.2rem 0.9rem 2rem;
  }

  .hero {
    min-height: 50vh;
    padding: 2rem 0.9rem;
  }

  .pixel-bg-icon {
    width: clamp(50px, 14vw, 78px);
    opacity: 0.5;
  }

  .icon-dumbbell {
    left: -78px;
    top: 10%;
  }

  .icon-sushi {
    right: -72px;
    top: 33%;
  }

  .icon-piano {
    right: -68px;
    bottom: 12%;
  }

  .icon-book {
    left: -80px;
    bottom: 40%;
  }

  .icon-soccer {
    left: 70%;
    bottom: -72px;
  }
}
@media (pointer: coarse) {
  .cursor-glow,
  .pixel-trail {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@keyframes hero-name-idle {
  0% {
    transform: translateY(0) scale(1);
    letter-spacing: 1.15px;
    text-shadow: 0 0 6px rgba(137, 173, 211, 0.34), 2px 2px 0 rgba(17, 17, 17, 0.28);
  }
  50% {
    transform: translateY(-1px) scale(1.006);
    letter-spacing: 1.22px;
    text-shadow: 0 0 8px rgba(156, 190, 224, 0.42), 2px 2px 0 rgba(17, 17, 17, 0.26);
  }
  100% {
    transform: translateY(0) scale(1);
    letter-spacing: 1.15px;
    text-shadow: 0 0 6px rgba(137, 173, 211, 0.34), 2px 2px 0 rgba(17, 17, 17, 0.28);
  }
}
@keyframes hero-name-layer-a {
  0% {
    transform: translate(0.05em, 0.028em);
    opacity: 0.18;
  }
  50% {
    transform: translate(0.035em, 0.018em);
    opacity: 0.26;
  }
  100% {
    transform: translate(0.05em, 0.028em);
    opacity: 0.18;
  }
}
@keyframes hero-name-layer-b {
  0% {
    transform: translate(-0.038em, -0.028em);
    opacity: 0.38;
  }
  50% {
    transform: translate(-0.024em, -0.016em);
    opacity: 0.48;
  }
  100% {
    transform: translate(-0.038em, -0.028em);
    opacity: 0.38;
  }
}
@keyframes hero-name-shimmer {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}
@keyframes pixel-icon-float {
  0% {
    transform: var(--icon-base-transform) translate(0, 0);
  }
  25% {
    transform: var(--icon-base-transform) translate(1px, -3px);
  }
  50% {
    transform: var(--icon-base-transform) translate(-1px, -6px);
  }
  75% {
    transform: var(--icon-base-transform) translate(1px, -3px);
  }
  100% {
    transform: var(--icon-base-transform) translate(0, 0);
  }
}
@keyframes pixel-trail-fade {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1) rotate(var(--pixel-rotate, 0deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3) rotate(var(--pixel-rotate, 0deg));
  }
}
.projects-hero {
  text-align: center;
  margin-bottom: 2rem;
}
.projects-hero h1 {
  margin-bottom: 0.5rem;
}
.projects-hero .lead {
  color: var(--muted-text);
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.project-featured {
  margin: 1.8rem 0 3rem;
}

.project-card {
  background: var(--surface);
  border: 2px solid var(--border);
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--border);
  transition: transform 0.18s ease-in-out, box-shadow 0.18s ease-in-out;
}
.project-card.featured {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
}
@media (max-width: 820px) {
  .project-card.featured {
    grid-template-columns: 1fr;
  }
}
.project-card .project-image {
  background: var(--surface-alt);
}
.project-card .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(14%) contrast(1.05);
  transition: transform 0.28s ease-in-out, filter 0.28s ease-in-out;
}
.project-card .featured .project-image {
  min-height: 330px;
}
.project-card .project-content {
  padding: 1rem;
}
.project-card.featured .project-content {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.project-card .project-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.project-card .project-tag {
  display: inline-block;
  border: 2px solid var(--border);
  background: var(--accent-soft);
  padding: 0.12rem 0.6rem;
  margin-bottom: 0;
}
.project-card .project-date {
  display: inline-block;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  padding: 0.12rem 0.55rem;
  margin: 0;
  color: var(--text-color);
  line-height: 1.2;
}
.project-card h2 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 0.2rem;
}
.project-card h3 {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}
.project-card .project-description,
.project-card p {
  color: var(--muted-text);
}
.project-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--border);
}
.project-card:hover .project-image img {
  transform: scale(1.035);
  filter: grayscale(4%) contrast(1.08);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.project-actions .btn-primary,
.project-actions .btn-secondary {
  margin-top: 0;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.8rem 0 1rem;
}
.skills-list .skill {
  border: 2px solid var(--border);
  background: var(--surface-alt);
  padding: 0.2rem 0.55rem;
  transition: transform 0.15s ease-in-out, background 0.15s ease-in-out;
}
.skills-list .skill:hover {
  transform: translate(-1px, -1px);
  background: var(--accent-soft);
}

.section-skills {
  justify-content: center;
  margin-top: 0.55rem;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  border: 2px solid var(--border);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  transition: 0.15s ease-in-out;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text-color);
  margin-top: 1.25rem;
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--border);
}

.project-section {
  margin: 3.4rem 0;
}
.project-section .section-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.project-section .section-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.25rem;
}
.project-section .section-header p {
  color: var(--muted-text);
}
.project-section .section-header .project-date {
  display: inline-block;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-color);
  padding: 0.1rem 0.55rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.project-grid .project-card .project-image {
  height: 190px;
}

.mini-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mini-card {
  border: 2px solid var(--border);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--border);
  text-align: center;
  padding: 1rem;
  transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out, background 0.15s ease-in-out;
}
.mini-card:hover {
  transform: translate(-2px, -2px);
  background: var(--surface-alt);
  box-shadow: 6px 6px 0 var(--border);
}
.mini-card h4 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.mini-card p {
  color: var(--muted-text);
}

.projects-footer {
  margin: 2.2rem 0 1rem;
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
}

/* Learning page theme overrides - slightly darker blue
   Scoped under .learning-page so other pages remain unchanged */
.learning-page {
  /* slightly darker accent for Learning section */
  --accent: #244a78;
  /* darker than default */
  --accent-soft: #cbdcf0;
}
.learning-page .projects-hero .lead {
  color: #2b4f7a;
}
.learning-page .project-card.featured .project-meta .project-tag {
  background: linear-gradient(90deg, rgba(36, 74, 120, 0.12), rgba(36, 74, 120, 0.06));
  color: #15324f;
  border: 1px solid rgba(36, 74, 120, 0.12);
}
.learning-page .project-card.featured .project-actions .btn-secondary {
  border-color: var(--accent);
  color: var(--accent);
}
.learning-page .project-card.featured .project-actions .btn-primary,
.learning-page .project-card.featured .cta-primary {
  background: var(--accent);
  color: #fff;
}
