﻿:root {
  --navy-900: #08182e;
  --navy-800: #0b2545;
  --navy-700: #143a6e;
  --navy-600: #1f5a9c;
  --cream: #f1f7fd;
  --cream-2: #e3eef9;
  --gold: #5b9bd5;
  --gold-deep: #2f6ba3;
  --gold-soft: #a9d1ef;
  --ink: #172a41;
  --muted: #5a6f88;
  --line: rgba(11, 37, 69, 0.12);
  --line-dark: rgba(185, 215, 240, 0.22);
  --white: #ffffff;
  --shadow-sm: 0 10px 30px rgba(11, 37, 69, 0.07);
  --shadow-md: 0 24px 60px rgba(11, 37, 69, 0.14);
  --radius: 18px;
  --radius-lg: 26px;
  --max: 1120px;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy-900);
  font-weight: 700;
  transition: top 0.2s ease;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 247, 253, 0.88);
  border-bottom: 1px solid rgba(11, 37, 69, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-soft);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-text {
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  position: relative;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--navy-800);
  background: rgba(11, 37, 69, 0.06);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  border-radius: 2px;
  background: var(--navy-800);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 16%, rgba(91, 155, 213, 0.16), transparent 42%),
    radial-gradient(circle at 6% 90%, rgba(47, 107, 163, 0.1), transparent 40%),
    linear-gradient(180deg, #f7fbff 0%, #eaf3fb 100%);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(4.5rem, 9vw, 7.5rem);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/circuit.svg");
  background-size: 220px 220px;
  opacity: 0.75;
  mask-image: radial-gradient(circle at 68% 35%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 68% 35%, black, transparent 78%);
  pointer-events: none;
}

.hero-glow {
  display: none;
}

.hero-glow-one {
  width: 420px;
  height: 420px;
  right: -120px;
  top: -140px;
  background: rgba(91, 155, 213, 0.28);
}

.hero-glow-two {
  width: 360px;
  height: 360px;
  left: -160px;
  bottom: -160px;
  background: rgba(47, 107, 163, 0.18);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

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

.hero .eyebrow {
  color: var(--gold-deep);
}

.hero h1 {
  margin-top: 1.1rem;
  font-size: clamp(2.9rem, 6.5vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--navy-800);
}

.hero-role {
  margin-top: 1.1rem;
  font-size: clamp(0.95rem, 1.7vw, 1.12rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-location svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--gold-deep);
}

.hero-focus {
  margin-top: 1.1rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.75rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

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

.btn-primary {
  background: var(--gold);
  color: var(--navy-900);
  box-shadow: 0 14px 30px rgba(91, 155, 213, 0.22);
}

.btn-primary:hover {
  background: var(--gold-soft);
}

.btn-ghost {
  border-color: rgba(11, 37, 69, 0.22);
  color: var(--navy-800);
  background: rgba(11, 37, 69, 0.03);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.btn-block {
  width: 100%;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.hero-links a:hover {
  color: var(--gold-deep);
}

.hero-links svg {
  width: 17px;
  height: 17px;
}

.hero-visual {
  justify-self: end;
  width: 100%;
  max-width: 440px;
}

.portrait-frame {
  position: relative;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--gold-soft), var(--gold) 45%, #1f5a9c);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
}

.portrait-frame img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 8px);
  background: var(--navy-700);
}

.portrait-accent {
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 62%;
  height: 62%;
  border: 1px solid rgba(91, 155, 213, 0.45);
  border-radius: var(--radius-lg);
  z-index: -1;
}

.portrait-caption {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(241, 247, 253, 0.16);
  border-radius: 14px;
  background: rgba(8, 24, 46, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.caption-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.caption-value {
  font-size: 0.9rem;
  color: var(--cream);
}

/* Sections */
.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: var(--navy-800);
}

.section-intro {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 56ch;
}

/* Skills */
.skills {
  background: var(--cream);
}

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

.skill-card {
  padding: 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 155, 213, 0.55);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.1rem;
  border-radius: 14px;
  background: rgba(91, 155, 213, 0.14);
  color: var(--gold-deep);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.skill-card h3 {
  font-size: 1.15rem;
  color: var(--navy-800);
}

.skill-card ul {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.skill-card li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.skill-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Projects */
.projects {
  background: var(--cream-2);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  max-width: 820px;
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--cream);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 155, 213, 0.6);
  box-shadow: var(--shadow-md);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.project-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--gold-deep);
}

