:root {
  --bg: #fff;
  --surface: #fff;
  --surface-solid: #fafafa;
  --ink: #0a0a0a;
  --muted: #737373;
  --line: #e9e9e9;
  --blue: #0a0a0a;
  --blue-dark: #171717;
  --blue-soft: #f5f5f5;
  --green: #525252;
  --shadow: 0 24px 80px rgba(10, 10, 10, .1);
  --selection-bg: #0a0a0a;
  --selection-fg: #fff;
  --mono: "JetBrains Mono", monospace;
  --sans: "DM Sans", sans-serif;
  --container: 1180px;
  --page-gutter: 24px;
}

body.dark {
  --bg: #0c0c0f;
  --surface: #18181b;
  --surface-solid: #1e1e22;
  --ink: #f4f4f5;
  --muted: #a0a0a8;
  --line: #2a2a30;
  --blue: #f4f4f5;
  --blue-dark: #e4e4e8;
  --blue-soft: #1e1e22;
  --green: #b8b8c0;
  --shadow: 0 24px 90px rgba(0, 0, 0, .36);
  --selection-bg: #fafafa;
  --selection-fg: #0a0a0a;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-fg);
}

html {
  zoom: .9;
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  transition: background-color .35s ease, color .35s ease;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.nav-shell {
  display: flex;
  align-items: center;
  width: min(var(--container), calc(100% - var(--page-gutter) - var(--page-gutter)));
  min-height: 74px;
  margin: auto;
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 600;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  letter-spacing: -.06em;
}

.brand-name {
  white-space: nowrap;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  position: relative;
  padding: 10px 13px;
  color: var(--muted);
  font-size: .89rem;
  font-weight: 500;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 5px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 14px;
}

.sidebar-theme {
  display: none;
}

.nav-contact {
  padding: 9px 15px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: .84rem;
  font-weight: 600;
}

.theme-toggle,
.menu-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.theme-track {
  position: relative;
  display: block;
  width: 51px;
  height: 29px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
}

.theme-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 14px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
  transition: transform .3s ease;
}

body.dark .theme-thumb {
  transform: translateX(22px);
  color: var(--muted);
}

.menu-toggle {
  display: none;
}

.section {
  width: min(var(--container), calc(100% - var(--page-gutter) - var(--page-gutter)));
  margin: 0 auto;
  padding: 120px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 90px;
  min-height: calc(100vh - 74px);
  padding-top: 110px;
}

.hero-copy,
.hero-visual {
  min-width: 0;
}

.eyebrow,
.section-index,
.mono-label,
.project-topline {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .09em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 14%, transparent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.7rem, 6.4vw, 6.8rem);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.075em;
}

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

.hero-lead {
  max-width: 640px;
  margin: 30px 0 34px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.24rem);
  line-height: 1.75;
}

.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero-actions .button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .015em;
  text-transform: lowercase;
}

.hero-actions .button:hover,
.hero-actions .button:focus-visible {
  transform: none;
  color: var(--ink);
}

.hero-actions .external-arrow {
  width: .82em;
  height: .82em;
  flex-basis: .82em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 51px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: .91rem;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

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

.external-arrow {
  display: inline-block;
  width: .95em;
  height: .95em;
  flex: 0 0 .95em;
  vertical-align: -.12em;
}

.button.primary {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: var(--bg);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--blue-dark) 25%, transparent);
}

.button.ghost {
  background: var(--surface);
}

.button.resume-button {
  border-color: var(--line);
  background: var(--surface-solid);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(10, 10, 10, .12);
}

.button.github-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 14px 28px rgba(10, 10, 10, .16);
}

.button.linkedin-button {
  border-color: var(--muted);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 14px 28px rgba(10, 10, 10, .1);
}

.hero-actions .button.resume-button,
.hero-actions .button.github-button,
.hero-actions .button.linkedin-button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

/* Keep every hero link identical in both light and dark themes. */
.hero-actions .button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.hero-actions .button:hover,
.hero-actions .button:focus-visible {
  transform: none;
  color: var(--ink);
}

.hero-meta {
  display: flex;
  gap: 36px;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-meta div {
  display: grid;
  gap: 3px;
}

.hero-meta span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero-meta strong {
  font-size: .91rem;
  font-weight: 600;
}

.hero-visual {
  position: relative;
}

.hero-image {
  display: block;
  width: min(100%, 540px);
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  align-items: start;
  gap: 60px;
  margin-bottom: 70px;
}

.section-index {
  margin: 10px 0 0;
  color: var(--blue);
  font-size: .69rem;
  font-weight: 600;
}

.section-heading h2,
.contact-card h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.7vw, 4.9rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.06em;
}

