html,
body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg);
}

@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Source+Serif+4:wght@600;700&family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --bg: #f6f1ea;
  --bg-deep: #efe4d6;
  --ink: #1c1a18;
  --muted: #5b554f;
  --accent: #1b4d6b;
  --accent-soft: #c7d7e2;
  --card: #ffffffcc;
  --shadow: 0 12px 40px rgba(28, 26, 24, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1116;
    --bg-deep: #0a0c10;
    --ink: #f3f4f7;
    --muted: #b6bdc8;
    --accent: #6ea6c7;
    --accent-soft: rgba(110, 166, 199, 0.25);
    --card: rgba(20, 24, 32, 0.75);
    --shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  }
}

body.theme-dark {
  --bg: #0f1116;
  --bg-deep: #0a0c10;
  --ink: #f3f4f7;
  --muted: #b6bdc8;
  --accent: #6ea6c7;
  --accent-soft: rgba(110, 166, 199, 0.25);
  --card: rgba(20, 24, 32, 0.75);
  --shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

body.theme-light {
  --bg: #f6f1ea;
  --bg-deep: #efe4d6;
  --ink: #1c1a18;
  --muted: #5b554f;
  --accent: #1b4d6b;
  --accent-soft: #c7d7e2;
  --card: #ffffffcc;
  --shadow: 0 12px 40px rgba(28, 26, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}





body.theme-dark {
  background: radial-gradient(circle at top left, #0b0e14 0%, #0a0c12 55%, #07090e 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

body.theme-light {
  background: radial-gradient(circle at top left, #fdf9f4 0%, var(--bg) 55%, var(--bg-deep) 100%);
  background-repeat: no-repeat;
  background-size: cover;
}

body.theme-space {
  color: #e6e7ff;
  background: radial-gradient(circle at top, #0b0f1f 0%, #05070d 65%, #000 100%);
  background-repeat: no-repeat;
  background-size: cover;
}




h1, h2, h3 {
  font-family: "Fraunces", "Times New Roman", serif;
  font-weight: 700;
  margin: 0 0 12px;
}

h1 {
  font-family: "Source Serif 4", "Georgia", serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  text-rendering: auto;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.theme-dark h1,
.theme-dark h2,
.theme-dark h3 {
  color: #f5f7ff;
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 24px 7vw 12px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 10;
  flex-wrap: nowrap;
  overflow: visible;
}

.theme-toggle {
  border: 1px solid #d7cdc1;
  background: #ffffffaa;
  color: var(--muted);
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
}

.theme-menu {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  overflow: visible;
}

.theme-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 50;
}

.theme-menu.is-open .theme-panel {
  display: grid;
  gap: 6px;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  cursor: pointer;
}

.panel-toggle {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.35);
  transition: background 200ms ease;
  flex-shrink: 0;
}

.panel-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 200ms ease;
}

.panel-row.is-on .panel-toggle {
  background: #34c759;
}

.panel-row.is-on .panel-toggle::after {
  transform: translateX(18px);
}

.theme-dark .theme-panel {
  border-color: rgba(255, 255, 255, 0.12);
}

.theme-dark .panel-row {
  background: rgba(20, 24, 32, 0.8);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.theme-dark .panel-toggle {
  background: rgba(200, 200, 200, 0.2);
}

.theme-dark .theme-toggle {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(20, 24, 32, 0.6);
  color: var(--ink);
}

.hero,
.section,
.resume,
.site-footer {
  position: relative;
  z-index: 2;
}

.theme-space .logo-mark {
  background: #e6e7ff;
  color: #0a0d16;
}

.theme-space .nav-link.is-active,
.theme-space .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #e6e7ff;
}

.theme-space .cta,
.theme-space .button {
  background: #5f8cff;
  color: #0a0d16;
  box-shadow: 0 10px 30px rgba(95, 140, 255, 0.35);
}

.theme-space .ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e6e7ff;
  background: rgba(10, 13, 22, 0.65);
}

.theme-space .hero-card,
.theme-space .project-grid article {
  background: rgba(10, 13, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.theme-space .pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(27, 77, 107, 0.12);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: default;
}

.theme-space .site-footer,
.theme-space .subtitle,
.theme-space .resume-summary {
  color: rgba(230, 231, 255, 0.75);
}

.theme-space .bg-orb {
  opacity: 0.1;
}

.theme-dark .bg-orb {
  opacity: 0.06;
}

.space-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 0;
}

.space-scene,
.space-cats,
.storm-clouds,
.storm-rain,
.snowfall,
.snowbank {
  max-width: 100vw;
  overflow: hidden;
}

.theme-space .space-scene {
  opacity: 1;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(122, 94, 255, 0.35) 0%, rgba(122, 94, 255, 0) 45%),
    radial-gradient(circle at 80% 20%, rgba(83, 214, 255, 0.25) 0%, rgba(83, 214, 255, 0) 40%),
    radial-gradient(circle at 60% 75%, rgba(255, 120, 214, 0.25) 0%, rgba(255, 120, 214, 0) 45%);
  background-repeat: no-repeat;
}

.space-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(220, 252, 255, 1) 0 3.5px, transparent 5px),
    radial-gradient(circle at 40% 80%, rgba(220, 252, 255, 0.95) 0 3px, transparent 4.5px),
    radial-gradient(circle at 75% 30%, rgba(220, 252, 255, 1) 0 3.5px, transparent 5px),
    radial-gradient(circle at 85% 70%, rgba(220, 252, 255, 0.9) 0 3px, transparent 4.5px),
    radial-gradient(circle at 55% 55%, rgba(220, 252, 255, 0.85) 0 2.5px, transparent 4px),
    radial-gradient(circle at 20% 65%, rgba(220, 252, 255, 0.85) 0 2.5px, transparent 4px);
  filter: drop-shadow(0 0 10px rgba(220, 252, 255, 0.95));
  opacity: 1;
}

