:root {
  --bg: #060a08;
  --bg-soft: #0a100d;
  --panel: #0d1511;
  --panel-light: #111c16;
  --text: #eef5f0;
  --muted: #8e9d94;
  --faint: #56635b;
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.12);
  --gold-light: #f0d58a;
  --line: rgba(238, 245, 240, 0.12);
  --line-accent: rgba(212, 175, 55, 0.34);
  --shell: 1180px;
  --sans: "Segoe UI Variable Display", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

button {
  color: inherit;
  font: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.shell,
.header-shell {
  width: min(calc(100% - 44px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--accent);
  font: 700 0.75rem/1 var(--mono);
  transition: transform 180ms ease;
}

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

.page-grid {
  position: fixed;
  z-index: 1000;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.008) 4px
    ),
    linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 100% 4px, 64px 64px, 64px 64px;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.scroll-progress {
  position: fixed;
  z-index: 1500;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.03);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--gold-light));
}

/* Header */

.site-header {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled,
.site-header.menu-active {
  border-color: var(--line);
  background: rgba(6, 10, 8, 0.93);
  backdrop-filter: blur(14px);
}

.header-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 11px;
  min-height: 44px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-accent);
  color: var(--accent);
  font: 700 0.78rem/1 var(--mono);
}

.brand-text {
  color: var(--text);
  font: 700 0.63rem/1.05 var(--mono);
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.1vw, 32px);
}

.site-nav a {
  position: relative;
  padding: 12px 0;
  color: var(--muted);
  font: 600 0.64rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--accent);
  content: "";
  transition: transform 240ms var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

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

.header-download {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
  min-height: 39px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 700 0.66rem/1 var(--mono);
  letter-spacing: 0.08em;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.header-download:hover {
  border-color: var(--line-accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-accent);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 1px;
  background: var(--accent);
  transition: top 220ms ease, transform 220ms ease;
}

.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 24px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* Home */

.home {
  position: relative;
  min-height: 940px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 77% 31%, rgba(212, 175, 55, 0.09), transparent 26%),
    radial-gradient(circle at 18% 72%, rgba(240, 213, 138, 0.045), transparent 28%),
    var(--bg);
}

.home::before {
  position: absolute;
  right: -12vw;
  bottom: -28vw;
  width: 62vw;
  height: 62vw;
  border: 1px solid rgba(212, 175, 55, 0.07);
  border-radius: 50%;
  box-shadow:
    0 0 0 7vw rgba(212, 175, 55, 0.012),
    0 0 0 14vw rgba(212, 175, 55, 0.01);
  content: "";
  pointer-events: none;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(55px, 8vw, 120px);
  min-height: 860px;
  padding-top: 110px;
  padding-bottom: 118px;
}

.home-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.overline,
.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--accent);
  font: 600 0.68rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overline::before,
.panel-label::before {
  width: 26px;
  height: 1px;
  background: currentColor;
  content: "";
}

.home h1 {
  max-width: 740px;
  margin-top: 28px;
  color: var(--text);
  font: 660 clamp(5.4rem, 9.7vw, 9.4rem)/0.78 var(--sans);
  letter-spacing: -0.08em;
}

.home h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 245, 240, 0.52);
}

.home-summary {
  max-width: 665px;
  margin-top: 44px;
  padding-left: 24px;
  border-left: 1px solid var(--accent);
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.72;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 35px;
  padding-left: 25px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  min-height: 54px;
  padding: 0 20px;
  border: 1px solid var(--line);
  font: 700 0.68rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 220ms var(--ease), color 180ms ease, background-color 180ms ease;
}

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

.button-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--gold-light);
}

.button-secondary {
  color: var(--text);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.home-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 51px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-facts div {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.home-facts div:first-child { padding-left: 0; }
.home-facts div:last-child { border-right: 0; }
.home-facts dt { color: var(--faint); font: 600 0.56rem/1 var(--mono); letter-spacing: 0.09em; text-transform: uppercase; }
.home-facts dd { margin-top: 8px; color: var(--text); font-size: 0.77rem; line-height: 1.4; }

.identity-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  justify-self: end;
}

.portrait-frame {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 30px 30px;
}

.portrait-frame::after {
  position: absolute;
  inset: 16px;
  background: linear-gradient(to top, rgba(6, 10, 8, 0.42), transparent 48%);
  content: "";
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.68) contrast(1.05);
}

.corner {
  position: absolute;
  z-index: 3;
  width: 25px;
  height: 25px;
  border-color: var(--accent);
  border-style: solid;
}

.corner-tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.corner-tr { top: 6px; right: 6px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; }
.corner-br { right: 6px; bottom: 6px; border-width: 0 1px 1px 0; }