.about-section {
  border-top: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}

.about-copy {
  padding-left: calc(40.8% + 7px);
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--blue);
  font-size: .91rem;
  font-weight: 600;
}

.text-link span {
  transition: transform .2s ease;
}

.text-link:hover span {
  transform: translate(3px, -3px);
}

.about-copy .text-link {
  grid-column: 1 / -1;
}

.skill-board {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(10, 10, 10, .07);
}

.mono-label {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .65rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-list span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-solid);
  font-family: var(--mono);
  font-size: .7rem;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.skill-list span:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.code-line {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
}

.code-line span {
  margin-right: 20px;
  opacity: .5;
}

.code-line em {
  color: var(--green);
  font-style: normal;
}

.github-contributions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.github-contributions-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.github-contributions-heading .mono-label {
  margin: 0;
}

.github-contributions-heading a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
}

.github-chart-scroll {
  width: 100%;
  overflow: hidden;
}

.github-chart-scroll > a {
  display: block;
  width: 100%;
}

.github-chart-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

body.dark .github-chart-image {
  filter: invert(1) hue-rotate(180deg) saturate(.85);
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 1fr 60px 1.45fr;
  gap: 30px;
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  padding-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
}

.timeline-marker {
  position: relative;
  display: flex;
  justify-content: center;
}

.timeline-marker::after {
  content: "";
  position: absolute;
  top: 19px;
  bottom: -62px;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-marker span {
  position: relative;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 7px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.timeline-content .company {
  margin: 0 0 6px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.timeline-content h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -.035em;
}

.timeline-content > p:last-child {
  max-width: 590px;
  margin: 12px 0 0;
  color: var(--muted);
}

.row-heading {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.row-heading .text-link {
  margin-bottom: 9px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  min-height: 370px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 15px 45px rgba(10, 10, 10, .06);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.project-card:hover {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--blue) 45%, var(--line));
  box-shadow: var(--shadow);
}

.project-featured {
  grid-row: span 2;
  min-height: 758px;
  display: flex;
  flex-direction: column;
}

.project-topline {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .61rem;
}

.project-graphic {
  position: relative;
  flex: 1;
  min-height: 330px;
  margin: 30px 0;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(140deg, var(--surface-solid), var(--surface)),
    var(--surface-solid);
}

.water-graphic::before,
.water-graphic::after {
  content: "";
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  border-radius: 50%;
}

.water-graphic::before { width: 280px; height: 280px; top: 25px; left: 55px; }
.water-graphic::after { width: 210px; height: 210px; top: 60px; left: 90px; }

.water-drop {
  position: absolute;
  z-index: 2;
  top: 95px;
  left: 50%;
  width: 90px;
  height: 120px;
  border-radius: 60% 40% 65% 35% / 65% 45% 55% 35%;
  background: linear-gradient(145deg, var(--muted), var(--blue-dark));
  box-shadow: 0 30px 45px rgba(10, 10, 10, .24);
  transform: translateX(-50%) rotate(45deg);
}

.dashboard-lines {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 25px;
  display: flex;
  align-items: end;
  gap: 10px;
  height: 85px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  backdrop-filter: blur(10px);
}

.dashboard-lines i {
  flex: 1;
  height: 30%;
  border-radius: 4px 4px 2px 2px;
  background: var(--blue-soft);
}

.dashboard-lines i:nth-child(2) { height: 78%; background: var(--blue); }
.dashboard-lines i:nth-child(3) { height: 52%; }

.project-copy h3,
.project-card > h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.035em;
}

.project-copy p,
.project-card > p {
  margin: 0;
  color: var(--muted);
  font-size: .94rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}

.project-tags span {
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--mono);
  font-size: .58rem;
}

.project-symbol {
  display: grid;
  place-items: center;
  width: 105px;
  height: 105px;
  margin: 70px auto 52px;
  border: 1px solid color-mix(in srgb, var(--blue) 34%, transparent);
  border-radius: 50%;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 3.5rem;
  font-weight: 300;
  box-shadow: inset 0 0 40px color-mix(in srgb, var(--blue) 10%, transparent);
}

