:root {
  --ink: #050505;
  --ink-soft: #3c3c3c;
  --paper: #f4f1e9;
  --paper-strong: #fffdf6;
  --accent: #ff1493;
  --accent-deep: #c90074;
  --accent-soft: #ffd4ec;
  --electric-blue: #006cff;
  --acid: #d9ff00;
  --acid-soft: #f3ff9c;
  --line: #050505;
  --shadow: 10px 10px 0 #050505;
  --deck-shadow: var(--shadow);
  --surface-shadow: rgba(5, 5, 5, 0.12);
  --header-bg: rgba(244, 241, 233, 0.95);
  --body-dot: rgba(5, 5, 5, 0.1);
  --body-grid: rgba(5, 5, 5, 0.035);
  --footer-muted: rgba(255, 255, 255, 0.76);
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #f7f7ef;
  --ink-soft: #c9c9bb;
  --paper: #050505;
  --paper-strong: #151513;
  --accent: #ff1493;
  --accent-deep: #ff4fb1;
  --accent-soft: #4b1534;
  --electric-blue: #4c9dff;
  --acid: #d9ff00;
  --acid-soft: #293000;
  --line: #2b2b27;
  --shadow: 10px 10px 0 #f7f7ef;
  --deck-shadow: var(--shadow);
  --surface-shadow: rgba(217, 255, 0, 0.22);
  --header-bg: rgba(5, 5, 5, 0.94);
  --body-dot: rgba(217, 255, 0, 0.12);
  --body-grid: rgba(255, 255, 255, 0.055);
  --footer-muted: rgba(247, 247, 239, 0.72);
  color-scheme: dark;
}

[data-theme="dark"] .skip-link,
[data-theme="dark"] .skill-card:first-child .skill-card-front,
[data-theme="dark"] .timeline-item.is-active,
[data-theme="dark"] .deck-slide figcaption,
[data-theme="dark"] .site-footer {
  background: #050505;
  color: #f7f7ef;
}

[data-theme="dark"] .brand-mark,
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links a[aria-current="page"],
[data-theme="dark"] .hero-tagline,
[data-theme="dark"] .project-grid .repo-label,
[data-theme="dark"] .project-grid .repo-label:hover,
[data-theme="dark"] .deck-controls a:hover,
[data-theme="dark"] .download-actions a:hover,
[data-theme="dark"] .download-actions a:first-child {
  color: #050505;
}

[data-theme="dark"] .skill-card:nth-child(2) .skill-card-front,
[data-theme="dark"] .skill-card:nth-child(3) .skill-card-front,
[data-theme="dark"] .skill-card:nth-child(4) .skill-card-front {
  color: #050505;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, var(--body-dot) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(90deg, var(--body-grid) 1px, transparent 1px) 0 0 / 68px 68px,
    var(--paper);
  color: var(--ink);
  font-family:
    "Arial Narrow", Impact, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  background: var(--ink);
  color: white;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 3px solid transparent;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header.is-elevated {
  border-bottom-color: var(--ink);
}

.nav {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 1.15rem clamp(1.5rem, 4vw, 3rem);
  position: relative;
}

.brand,
.nav-links {
  align-items: center;
  display: flex;
  gap: 0.75rem;
}

.brand {
  justify-self: start;
  font-weight: 1000;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  color: var(--ink);
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  line-height: 1;
  width: 2.35rem;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 1000;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: var(--accent);
  color: var(--ink);
}

.theme-toggle {
  align-items: center;
  background: var(--ink);
  border: 3px solid var(--line);
  color: var(--paper-strong);
  cursor: pointer;
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-areas: "icon";
  height: 2.65rem;
  justify-content: center;
  justify-self: end;
  padding: 0;
  position: relative;
  width: 2.65rem;
}

.theme-toggle:hover {
  background: var(--acid);
  color: #050505;
}

.theme-icon {
  display: block;
  fill: currentColor;
  grid-area: icon;
  height: 1.25rem;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  width: 1.25rem;
}

.theme-icon-sun {
  opacity: 0;
  transform: scale(0.72) rotate(-30deg);
}

.theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.72) rotate(30deg);
}

