:root {
  --cream: #f4f7ff;
  --muted: #b8c3d9;
  --ink: #071018;
  --deep: #06111f;
  --line: rgba(255, 255, 255, 0.13);
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--cream);
  background: var(--deep);
  cursor: auto;
  overflow-x: hidden;
}

body.is-touch { cursor: auto; }

a { color: inherit; text-decoration: none; }

button, input, textarea { font-family: inherit; }

.cursor {
  display: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 0;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: #fff;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

body.is-touch .cursor { display: none; }

.site-header {
  position: fixed;
  top: 22px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.pill {
  pointer-events: auto;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(20, 35, 65, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.pill a {
  position: relative;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease, background 0.25s ease;
}

.pill a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 6px;
  height: 1px;
  background: #7eb0ff;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.pill a:hover,
.pill a:focus-visible,
.pill a.active {
  color: #fff;
  outline: 2px solid transparent;
}

.pill a:hover::after,
.pill a:focus-visible::after,
.pill a.active::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42% 58%;
  align-items: center;
  gap: 12px;
  padding: 108px 7vw 48px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 46% 58% at 68% 46%, rgba(59, 130, 246, 0.28) 0%, transparent 68%),
    linear-gradient(100deg, #06111f 0%, #07172b 42%, #0b1e3d 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.45), transparent 68%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  left: 62%;
  top: 46%;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.hero-copy > * {
  animation: rise 0.8s ease both;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(76px, 8vw, 124px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--cream);
}

.lede {
  margin: 22px 0 0;
  max-width: 34rem;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 10px;
  padding: 14px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.is-touch .btn { cursor: pointer; }

.btn-solid {
  background: #2f6fed;
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.28);
}

.btn-solid:hover,
.btn-solid:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(47, 111, 237, 0.4);
  outline: none;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.stage {
  position: relative;
  align-self: end;
  height: calc(100vh - 130px);
  max-height: 760px;
  perspective: 1100px;
  z-index: 1;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.work, .about, .contact {
  padding: 108px 7vw;
}

.work { background: linear-gradient(180deg, #0c1c38 0%, var(--deep) 22%); }

.section-head, .about-grid, .contact-grid {
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9ec0ff;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.pixl-banner,
.pixl-shot {
  margin: 0;
  background: #05070d;
  border: 1px solid var(--line);
}

.pixl-banner {
  max-width: 1100px;
  margin: 28px auto 0;
}

.pixl-banner img,
.pixl-shot img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: contain;
}

.pixl-shot img { height: 240px; }

.cards {
  max-width: 1100px;
  margin: 22px auto 0;
  display: grid;
  gap: 22px;
}

.card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 18px;
  border-radius: 0;
  background: rgba(255, 247, 243, 0.04);
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transition: border-color 0.3s ease;
}

.card:hover, .card:focus-visible {
  border-color: rgba(255, 180, 168, 0.45);
  outline: none;
}

.card-visual {
  width: 100%;
  height: 148px;
  object-fit: cover;
  border-radius: 0;
  display: block;
}

.v1 { background: linear-gradient(145deg, #7eb0ff, #2563eb 55%, #0b1b3a); }
.v2 { background: linear-gradient(160deg, #d7e6ff, #3b82f6 42%, #10203f); }
.v3 { background: linear-gradient(200deg, #3dde4a, #1d4ed8 40%, #071018); }
.v4 { background: linear-gradient(160deg, #93c5fd, #1e3a8a 50%, #020617); }

.meta {
  margin: 0 0 6px;
  color: #9ec0ff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 500;
}

.card p:last-child {
  margin: 0;
  color: rgba(255, 247, 243, 0.78);
  line-height: 1.6;
  max-width: 62ch;
}

.about { background: var(--deep); }

.about-grid, .contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.about p, .contact-note {
  color: rgba(255, 247, 243, 0.78);
  line-height: 1.7;
  font-size: 17px;
}

.skills {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills li {
  padding: 10px 14px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 14px;
}

.contact {
  background:
    radial-gradient(ellipse at 10% 0%, rgba(37, 99, 235, 0.35), transparent 50%),
    var(--deep);
}

.mail {
  display: inline-block;
  margin-top: 8px;
  font-size: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9d0ff;
}

.form input, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border-radius: 0;
  padding: 14px 16px;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}

.form input:focus, .form textarea:focus {
  outline: 2px solid rgba(255, 180, 168, 0.8);
  border-color: transparent;
}

.form .btn { justify-self: start; }

.form-status {
  margin: 0;
  color: #c5d8ff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 7vw 36px;
  color: rgba(255, 247, 243, 0.55);
  border-top: 1px solid var(--line);
}

.resume {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 32px);
}

.resume::backdrop {
  background: rgba(12, 4, 6, 0.72);
  backdrop-filter: blur(8px);
}

.resume-card {
  position: relative;
  width: min(560px, 92vw);
  padding: 36px 32px;
  border-radius: 0;
  background: #101826;
  color: var(--cream);
  border: 1px solid var(--line);
}

.resume-card .role { color: #ffb4a8; margin-top: 0; }

.resume-card ul {
  padding-left: 18px;
  line-height: 1.6;
  color: rgba(255, 247, 243, 0.86);
}

.close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 28px;
  cursor: none;
}

body.is-touch .close { cursor: pointer; }

@media (max-width: 860px) {
  body { cursor: auto; }
  .cursor { display: none; }
  .btn, .close { cursor: pointer; }

  .site-header {
    top: 12px;
    padding: 0 12px;
  }

  .pill {
    width: min(100%, 420px);
    justify-content: space-between;
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .pill a {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    letter-spacing: 0.08em;
    font-size: 11px;
  }

  .hero {
    min-height: 100svh;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 48svh) auto;
    justify-items: center;
    align-items: stretch;
    gap: 8px;
    padding: 96px 20px 36px;
    text-align: center;
  }

  .stage {
    order: -1;
    width: 100%;
    height: 48svh;
    min-height: 280px;
    max-height: 460px;
  }

  .hero-copy {
    max-width: none;
    margin-inline: auto;
  }

  .lede {
    max-width: 34rem;
    margin-inline: auto;
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .btn {
    width: 100%;
    min-height: 48px;
    text-align: center;
  }

  .card, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }

  .card { gap: 14px; padding: 14px; }
  .card-visual { height: 112px; }
  .card h3 { font-size: 22px; }

  .work, .about, .contact { padding: 64px 20px; text-align: center; }
  .section-head, .about-grid, .contact-grid, .card-body { text-align: center; }
  .skills { justify-content: center; }
  .form .btn { justify-self: center; }
  h2 { font-size: 34px; }
  h1 { font-size: 56px; }

  .mail { font-size: 18px; overflow-wrap: anywhere; }
  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px calc(28px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > * { animation: none; }
}