.project-symbol.play {
  padding-left: 7px;
  font-size: 2rem;
}

.mini-projects {
  display: grid;
  gap: 0;
  margin-top: 47px;
  border-top: 1px solid var(--line);
}

.mini-projects span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 600;
}

.mini-projects i {
  color: var(--blue);
  font-style: normal;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}

.credential-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 125px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.credential-card:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.institution-logo {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  filter: grayscale(100%) drop-shadow(0 6px 12px rgba(10, 10, 10, .12));
  transition: filter .25s ease, transform .25s ease;
}

.credential-card:hover .institution-logo,
.credential-card:focus-within .institution-logo {
  filter: drop-shadow(0 6px 12px rgba(10, 10, 10, .12));
  transform: scale(1.06);
}

.credential-date {
  align-self: start;
  margin-top: 4px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: .65rem;
  white-space: nowrap;
}

.credential-card h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 600;
}

.credential-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .79rem;
}

.contact-section {
  padding-bottom: 70px;
}

.contact-card {
  position: relative;
  padding: clamp(38px, 7vw, 90px);
  overflow: hidden;
  border-radius: 28px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 35px 90px rgba(10, 10, 10, .25);
}

.contact-card::before {
  content: "";
  position: absolute;
  width: 470px;
  height: 470px;
  top: -230px;
  right: -80px;
  border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 70px color-mix(in srgb, var(--bg) 3.5%, transparent), 0 0 0 140px color-mix(in srgb, var(--bg) 2.5%, transparent);
}

.contact-card .section-index {
  position: relative;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.contact-card h2 {
  position: relative;
  margin: 22px 0;
}

.contact-card > p:not(.section-index) {
  position: relative;
  max-width: 520px;
  margin-bottom: 35px;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  font-size: 1.04rem;
}

.button.light {
  position: relative;
  border-color: var(--bg);
  background: var(--bg);
  color: var(--ink);
}

.contact-github {
  position: relative;
  color: color-mix(in srgb, var(--bg) 84%, transparent);
  font-family: var(--mono);
  font-size: .73rem;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--container), calc(100% - var(--page-gutter) - var(--page-gutter)));
  margin: auto;
  padding: 28px 0 38px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .64rem;
}

footer p { margin: 0; }
footer a { color: var(--ink); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .75s ease var(--delay, 0s), transform .75s cubic-bezier(.22, 1, .36, 1) var(--delay, 0s);
}

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

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 0;
  }
  .nav-shell { min-height: 62px; }
  .nav-shell { padding: 0; }
  .nav-actions { display: none; }
  .menu-toggle {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    margin-left: auto;
    flex: 0 0 38px;
    z-index: 2;
  }
  .menu-toggle span:not(.sr-only) {
    position: absolute;
    left: 8px;
    width: 22px;
    height: 1px;
    background: var(--ink);
    transition: transform .25s ease, top .25s ease;
  }
  .menu-toggle span:first-child { top: 14px; }
  .menu-toggle span:nth-child(2) { top: 22px; }
  .menu-toggle[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 18px; transform: rotate(-45deg); }
  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    display: flex;
    width: min(82vw, 360px);
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 84px 28px 32px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface-solid);
    box-shadow: -18px 0 45px rgba(10, 10, 10, .14);
    opacity: 1;
    visibility: visible;
    transform: translateX(105%);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .nav-links a:last-child { border: 0; }
  .sidebar-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .nav-actions { margin-left: 5px; }
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    min-height: auto;
    padding-top: 84px;
  }
  .hero-copy {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
  }
  .hero-copy .eyebrow { justify-content: center; }
  .hero-copy .hero-lead { margin-inline: auto; }
  .hero-copy .hero-lead,
  .hero-copy .hero-actions,
  .hero-copy .hero-meta { text-align: left; }
  .hero-copy .hero-actions,
  .hero-copy .hero-meta { justify-content: flex-start; }
  .hero-copy .hero-lead { margin-left: 0; }
  .hero-visual {
    order: -1;
    width: min(580px, 100%);
    margin: auto;
  }
  .section-heading,
  .about-grid,
  .about-copy {
    grid-template-columns: 1fr;
  }
  .about-copy {
    padding-left: 0;
    gap: 20px;
  }
  .about-copy .text-link { grid-column: auto; }
  .timeline-item { grid-template-columns: 90px 30px 1fr; }
}