.space-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
}

.theme-space .space-scene::before {
  animation: twinkle 3.6s ease-in-out infinite;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.space-cats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 0;
  overflow: hidden;
}

.theme-space .space-cats {
  opacity: 1;
}

.space-cats span {
  position: absolute;
  font-size: 26px;
  animation: catFloat 18s linear infinite;
  filter: drop-shadow(0 0 6px rgba(220, 252, 255, 0.6));
}

.space-cats span:nth-child(1) { top: 15%; left: -10%; animation-delay: 0s; font-size: 28px; }
.space-cats span:nth-child(2) { top: 35%; left: -15%; animation-delay: 3s; font-size: 24px; }
.space-cats span:nth-child(3) { top: 55%; left: -12%; animation-delay: 6s; font-size: 30px; }
.space-cats span:nth-child(4) { top: 70%; left: -18%; animation-delay: 9s; font-size: 22px; }
.space-cats span:nth-child(5) { top: 25%; left: -20%; animation-delay: 12s; font-size: 26px; }
.space-cats span:nth-child(6) { top: 80%; left: -14%; animation-delay: 15s; font-size: 20px; }

@keyframes catFloat {
  0% {
    transform: translateX(0) translateY(0) rotate(-8deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(115vw) translateY(-30px) rotate(8deg);
    opacity: 0;
  }
}

.storm-clouds {
  position: fixed;
  top: -30vh;
  left: 0;
  right: 0;
  height: 40vh;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 1;
}

.theme-storm .storm-clouds {
  opacity: 1;
  animation: cloudsRoll 1.8s ease-out forwards;
  background:
    radial-gradient(circle at 20% 70%, rgba(20, 24, 32, 0.95) 0%, rgba(20, 24, 32, 0) 60%),
    radial-gradient(circle at 50% 80%, rgba(24, 28, 36, 0.95) 0%, rgba(24, 28, 36, 0) 65%),
    radial-gradient(circle at 80% 75%, rgba(16, 20, 28, 0.95) 0%, rgba(16, 20, 28, 0) 60%);
}

.theme-snow .storm-clouds {
  opacity: 1;
  animation: cloudsRoll 1.8s ease-out forwards;
  background:
    radial-gradient(circle at 20% 70%, rgba(40, 44, 52, 0.9) 0%, rgba(40, 44, 52, 0) 60%),
    radial-gradient(circle at 50% 80%, rgba(46, 50, 58, 0.9) 0%, rgba(46, 50, 58, 0) 65%),
    radial-gradient(circle at 80% 75%, rgba(36, 40, 48, 0.9) 0%, rgba(36, 40, 48, 0) 60%);
}

.storm-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 1;
  overflow: hidden;
}

.theme-storm .storm-rain {
  opacity: 1;
}

.storm-rain span {
  position: absolute;
  top: -10vh;
  font-size: 22px;
  animation: rainFall linear infinite;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.theme-storm::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  animation: lightningFlash 7s infinite;
}

@keyframes cloudsRoll {
  0% {
    transform: translateY(-25vh);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh);
    opacity: 0;
  }
}

@keyframes lightningFlash {
  0%,
  90%,
  100% {
    opacity: 0;
  }
  92% {
    opacity: 0.35;
  }
  94% {
    opacity: 0.1;
  }
  96% {
    opacity: 0.45;
  }
  97% {
    opacity: 0.05;
  }
}

