body.theme-sand {
  --bg: #f4efe7;
  --bg-elevated: rgba(255, 250, 244, 0.78);
  --panel: rgba(249, 241, 232, 0.92);
  --panel-strong: #eadfd1;
  --text: #1e2a2e;
  --muted: #5f6d70;
  --accent: #b66a3c;
  --accent-soft: rgba(182, 106, 60, 0.14);
  --line: rgba(30, 42, 46, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --page-background:
    radial-gradient(circle at top left, rgba(182, 106, 60, 0.1), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(135, 170, 156, 0.12), transparent 24%),
    linear-gradient(135deg, #f7f2ea 0%, #efe6d9 52%, #f9f4ee 100%);
}

body.theme-copper {
  --bg: #f6f1eb;
  --bg-elevated: rgba(255, 251, 246, 0.8);
  --panel: rgba(245, 237, 228, 0.94);
  --panel-strong: #e9dccf;
  --text: #241f1b;
  --muted: #6b6258;
  --accent: #b87333;
  --accent-soft: rgba(184, 115, 51, 0.14);
  --line: rgba(36, 31, 27, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  --page-background:
    radial-gradient(circle at top left, rgba(184, 115, 51, 0.1), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(112, 135, 148, 0.12), transparent 24%),
    linear-gradient(135deg, #faf6f1 0%, #efe4d8 52%, #fcf8f3 100%);
}

body.theme-teal {
  --bg: #eef5f3;
  --bg-elevated: rgba(252, 255, 254, 0.82);
  --panel: rgba(239, 247, 244, 0.94);
  --panel-strong: #ddebe6;
  --text: #1d2a2d;
  --muted: #5f7375;
  --accent: #2b8c82;
  --accent-soft: rgba(43, 140, 130, 0.14);
  --line: rgba(29, 42, 45, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
  --page-background:
    radial-gradient(circle at top left, rgba(43, 140, 130, 0.1), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(120, 175, 198, 0.14), transparent 24%),
    linear-gradient(135deg, #f6fbf9 0%, #e7f1ee 52%, #fbfefd 100%);
}

body.theme-rose {
  --bg: #f8f1ef;
  --bg-elevated: rgba(255, 251, 250, 0.84);
  --panel: rgba(247, 238, 235, 0.94);
  --panel-strong: #eadbd6;
  --text: #2a2326;
  --muted: #75676c;
  --accent: #b85c6d;
  --accent-soft: rgba(184, 92, 109, 0.14);
  --line: rgba(42, 35, 38, 0.1);
  --shadow: 0 24px 80px rgba(62, 35, 43, 0.14);
  --page-background:
    radial-gradient(circle at top left, rgba(184, 92, 109, 0.1), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(194, 160, 140, 0.14), transparent 24%),
    linear-gradient(135deg, #fcf7f5 0%, #f2e6e2 52%, #fdf9f8 100%);
}

body.theme-paper {
  --bg: #f6f8fb;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --panel: rgba(248, 250, 253, 0.96);
  --panel-strong: #e5ebf2;
  --text: #16222d;
  --muted: #425768;
  --accent: #b78300;
  --accent-soft: rgba(183, 131, 0, 0.22);
  --line: rgba(31, 45, 58, 0.1);
  --image-surface: #e9eff5;
  --image-frame: rgba(96, 122, 148, 0.1);
  --shadow: 0 24px 80px rgba(31, 45, 58, 0.12);
  --page-background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top left, rgba(199, 154, 43, 0.08), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(214, 129, 75, 0.12), transparent 22%),
    linear-gradient(135deg, #fbfcfe 0%, #edf3f8 52%, #f7fafc 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: #f6f1eb;
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--page-background);
}

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

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  position: relative;
  z-index: 20;
  padding: 0.5rem 0 2rem;
}

.topbar-links {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.contact-menu {
  display: none;
  position: relative;
  z-index: 30;
}

.brand,
.eyebrow,
.tag,
.timeline-year {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand,
.toplink,
.eyebrow,
.tag {
  font-family: "Space Grotesk", sans-serif;
}

.brand {
  font-size: 0.9rem;
  color: var(--muted);
}

.toplink {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.toplink:hover {
  transform: translateY(-1px);
  border-color: rgba(199, 154, 43, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 22px rgba(31, 45, 58, 0.08);
}

.toplink-icon {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
}

.toplink-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-menu summary {
  list-style: none;
  cursor: pointer;
}

.contact-menu summary::-webkit-details-marker {
  display: none;
}

.contact-menu-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 180px;
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  z-index: 40;
}

.contact-menu-panel a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.45);
}

.contact-menu-panel a:hover {
  background: var(--accent-soft);
}

.hero {
  padding: 1rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
  justify-items: center;
}

.hero-copy,
.card,
.contact-card {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 3rem;
  border-radius: 2rem;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(199, 154, 43, 0.14), transparent 68%);
  pointer-events: none;
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(170px, 20vw, 220px);
  grid-template-areas: "text photo";
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}

.hero-photo-frame {
  grid-area: photo;
  position: relative;
  width: clamp(170px, 20vw, 220px);
  aspect-ratio: 5 / 6.4;
  margin: 0;
  padding: clamp(0.5rem, 1vw, 0.75rem);
  border-radius: 1.35rem;
  background: var(--image-frame, rgba(255, 255, 255, 0.08));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.hero-photo-frame::before {
  content: "";
  position: absolute;
  inset: clamp(0.5rem, 1vw, 0.75rem);
  border-radius: 1rem;
  background: var(--image-surface, #ffffff);
}

.hero-text {
  grid-area: text;
  display: grid;
  gap: 1rem;
}

.hero-support {
  max-width: 38ch;
}

.hero-cta {
  margin-top: 0.25rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--accent);
}

.eyebrow-icon {
  display: inline-grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(244, 184, 96, 0.12);
}

.eyebrow-icon svg {
  width: 0.82rem;
  height: 0.82rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.06;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  max-width: 16ch;
  font-size: clamp(1.75rem, 4vw, 3.1rem);
}

h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.lead,
.card p,
.contact-card p,
.timeline-item p {
  color: var(--muted);
  line-height: 1.7;
}

.lead {
  max-width: 56ch;
  margin: 0;
  font-size: 1.05rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-weight: 700;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow:
    0 10px 24px rgba(244, 184, 96, 0.22),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

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

.button-primary:hover {
  box-shadow:
    0 14px 30px rgba(244, 184, 96, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.button-secondary:hover {
  border-color: rgba(244, 184, 96, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.profile-photo-frame {
  width: 180px;
  height: 228px;
  margin-bottom: 2rem;
  padding: 0;
  border-radius: 1.35rem;
  background: transparent;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.profile-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 1.35rem;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.profile-label {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.profile-list {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 0.8rem;
  line-height: 1.5;
  list-style: none;
}

.profile-list li {
  display: grid;
  grid-template-columns: 1.8rem 1fr;
  gap: 0.7rem;
  align-items: start;
}

.list-icon,
.contact-icon {
  display: inline-grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent);
}

.list-icon svg,
.contact-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section {
  padding-top: 4.75rem;
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.cards {
  display: grid;
  gap: 1rem;
}

.cards-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-projects {
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 4rem;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 1.75rem;
}

.project-card {
  display: grid;
  align-content: start;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(199, 154, 43, 0.18);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.project-image {
  width: calc(100% + 3rem);
  height: 220px;
  margin: -1.5rem -1.5rem 1.25rem;
  object-fit: contain;
  padding: 1.75rem;
  border-radius: 1.5rem 1.5rem 1rem 1rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(244, 184, 96, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(13, 25, 30, 0.96), rgba(21, 37, 44, 0.94));
  transition: transform 260ms ease;
}

.project-image-light {
  background: var(--image-surface, #ffffff);
}

.project-card:hover .project-image {
  transform: scale(1.02);
}

.project-image-placeholder {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.project-meta span {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.84rem;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.placeholder-grid span {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.tag {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.75rem;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline-item + .timeline-item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.timeline-year {
  margin: 0 0 0.45rem;
  color: var(--accent);
  font-size: 0.78rem;
}

.contact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 1.5rem;
  padding: 2.25rem;
  border-radius: 1.75rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

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

.field {
  display: grid;
  gap: 0.5rem;
}

.field span {
  color: var(--muted);
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
}

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

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(244, 184, 96, 0.4);
  box-shadow: 0 0 0 3px rgba(244, 184, 96, 0.12);
}

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

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

@media (max-width: 960px) {
  .cards-three,
  .cards-projects,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 2rem;
  }

  h1 {
    max-width: 100%;
  }
}

@media (min-width: 961px) {
  .eyebrow {
    font-size: 1.08rem;
  }

  .lead,
  .card p,
  .contact-card p,
  .timeline-item p {
    font-size: 1.08rem;
  }

  .field span {
    font-size: 1rem;
  }
}

@media (max-width: 980px) {
  .topbar-links {
    display: none;
  }

  .contact-menu {
    display: block;
  }
}

@media (max-width: 760px) {
  .hero-intro {
    grid-template-columns: minmax(0, 1fr) 88px;
    grid-template-areas: "text photo";
    gap: 0.9rem;
    justify-items: stretch;
    text-align: left;
  }

  .hero-text {
    grid-area: text;
    justify-items: start;
  }

  .hero-photo-frame {
    grid-area: photo;
    width: 88px;
    margin: 0;
    align-self: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1.5rem, 100%);
  }

  .hero-copy {
    padding: 1.35rem;
    border-radius: 1.25rem;
  }

  .card,
  .contact-card {
    padding: 1.5rem;
    border-radius: 1.25rem;
  }

  .hero-actions,
  .contact-links {
    flex-direction: column;
  }

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

  .button,
  .contact-links a {
    width: 100%;
  }
}
