﻿@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;800&family=Press+Start+2P&family=Space+Grotesk:wght@400;500;600;700&family=VT323&display=swap');

:root {
  --bg-top: #9ee7ff;
  --bg-bottom: #75cbff;
  --card: #fff8df;
  --card-soft: #fff2c2;
  --accent: #ff5c89;
  --accent-soft: #ffe0ea;
  --accent-alt: #00b9ff;
  --accent-warm: #ffd84a;
  --text: #1f2c6a;
  --muted: #43518f;
  --line: #1f2c6a;
  --shadow-hard: 6px 6px 0 #1f2c6a;
  --shadow-soft: 0 18px 30px rgba(28, 44, 105, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overscroll-behavior-y: auto;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.6) 0 8%, transparent 9%),
    radial-gradient(circle at 84% 16%, rgba(255, 240, 194, 0.7) 0 12%, transparent 13%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.2) 0,
      rgba(255, 255, 255, 0.2) 12px,
      transparent 12px,
      transparent 24px
    ),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 2px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.3;
  z-index: 1;
}

.page {
  max-width: 1120px;
  margin: 30px auto;
  padding: 28px 24px 38px;
  border: 3px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 251, 236, 0.95), rgba(251, 243, 215, 0.95));
  box-shadow: var(--shadow-hard), var(--shadow-soft);
  position: relative;
  z-index: 2;
}

h1,
h2,
h3 {
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.06;
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  margin-top: 8px;
}

h3 {
  font-size: 1.14rem;
}

p {
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-140%);
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  color: var(--text);
  background: var(--card);
  box-shadow: 2px 2px 0 var(--line);
  z-index: 200;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--accent-alt);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav {
  position: -webkit-sticky;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  margin-bottom: 28px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 248, 223, 0.97);
  box-shadow: 4px 4px 0 rgba(31, 44, 106, 0.72);
  position: sticky;
  top: 8px;
  z-index: 120;
  backdrop-filter: none;
}

.logo {
  font-family: "Orbitron", "VT323", monospace;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0.03em;
  color: var(--accent);
  text-shadow:
    2px 2px 0 var(--line),
    4px 4px 0 rgba(31, 44, 106, 0.45),
    0 0 10px rgba(0, 185, 255, 0.35);
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav-links a {
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  padding: 9px 11px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 2px 2px 0 var(--line);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.nav-links a:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--line);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-contact {
  min-width: 112px;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff9e2, var(--accent-warm));
  min-width: 46px;
  min-height: 44px;
  padding: 10px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
}

.nav-toggle:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--line);
}