.snowfall {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 1;
  overflow: hidden;
}

.theme-snow .snowfall {
  opacity: 1;
}

.snowfall span {
  position: absolute;
  top: -10vh;
  font-size: 20px;
  animation: snowFall linear infinite;
}

.snowbank {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -40px;
  height: 140px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  filter: blur(0.3px);
}

.theme-snow .snowbank {
  opacity: 1;
}

@keyframes snowFall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) translateX(20px);
    opacity: 0;
  }
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.theme-dark .logo-mark {
  background: #f5f7ff;
  color: #0a0d13;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7cdc1;
  background: #ffffffaa;
  font-weight: 600;
}

.nav-link.is-active,
.nav-link:hover {
  background: #ffffff;
  color: var(--ink);
}

.theme-dark .nav-link {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(20, 24, 32, 0.8);
  color: #e9eef8;
}

.theme-dark .nav-link.is-active,
.theme-dark .nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.theme-dark .cta {
  background: #9cc2ff;
  color: #0a0d13;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  padding: 40px 7vw 60px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.hero-copy {
  animation: fadeUp 700ms ease both;
  padding-top: 30px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.theme-dark .subtitle,
.theme-dark .resume-summary,
.theme-dark .role-meta,
.theme-dark .facts,
.theme-dark .site-footer {
  color: rgba(233, 238, 248, 0.78);
}

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

.button {
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.theme-dark .button {
  background: #9cc2ff;
  color: #0a0d13;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.ghost {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #d7cdc1;
  color: var(--muted);
  background: #ffffffaa;
}

.theme-dark .ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #eef2fb;
  background: rgba(15, 18, 26, 0.85);
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: fadeUp 900ms ease both;
  animation-delay: 120ms;
}

.card-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 16px;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.section {
  padding: 20px 7vw 60px;
  max-width: var(--max);
  margin: 0 auto;
  width: 100%;
}

.container * {
  max-width: 100%;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 100%;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1f3643;
  font-size: 0.9rem;
}

.theme-dark .pill {
  background: rgba(80, 120, 180, 0.28);
  color: #f0f4ff;
}

.site-footer {
  display: flex;
  margin-top: auto;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 28px 7vw 40px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-button {
  padding: 0 14px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7cdc1;
  background: #ffffffaa;
  color: var(--muted);
  font-weight: 600;
}

.theme-dark .footer-button {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(20, 24, 32, 0.6);
  color: var(--ink);
}

.egg-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.egg-button {
  border: 1px solid #d7cdc1;
  background: #ffffffaa;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.theme-dark .egg-button {
  border-color: rgba(255, 255, 255, 0.2);
  color: #eef2fb;
  background: rgba(15, 18, 26, 0.85);
}

.resume {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 7vw 60px;
}

.resume-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid #e2d7c8;
}

.resume-summary {
  padding: 24px 0 6px;
  color: var(--muted);
  line-height: 1.7;
}

.resume-summary p {
  margin: 0 0 12px;
}

.resume-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
  padding: 32px 0;
}

.resume-section h2 {
  margin-top: 0;
}

.skill-groups {
  display: grid;
  gap: 20px;
}

.skill-group h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.role {
  margin-bottom: 24px;
}

.role-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.role-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.role ul,
.resume-section ul {
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.6;
}

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

.project-grid article {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.bg-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.5;
  z-index: 0;
  animation: drift 18s ease-in-out infinite;
}

.bg-orb-1 {
  background: radial-gradient(circle, #f7d9b6 0%, rgba(247, 217, 182, 0) 70%);
  top: -120px;
  left: -80px;
}

.bg-orb-2 {
  background: radial-gradient(circle, #cfe3d1 0%, rgba(207, 227, 209, 0) 70%);
  bottom: -140px;
  right: -60px;
  animation-delay: 4s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(18px);
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: center;
    gap: 6px;
    padding: 12px 4vw 8px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .site-nav {
    gap: 6px;
  }

      .nav-link {
    padding: 0 10px;
    font-size: 0.78rem;
    height: 34px;
  }

      .theme-toggle {
    padding: 0 10px;
    font-size: 0.78rem;
    height: 34px;
  }

  .theme-panel {
    right: 0;
    min-width: 200px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 30px 5vw 40px;
  }

  .section {
    padding: 16px 5vw 40px;
  }

  .section h2,
  .section .pill-row {
    max-width: 100%;
  }

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

@media (max-width: 420px) {
  .nav-link {
    padding: 4px 6px;
    font-size: 0.72rem;
  }
  .theme-toggle {
    padding: 4px 6px;
    font-size: 0.7rem;
  }
}