.resume-hero,
.page-hero,
.section,
.site-footer {
  margin: 0 auto;
  max-width: 1180px;
  padding-left: clamp(3.33rem, 8vw, 8rem);
  padding-right: clamp(3.33rem, 8vw, 8rem);
}

.resume-hero {
  border-bottom: 4px solid var(--line);
  max-width: none;
  padding-bottom: clamp(3rem, 6vw, 5.25rem);
  padding-left: 0;
  padding-right: 0;
  padding-top: clamp(3rem, 7vw, 6.25rem);
}

.resume-summary {
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.6fr);
  margin: 0 auto;
  max-width: 1180px;
  padding-left: clamp(3.33rem, 8vw, 8rem);
  padding-right: clamp(3.33rem, 8vw, 8rem);
}

.page-hero {
  max-width: 920px;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  padding-top: clamp(3rem, 8vw, 7rem);
}

.portfolio-hero {
  padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.section {
  padding-bottom: clamp(2.75rem, 5vw, 4.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  scroll-margin-top: 5rem;
}

.portfolio-section {
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.compact-section {
  padding-bottom: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3rem);
}

.compact-section + .timeline-section,
.timeline-section + .timeline-section {
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3rem, 16cqw, 8.8rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.78;
  margin-bottom: 1.35rem;
  margin-top: 1.2rem;
  text-transform: uppercase;
}

.wordmark {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  width: 100%;
}

.wordmark span {
  min-width: 0;
  text-align: center;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.55rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.page-hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.92;
  max-width: 14ch;
}

h3 {
  font-size: 1.32rem;
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 1.16;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.title-lock {
  container-type: inline-size;
  max-width: 62rem;
  overflow: hidden;
  width: 100%;
}

.title-lock h1 {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.name-shimmer-trail {
  animation: fade-shimmer-trail 650ms ease-out forwards;
  background: radial-gradient(circle, rgba(213, 255, 0, 0.92) 0 18%, rgba(255, 20, 147, 0.74) 38%, rgba(0, 108, 255, 0) 72%);
  border-radius: 999px;
  height: clamp(0.6rem, 1.4vw, 1rem);
  left: var(--trail-x);
  mix-blend-mode: multiply;
  pointer-events: none;
  position: absolute;
  top: var(--trail-y);
  transform: translate(-50%, -50%) scale(0.6);
  width: clamp(0.6rem, 1.4vw, 1rem);
  z-index: 1;
}

@keyframes fade-shimmer-trail {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.45);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.8);
  }
}

.hero-tagline {
  background: var(--acid);
  color: var(--ink);
  display: block;
  font-size: clamp(1rem, 3.2cqw, 1.55rem);
  font-weight: 1000;
  line-height: 1.1;
  margin: 0 0 clamp(1.75rem, 3vw, 2.35rem);
  padding: 0.25rem 0.55rem;
  text-align: center;
  text-transform: uppercase;
}

.hero-text,
.page-hero p,
.section-heading p,
.skill-grid p,
.project-card p,
.timeline-panel li {
  color: var(--ink-soft);
}

.hero-text,
.page-hero p {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 58rem;
}

.hero-socials {
  align-items: center;
  display: flex;
  gap: clamp(1.1rem, 2.8vw, 2rem);
  margin: 1.2rem auto 0;
  padding: 0.65rem 0;
  width: fit-content;
}

.hero-socials a {
  align-items: center;
  background: var(--paper-strong);
  border-radius: 999px;
  box-shadow: 0 10px 25px var(--surface-shadow);
  color: var(--ink);
  display: inline-flex;
  justify-content: center;
  height: 3.4rem;
  isolation: isolate;
  min-width: 3.4rem;
  position: relative;
  text-decoration: none;
  width: 3.4rem;
  transition:
    box-shadow 500ms ease,
    width 500ms ease;
}

.hero-socials a::before,
.hero-socials a::after {
  background: var(--social-color);
  border-radius: inherit;
  content: "";
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 500ms ease;
}

.hero-socials a::before {
  z-index: 0;
}

.hero-socials a::after {
  filter: blur(15px);
  inset: 0;
  top: 0.55rem;
  z-index: -1;
}

.hero-socials a:hover,
.hero-socials a:focus-visible {
  box-shadow: 0 10px 25px rgba(5, 5, 5, 0);
  width: 10.75rem;
}

.hero-socials a:hover::before,
.hero-socials a:focus-visible::before {
  opacity: 1;
}

.hero-socials a:hover::after,
.hero-socials a:focus-visible::after {
  opacity: 0.42;
}

.social-icon {
  display: block;
  fill: currentColor;
  height: 1.65rem;
  width: 1.65rem;
  z-index: 1;
  transition:
    color 500ms ease,
    transform 500ms ease;
  transition-delay: 250ms;
}

.hero-socials a:hover .social-icon,
.hero-socials a:focus-visible .social-icon {
  color: white;
  transform: scale(0);
  transition-delay: 0ms;
}

.social-title {
  color: white;
  font-size: 0.8rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  position: absolute;
  text-transform: uppercase;
  transform: scale(0);
  transition: transform 500ms ease;
  transition-delay: 0ms;
  z-index: 1;
}

.hero-socials a:hover .social-title,
.hero-socials a:focus-visible .social-title {
  transform: scale(1);
  transition-delay: 250ms;
}

.social-icon-linkedin {
  color: #4c9dff;
}

.social-icon-github {
  color: #9b35ff;
}

.social-icon-instagram {
  color: #ff1493;
}

.social-icon-youtube {
  color: #ff2b23;
}

.social-icon-link {
  color: var(--ink);
}

.portrait-panel {
  align-self: stretch;
  background: transparent;
  border: 0;
  box-shadow: var(--shadow);
  color: white;
  overflow: hidden;
}

.portrait-panel img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.section-heading {
  max-width: 760px;
}

.heading-anchor {
  color: inherit;
  text-decoration: none;
}

.heading-anchor:hover {
  color: var(--accent-deep);
}

.skill-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 2rem;
  perspective: 1000px;
}