.portrait-scan {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  left: 16px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.55);
  opacity: 0.4;
}

.identity-meta {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 5px 14px;
  padding: 17px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.identity-meta span {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font: 600 0.59rem/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.identity-meta strong { color: var(--text); font-size: 0.92rem; font-weight: 600; }
.identity-meta small { color: var(--muted); font: 500 0.61rem/1.3 var(--mono); }

.home-ticker {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-top: 1px solid var(--line);
  background: rgba(6, 10, 8, 0.76);
}

.home-ticker .shell {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.home-ticker span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 70px;
  padding: 0 17px 0 36px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font: 600 0.6rem/1.3 var(--mono);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.home-ticker span:first-child { border-left: 1px solid var(--line); }
.home-ticker span::before {
  position: absolute;
  left: 17px;
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
  content: "";
}

/* Shared sections */

.content-section {
  position: relative;
  padding: clamp(7rem, 10vw, 10rem) 0;
  border-bottom: 1px solid var(--line);
}

.content-section::before {
  position: absolute;
  top: 0;
  left: max(22px, calc((100vw - var(--shell)) / 2));
  width: 34px;
  height: 1px;
  background: var(--accent);
  content: "";
}

.section-header {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: start;
  margin-bottom: clamp(60px, 7vw, 95px);
}

.section-label {
  padding-top: 10px;
  color: var(--muted);
  font: 600 0.65rem/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-label span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 15px;
  color: var(--accent);
}

.section-label span::before {
  content: "/";
  color: var(--gold-light);
}

.section-header h2 {
  max-width: 870px;
  color: var(--text);
  font: 650 clamp(3.5rem, 7vw, 7rem)/0.87 var(--sans);
  letter-spacing: -0.068em;
}

.section-header h2 em {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.045em;
}

.log-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 47px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 600 0.57rem/1 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* About */

.about {
  background:
    radial-gradient(circle at 16% 34%, rgba(240, 213, 138, 0.035), transparent 26%),
    var(--bg-soft);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(520px, 1.25fr);
  gap: clamp(55px, 8vw, 120px);
  align-items: start;
}

.profile-copy {
  position: sticky;
  top: 120px;
  padding-top: 8px;
}

.profile-copy p {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.78;
}

.profile-copy p:first-child {
  color: var(--text);
  font-size: clamp(1.35rem, 2.2vw, 1.82rem);
  line-height: 1.48;
}

.profile-copy p + p {
  margin-top: 27px;
}

.education-log {
  border: 1px solid var(--line);
  background: rgba(6, 10, 8, 0.42);
}

.education-item {
  position: relative;
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 12px 25px;
  padding: 27px 25px;
  border-bottom: 1px solid var(--line);
}

.education-item:last-child { border-bottom: 0; }
.education-item::before {
  position: absolute;
  top: 32px;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  background: var(--bg-soft);
  content: "";
}

.education-date {
  grid-row: 1 / span 3;
  padding-top: 4px;
  color: var(--accent);
  font: 600 0.58rem/1.4 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.education-item h3 {
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.4;
}

.education-item p,
.education-item small {
  color: var(--muted);
  font-size: 0.82rem;
}

.education-item small {
  font-family: var(--mono);
  font-size: 0.63rem;
}

.education-primary {
  background: var(--accent-soft);
}

/* Skills */

.skills {
  background: var(--bg);
}

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

.skill-group {
  min-height: 440px;
  padding: clamp(27px, 3.4vw, 43px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 21, 17, 0.38);
  transition: background-color 220ms ease, border-color 220ms ease;
}

.skill-group:hover {
  background: var(--panel);
  border-color: var(--line-accent);
}

.skill-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.skill-heading span {
  color: var(--accent);
  font: 600 0.62rem/1 var(--mono);
}

.skill-heading h3 {
  max-width: 310px;
  color: var(--text);
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-align: right;
}

.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 33px;
}

.skill-group li,
.project-tags li {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 0.64rem/1 var(--mono);
}

.skill-group li::before {
  margin-right: 8px;
  color: var(--accent);
  content: "+";
}

/* Experience */

.experience {
  background:
    linear-gradient(rgba(212, 175, 55, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.027) 1px, transparent 1px),
    var(--bg-soft);
  background-size: 64px 64px;
}

.lab-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  border: 1px solid var(--line-accent);
  background: rgba(6, 10, 8, 0.76);
}

.lab-panel::before,
.lab-panel::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent);
  border-style: solid;
  content: "";
}

.lab-panel::before { top: 9px; left: 9px; border-width: 1px 0 0 1px; }
.lab-panel::after { right: 9px; bottom: 9px; border-width: 0 1px 1px 0; }

