:root {
  --bg: #050706;
  --bg-soft: #0d100f;
  --panel: #151817;
  --panel-strong: #1b1f1d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f6f4ef;
  --muted: #aaa8a2;
  --soft: #777a75;
  --accent: #55f39a;
  --accent-strong: #18c46e;
  --accent-dark: #083923;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --radius: 8px;
  --radius-lg: 18px;
  --max: 1520px;
  --site-gutter: clamp(24px, 5vw, 120px);
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-display: "Arial Narrow", "Roboto Condensed", Impact, var(--font-body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: #050706;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 35%, rgba(50, 239, 139, 0.3), transparent 28rem),
    radial-gradient(circle at 94% 12%, rgba(90, 243, 154, 0.16), transparent 30rem),
    linear-gradient(135deg, #040504 0%, #0a0d0c 42%, #050706 100%);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: clip;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

.keep-together {
  white-space: nowrap;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(85, 243, 154, 0.6);
  outline-offset: 4px;
}

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

.skip-link:focus {
  z-index: 100;
  top: 18px;
  left: 18px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: #06120c;
  background: var(--accent);
  border-radius: var(--radius);
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: 100%;
  padding: 18px clamp(16px, 2.5vw, 36px);
  pointer-events: none;
}

.nav-shell {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  width: min(var(--max), calc(100vw - var(--site-gutter)));
  min-height: 62px;
  margin-inline: auto;
  padding: 8px;
  color: var(--text);
  background: rgba(12, 15, 14, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.brand,
.nav-links,
.nav-cta,
.menu-toggle {
  position: relative;
  z-index: 2;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding-inline: 10px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  color: #06120c;
  background: linear-gradient(135deg, var(--accent), #d4ffe3);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-links li,
.footer-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  padding: 12px 0;
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.nav-cta {
  color: #06120c;
  background: var(--accent);
  font-size: 0.86rem;
}

.nav-cta:hover,
.btn:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 46px;
  height: 46px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: transform 180ms ease;
}

.menu-toggle::before,
.menu-toggle::after {
  content: "";
  position: absolute;
  left: 14px;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 180ms ease;
}

.menu-toggle::before {
  top: 18px;
}

.menu-toggle::after {
  top: 26px;
}

.section-grid,
.content-shell {
  width: min(var(--max), calc(100% - var(--site-gutter)));
  margin-inline: auto;
}

.hero {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, clamp(320px, 24vw, 390px)) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(112px, 12vh, 148px) max(16px, calc((100vw - var(--max)) / 2)) clamp(72px, 8vh, 108px);
}

.vertical-word {
  position: absolute;
  z-index: 0;
  right: -0.12em;
  top: 50%;
  margin: 0;
  color: rgba(85, 243, 154, 0.18);
  font-family: var(--font-display);
  font-size: clamp(5rem, 13vw, 11.4rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.8;
  text-transform: uppercase;
  text-orientation: mixed;
  writing-mode: vertical-rl;
  transform: translateY(-48%);
  text-shadow: 0 0 34px rgba(85, 243, 154, 0.18);
}

.hero-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(3px);
  pointer-events: none;
}

.hero-glow-one {
  left: -14%;
  bottom: 10%;
  width: 34vw;
  min-width: 250px;
  height: 34vw;
  min-height: 250px;
  background: radial-gradient(circle, rgba(85, 243, 154, 0.28), transparent 64%);
}

.hero-glow-two {
  top: 14%;
  right: 0;
  width: 24vw;
  min-width: 220px;
  height: 24vw;
  min-height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 66%);
}

.profile-card,
.hero-content,
.resume-block,
.stack-card,
.project-card,
.contact-copy,
.contact-form {
  position: relative;
  z-index: 1;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
}

.profile-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  pointer-events: none;
}

.portrait {
  width: 100%;
  aspect-ratio: 1;
  margin: 0 0 16px;
  overflow: hidden;
  background: #1c201e;
  border-radius: 18px;
}

.portrait svg,
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.portrait img {
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.status-pill span {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
}

.profile-card h2 {
  width: 100%;
  margin: 18px 0 2px;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  text-align: center;
  line-height: 1.1;
}

.profile-card p {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.social-list {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 18px 0;
  list-style: none;
}

.social-list a,
.social-list span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.74rem;
  font-weight: 900;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.social-list a:hover,
.social-list span:hover {
  color: #06120c;
  background: var(--accent);
  transform: translateY(-2px);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.btn-muted {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.btn-accent {
  color: #06120c;
  background: var(--accent);
}

.hero-content {
  max-width: 760px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.kicker span {
  color: var(--warning);
}

.education-label {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 2px;
  align-items: start;
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.05;
}

.education-label > span {
  color: var(--warning);
}

.education-label > span:first-child {
  grid-row: 1 / span 2;
}

.education-label > strong {
  display: block;
  grid-column: 2;
  color: inherit;
  font: inherit;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  overflow-wrap: normal;
}

.hero h1 span {
  color: var(--accent);
}

.hero-copy {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: clamp(28px, 5vw, 54px) 0 0;
}

.stats div {
  min-width: 0;
}

.stats dt {
  margin: 0 0 7px;
  color: var(--text);
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1;
}

.stats dd {
  margin: 0;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.content-shell {
  padding: clamp(44px, 8vw, 82px) 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
}

.resume-block,
.contact-form {
  padding: clamp(18px, 3vw, 28px);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.22);
}

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

.section-heading .kicker {
  margin-bottom: 0;
}

.section-heading h2,
.contact-copy h2 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900;
  line-height: 1.02;
}

.timeline,
.education-list {
  display: grid;
  gap: 12px;
}

.timeline-item,
.education-list article,
.stack-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.timeline-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
}

.timeline-item:hover,
.education-list article:hover,
.stack-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(85, 243, 154, 0.36);
  background: var(--panel-strong);
}

.timeline-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #06120c;
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 900;
}

.timeline-icon.has-logo {
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(85, 243, 154, 0.24),
    0 12px 26px rgba(85, 243, 154, 0.16);
}

.timeline-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-item h3,
.education-list h3,
.stack-card h3,
.project-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.timeline-item p,
.education-list p,
.stack-card p,
.project-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.timeline-copy {
  padding-top: 8px;
  color: var(--soft) !important;
}

.timeline-item time,
.education-list time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  min-height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.education-list article {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.stack-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.18);
  border-block: 1px solid var(--line);
}

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

.stack-card {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
}

.stack-card > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #06120c;
  background: linear-gradient(135deg, var(--accent), #f0fff5);
  border-radius: var(--radius);
  font-weight: 900;
}

.stack-card > .stack-icon {
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(85, 243, 154, 0.22),
    0 12px 24px rgba(85, 243, 154, 0.14);
}

.stack-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.project-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.project-visual {
  position: relative;
  min-height: clamp(220px, 16vw, 300px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-visual img {
  transform: scale(1.04);
}

.visual-blue {
  background:
    radial-gradient(circle at 76% 22%, rgba(86, 243, 255, 0.72), transparent 18%),
    linear-gradient(135deg, #eaf8ff, #7db8ff 46%, #071018);
}

.visual-lime {
  background:
    radial-gradient(circle at 18% 26%, rgba(255, 255, 255, 0.8), transparent 18%),
    linear-gradient(135deg, #d8ff57, #48ed87 48%, #0e1411);
}

.visual-violet {
  background:
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.76), transparent 17%),
    linear-gradient(135deg, #efe7ff, #9884ff 45%, #141020);
}

.visual-amber {
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.74), transparent 17%),
    linear-gradient(135deg, #fff0bc, #ffb247 46%, #181008);
}

.browser-bar,
.mock-chart,
.mock-lines,
.device {
  position: absolute;
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.browser-bar {
  inset: 26px 26px auto;
  height: 28px;
  background:
    radial-gradient(circle at 16px 50%, #ff605c 0 4px, transparent 5px),
    radial-gradient(circle at 32px 50%, #ffbd44 0 4px, transparent 5px),
    radial-gradient(circle at 48px 50%, #00ca4e 0 4px, transparent 5px),
    rgba(255, 255, 255, 0.92);
}

.mock-chart {
  inset: 64px 36px 36px;
  background:
    linear-gradient(90deg, transparent 8%, rgba(20, 20, 20, 0.14) 8% 9%, transparent 9% 30%, rgba(20, 20, 20, 0.14) 30% 31%, transparent 31% 54%, rgba(20, 20, 20, 0.14) 54% 55%, transparent 55%),
    linear-gradient(180deg, #ffffff, #e8eef5);
}

.mock-chart::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 28px;
  height: 52%;
  background: linear-gradient(135deg, transparent 0 10%, #2b7fff 10% 18%, transparent 18% 32%, #49d990 32% 42%, transparent 42%);
  border-bottom: 3px solid rgba(0, 0, 0, 0.2);
}

.device-one {
  left: 12%;
  bottom: 34px;
  width: 58%;
  height: 62%;
  background: #f8f8f5;
}

.device-two {
  right: 12%;
  bottom: 34px;
  width: 23%;
  height: 48%;
  background: #141716;
  border: 8px solid #f8f8f5;
}

.mock-lines {
  inset: 64px 36px 38px;
  background:
    linear-gradient(#191b20 0 0) 22px 26px / 45% 12px no-repeat,
    linear-gradient(#8871ff 0 0) 22px 58px / 72% 12px no-repeat,
    linear-gradient(#d9d4ff 0 0) 22px 88px / 58% 10px no-repeat,
    linear-gradient(180deg, #ffffff, #eeeaff);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.project-meta a {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: #06120c;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 900;
}

.contact-section {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.contact-section::before {
  content: "";
  position: absolute;
  inset: 10% auto auto 4%;
  width: 32vw;
  min-width: 240px;
  height: 32vw;
  min-height: 240px;
  background: radial-gradient(circle, rgba(85, 243, 154, 0.22), transparent 66%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.contact-copy p:not(.kicker) {
  max-width: 560px;
  color: var(--muted);
}

address {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  font-style: normal;
  color: var(--text);
  font-weight: 900;
}

address a:hover {
  color: var(--accent);
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-row {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.required-mark,
.form-hint span {
  color: var(--accent);
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 15px;
  resize: vertical;
  transition:
    border-color 180ms ease,
    background 180ms ease;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

input:focus,
textarea:focus {
  background: #101412;
  border-color: rgba(85, 243, 154, 0.5);
}

.is-invalid {
  border-color: #ff6b6b;
}

input[type="checkbox"].is-invalid {
  outline: 2px solid #ff6b6b;
  outline-offset: 3px;
}

.form-submit {
  width: max-content;
  min-width: 168px;
}

.consent-row label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.consent-row a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - var(--site-gutter)));
  margin-inline: auto;
  padding: 28px 0 42px;
  color: var(--soft);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.site-footer a:hover {
  color: var(--accent);
}

.legal-main {
  min-height: 100vh;
  padding: clamp(118px, 14vh, 168px) 0 clamp(56px, 8vw, 96px);
}

.legal-shell {
  display: grid;
  gap: 22px;
  width: min(980px, calc(100% - var(--site-gutter)));
  margin-inline: auto;
}

.legal-hero,
.legal-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.22);
}

.legal-hero {
  padding: clamp(26px, 5vw, 48px);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.legal-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
}

.legal-card {
  padding: clamp(20px, 4vw, 36px);
}

.legal-card h2 {
  margin: 28px 0 10px;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li,
.legal-card address {
  color: var(--muted);
}

.legal-card address {
  font-style: normal;
}

.legal-card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-card ul {
  padding-left: 1.2rem;
}

.legal-notice {
  color: var(--warning) !important;
}

.auth-page {
  min-height: 100vh;
}

.auth-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - var(--site-gutter)));
  min-height: 72px;
  padding: 14px 0;
  transform: translateX(-50%);
}

.auth-legal-top {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-legal-top a:hover {
  color: var(--accent);
}

.auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(108px, 13vh, 156px) 0 clamp(42px, 7vw, 84px);
}

.auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  align-items: center;
  gap: clamp(30px, 7vw, 96px);
  width: min(1180px, calc(100% - var(--site-gutter)));
  margin-inline: auto;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: -12% 42% auto auto;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(85, 243, 154, 0.22), transparent 68%);
  pointer-events: none;
}

.auth-copy,
.auth-form {
  position: relative;
  z-index: 1;
}

.auth-copy h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8.8rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-copy p:last-child {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  overflow-wrap: break-word;
}

.auth-form {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(13, 16, 15, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.access-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.access-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 112px;
  padding: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease;
}

.access-card:hover,
.access-card:has(input:checked) {
  background: rgba(85, 243, 154, 0.08);
  border-color: rgba(85, 243, 154, 0.42);
}

.access-card:hover {
  transform: translateY(-2px);
}

.access-card strong,
.access-card small {
  display: block;
  overflow-wrap: break-word;
}

.access-card strong {
  font-size: 0.96rem;
}

.access-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.auth-password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease;
}

.auth-password-field:focus-within {
  border-color: rgba(85, 243, 154, 0.5);
}

.auth-password-field input {
  border: 0;
  background: transparent;
}

.auth-password-field input:focus {
  background: transparent;
}

.password-toggle {
  padding: 0 14px;
  color: var(--accent);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  color: #06120c;
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 950;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.auth-submit:hover {
  background: #d4ffe3;
  transform: translateY(-2px);
}

.auth-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 600ms ease,
    transform 600ms ease;
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1024px) {
  .nav-shell {
    grid-template-columns: auto auto;
    justify-content: space-between;
    width: min(var(--max), calc(100vw - 24px));
  }

  .menu-toggle {
    display: grid !important;
    place-items: center;
    position: relative;
    top: auto;
    right: auto;
    justify-self: end;
    margin-left: 0;
    background: var(--accent);
  }

  .menu-toggle::before,
  .menu-toggle::after,
  .menu-toggle span:not(.sr-only) {
    background: #06120c;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-open .nav-shell {
    border-radius: 28px;
  }

  .nav-open .brand,
  .nav-open .menu-toggle {
    z-index: 4;
  }

  .nav-open .menu-toggle span:nth-child(2) {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-3px) rotate(-45deg);
  }

  .nav-open .menu-toggle::before {
    transform: translateY(4px) rotate(45deg);
  }

  .nav-open .menu-toggle::after {
    transform: translateY(-4px) rotate(-45deg);
  }

  .nav-open .nav-links {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: grid;
    place-content: center;
    gap: 10px;
    padding: clamp(96px, 18vh, 160px) clamp(24px, 8vw, 80px);
    background: rgba(7, 10, 9, 0.98);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .nav-open .nav-links a {
    min-width: min(280px, 80vw);
    padding: 17px 22px;
    border-radius: 14px;
    font-size: clamp(1rem, 3vw, 1.28rem);
    text-align: center;
  }

  .nav-open .nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-open .nav-cta {
    position: fixed;
    left: 50%;
    bottom: clamp(24px, 7vh, 70px);
    z-index: 3;
    display: inline-flex;
    min-width: min(280px, 80vw);
    justify-content: center;
    transform: translateX(-50%);
  }

  .nav-open .nav-cta:hover {
    transform: translateX(-50%) translateY(-2px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 120px;
    justify-items: center;
  }

  .section-grid,
  .content-shell,
  .site-footer {
    width: min(var(--max), calc(100% - 32px));
  }

  .auth-header,
  .auth-shell {
    width: min(var(--max), calc(100% - 32px));
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-copy h1 {
    max-width: 720px;
    font-size: clamp(3.2rem, 12vw, 6.6rem);
  }

  .profile-card {
    width: min(400px, 100%);
  }

  .hero-content {
    max-width: 100%;
    justify-self: stretch;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 6.2vw, 3.9rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .portrait svg,
  .project-visual svg {
    height: auto;
  }

  .vertical-word {
    right: 0;
    opacity: 0.6;
  }

  .two-column,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 12px;
  }

  .nav-shell {
    min-height: 58px;
  }

  .brand-text {
    display: none;
  }

  .auth-header {
    left: 16px;
    right: 16px;
    width: auto;
    min-height: 68px;
    align-items: flex-start;
    justify-content: flex-start;
    transform: none;
  }

  .auth-legal-top {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.74rem;
  }

  .auth-main {
    align-items: start;
    overflow-x: hidden;
    padding-top: 112px;
  }

  .auth-shell {
    width: calc(100vw - 32px);
    max-width: 640px;
  }

  .auth-copy,
  .auth-form {
    width: 100%;
    max-width: 100%;
  }

  .auth-copy h1 {
    font-size: clamp(2.8rem, 16vw, 4.4rem);
    overflow-wrap: anywhere;
  }

  .auth-copy p:last-child {
    margin-top: 18px;
    font-size: 0.98rem;
  }

  .access-options {
    grid-template-columns: 1fr;
  }

  .access-card {
    min-height: auto;
  }

  .hero {
    padding-bottom: 56px;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 10.5vw, 3.35rem);
  }

  .profile-card {
    width: min(360px, 100%);
  }

  .status-pill {
    max-width: 100%;
    justify-content: center;
    padding-block: 6px;
    text-align: center;
    line-height: 1.15;
    white-space: normal;
  }

  .profile-actions .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    white-space: normal;
    text-align: center;
    line-height: 1.08;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .content-shell {
    padding-block: clamp(42px, 12vw, 68px);
  }

  .stats,
  .stack-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 12px;
  }

  .stats div {
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .timeline-item,
  .education-list article {
    grid-template-columns: 1fr;
  }

  .timeline-icon {
    width: 34px;
    height: 34px;
  }

  .timeline-item time,
  .education-list time {
    justify-self: start;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .project-visual {
    min-height: 210px;
  }

  .project-grid {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 16px;
  }

  .profile-actions {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}

@media (max-width: 540px) {
  .auth-main {
    justify-items: start;
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-shell {
    width: 100%;
    max-width: 326px;
    margin-inline: 0;
  }

  .auth-copy h1 {
    font-size: clamp(2.35rem, 12vw, 3.55rem);
    line-height: 0.92;
  }
}

@media (max-width: 420px) {
  .section-grid,
  .content-shell,
  .site-footer,
  .auth-header,
  .auth-shell {
    width: min(100% - 24px, var(--max));
  }

  .auth-header {
    left: 12px;
    right: 12px;
    width: auto;
    gap: 10px;
  }

  .auth-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .auth-shell {
    width: 100%;
  }

  .auth-legal-top {
    gap: 10px;
  }

  .auth-form {
    padding: 16px;
  }

  .auth-password-field {
    grid-template-columns: 1fr;
  }

  .password-toggle {
    min-height: 44px;
    border-top: 1px solid var(--line);
  }

  .profile-card,
  .resume-block,
  .contact-form {
    padding: 14px;
  }

  .profile-card {
    width: 100%;
    max-width: calc(100vw - 24px);
  }

  .status-pill {
    font-size: 0.68rem;
  }

  .social-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .vertical-word {
    display: none;
  }

  .hero {
    padding-top: 104px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9.5vw, 2.35rem);
  }

  .hero-copy {
    font-size: 0.96rem;
  }
}

/* Mobile fit refinements: targeted overrides only, no global zoom or scaling. */
@media (max-width: 1024px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  :root {
    --site-gutter: clamp(16px, 4vw, 32px);
  }

  .hero,
  .content-shell,
  .stack-section,
  .contact-section,
  .legal-main,
  .auth-main {
    overflow-x: hidden;
  }

  .hero-content,
  .profile-card,
  .resume-block,
  .contact-copy,
  .contact-form,
  .auth-copy,
  .auth-form,
  .legal-card,
  .legal-hero,
  .timeline-item,
  .education-list article,
  .stack-card,
  .project-card {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  body {
    min-width: 0;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .site-header {
    padding: 10px 12px;
  }

  .nav-shell {
    width: calc(100vw - 24px);
    min-height: 56px;
    gap: 10px;
    padding: 7px;
  }

  .brand {
    min-width: 0;
    padding-inline: 6px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .nav-open .nav-links {
    padding: 88px 18px 104px;
  }

  .nav-open .nav-links a {
    width: min(100%, 320px);
    min-width: 0;
    font-size: clamp(1rem, 5vw, 1.18rem);
  }

  .nav-open .nav-cta {
    width: min(calc(100vw - 48px), 320px);
    min-width: 0;
    min-height: 48px;
  }

  .section-grid,
  .content-shell,
  .site-footer,
  .legal-shell {
    width: calc(100vw - 32px);
  }

  .hero {
    row-gap: 24px;
    padding: 96px 16px 48px;
  }

  .hero-content {
    order: 1;
  }

  .profile-card {
    order: 2;
    width: min(100%, 340px);
    max-width: 100%;
    padding: 16px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2rem, 11vw, 3.1rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .hero-copy {
    font-size: clamp(0.95rem, 3.9vw, 1.03rem);
    overflow-wrap: break-word;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .contact-grid {
    gap: 18px;
  }

  .resume-block {
    padding: 16px;
  }

  .section-heading {
    gap: 12px;
  }

  .section-heading h2 {
    font-size: clamp(1.85rem, 10vw, 2.65rem);
    overflow-wrap: anywhere;
  }

  .timeline-item {
    gap: 12px;
    padding: 14px 0;
  }

  .timeline-item h3,
  .education-list h3,
  .project-meta h3,
  .stack-card h3 {
    overflow-wrap: anywhere;
  }

  .timeline-item time,
  .education-list time {
    min-width: 0;
    white-space: normal;
  }

  .stack-grid,
  .project-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .project-visual {
    min-height: 190px;
    aspect-ratio: 16 / 10;
  }

  .project-meta {
    gap: 12px;
  }

  .contact-copy h2 {
    font-size: clamp(2.1rem, 12vw, 3.1rem);
  }

  .contact-copy p,
  .legal-card p,
  .legal-card li,
  .legal-card address {
    overflow-wrap: break-word;
  }

  .form-submit {
    width: 100%;
    min-height: 48px;
  }

  .legal-main {
    padding-top: 100px;
  }

  .legal-hero h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
    overflow-wrap: anywhere;
  }

  .auth-main {
    justify-items: center;
    padding: 96px 16px 42px;
  }

  .auth-header {
    left: 16px;
    right: 16px;
    width: auto;
  }

  .auth-shell {
    width: 100%;
    max-width: 430px;
    margin-inline: auto;
  }

  .auth-copy h1 {
    font-size: clamp(2.2rem, 13vw, 3.6rem);
    line-height: 0.95;
  }

  .auth-copy p:last-child {
    font-size: 0.95rem;
  }

  .auth-form,
  .access-card {
    min-width: 0;
  }
}

@media (max-width: 540px) {
  .section-grid,
  .content-shell,
  .site-footer,
  .legal-shell {
    width: calc(100vw - 24px);
  }

  .auth-main {
    justify-items: center;
    padding: 88px 12px 36px;
  }

  .auth-shell {
    width: 100%;
    max-width: min(100%, 300px);
    margin-inline: auto;
  }

  .auth-copy h1 {
    font-size: clamp(2rem, 10.5vw, 2.85rem);
    line-height: 0.98;
  }

  .auth-copy,
  .auth-form,
  .access-options,
  .access-card,
  .auth-password-field,
  .auth-submit {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  :root {
    --site-gutter: 20px;
  }

  .keep-together {
    white-space: normal;
  }

  .section-grid,
  .content-shell,
  .site-footer,
  .legal-shell {
    width: calc(100vw - 24px);
  }

  .nav-shell {
    width: calc(100vw - 20px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .auth-legal-top {
    gap: 8px;
    font-size: 0.68rem;
  }

  .hero {
    padding: 88px 12px 42px;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 10.5vw, 2.35rem);
    line-height: 1.05;
  }

  .hero-copy {
    font-size: 0.94rem;
  }

  .profile-card,
  .resume-block,
  .contact-form,
  .legal-card,
  .legal-hero,
  .auth-form {
    padding: 14px;
  }

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

  .section-heading h2 {
    font-size: clamp(1.65rem, 9.5vw, 2.25rem);
  }

  .project-visual {
    min-height: 170px;
  }

  .project-meta {
    align-items: flex-start;
  }

  .btn,
  .nav-cta,
  .auth-submit {
    min-height: 46px;
  }

  .auth-main {
    justify-items: start;
    padding: 84px 12px 34px;
  }

  .auth-header {
    left: 12px;
    right: 12px;
  }

  .auth-shell {
    width: 100%;
    max-width: min(100%, 336px);
    margin-inline: auto;
  }

  .auth-copy h1 {
    font-size: clamp(2rem, 12.4vw, 3rem);
  }

  .auth-copy,
  .auth-form,
  .access-options,
  .access-card,
  .auth-password-field,
  .auth-submit {
    width: 100%;
    max-width: 100%;
  }
}