.skill-card {
  cursor: pointer;
  min-height: 18rem;
  outline: 0;
  perspective: 1000px;
}

.skill-card-inner {
  height: 100%;
  min-height: 18rem;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 600ms ease;
  width: 100%;
}

.skill-card:hover .skill-card-inner,
.skill-card:focus-visible .skill-card-inner,
.skill-card:focus-within .skill-card-inner {
  transform: rotateY(180deg);
}

.skill-card-face {
  backface-visibility: hidden;
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--ink);
  display: flex;
  flex-direction: column;
  height: 100%;
  inset: 0;
  justify-content: center;
  min-height: 18rem;
  padding: clamp(1rem, 2vw, 1.35rem);
  position: absolute;
  width: 100%;
}

.skill-card-front {
  background: var(--paper-strong);
  color: var(--ink);
}

.skill-card-back {
  background: var(--paper-strong);
  color: var(--ink);
  transform: rotateY(180deg);
}

.skill-card:nth-child(2) .skill-card-front {
  background: var(--accent);
}

.skill-card:nth-child(3) .skill-card-front {
  background: var(--acid);
}

.skill-card:nth-child(4) .skill-card-front {
  background: var(--electric-blue);
}

.skill-card:first-child .skill-card-front {
  background: var(--ink);
  color: white;
}

.skill-heading {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  grid-template-rows: 2.75rem minmax(4.6rem, auto);
  justify-items: center;
  margin: 0;
  min-height: 0;
  text-align: center;
}

.skill-icon {
  display: block;
  fill: currentColor;
  height: 2.5rem;
  margin: 0;
  width: 2.5rem;
}

.skill-card:nth-child(2) .skill-icon {
  height: 2.15rem;
  width: 2.15rem;
}