.lab-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 590px;
  padding: clamp(35px, 5vw, 64px);
  border-right: 1px solid var(--line);
}

.lab-summary h3 {
  max-width: 500px;
  margin-top: 28px;
  color: var(--text);
  font: 640 clamp(2.5rem, 4.5vw, 4.65rem)/0.94 var(--sans);
  letter-spacing: -0.055em;
}

.lab-summary > p:not(.panel-label) {
  max-width: 500px;
  margin-top: 28px;
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  align-self: flex-start;
  gap: 45px;
  min-width: 245px;
  margin-top: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-accent);
  color: var(--text);
  font: 700 0.66rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.text-link span { color: var(--accent); font-size: 1.05rem; }
.text-link:hover { border-color: var(--accent); color: var(--accent); }

.lab-topics {
  align-self: center;
  margin: clamp(20px, 3.4vw, 44px);
  border: 1px solid var(--line);
  background: var(--bg);
}

.lab-topics li {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  min-height: 54px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.84rem;
}

.lab-topics li:last-child { border-bottom: 0; }
.lab-topics li span { color: var(--accent); font: 600 0.57rem/1 var(--mono); }

/* Projects */

.projects {
  background: var(--bg);
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: clamp(26px, 3.3vw, 42px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(13, 21, 17, 0.46);
  transition: transform 250ms var(--ease), border-color 200ms ease, background-color 200ms ease;
}

.project-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  content: "";
  opacity: 0.42;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-accent);
  background: var(--panel);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font: 600 0.57rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-top span:first-child { color: var(--accent); }

.project-content {
  flex: 1;
  padding-top: 54px;
}

.project-content h3 {
  max-width: 500px;
  color: var(--text);
  font: 640 clamp(2.2rem, 3.8vw, 3.8rem)/0.98 var(--sans);
  letter-spacing: -0.055em;
}

.project-content p {
  max-width: 500px;
  margin-top: 24px;
  color: var(--muted);
  line-height: 1.72;
}

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

.project-tags li {
  min-height: 29px;
  color: var(--muted);
  font-size: 0.58rem;
}

.project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font: 700 0.64rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-link i {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  color: var(--accent);
  font: normal 1rem/1 var(--sans);
  transition: background-color 180ms ease, color 180ms ease;
}

.project-link:hover i { background: var(--accent); color: var(--bg); }

/* Contact */

.contact {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 70%, rgba(212, 175, 55, 0.08), transparent 25%),
    var(--bg-soft);
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: clamp(40px, 7vw, 90px);
  align-items: start;
}

.contact-primary {
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-accent);
  background: var(--panel);
}

.contact-email {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-top: 35px;
  overflow-wrap: anywhere;
  color: var(--text);
  font: 620 clamp(2rem, 4.6vw, 4.4rem)/0.98 var(--sans);
  letter-spacing: -0.055em;
}

.contact-email span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 1.5rem;
}

.copy-button {
  min-height: 42px;
  margin-top: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 600 0.61rem/1 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.copy-button:hover { border-color: var(--line-accent); color: var(--accent); }

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

.contact-details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 23px 4px;
  border-bottom: 1px solid var(--line);
}