.nav-toggle:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.nav-toggle-icon {
  width: 18px;
  height: 12px;
  display: block;
  background:
    linear-gradient(var(--line), var(--line)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 50% / 100% 2px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 100% / 100% 2px no-repeat;
}

.nav[data-open="true"] .nav-toggle {
  background: linear-gradient(180deg, #ff9fbc, #ff6f9c);
}

.hero {
  padding: 8px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: start;
}

.hero-side {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 340px;
  justify-self: end;
}

.eyebrow {
  font-family: "Press Start 2P", monospace;
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.lede {
  margin: 16px 0 22px;
  color: var(--muted);
  font-size: 1.04rem;
  max-width: 60ch;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  /* Pixel-era UX rule: if it does not click, add one more border and a shadow. */
  border: 2px solid var(--line);
  color: var(--text);
  padding: 11px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--line);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--line);
}

.btn.primary {
  background: linear-gradient(180deg, #ff7ca3, var(--accent));
  color: #fff8fc;
}

.btn.ghost {
  background: linear-gradient(180deg, #fff9e2, var(--accent-warm));
}

.theme-toggle {
  white-space: nowrap;
  min-width: 132px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-left: 12px;
  padding-right: 14px;
}

.theme-toggle-icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 2px;
  background:
    radial-gradient(circle at 28% 28%, #fff9cc 0 30%, transparent 31%),
    linear-gradient(180deg, #ffd84a, #ffaf32);
  box-shadow: 2px 2px 0 var(--line);
  flex: 0 0 auto;
}

.theme-toggle[data-mode="dark"] .theme-toggle-icon {
  background:
    radial-gradient(circle at 72% 28%, #86dfff 0 28%, transparent 29%),
    linear-gradient(180deg, #27325d, #1a2446);
}

.hero-portrait,
.hero-card,
.project-card,
.contact-card,
.retro-lab {
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-hard);
}

.hero-portrait {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 2px solid var(--line);
  object-fit: cover;
  object-position: center 18%;
  background: #f8f3df;
  box-shadow: 3px 3px 0 rgba(31, 44, 106, 0.85);
}

.portrait-caption {
  font-size: 0.9rem;
}

.hero-card {
  padding: 16px;
}

.card-head {
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  color: var(--muted);
}

.card-body {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-value {
  font-weight: 700;
}

.section {
  padding: 52px 0;
  border-top: 2px dashed rgba(31, 44, 106, 0.45);
  scroll-margin-top: 108px;
}

.section:first-of-type {
  border-top: none;
}

.section-title {
  max-width: 760px;
}

.section-content {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  max-width: 68ch;
}

.muted {
  color: var(--muted);
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.pill-grid span {
  border: 2px solid var(--line);
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fff2c2);
  box-shadow: 3px 3px 0 rgba(31, 44, 106, 0.85);
  font-weight: 600;
}

.skills-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.skill-panel {
  border: 3px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff8df, #ffeeb8);
  box-shadow: var(--shadow-hard);
}

.soft-panel {
  background: linear-gradient(180deg, #ffe8f0, #ffeac2);
}

.skill-panel-title {
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.skill-panel .pill-grid {
  margin-top: 0;
}

.technical-pills span {
  background: linear-gradient(180deg, #ffffff, #fff2c2);
}

.soft-pills span {
  background: linear-gradient(180deg, #fff7ff, #ffe0ea);
}

.journey-list {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.journey-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 14px;
  align-items: start;
}

.dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid var(--line);
  transform: rotate(45deg);
  margin-top: 5px;
  box-shadow: 2px 2px 0 var(--line);
}

.projects-links {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.projects-carousel {
  margin-top: 18px;
}

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

.project-dots {
  display: none;
}

.project-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: var(--card-soft);
  box-shadow: 1px 1px 0 var(--line);
}

.project-dot.is-active {
  background: var(--accent);
}

.project-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: 150px auto;
  transition: transform 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px) rotate(-0.3deg);
}

.img-placeholder {
  display: grid;
  place-items: center;
  border-bottom: 3px solid var(--line);
  font-family: "Press Start 2P", monospace;
  font-size: 0.56rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.55) 0 16%, transparent 17%),
    radial-gradient(circle at 82% 32%, rgba(255, 255, 255, 0.45) 0 14%, transparent 15%),
    linear-gradient(135deg, #ffb4ca, #9cdfff);
}

.project-body {
  padding: 16px;
  display: grid;
  gap: 9px;
}

.project-body h3 {
  margin-bottom: 2px;
}

.project-body p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.retro-lab {
  margin-top: 22px;
  padding: 18px;
  background:
    linear-gradient(180deg, #fff7d5, #ffefb0),
    repeating-linear-gradient(
      90deg,
      rgba(255, 92, 137, 0.06) 0,
      rgba(255, 92, 137, 0.06) 8px,
      transparent 8px,
      transparent 16px
    );
  display: grid;
  gap: 12px;
}

.retro-lab code {
  font-family: "VT323", monospace;
  font-size: 1.22rem;
  color: #d72d67;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(31, 44, 106, 0.55);
  padding: 0 8px;
  border-radius: 7px;
}

.lab-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rain-toggle {
  min-width: 180px;
}

.contact-card {
  margin-top: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer {
  margin-top: 10px;
  padding: 30px 0 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

#rain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.rain-drop {
  position: absolute;
  top: -45px;
  width: 3px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 185, 255, 0), rgba(0, 185, 255, 0.95));
  transform: rotate(10deg);
  animation-name: rain-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes rain-fall {
  from {
    transform: translateY(-45px) rotate(10deg);
  }
  to {
    transform: translateY(120vh) rotate(10deg);
  }
}

body[data-theme="dark"] {
  --bg-top: #0e1322;
  --bg-bottom: #080b14;
  --card: #171d32;
  --card-soft: #1f2740;
  --accent: #7f9bff;
  --accent-soft: rgba(127, 155, 255, 0.25);
  --accent-alt: #63e2ff;
  --accent-warm: #3f4c7a;
  --text: #e6ecff;
  --muted: #aab8e6;
  --line: #8fa4ff;
  --shadow-hard: 6px 6px 0 #040611;
  --shadow-soft: 0 20px 34px rgba(5, 8, 20, 0.75);
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 14% 10%, rgba(127, 155, 255, 0.22) 0 10%, transparent 11%),
    radial-gradient(circle at 84% 12%, rgba(99, 226, 255, 0.2) 0 13%, transparent 14%),
    repeating-linear-gradient(
      45deg,
      rgba(133, 152, 229, 0.1) 0,
      rgba(133, 152, 229, 0.1) 12px,
      transparent 12px,
      transparent 24px
    ),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body[data-theme="dark"] .page {
  background: linear-gradient(180deg, rgba(17, 23, 40, 0.96), rgba(11, 16, 31, 0.96));
}

body[data-theme="dark"] .nav {
  background: rgba(20, 28, 49, 0.9);
  box-shadow: 4px 4px 0 rgba(4, 6, 17, 0.85);
}

body[data-theme="dark"] .nav-toggle {
  background: linear-gradient(180deg, #232c4a, #1a223d);
}

body[data-theme="dark"] .nav[data-open="true"] .nav-toggle {
  background: linear-gradient(180deg, #3a4e87, #2a3a66);
}

body[data-theme="dark"] .btn.ghost {
  background: linear-gradient(180deg, #232c4a, #1a223d);
}

body[data-theme="dark"] .pill-grid span {
  background: linear-gradient(180deg, #1f2947, #1a223a);
}

body[data-theme="dark"] .skill-panel {
  background: linear-gradient(180deg, #1a2238, #151c31);
}

body[data-theme="dark"] .soft-panel {
  background: linear-gradient(180deg, #232645, #1b2140);
}

body[data-theme="dark"] .technical-pills span,
body[data-theme="dark"] .soft-pills span {
  background: linear-gradient(180deg, #253153, #1b2643);
}

body[data-theme="dark"] .img-placeholder {
  color: #dbe4ff;
  background:
    radial-gradient(circle at 20% 18%, rgba(127, 155, 255, 0.35) 0 16%, transparent 17%),
    radial-gradient(circle at 82% 32%, rgba(99, 226, 255, 0.26) 0 14%, transparent 15%),
    linear-gradient(135deg, #27325d, #1a2446);
}

body[data-theme="dark"] .project-dot {
  background: #27325d;
}

body[data-theme="dark"] .project-dot.is-active {
  background: #86dfff;
}

body[data-theme="dark"] .profile-photo {
  background: #151a2b;
}

body[data-theme="dark"] .retro-lab {
  background:
    linear-gradient(180deg, #1b2240, #141b35),
    repeating-linear-gradient(
      90deg,
      rgba(127, 155, 255, 0.15) 0,
      rgba(127, 155, 255, 0.15) 8px,
      transparent 8px,
      transparent 16px
    );
}

body[data-theme="dark"] .retro-lab code {
  color: #86dfff;
  background: rgba(22, 28, 47, 0.82);
  border-color: rgba(143, 164, 255, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 860px) {
  .page {
    padding-top: 84px;
  }

  .nav {
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    z-index: 260;
  }

  .section {
    scroll-margin-top: 116px;
  }

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

  .hero-side {
    grid-template-columns: 1fr;
    max-width: none;
    justify-self: stretch;
  }

  .project-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 2px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .project-track::-webkit-scrollbar {
    display: none;
  }

  .project-track .project-card {
    flex: 0 0 min(86%, 340px);
    max-width: min(86%, 340px);
    scroll-snap-align: start;
  }

  .project-track .project-card:hover {
    transform: none;
  }

  .project-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }
}

@media (max-width: 720px) {
  .page {
    margin: 12px;
    padding: 84px 14px calc(24px + env(safe-area-inset-bottom));
    border-radius: 14px;
    margin-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    backdrop-filter: none;
    box-shadow: 3px 3px 0 rgba(31, 44, 106, 0.72);
    z-index: 260;
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    gap: 8px;
  }

  .nav[data-open="false"] .nav-links {
    display: none;
  }

  .nav[data-open="true"] .nav-links {
    display: flex;
  }

  .nav[data-open="false"] .nav-actions {
    display: none;
  }

  .nav[data-open="true"] .nav-actions {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .nav-contact {
    flex: 1 1 auto;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
  }

  .logo {
    font-size: 0.98rem;
  }

  .nav-links a,
  .btn,
  .nav-toggle {
    font-size: 0.56rem;
  }

  .theme-toggle {
    flex: 0 0 auto;
    min-width: 126px;
    margin-top: 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 40px 0;
    scroll-margin-top: 116px;
  }

  body::before {
    display: none;
  }

  .profile-photo {
    aspect-ratio: 3 / 4;
  }

  .footer-care {
    display: block;
    margin-top: 2px;
  }
}