.skill-grid h3 {
  align-items: flex-start;
  display: flex;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  justify-content: center;
  margin-bottom: 0;
  min-height: 4.6rem;
  width: 100%;
}

.skill-grid p {
  color: currentColor;
  font-size: clamp(0.92rem, 1.2vw, 1.05rem);
  line-height: 1.45;
  margin-bottom: 0;
  opacity: 0.82;
}

.timeline-shell {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(16rem, 0.45fr) minmax(0, 1fr);
  margin-top: 2rem;
}

.timeline-list {
  display: grid;
  gap: 0;
}

.timeline-item {
  background: var(--paper-strong);
  border: 3px solid var(--line);
  border-bottom-width: 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.08rem;
  min-height: 5.25rem;
  padding: 1rem;
  text-align: left;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.timeline-item:last-child {
  border-bottom-width: 3px;
}

.timeline-item:hover {
  transform: translateX(4px);
}

.timeline-item.is-active {
  background: var(--ink);
  color: white;
}

.timeline-item span,
.timeline-item strong {
  display: block;
}

.timeline-item span {
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.timeline-item.is-active span {
  color: var(--acid);
}

.timeline-detail {
  background: var(--paper-strong);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 23rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.timeline-panel[hidden] {
  display: none;
}

.panel-kicker {
  color: var(--accent-deep);
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 1000;
  letter-spacing: 0;
  text-transform: uppercase;
}

.timeline-panel ul,
.project-points {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.timeline-panel li + li,
.project-points li + li {
  margin-top: 0.3rem;
}

.project-grid {
  align-items: stretch;
  display: grid;
  gap: 0.75rem;
  grid-auto-rows: 1fr;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 50rem;
}

.project-card {
  aspect-ratio: 2 / 1;
  background: var(--paper-strong);
  border: 2px solid var(--line);
  box-shadow: 4px 4px 0 var(--ink);
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0.7rem;
  text-decoration: none;
}

.project-grid .project-card h2 {
  font-size: clamp(0.95rem, 1.18vw, 1.12rem);
  line-height: 0.95;
  margin-bottom: 0.3rem;
}

.project-grid .project-card p,
.project-grid .project-points {
  font-size: clamp(0.66rem, 0.76vw, 0.74rem);
  line-height: 1.18;
}

.project-grid .repo-label {
  align-items: center;
  align-self: flex-start;
  background: var(--acid);
  border: 2px solid var(--ink);
  color: var(--ink);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 1000;
  margin-top: 1lh;
  padding: 0.28rem 0.55rem;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.project-grid .repo-label:hover {
  background: var(--accent);
  color: var(--ink);
  transform: translate(-1px, -1px);
}

.training-feature {
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.training-layout {
  align-items: start;
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.36fr);
}

.training-main {
  min-width: 0;
}

.deck-carousel {
  margin-top: 1.5rem;
}

.deck-rail {
  display: grid;
  gap: 1rem;
  grid-auto-columns: 100%;
  grid-auto-flow: column;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 0.35rem 1rem 0;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--ink) var(--paper-strong);
}

.deck-slide {
  background: var(--paper-strong);
  border: 3px solid var(--line);
  box-shadow: var(--deck-shadow);
  margin: 0;
  overflow: hidden;
  scroll-margin-left: 0.35rem;
  scroll-snap-align: start;
}

.deck-slide img {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.deck-slide figcaption {
  background: var(--ink);
  color: white;
  font-size: 0.8rem;
  font-weight: 1000;
  padding: 0.45rem 0.65rem;
  text-transform: uppercase;
}

.deck-controls,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.deck-controls a,
.download-actions a {
  align-items: center;
  background: var(--paper-strong);
  border: 2px solid var(--ink);
  color: var(--ink);
  display: inline-flex;
  font-weight: 1000;
  justify-content: center;
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.deck-controls a:hover,
.download-actions a:hover {
  background: var(--acid);
  transform: translate(-1px, -1px);
}

.download-actions a:first-child {
  background: var(--accent);
}

.training-side-panel {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 6rem;
}

.license-card,
.disclaimer-card {
  background: var(--paper-strong);
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 var(--ink);
  padding: clamp(1rem, 2vw, 1.25rem);
}

.license-card h2,
.disclaimer-card h2 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1;
  margin-bottom: 0.7rem;
}

.license-card p,
.disclaimer-card p {
  color: var(--ink-soft);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.92rem;
  margin-bottom: 0;
}

.license-card p + p,
.disclaimer-card p + p {
  margin-top: 0.75rem;
}

.license-card a {
  color: var(--accent-deep);
  font-weight: 800;
}

.license-icons {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

.license-icons img {
  display: block;
  height: 1.5rem;
  width: 1.5rem;
}

.site-footer {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  max-width: none;
  padding-bottom: 2rem;
  padding-top: 2rem;
}

.site-footer p {
  color: var(--footer-muted);
  margin: 0;
}

.site-footer a {
  color: var(--acid);
  font-weight: 1000;
}

.project-card:focus-visible,
.repo-label:focus-visible,
.skill-card:focus-visible,
.hero-socials a:focus-visible,
.timeline-item:focus-visible,
.deck-rail:focus-visible,
.deck-controls a:focus-visible,
.download-actions a:focus-visible,
.heading-anchor:focus-visible,
.nav-links a:focus-visible,
.brand:focus-visible,
.theme-toggle:focus-visible,
.site-footer a:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 940px) {
  .resume-summary,
  .timeline-shell,
  .training-layout {
    grid-template-columns: 1fr;
  }

  .portrait-panel {
    min-height: 0;
  }

  .portrait-panel img {
    aspect-ratio: 1 / 1.16;
    height: auto;
  }

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

  .training-side-panel {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card-inner {
    display: grid;
    transform: none !important;
  }

  .skill-card-face {
    backface-visibility: visible;
    position: static;
    transform: none;
  }

  .skill-card-back {
    border-top: 0;
    box-shadow: 5px 5px 0 var(--ink);
    min-height: auto;
  }
}

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

  .nav-links {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .theme-toggle {
    position: absolute;
    right: 1.25rem;
    top: 0.85rem;
  }

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

  .resume-hero {
    padding-top: 1.5rem;
  }

  .timeline-detail {
    min-height: auto;
  }

  .deck-slide {
    box-shadow: 5px 5px 0 var(--ink);
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.35rem, 11vw, 2.8rem);
    line-height: 0.92;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-text,
  .page-hero p {
    font-size: 1rem;
  }

  .nav {
    gap: 0.8rem;
    padding: 0.9rem 1.25rem;
  }

  .brand {
    gap: 0.55rem;
  }

  .brand-mark {
    height: 2rem;
    width: 2rem;
  }

  .brand span:last-child {
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 0.35rem;
  }

  .nav-links a {
    font-size: 0.82rem;
    padding: 0.28rem 0.34rem;
  }

  .resume-hero,
  .page-hero,
  .section,
  .site-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .resume-summary {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .page-hero {
    padding-bottom: 1rem;
    padding-top: 1.4rem;
  }

  .page-hero h1 {
    max-width: none;
  }

  .portfolio-section {
    padding-top: 0.75rem;
  }

  .hero-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }

  .hero-socials a:hover,
  .hero-socials a:focus-visible {
    width: min(10.75rem, 100%);
  }

  .timeline-item,
  .project-card {
    min-height: auto;
  }

  .project-grid {
    max-width: none;
  }

  .project-card {
    aspect-ratio: auto;
    overflow: visible;
    padding: 1rem;
  }

  .project-grid .project-card h2 {
    font-size: clamp(1.25rem, 7vw, 1.85rem);
    line-height: 0.95;
  }

  .project-grid .project-card p,
  .project-grid .project-points {
    font-size: 0.95rem;
    line-height: 1.28;
  }

  .project-grid .repo-label {
    margin-top: 0.8rem;
  }

  .skill-card,
  .skill-card-inner,
  .skill-card-face {
    min-height: 14rem;
  }

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