.contact-details dt {
  color: var(--faint);
  font: 600 0.59rem/1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-details dd {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.contact-details a { transition: color 180ms ease; }
.contact-details a:hover { color: var(--accent); }

/* Footer and feedback */

.site-footer {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-footer .shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  color: var(--faint);
  font: 600 0.57rem/1.4 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.site-footer p:nth-child(2) { text-align: center; }
.site-footer a { justify-self: end; color: var(--muted); transition: color 180ms ease; }
.site-footer a:hover { color: var(--accent); }

.toast {
  position: fixed;
  z-index: 1600;
  right: 20px;
  bottom: 20px;
  padding: 13px 16px;
  transform: translateY(20px);
  border: 1px solid var(--line-accent);
  background: var(--panel-light);
  color: var(--text);
  font: 600 0.64rem/1 var(--mono);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 260ms var(--ease);
}

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

/* Reveal */

.reveal-enabled .reveal {
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

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

/* Responsive */

@media (max-width: 1040px) {
  .header-shell { grid-template-columns: 1fr auto; }
  .header-download { display: none; }
  .site-nav { grid-column: 2; grid-row: 1; }
  .home-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr); gap: 45px; }
  .home h1 { font-size: clamp(5rem, 10.8vw, 7.5rem); }
  .about-layout { grid-template-columns: minmax(270px, 0.7fr) minmax(460px, 1.3fr); gap: 50px; }
  .lab-panel { grid-template-columns: 1fr; }
  .lab-summary { min-height: 480px; border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .header-shell { grid-template-columns: 1fr auto; min-height: 68px; }
  .brand-text { display: none; }
  .menu-toggle { display: block; grid-column: 2; grid-row: 1; z-index: 2; }
  .site-nav {
    position: fixed;
    z-index: 1;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    padding: 88px 24px 32px;
    transform: translateY(-102%);
    background:
      linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px),
      rgba(6, 10, 8, 0.985);
    background-size: 48px 48px;
    opacity: 0;
    visibility: hidden;
    transition: transform 420ms var(--ease), opacity 220ms ease, visibility 0s 420ms;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 420ms var(--ease), opacity 220ms ease, visibility 0s;
  }
  .site-nav a {
    width: 100%;
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font: 620 clamp(1.75rem, 7vw, 2.6rem)/1 var(--sans);
    letter-spacing: -0.04em;
    text-transform: none;
  }
  .site-nav a::after { display: none; }
  .home { min-height: auto; }
  .home-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 130px;
    padding-bottom: 68px;
  }
  .home-copy { width: 100%; }
  .home h1 { font-size: clamp(4.2rem, 15.5vw, 7rem); }
  .identity-panel { justify-self: start; max-width: 480px; }
  .home-ticker { position: relative; }
  .home-ticker .shell { grid-template-columns: repeat(2, 1fr); }
  .home-ticker span:nth-child(2) { border-right: 0; }
  .home-ticker span:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .section-header { grid-template-columns: 1fr; gap: 30px; }
  .about-layout { grid-template-columns: 1fr; }
  .profile-copy { position: static; }
  .skills-grid { grid-template-columns: 1fr; }
  .skill-group { min-height: 360px; }
  .projects-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .shell,
  .header-shell { width: min(calc(100% - 36px), var(--shell)); }
  .content-section { padding: 6.5rem 0; }
  .home-layout { padding-top: 116px; }
  .overline { font-size: 0.59rem; }
  .home h1 { margin-top: 23px; font-size: clamp(3.8rem, 18vw, 5.4rem); line-height: 0.82; }
  .home-summary { margin-top: 35px; padding-left: 17px; font-size: 1rem; }
  .home-actions { flex-direction: column; padding-left: 0; }
  .button { width: 100%; }
  .home-facts { grid-template-columns: 1fr; }
  .home-facts div,
  .home-facts div:first-child { padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .home-facts div:last-child { border-bottom: 0; }
  .identity-panel { max-width: 100%; }
  .portrait-frame { padding: 11px; }
  .portrait-frame::after { inset: 11px; }
  .portrait-scan { right: 11px; bottom: 11px; left: 11px; }
  .home-ticker .shell { width: 100%; }
  .home-ticker span { padding-left: 31px; font-size: 0.56rem; }
  .home-ticker span:first-child { border-left: 0; }
  .home-ticker span::before { left: 13px; }
  .section-header { margin-bottom: 50px; }
  .section-header h2 { font-size: clamp(3.2rem, 15vw, 4.7rem); }
  .education-item { grid-template-columns: 1fr; gap: 8px; padding: 24px 19px; }
  .education-date { grid-row: auto; padding: 0 0 8px; }
  .skill-group { min-height: auto; padding: 25px 20px 30px; }
  .skill-heading { flex-direction: column; }
  .skill-heading h3 { text-align: left; }
  .lab-summary { min-height: auto; padding: 54px 23px; }
  .lab-summary h3 { font-size: clamp(2.6rem, 13vw, 3.7rem); }
  .lab-topics { margin: 12px; }
  .lab-topics li { grid-template-columns: 42px 1fr; min-height: 58px; padding-inline: 12px; font-size: 0.78rem; }
  .project-card { min-height: 470px; padding: 24px 20px; }
  .project-content { padding-top: 45px; }
  .project-content h3 { font-size: clamp(2.35rem, 12vw, 3.4rem); }
  .contact-primary { padding: 27px 20px; }
  .contact-email { font-size: clamp(1.75rem, 9vw, 2.8rem); }
  .contact-details div { grid-template-columns: 92px 1fr; }
  .site-footer .shell { grid-template-columns: 1fr auto; min-height: 92px; }
  .site-footer p:nth-child(2) { display: none; }
}

@media (max-width: 380px) {
  .home h1 { font-size: 3.65rem; }
  .home-ticker .shell { grid-template-columns: 1fr; }
  .home-ticker span { border-right: 0; border-bottom: 1px solid var(--line); }
  .home-ticker span:last-child { border-bottom: 0; }
  .contact-details div { grid-template-columns: 1fr; gap: 8px; }
}

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