@media (max-width: 700px) {
  :root { --page-gutter: 15px; }
  .site-header { padding: 0; }
  .nav-shell { padding: 0 8px 0 12px; }
  .brand { gap: 7px; }
  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: .72rem;
  }
  .brand-name { font-size: .74rem; }
  .nav-actions {
    display: none;
  }
  .theme-track {
    width: 47px;
    height: 28px;
  }
  .theme-thumb {
    width: 22px;
    height: 22px;
  }
  body.dark .theme-thumb {
    transform: translateX(19px);
  }
  .nav-links { inset: 0 0 0 auto; }
  .section {
    padding: 82px 0;
  }
  .hero {
    gap: 38px;
    padding-top: 70px;
  }
  .hero h1 { font-size: clamp(2.85rem, 12.5vw, 3.5rem); }
  .hero-lead { font-size: 1rem; }
  .hero-meta { flex-direction: column; gap: 16px; margin-top: 38px; }
  .hero-visual { width: min(100%, 480px); }
  .hero-image { border-radius: 16px; }
  .skill-board { padding: 20px; }
  .section-heading { gap: 20px; margin-bottom: 45px; }
  .section-heading h2,
  .contact-card h2 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .row-heading { grid-template-columns: 1fr; }
  .projects-grid,
  .credentials-grid { grid-template-columns: 1fr; }
  .project-featured { min-height: 670px; }
  .project-card { min-height: 350px; }
  .project-featured { grid-row: auto; }
  .credential-card:nth-child(odd) { border-right: 0; }
  .credential-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }
  .credential-date {
    grid-column: 2;
    margin-top: -8px;
  }
  .timeline-item {
    grid-template-columns: 58px 16px 1fr;
    gap: 13px;
    padding: 34px 0;
  }
  .timeline-content h3 { font-size: 1.25rem; }
  .timeline-marker::after { bottom: -55px; }
  .contact-card { border-radius: 22px; }
  .contact-actions { align-items: flex-start; flex-direction: column; }
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .footer-note {
    display: block;
    max-width: 32ch;
    margin: 0;
    font-size: .7rem;
    line-height: 1.55;
  }
}

/* Unified project cards */
.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  display: flex;
  min-height: 440px;
  padding: 16px;
  flex-direction: column;
}

.project-topline {
  margin: 20px 10px 12px;
  font-family: var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-image-placeholder {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--surface-solid), var(--surface)), var(--surface-solid);
}

.project-image {
  display: block;
  width: 100%;
  min-height: 180px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  object-fit: cover;
  object-position: top center;
  background: var(--surface-solid);
  filter: grayscale(100%);
  transition: filter .25s ease, transform .25s ease;
}

.project-card:hover .project-image,
.project-card:focus-within .project-image {
  filter: grayscale(0);
  transform: scale(1.02);
}

.project-image-placeholder::before,
.project-image-placeholder::after {
  content: "";
  position: absolute;
  width: 145px;
  height: 145px;
  border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
  border-radius: 50%;
  transform: translate(-38px, -20px);
}

.project-image-placeholder::after {
  width: 100px;
  height: 100px;
  transform: translate(55px, 43px);
}

.project-image-placeholder span {
  position: absolute;
  z-index: 1;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-solid) 80%, transparent);
  color: var(--blue);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-card > h3 {
  margin: 0 10px 10px;
  font-size: 1.35rem;
}

.project-card > p {
  margin: 0 10px;
}

.project-card .project-tags {
  margin: 18px 10px 14px;
}

.project-card .project-tags span {
  font-size: .57rem;
}

.project-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: auto 10px 6px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  text-decoration: none;
}

.project-link span {
  font-size: 1rem;
  transition: transform .2s ease;
}

.project-link:hover span { transform: translate(3px, -3px); }

@media (max-width: 980px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 410px; }
  .credential-card { grid-template-columns: 56px minmax(0, 1fr); }
  .institution-logo { width: 52px; height: 52px; }
}

@media (max-width: 380px) {
  .nav-shell { padding: 0 5px 0 8px; }
  .brand { gap: 5px; }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .brand-name { font-size: .68rem; }
  .menu-toggle {
    width: 34px;
    flex-basis: 34px;
  }
  .theme-track { width: 43px; }
  body.dark .theme-thumb { transform: translateX(15px); }
  .skill-board { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