.project-type {
  padding: 0.32rem 0.65rem;
  border: 1px solid rgba(11, 37, 69, 0.14);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-card h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  color: var(--navy-800);
}

.project-card p {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1.4rem;
}

.tag-list li {
  padding: 0.35rem 0.62rem;
  border-radius: 8px;
  background: rgba(11, 37, 69, 0.06);
  color: var(--navy-700);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Education */
.education {
  background: var(--cream);
}

.education-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  padding: clamp(1.7rem, 4vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.education-main {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.education-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 16px;
  background: var(--navy-800);
  color: var(--gold-soft);
}

.education-icon svg {
  width: 27px;
  height: 27px;
}

.education-main h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  color: var(--navy-800);
}

.education-school {
  margin-top: 0.55rem;
  font-weight: 650;
  color: var(--gold-deep);
  font-size: 0.98rem;
}

.education-location {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.education-detail {
  padding-left: clamp(0rem, 3vw, 2rem);
  border-left: 1px solid var(--line);
}

.education-detail h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.education-level {
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.education-card + .education-card {
  margin-top: 1.2rem;
}

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

.certificate-title {
  color: var(--navy-800);
}

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

.certificate-card {
  padding: 1.4rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.certificate-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.certificate-card h3 {
  font-size: 1.05rem;
  color: var(--navy-800);
}

.certificate-card p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.certificate-link {
  color: var(--navy-800);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: rgba(91, 155, 213, 0.6);
}

.certificate-link:hover {
  color: var(--gold-deep);
}

.coursework-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.coursework-list li {
  position: relative;
  padding-left: 1rem;
  color: var(--ink);
  font-size: 0.88rem;
}

.coursework-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Contact */
.contact {
  background: var(--cream-2);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info h2 {
  margin-top: 0.9rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: var(--navy-800);
}

.contact-lead {
  margin-top: 1rem;
  max-width: 42ch;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--gold-deep);
}

.contact-icon svg {
  width: 21px;
  height: 21px;
}

.contact-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a,
.contact-list span:not(.contact-label):not(.contact-icon) {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
  color: var(--navy-800);
  word-break: break-word;
}

.contact-list a {
  text-decoration: underline;
  text-decoration-color: rgba(91, 155, 213, 0.6);
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.contact-list a:hover {
  color: var(--gold-deep);
}

.contact-form-wrap {
  padding: clamp(1.5rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.contact-form .field:nth-of-type(3),
.contact-form .field:nth-of-type(4),
.contact-form .btn,
.form-status,
.form-note {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(11, 37, 69, 0.16);
  border-radius: 12px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7b91ab;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.16);
}

.form-status {
  min-height: 1.4rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-status.is-success {
  color: #226b52;
}

.form-status.is-error {
  color: #a33232;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-note a {
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  background: var(--navy-900);
  color: var(--cream);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer-brand .brand-mark {
  background: var(--gold);
  color: var(--navy-900);
}

.footer-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.footer-role {
  margin-top: 0.12rem;
  font-size: 0.8rem;
  color: rgba(241, 247, 253, 0.62);
}

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

.footer-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241, 247, 253, 0.72);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 1.4rem;
  font-size: 0.8rem;
  color: rgba(241, 247, 253, 0.55);
}

.back-to-top {
  color: var(--gold-soft);
  font-weight: 600;
}

.back-to-top:hover {
  color: var(--cream);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    justify-self: start;
    max-width: 420px;
  }

  .hero-copy {
    max-width: 640px;
  }

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

  .project-grid,
  .education-card,
  .certificate-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .education-detail {
    padding-left: 0;
    padding-top: 1.4rem;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .coursework-list {
    grid-template-columns: 1fr 1fr;
  }

  .contact-info {
    max-width: 620px;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 78px;
  }

  .header-inner {
    min-height: 68px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.8rem;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 1rem;
    border-radius: 10px;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 1.6rem, var(--max));
  }

  .brand-text {
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-links {
    gap: 1rem;
  }

  .portrait-caption {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .coursework-list,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    grid-template-columns: 1fr;
  }

  .contact-form .field:nth-of-type(3),
  .contact-form .field:nth-of-type(4),
  .contact-form .btn,
  .form-status,
  .form-note {
    grid-column: auto;
  }

  .footer-inner,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

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

  .btn,
  .skill-card,
  .project-card {
    transition: none;
  }
}
