:root {
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max-width: 1180px;
  --measure: 68ch;
  --header-height: 76px;
  --space-1: 0.375rem;
  --space-2: 0.625rem;
  --space-3: 0.875rem;
  --space-4: 1.125rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --transition-fast: 160ms ease;
  --transition: 240ms ease;
  --shadow-sm: 0 12px 34px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 26px 80px rgba(0, 0, 0, 0.24);
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

html[data-theme="dark"] {
  --bg: #070b10;
  --bg-elevated: #0c121a;
  --surface: #101923;
  --surface-strong: #15212d;
  --text: #f4f8fb;
  --text-soft: #aebdca;
  --text-faint: #7e90a0;
  --accent: #42d7df;
  --accent-strong: #8ff5f2;
  --accent-ink: #031414;
  --accent-secondary: #7d8cff;
  --border: rgba(165, 210, 222, 0.16);
  --border-strong: rgba(109, 226, 231, 0.36);
  --focus: #ffce70;
  --success: #70e4ad;
  --status-bg: rgba(112, 228, 173, 0.1);
  --header-bg: rgba(7, 11, 16, 0.86);
  --grid: rgba(97, 213, 220, 0.055);
  --glow: rgba(66, 215, 223, 0.16);
}

html[data-theme="slate"] {
  color-scheme: dark;
  --bg: #242a30;
  --bg-elevated: #2c333a;
  --surface: #333b43;
  --surface-strong: #3b454f;
  --text: #f6f8fa;
  --text-soft: #cbd3d9;
  --text-faint: #9daab4;
  --accent: #6ee3e7;
  --accent-strong: #b0f7f5;
  --accent-ink: #071718;
  --accent-secondary: #aab3ff;
  --border: rgba(232, 244, 248, 0.14);
  --border-strong: rgba(110, 227, 231, 0.42);
  --focus: #ffe090;
  --success: #91edbd;
  --status-bg: rgba(145, 237, 189, 0.12);
  --header-bg: rgba(36, 42, 48, 0.9);
  --grid: rgba(213, 245, 247, 0.05);
  --glow: rgba(110, 227, 231, 0.13);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f8fa;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eaf1f4;
  --text: #101a22;
  --text-soft: #455663;
  --text-faint: #687b88;
  --accent: #007b86;
  --accent-strong: #005b64;
  --accent-ink: #ffffff;
  --accent-secondary: #485ec9;
  --border: rgba(19, 55, 67, 0.14);
  --border-strong: rgba(0, 123, 134, 0.35);
  --focus: #8d5700;
  --success: #087844;
  --status-bg: rgba(8, 120, 68, 0.08);
  --header-bg: rgba(245, 248, 250, 0.9);
  --grid: rgba(0, 86, 95, 0.06);
  --glow: rgba(0, 123, 134, 0.11);
  --shadow-sm: 0 12px 34px rgba(35, 58, 68, 0.1);
  --shadow-lg: 0 26px 80px rgba(35, 58, 68, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 72% 8%, var(--glow), transparent 32rem),
    var(--bg);
  background-size: 52px 52px, 52px 52px, auto, auto;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open,
body.dialog-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

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

h1,
h2,
h3 {
  color: var(--text);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2.75rem, 7vw, 5.7rem);
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

p,
li {
  color: var(--text-soft);
}

strong {
  color: var(--text);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(18px) saturate(140%);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.nav-shell {
  display: flex;
  width: min(calc(100% - 2rem), var(--max-width));
  height: 100%;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.brand-name {
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-link {
  display: inline-flex;
  min-height: 44px;
  padding: 0.6rem 0.78rem;
  align-items: center;
  border-radius: 0.65rem;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover,
.nav-link[aria-current] {
  background: var(--surface);
  color: var(--text);
}

.nav-link[aria-current]::before {
  width: 0.38rem;
  height: 0.38rem;
  margin-right: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  box-shadow: 0 0 0.75rem var(--accent);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  cursor: pointer;
  list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown-summary::after {
  margin-left: 0.45rem;
  color: var(--accent);
  content: "▾";
  font-size: 0.72rem;
  transition: transform var(--transition-fast);
}

.nav-dropdown[open] .nav-dropdown-summary::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.55rem);
  left: 0;
  display: grid;
  width: min(18rem, 80vw);
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  gap: 0.15rem;
}

.nav-dropdown-menu a {
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current] {
  background: var(--surface-strong);
  color: var(--text);
}

.theme-switcher {
  display: inline-flex;
  margin-left: 0.7rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  gap: 0.1rem;
}

.theme-button {
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 720;
}

.theme-button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  cursor: pointer;
}

.menu-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:first-child {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-line:last-child {
  transform: translateY(-7px) rotate(-45deg);
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(4rem, 8vh, var(--space-9));
}

.section[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.section-heading {
  display: grid;
  margin-bottom: clamp(1.75rem, 4vh, var(--space-7));
  gap: var(--space-3);
}

.section-heading p {
  max-width: var(--measure);
  margin-bottom: 0;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.55rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero {
  display: grid;
  min-height: 0;
  padding-block: clamp(1rem, 2.3vh, 1.75rem);
  align-items: center;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}

.home-intro {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(0.7rem, 1.7vh, 1.1rem);
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.5rem, 1.25vh, 0.85rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  max-width: 15ch;
  margin: clamp(0.6rem, 1.25vh, 0.9rem) 0 clamp(0.7rem, 1.5vh, 1rem);
  font-size: clamp(2.65rem, min(5.25vw, 7.8vh), 4.65rem);
}

.hero-summary {
  max-width: 63ch;
  margin-bottom: 0;
  font-size: clamp(0.98rem, min(1.35vw, 2.1vh), 1.14rem);
  line-height: 1.5;
}

.availability {
  display: flex;
  max-width: 58ch;
  margin: clamp(0.65rem, 1.4vh, 0.9rem) 0 0;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
}

.availability-dot {
  flex: 0 0 auto;
  width: 0.68rem;
  height: 0.68rem;
  margin-top: 0.47rem;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--status-bg), 0 0 1rem rgba(112, 228, 173, 0.38);
}

.hero-actions,
.inline-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-actions {
  margin-top: clamp(0.8rem, 1.7vh, 1.15rem);
}

.inline-links {
  margin-top: clamp(0.45rem, 1vh, 0.7rem);
  gap: 1rem;
}

.inline-link {
  display: inline-flex;
  min-height: 36px;
  padding: 0.2rem 0;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-soft);
  font-weight: 650;
  text-decoration: none;
}

.inline-link::after {
  content: "↗";
  color: var(--accent);
  transition: transform var(--transition-fast);
}

.inline-link:hover::after {
  transform: translate(0.16rem, -0.16rem);
}

.button {
  display: inline-flex;
  min-height: 48px;
  padding: 0.72rem 1.05rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

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

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 34px var(--glow);
}

.button-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-strong);
}

.button-quiet {
  border-color: var(--border);
  background: transparent;
  color: var(--text-soft);
}

.hero-visual {
  position: relative;
  width: min(100%, clamp(250px, 27vw, 360px));
  max-width: none;
  justify-self: end;
}

.portrait-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.portrait-frame:hover,
.portrait-frame:focus-visible {
  border-color: var(--accent);
  color: inherit;
  box-shadow: 0 30px 86px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--glow);
  transform: translateY(-3px);
}

.portrait-frame::before,
.project-visual::before {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 38%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  content: "";
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 968 / 1200;
  object-fit: contain;
  object-position: center;
}

.portrait-label {
  position: absolute;
  z-index: 3;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.8rem;
  background: rgba(3, 9, 13, 0.78);
  color: #f5fbfd;
  backdrop-filter: blur(12px);
}

.portrait-label strong,
.portrait-label span {
  display: block;
}

.portrait-label span {
  margin-top: 0.1rem;
  color: #bcd0da;
  font-size: 0.84rem;
}

.hero-code {
  position: absolute;
  z-index: -1;
  top: -2rem;
  right: -2rem;
  width: 9rem;
  height: 9rem;
  border-top: 1px solid var(--border-strong);
  border-right: 1px solid var(--border-strong);
  border-radius: 0 var(--radius-xl) 0 0;
}

.hero-code::before,
.hero-code::after {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.hero-code::before {
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
}

.hero-code::after {
  right: -4px;
  bottom: 0;
  width: 7px;
  height: 7px;
}

.stats-grid {
  display: grid;
  margin-top: clamp(0.75rem, 1.6vh, 1rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.stat {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.stat dt {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat dd {
  margin: 0.22rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.3;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.project-card,
.skill-card,
.experience-card,
.education-card,
.content-card,
.resume-card,
.contact-card,
.case-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, color-mix(in srgb, var(--surface) 96%, var(--accent) 4%), var(--surface));
  box-shadow: var(--shadow-sm);
}

.project-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
  color: inherit;
  scroll-snap-align: start;
  text-decoration: none;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover,
.project-card:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.project-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.project-visual picture {
  width: 100%;
  height: 100%;
}

.project-visual-contain {
  display: grid;
  padding: 0.75rem;
  background:
    radial-gradient(circle at 50% 45%, var(--glow), transparent 72%),
    var(--surface-strong);
  place-items: center;
}

.project-visual-contain img {
  object-fit: contain;
}

.project-visual-screenshot {
  padding: 0.9rem;
  background: linear-gradient(145deg, var(--surface-strong), var(--bg-elevated));
}

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

.project-visual-flexin {
  display: grid;
  background:
    radial-gradient(circle at 50% 45%, rgba(226, 179, 71, 0.18), transparent 34%),
    linear-gradient(145deg, #101216, #050607);
  place-items: center;
}

.project-visual-flexin img {
  width: 48%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, 0.48));
}

.project-card-body {
  display: flex;
  padding: 1.35rem;
  flex: 1;
  flex-direction: column;
}

.project-kicker,
.status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-kicker {
  color: var(--accent);
}

.project-card h3 {
  margin: 0.55rem 0 0.75rem;
}

.project-card p {
  margin-bottom: 1.1rem;
}

.project-card:hover {
  color: inherit;
}

.project-card .tag-list {
  margin-top: auto;
}

.project-card-actions {
  display: flex;
  margin-top: 1.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.card-link::after {
  margin-left: 0.45rem;
  color: var(--accent);
  content: "→";
  transition: transform var(--transition-fast);
}

.card-link:hover::after {
  transform: translateX(0.22rem);
}

.status {
  width: fit-content;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--status-bg);
  color: var(--success);
  white-space: nowrap;
}

.tag-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
}

.tag-list li {
  padding: 0.32rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  padding: 1.35rem;
}

.skill-card h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.skill-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
}

.skill-list li {
  padding: 0.38rem 0.62rem;
  border-radius: 0.55rem;
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 650;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline::before {
  position: absolute;
  top: 1.75rem;
  bottom: 1.75rem;
  left: 1.05rem;
  width: 1px;
  background: var(--border-strong);
  content: "";
}

.experience-card {
  position: relative;
  display: grid;
  margin-left: 2.6rem;
  padding: 1.5rem;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 1.5rem;
}

.experience-card::before {
  position: absolute;
  top: 1.65rem;
  left: -2.03rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--border-strong);
  content: "";
}

.experience-meta p {
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}

.experience-card ul,
.case-copy ul {
  margin: 0;
  padding-left: 1.2rem;
}

.experience-card li + li,
.case-copy li + li {
  margin-top: 0.45rem;
}

.education-card {
  display: grid;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.4rem;
}

.education-mark {
  display: grid;
  width: 4.4rem;
  height: 4.4rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
  place-items: center;
}

.education-card h3,
.education-card p {
  margin-bottom: 0.35rem;
}

.education-date {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
}

.about-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.about-grid .content-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.principles {
  display: grid;
  margin: 0;
  gap: 0.8rem;
}

.principles div {
  display: grid;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
}

.principles div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.principles dt {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
}

.principles dd {
  margin: 0;
  color: var(--text-soft);
}

.contact-card {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 5rem);
}

.contact-card::after {
  position: absolute;
  right: -5rem;
  bottom: -7rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 3rem var(--glow), 0 0 0 6rem rgba(66, 215, 223, 0.03);
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-card h2 {
  max-width: 14ch;
}

.contact-card p {
  max-width: 62ch;
  font-size: 1.1rem;
}

.contact-button {
  gap: 0.65rem;
  overflow: hidden;
}

.contact-icon {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 0.58rem;
  background: color-mix(in srgb, currentColor 10%, transparent);
  place-items: center;
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.contact-button-email .contact-icon {
  background: #dffbfc;
  color: #056a72;
}

.contact-button-email .contact-icon svg,
.contact-button-resume .contact-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.contact-button-linkedin .contact-icon {
  background: #0a66c2;
  color: #ffffff;
}

.contact-button-github .contact-icon {
  background: #ffffff;
  color: #181717;
}

.contact-button-resume .contact-icon {
  background: #fff0ce;
  color: #80520a;
}

.contact-button-resume[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--surface-strong);
  color: var(--text);
}

.contact-button:hover .contact-icon,
.contact-button:focus-visible .contact-icon {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transform: translateY(-2px) rotate(-2deg) scale(1.04);
}

.contact-button:active .contact-icon {
  transform: scale(0.96);
}

.resume-dialog {
  position: fixed;
  inset: 0;
  width: min(calc(100% - 2rem), 74rem);
  max-width: none;
  height: min(calc(100svh - 2rem), 50rem);
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.52);
}

.resume-dialog::backdrop {
  background: rgba(3, 8, 12, 0.76);
  backdrop-filter: blur(10px);
}

.resume-dialog[open] {
  animation: dialog-enter 240ms ease both;
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(0.8rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.resume-drawer-inner {
  display: grid;
  height: 100%;
  min-height: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  grid-template-rows: auto minmax(0, 1fr);
}

.resume-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.resume-drawer-header h3 {
  max-width: 18ch;
  margin: 0.65rem 0 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.resume-drawer-header p {
  max-width: 58ch;
  margin-bottom: 0;
  font-size: 1rem;
}

.resume-drawer-close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  place-items: center;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.resume-drawer-close:hover,
.resume-drawer-close:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  transform: rotate(4deg);
}

.resume-drawer-close svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.resume-drawer-body {
  display: grid;
  min-height: 0;
  padding-top: 1.5rem;
  align-items: stretch;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
}

.resume-preview-shell {
  display: grid;
  min-height: 0;
  padding: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  place-items: center;
}

.resume-preview-shell img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 0.25rem;
  background: #ffffff;
  object-fit: contain;
}

.resume-drawer-copy {
  align-self: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
}

.resume-drawer-kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resume-drawer-copy h4 {
  margin: 0.7rem 0 0.65rem;
  color: var(--text);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.resume-drawer-copy p {
  margin-bottom: 0;
  font-size: 1rem;
}

.resume-preview-controls {
  display: flex;
  margin-top: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button-with-icon {
  gap: 0.55rem;
}

.button-with-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-shell p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.page-hero {
  display: grid;
  min-height: 62vh;
  padding-block: clamp(5rem, 11vw, 9rem);
  align-items: end;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: clamp(2rem, 7vw, 6rem);
}

.page-hero h1 {
  margin: 1rem 0 1.25rem;
}

.page-hero p {
  max-width: 62ch;
  margin-bottom: 0;
  font-size: clamp(1.08rem, 2vw, 1.3rem);
}

.page-hero-note {
  padding: 1.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.page-hero-note p:last-child {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.case-hero {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.case-hero h1 {
  margin: 1rem 0 1.2rem;
}

.case-summary {
  max-width: 68ch;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.case-meta {
  display: grid;
  margin: 2rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.case-meta dt {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-meta dd {
  margin: 0.35rem 0 0;
  color: var(--text);
  font-weight: 700;
}

.case-layout {
  display: grid;
  padding-bottom: var(--space-9);
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 7vw, 6rem);
}

.case-sidebar {
  align-self: start;
}

.case-sidebar-inner {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.case-sidebar nav {
  display: grid;
  gap: 0.25rem;
}

.case-sidebar a {
  display: flex;
  min-height: 42px;
  padding: 0.45rem 0.65rem;
  align-items: center;
  border-left: 2px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.case-sidebar a:hover {
  border-color: var(--accent);
  color: var(--text);
}

.case-copy {
  display: grid;
  gap: 1.25rem;
}

.case-panel {
  padding: clamp(1.35rem, 4vw, 2.2rem);
}

.case-panel h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

.case-panel p:last-child,
.case-panel ul:last-child {
  margin-bottom: 0;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.media-grid figure,
.case-media {
  margin: 0;
}

.media-grid img,
.case-media img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.media-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.case-media img {
  max-height: 34rem;
  object-fit: contain;
}

.media-grid figcaption,
.case-media figcaption {
  margin-top: 0.55rem;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.architecture {
  display: grid;
  align-items: stretch;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.architecture-step {
  position: relative;
  display: grid;
  min-height: 8rem;
  padding: 1rem;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  text-align: center;
}

.architecture-step:not(:last-child)::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -1.15rem;
  color: var(--accent);
  content: "→";
  font-size: 1.2rem;
  transform: translateY(-50%);
}

.architecture-step strong,
.architecture-step span {
  display: block;
}

.architecture-step span {
  margin-top: 0.3rem;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.case-navigation {
  display: grid;
  padding-block: var(--space-7);
  border-top: 1px solid var(--border);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.case-navigation a {
  display: grid;
  min-height: 7.5rem;
  padding: 1.2rem;
  align-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}

.case-navigation a:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.case-navigation span {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.case-navigation strong {
  margin-top: 0.3rem;
}

.case-navigation a:last-child {
  text-align: right;
}

.about-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.about-detail-grid .content-card {
  padding: 1.5rem;
}

.about-detail-grid .content-card:first-child {
  grid-column: span 2;
}

.numbered-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 0.85rem;
  list-style: none;
  counter-reset: principles;
}

.numbered-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.65rem;
  counter-increment: principles;
}

.numbered-list li::before {
  color: var(--accent);
  content: "0" counter(principles);
  font-family: var(--font-mono);
  font-weight: 800;
}

.quote-card {
  position: relative;
  display: grid;
  margin-top: 0;
  padding: clamp(0.75rem, 1.6vw, 1rem) clamp(0.9rem, 2vw, 1.2rem);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 92% 18%, var(--glow), transparent 12rem),
    linear-gradient(145deg, var(--surface), var(--bg-elevated));
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.quote-mark {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 0.7;
}

.quote-copy {
  margin: 0;
  color: var(--text);
  font-size: clamp(0.9rem, 1.35vw, 1.03rem);
  font-weight: 620;
  line-height: 1.4;
}

.quote-meta {
  display: grid;
  justify-items: end;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  gap: 0.2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-carousel {
  --visible-projects: 3;
  display: grid;
  gap: 1.25rem;
}

.project-browse {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.project-position {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-position {
  margin: 0;
  text-align: right;
}

.project-carousel-frame {
  display: grid;
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.project-track {
  display: flex;
  padding: 0.3rem 0 1rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 1rem;
}

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

.project-track .project-card {
  min-width: 0;
  flex: 0 0 calc((100% - 2rem) / 3);
}

.project-arrow {
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 1.45rem;
  font-weight: 800;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), opacity var(--transition-fast), background var(--transition-fast);
}

.project-arrow:hover:not(:disabled) {
  background: var(--surface-strong);
  transform: scale(1.06);
}

.project-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.project-visual-led,
.project-visual-plant,
.project-visual-sql {
  background: var(--surface-strong);
}

.project-visual-rocket {
  display: grid;
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 140, 255, 0.25), transparent 34%),
    linear-gradient(145deg, #111b27, #070b10);
  place-items: center;
}

.rocket-card-visual {
  position: relative;
  width: 5.2rem;
  height: 8.5rem;
  border: 2px solid var(--accent);
  border-radius: 50% 50% 18% 18%;
  background: linear-gradient(90deg, var(--surface-strong), var(--bg-elevated));
  box-shadow: 0 0 2rem var(--glow);
}

.rocket-card-visual::before,
.rocket-card-visual::after {
  position: absolute;
  bottom: 0.6rem;
  width: 1.7rem;
  height: 2.8rem;
  border: 2px solid var(--accent-secondary);
  background: var(--surface);
  content: "";
}

.rocket-card-visual::before {
  left: -1.3rem;
  transform: skewY(-28deg);
}

.rocket-card-visual::after {
  right: -1.3rem;
  transform: skewY(28deg);
}

.visual-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.visual-link-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: inherit;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.visual-link-card:hover,
.visual-link-card:focus-visible {
  border-color: var(--border-strong);
  color: inherit;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.visual-link-card-image {
  position: relative;
  height: clamp(12rem, 28vh, 17rem);
  overflow: hidden;
  background: var(--bg-elevated);
}

.visual-link-card-image::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  content: "";
  pointer-events: none;
}

.visual-link-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.visual-link-card-image img[src*="amur-AmurFront"],
.visual-link-card-image img[src*="college-College"],
.visual-link-card-image img[src*="highschool-Northwest"] {
  object-position: center 48%;
}

.visual-link-card-image img[src*="menards-Menardspic2"] {
  object-position: center 44%;
}

.visual-link-card:hover img {
  transform: scale(1.035);
}

.visual-link-card-body {
  display: grid;
  padding: 1.25rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.visual-link-card-body h3,
.visual-link-card-body p {
  margin-bottom: 0.35rem;
}

.visual-link-card-arrow {
  color: var(--accent);
  font-size: 1.5rem;
}

.about-collage-hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.about-collage-hero .section-heading {
  margin-bottom: 2rem;
  text-align: center;
}

.about-collage-hero .section-heading > * {
  margin-inline: auto;
}

.about-collage {
  display: grid;
  height: min(38vw, 31rem);
  min-height: 25rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.about-collage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0.75rem;
  object-fit: cover;
}

.about-collage img:nth-child(1) { grid-area: 1 / 5 / 4 / 8; }
.about-collage img:nth-child(2) { grid-area: 1 / 1 / 2 / 4; }
.about-collage img:nth-child(3) { grid-area: 1 / 4 / 2 / 5; }
.about-collage img:nth-child(4) { grid-area: 2 / 1 / 4 / 4; }
.about-collage img:nth-child(5) { grid-area: 2 / 4 / 3 / 5; }
.about-collage img:nth-child(6) { grid-area: 3 / 4 / 4 / 5; }
.about-collage img:nth-child(7) { grid-area: 1 / 8 / 2 / 9; }
.about-collage img:nth-child(8) { grid-area: 2 / 8 / 4 / 9; }
.about-collage img:nth-child(9) { grid-area: 1 / 9 / 3 / 12; }
.about-collage img:nth-child(10) { grid-area: 1 / 12 / 3 / 13; }
.about-collage img:nth-child(11) { grid-area: 3 / 9 / 4 / 11; }
.about-collage img:nth-child(12) { grid-area: 3 / 11 / 4 / 13; }

.about-collage img:nth-child(1) { object-position: 50% 30%; }
.about-collage img:nth-child(2) { object-position: 50% 34%; }
.about-collage img:nth-child(3) { object-position: 50% 28%; }
.about-collage img:nth-child(4) { object-position: 50% 38%; }
.about-collage img:nth-child(5) { object-position: 50% 32%; }
.about-collage img:nth-child(6) { object-position: 50% 36%; }
.about-collage img:nth-child(7) { object-position: 50% 34%; }
.about-collage img:nth-child(8) { object-position: 50% 34%; }
.about-collage img:nth-child(9) { object-position: 50% 30%; }
.about-collage img:nth-child(10) { object-position: 50% 32%; }
.about-collage img:nth-child(11),
.about-collage img:nth-child(12) { object-position: 50% 42%; }

.visual-detail-hero {
  display: grid;
  padding-block: clamp(3.5rem, 8vw, 7rem);
  align-items: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.visual-detail-hero h1 {
  margin: 1rem 0;
}

.visual-detail-hero p {
  max-width: 58ch;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
}

.visual-hero-media {
  position: relative;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.visual-hero-media img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.visual-hero-media.contain img {
  padding: 1.5rem;
  object-fit: contain;
}

.visual-facts {
  display: flex;
  margin: 1.5rem 0 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
}

.visual-facts li {
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

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

.story-card {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.story-card-number {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 0.7rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  place-items: center;
}

.story-card h3 {
  margin-bottom: 0.55rem;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.performance-section {
  padding-top: clamp(2rem, 4vh, 3.5rem);
}

.performance-video {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.performance-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
}

.performance-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.performance-video figcaption {
  padding: 0.85rem 1rem;
  color: var(--text-faint);
  font-size: 0.84rem;
}

.performance-video figcaption a {
  color: var(--accent);
  font-weight: 700;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 0.8rem;
}

.gallery-tile {
  display: grid;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  grid-column: span 4;
  grid-template-rows: auto 1fr;
}

.gallery-tile.wide {
  grid-column: span 8;
}

.gallery-tile.full {
  grid-column: span 12;
}

.gallery-tile.half {
  grid-column: span 6;
}

.gallery-tile img {
  width: 100%;
  height: clamp(15rem, 27vw, 21rem);
  min-height: 0;
  object-fit: cover;
}

.gallery-tile.portrait {
  min-height: 0;
}

.gallery-tile.portrait img {
  object-position: center 22%;
}

.gallery-tile.contain img {
  padding: 0.65rem;
  background:
    radial-gradient(circle at 50% 45%, var(--glow), transparent 75%),
    var(--bg-elevated);
  object-fit: contain;
}

.gallery-tile figcaption {
  padding: 0.7rem 0.8rem;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.is-zoomable {
  position: relative;
  cursor: zoom-in;
}

.is-zoomable::after {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(3, 9, 13, 0.78);
  color: #ffffff;
  content: "+";
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.is-zoomable:hover::after,
.is-zoomable:focus-visible::after {
  background: var(--accent);
  color: var(--accent-ink);
  transform: scale(1.08);
}

.image-lightbox {
  width: min(calc(100% - 2rem), 92rem);
  max-width: none;
  height: min(calc(100svh - 2rem), 58rem);
  max-height: calc(100svh - 2rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: rgba(7, 11, 16, 0.96);
  color: #f4f8fb;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.58);
}

.image-lightbox::backdrop {
  background: rgba(3, 8, 12, 0.82);
  backdrop-filter: blur(10px);
}

.image-lightbox[open] {
  animation: dialog-enter 220ms ease both;
}

.image-lightbox-frame {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

.image-lightbox-close {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 0 0.15rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(3, 9, 13, 0.8);
  color: #ffffff;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  place-items: center;
}

.image-lightbox-close:hover,
.image-lightbox-close:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.image-lightbox-figure {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
}

.image-lightbox-figure img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  background: transparent;
  object-fit: contain;
}

.image-lightbox-figure figcaption {
  max-width: 70ch;
  padding: 0.8rem 3.5rem 0;
  color: #cbd3d9;
  font-size: 0.9rem;
  text-align: center;
}

.gallery-tile img[src*="amur-AmurLepard"] {
  object-position: center 18%;
}

.gallery-tile img[src*="amur-AmurComputer"] {
  object-position: center 58%;
}

.gallery-tile img[src*="menards-Menardspic2"] {
  object-position: center 46%;
}

.gallery-tile img[src*="college-spacex"] {
  object-position: center 38%;
}

.system-visual {
  display: grid;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 50%, var(--glow), transparent 24rem),
    var(--surface);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.5rem;
}

.system-node {
  position: relative;
  display: grid;
  min-height: 9rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  text-align: center;
  place-content: center;
}

.system-node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -1.15rem;
  color: var(--accent);
  content: "→";
  transform: translateY(-50%);
}

.system-node span {
  margin-top: 0.35rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.code-visual {
  overflow-x: auto;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #060a0e;
  color: #a8f3ef;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  white-space: pre;
}

.back-to-top {
  position: static;
  z-index: auto;
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 max(1rem, calc((100vw - var(--max-width)) / 2)) 1.25rem auto;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-size: 1.65rem;
  font-weight: 850;
  place-items: center;
  box-shadow: var(--shadow-lg);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.back-to-top:hover {
  color: var(--accent-ink);
  transform: translateY(-3px);
}

.back-to-top[hidden] {
  display: none;
}

.menu-open .back-to-top {
  display: none;
}

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

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

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

@media (min-width: 761px) {
  body[data-page="home"] .section {
    display: grid;
    min-height: calc(100svh - var(--header-height));
    align-content: center;
  }
}

@media (min-width: 1320px) {
  .back-to-top {
    position: fixed;
    z-index: 40;
    right: max(1rem, calc((100vw - var(--max-width)) / 2 - 4.5rem));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    margin: 0;
  }
}

@media (max-width: 1120px) {
  .menu-toggle {
    display: block;
  }

  .primary-nav {
    position: fixed;
    top: calc(var(--header-height) + 0.75rem);
    right: 1rem;
    left: 1rem;
    display: grid;
    max-height: calc(100vh - var(--header-height) - 2rem);
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    overflow-y: auto;
    pointer-events: none;
    transform: translateY(-0.75rem) scale(0.985);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
  }

  .primary-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .nav-link {
    width: 100%;
    padding-inline: 0.9rem;
  }

  .nav-dropdown,
  .nav-dropdown summary {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    width: 100%;
    margin: 0.25rem 0 0.5rem;
    border-color: var(--border);
    background: var(--surface);
    box-shadow: none;
  }

  .theme-switcher {
    display: grid;
    width: 100%;
    margin: 0.75rem 0 0;
    grid-template-columns: repeat(3, 1fr);
  }

  .theme-button {
    min-height: 44px;
  }

  .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
  }

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

  .project-carousel {
    --visible-projects: 2;
  }

  .project-track .project-card {
    flex-basis: calc((100% - 1rem) / 2);
  }

  .projects-grid > .project-card:first-child {
    grid-column: span 2;
  }

  .projects-grid > .project-card:first-child {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .projects-grid > .project-card:first-child .project-visual {
    height: 100%;
    aspect-ratio: auto;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

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

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

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

  .system-node:nth-child(2)::after {
    display: none;
  }

  .case-layout {
    grid-template-columns: 1fr;
  }

  .case-sidebar {
    display: none;
  }
}

@media (min-width: 761px) and (max-height: 820px) {
  body[data-page="home"] .section {
    padding-block: 2.5rem;
  }

  body[data-page="home"] .section-heading {
    margin-bottom: 1.75rem;
    gap: 0.65rem;
  }

  body[data-page="home"] .section-heading h2 {
    font-size: clamp(1.9rem, 3.6vw, 3rem);
  }

  .home-intro {
    padding-block: 0.55rem;
    gap: 0.5rem;
  }

  .quote-card {
    padding: 0.55rem 0.8rem;
    gap: 0.6rem;
  }

  .quote-card .eyebrow {
    font-size: 0.68rem;
  }

  .quote-mark {
    font-size: 2.25rem;
  }

  .quote-copy {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  .quote-meta {
    font-size: 0.58rem;
  }

  .hero {
    padding-block: 0.6rem;
  }

  .hero h1 {
    margin-block: 0.48rem 0.62rem;
    font-size: clamp(2.35rem, min(4.7vw, 7vh), 3.8rem);
  }

  .hero-summary {
    font-size: 0.94rem;
    line-height: 1.4;
  }

  .availability {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .availability-dot {
    margin-top: 0.34rem;
  }

  .hero-actions {
    margin-top: 0.65rem;
  }

  .hero-actions .button {
    min-height: 42px;
    padding-block: 0.55rem;
  }

  .inline-links {
    margin-top: 0.3rem;
  }

  .inline-link {
    min-height: 32px;
    font-size: 0.9rem;
  }

  .stats-grid {
    margin-top: 0.55rem;
  }

  .stat {
    padding: 0.5rem 0.65rem;
  }

  .stat dd {
    font-size: 0.82rem;
  }

  .portrait-label {
    right: 0.7rem;
    bottom: 0.7rem;
    left: 0.7rem;
    padding: 0.65rem 0.75rem;
  }
}

@media (min-width: 761px) and (max-height: 620px) {
  .resume-dialog {
    overflow-y: auto;
  }

  .resume-drawer-inner {
    min-height: 36rem;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 68px;
    --space-8: 3.5rem;
    --space-9: 4.5rem;
  }

  .brand-name {
    display: none;
  }

  .hero,
  .page-hero,
  .visual-detail-hero {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-block: 1.75rem 2.75rem;
    gap: 2.25rem;
  }

  .home-intro {
    display: block;
    min-height: 0;
    padding-block: 0.75rem 0;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .hero-visual {
    width: min(100%, 330px);
    justify-self: center;
  }

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

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

  .quote-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .quote-meta {
    grid-column: 2;
    justify-items: start;
  }

  .project-carousel {
    --visible-projects: 1;
  }

  .project-position {
    text-align: left;
  }

  .project-carousel-frame {
    gap: 0.35rem;
  }

  .project-track .project-card {
    flex-basis: 100%;
  }

  .project-arrow {
    width: 42px;
    height: 42px;
  }

  .projects-grid > .project-card:first-child {
    display: flex;
    grid-column: auto;
  }

  .projects-grid > .project-card:first-child .project-visual {
    aspect-ratio: 16 / 10;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .skills-grid,
  .about-detail-grid,
  .visual-card-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .about-detail-grid .content-card:first-child {
    grid-column: auto;
  }

  .experience-card {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .education-card {
    grid-template-columns: auto 1fr;
  }

  .education-date {
    grid-column: 2;
  }

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

  .about-collage {
    height: auto;
    min-height: 60rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(10, 5.5rem);
  }

  .about-collage img:nth-child(1) { grid-area: 1 / 1 / 4 / 3; }
  .about-collage img:nth-child(2) { grid-area: 1 / 3 / 3 / 4; }
  .about-collage img:nth-child(3) { grid-area: 3 / 3 / 4 / 4; }
  .about-collage img:nth-child(4) { grid-area: 4 / 1 / 7 / 2; }
  .about-collage img:nth-child(5) { grid-area: 4 / 2 / 6 / 4; }
  .about-collage img:nth-child(6) { grid-area: 6 / 2 / 7 / 3; }
  .about-collage img:nth-child(7) { grid-area: 6 / 3 / 7 / 4; }
  .about-collage img:nth-child(8) { grid-area: 7 / 1 / 9 / 2; }
  .about-collage img:nth-child(9) { grid-area: 7 / 2 / 9 / 4; }
  .about-collage img:nth-child(10) { grid-area: 9 / 1 / 11 / 2; }
  .about-collage img:nth-child(11) { grid-area: 9 / 2 / 10 / 4; }
  .about-collage img:nth-child(12) { grid-area: 10 / 2 / 11 / 4; }

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

  .gallery-tile,
  .gallery-tile.wide,
  .gallery-tile.full,
  .gallery-tile.half {
    grid-column: auto;
  }

  .visual-link-card-image {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .gallery-tile img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .gallery-tile.wide img,
  .gallery-tile.full img {
    aspect-ratio: 16 / 9;
  }

  .gallery-tile.portrait img {
    aspect-ratio: 4 / 5;
  }

  .system-visual {
    grid-template-columns: 1fr;
  }

  .system-node:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -1.15rem;
    transform: translateX(50%) rotate(90deg);
  }

  .system-node:nth-child(2)::after {
    display: block;
  }

  .resume-dialog {
    width: calc(100% - 1rem);
    height: calc(100svh - 1rem);
    max-height: calc(100svh - 1rem);
    border-radius: var(--radius-lg);
  }

  .resume-drawer-inner {
    padding: 1rem;
  }

  .resume-drawer-header {
    align-items: center;
    gap: 0.75rem;
  }

  .resume-drawer-header .eyebrow,
  .resume-drawer-header p {
    display: none;
  }

  .resume-drawer-header h3 {
    max-width: none;
    margin: 0;
    font-size: clamp(1.25rem, 5vw, 1.6rem);
  }

  .resume-drawer-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    padding-top: 0.75rem;
    gap: 0.75rem;
  }

  .resume-drawer-copy {
    padding: 0.8rem;
  }

  .resume-drawer-kicker,
  .resume-drawer-copy p {
    display: none;
  }

  .resume-drawer-copy h4 {
    margin: 0;
    font-size: 1rem;
  }

  .resume-preview-controls {
    display: grid;
    margin-top: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .resume-preview-controls .button {
    min-height: 44px;
    padding: 0.55rem;
    font-size: 0.82rem;
  }

  .image-lightbox {
    width: calc(100% - 1rem);
    height: calc(100svh - 1rem);
    max-height: calc(100svh - 1rem);
    border-radius: var(--radius-lg);
  }

  .image-lightbox-figure figcaption {
    padding-inline: 0.5rem;
  }

  .media-grid,
  .case-navigation {
    grid-template-columns: 1fr;
  }

  .case-navigation a:last-child {
    text-align: left;
  }

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

  .architecture-step:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -1.35rem;
    transform: translateX(50%) rotate(90deg);
  }

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

@media (max-width: 480px) {
  .container,
  .nav-shell {
    width: min(calc(100% - 1.25rem), var(--max-width));
  }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.6rem);
  }

  .hero-actions .button,
  .contact-actions .button,
  .resume-preview-controls .button {
    width: 100%;
  }

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

  .experience-card {
    margin-left: 1.8rem;
  }

  .experience-card::before {
    left: -1.57rem;
  }

  .timeline::before {
    left: 0.65rem;
  }

  .education-card {
    padding: 1.25rem;
  }

  .education-mark {
    width: 3.5rem;
    height: 3.5rem;
  }

  .project-card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-carousel-frame {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .project-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .about-collage {
    min-height: 52rem;
    grid-template-rows: repeat(10, 4.75rem);
  }

  .back-to-top {
    right: 0.75rem;
    bottom: 0.75rem;
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::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 print {
  .site-header,
  .site-footer,
  .skip-link,
  .button,
  .inline-links {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .section {
    padding-block: 2rem;
  }
}
