/* irem.dev - Carrd-inspired layout */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Muted blue-gray surfaces, with stronger blues reserved for actions. */
:root {
  color-scheme: light;
  --background: #eef2f6;
  --surface: #e2eaf2;
  --text: #304458;
  --heading: #172b40;
  --muted: #4a5e74;
  --border: #c1cddd;
  --control-border: #677f96;
  --accent: #3c5977;
  --accent-hover: #2b4561;
  --on-accent: #f7faff;
  --shadow: rgba(23, 43, 64, 0.18);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #151f30;
  --surface: #202d41;
  --text: #d9e2ed;
  --heading: #edf2f8;
  --muted: #a9b9ce;
  --border: #3b4e65;
  --control-border: #788da7;
  --accent: #9eb9d8;
  --accent-hover: #b7cbe3;
  --on-accent: #151f30;
  --shadow: rgba(0, 0, 0, 0.3);
}

/* Honor device preferences even when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #151f30;
    --surface: #202d41;
    --text: #d9e2ed;
    --heading: #edf2f8;
    --muted: #a9b9ce;
    --border: #3b4e65;
    --control-border: #788da7;
    --accent: #9eb9d8;
    --accent-hover: #b7cbe3;
    --on-accent: #151f30;
    --shadow: rgba(0, 0, 0, 0.3);
  }
}

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

html {
  font-size: clamp(16px, 1.05vw + 12px, 17px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-width: 320px;
  overflow-x: hidden;
  word-wrap: break-word;
  background-color: var(--background);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1em;
  font-weight: 400;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--heading);
  color: var(--background);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transition:
    opacity var(--reveal-duration, 1s) ease,
    transform var(--reveal-duration, 1s) ease,
    filter var(--reveal-duration, 1s) ease;
  will-change: opacity, transform, filter;
}

.reveal--fade-up {
  transform: translateY(1.5rem);
}

.reveal--fade-down {
  transform: translateY(-1.5rem);
}

.reveal--blur-in {
  filter: blur(0.75rem);
}

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

.reveal:focus-within {
  opacity: 1;
  transform: none;
}

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

  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

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

a {
  color: inherit;
  text-decoration: underline;
  transition: color 0.25s ease;
}

a:hover {
  text-decoration: none;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

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

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Landing-page navigation and email CTA */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 3vw, 3rem);
  border-bottom: 1px solid var(--border);
  color: var(--heading);
}

.topbar__heading {
  margin: 0;
  font-size: inherit;
}

.topbar__name {
  display: inline-block;
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.045em;
  color: var(--heading);
  text-decoration: none;
}

.topbar__name:hover {
  color: var(--accent);
}

.topbar__identity {
  min-width: 0;
}

.topbar__roles {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

.topbar__roles > li {
  white-space: nowrap;
}

.topbar__roles a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  text-decoration: none;
}

.topbar__roles a:hover,
.topbar__roles a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.topbar__separator {
  margin-right: 0.3rem;
  color: var(--accent);
}

.topbar__nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-left: auto;
  font-size: 0.9em;
}

.topbar__nav > a {
  padding: 0.65rem 0;
  text-decoration: none;
}

.topbar__nav > a:hover {
  text-decoration: underline;
}

.language-options {
  display: flex;
  gap: 0.25rem;
}

.language-options button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.language-options button[aria-pressed="true"] {
  background: var(--surface);
  border-color: var(--accent);
  font-weight: 600;
}

.language-options button:hover {
  background: var(--surface);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--heading);
  font: inherit;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.theme-toggle__sun,
[data-theme="dark"] .theme-toggle__moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__sun {
  display: inline-block;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--accent);
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.contact-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.contact-cta svg {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.hero-contact {
  align-self: flex-start;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
}

.reviews-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.9rem 1.25rem;
  border: 2px solid var(--control-border);
  border-radius: 0.75rem;
  background: transparent;
  color: var(--accent);
  font-size: 1em;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.reviews-link:hover {
  background: var(--surface);
  border-color: var(--accent);
  text-decoration: none;
}

.about-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-weight: 400;
  text-decoration: none;
}

.about-contact:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hero-email {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.9em;
}

.hero-email a {
  overflow-wrap: anywhere;
}

.hero-services {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.hero-services > div {
  position: relative;
  padding: 1rem 1.25rem;
  border: 1px solid var(--control-border);
  border-radius: 0.85rem;
  background: var(--surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero-services > div:hover {
  border-color: var(--accent);
  box-shadow: 0 0.25rem 1rem var(--shadow);
}

.hero-services > div:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.hero-services dt {
  color: var(--heading);
  font-weight: 600;
}

.hero-services dt a {
  display: block;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.hero-services dt a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.85rem;
}

.hero-services dt a:hover {
  color: var(--accent);
}

.hero-services dt a:focus-visible {
  outline: none;
}

.hero-services dd {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9em;
}

.contact-intro {
  max-width: 32rem;
  margin: 0 auto 2rem;
  text-align: center;
}

.contact-direct {
  color: var(--muted);
  font-size: 0.95em;
  overflow-wrap: anywhere;
}

.topbar a:focus-visible,
.about-contact:focus-visible,
.hero-email a:focus-visible,
.language-options button:focus-visible,
.theme-toggle:focus-visible,
.contact-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Panoramic hero above a split About section */
.bio-split {
  display: grid;
  grid-template-columns: minmax(0, 25rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.5rem);
  max-width: 74rem;
  margin: clamp(2.5rem, 6vw, 5rem) auto 0;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
}

.hero-split__photo {
  height: clamp(12rem, 31vw, 26rem);
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

.hero-split__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 44% 42%;
}

.bio-split__photo {
  align-self: start;
  width: 100%;
  margin: 0;
}

.bio-split__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.hero-split__content {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 80rem;
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.5rem) 0;
}

.bio-split__content {
  text-align: left;
}

.bio-split__content .section-heading {
  margin-top: 0;
}

.hero-split__content .tagline {
  max-width: 54ch;
}

.page-sections {
  max-width: 95rem;
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 3vw, 3rem) 2rem;
}

.section-heading.section-heading--left {
  text-align: left;
}

/* Tagline */
.tagline {
  text-align: left;
  color: var(--text);
  font-size: 1em;
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
}

.site-wrapper {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}

.site-main {
  width: 100%;
  max-width: none;
  padding: 0;
}

.site-main > .inner {
  width: 100%;
  padding: 4rem 0 6rem;
}

/* Header / name */
.site-name {
  text-align: center;
  text-transform: uppercase;
  color: var(--heading);
  letter-spacing: 0.05rem;
  font-size: 1.5em;
  line-height: 1.25;
  font-weight: 300;
  margin-bottom: 2rem;
}

.site-name a {
  text-decoration: none;
}

.site-name a:hover {
  text-decoration: underline;
}

/* Tagline when not inside media-row (fallback) */
.tagline--centered {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 3.5rem;
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 3.5rem 0;
  padding: 0;
}

.nav-buttons li {
  list-style: none;
}

.nav-btn {
  display: inline-flex;
  align-items: flex-start;
  padding: 0.859375rem 1.375rem;
  font-family: 'Inter', sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.71875rem;
  color: var(--heading);
  border: solid 2px var(--border);
  border-radius: 0.75rem;
  text-decoration: none;
  white-space: normal;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-btn svg {
  display: block;
  flex-shrink: 0;
  height: 1.71875rem;
  width: 1.5em;
  margin-left: -0.125em;
  margin-right: 1.5rem;
  pointer-events: none;
  transition: fill 0.25s ease;
}

.nav-btn .label {
  text-align: right;
  flex-grow: 1;
}

.nav-btn .sublabel {
  display: block;
  font-size: 0.85em;
  opacity: 0.7;
}

.nav-btn:hover {
  transform: scale(0.975);
  text-decoration: none;
}

.nav-btn svg { fill: var(--accent); }
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Dividers */
.divider {
  margin: 4.375rem 0;
  border: none;
  border-top: 1px solid var(--border);
  height: 0;
}

/* Featured callout */
.featured {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  line-height: 1.6;
}

.featured-label {
  font-style: italic;
  color: var(--text);
}

.featured-title {
  font-weight: 600;
  color: var(--heading);
}

.featured-detail {
  margin-top: 0.5rem;
  font-size: 0.95em;
}

/* Section headings */
.section-heading {
  text-align: center;
  text-transform: none;
  color: var(--heading);
  letter-spacing: -0.025em;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  line-height: 1.25;
  font-weight: 600;
  margin-bottom: 2rem;
}

.section-subheading {
  text-align: center;
  color: var(--text);
  font-size: 1em;
  font-weight: 300;
  margin: -1rem 0 2.5rem;
  font-style: italic;
}

/* Content blocks */
.content-block {
  max-width: none;
  margin: 0;
  text-align: left;
}

.bio-name {
  font-size: 1.75em;
  line-height: 1.2;
  font-weight: 300;
  color: var(--heading);
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

.about-intro {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.about-contact {
  margin: 0.5rem 0 1.5rem;
  color: var(--accent);
}

.academic-background {
  margin-top: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.academic-background > summary {
  padding: 0.5rem 0;
  color: var(--heading);
  font-weight: 600;
  cursor: pointer;
}

.academic-background > p,
.academic-background > h3 {
  max-width: 40rem;
}

.academic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1.5rem;
  font-size: 0.9em;
}

.content-block .media-row {
  margin-left: 0;
  margin-right: 0;
}

.bio-split .content-block > h3,
.bio-split .content-block > p {
  max-width: 40rem;
}

.content-block p + p {
  margin-top: 1rem;
}

.content-block h3 {
  color: var(--heading);
  font-size: 1.1em;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.content-block img:not(.portrait) {
  display: block;
  width: clamp(9rem, 26vw, 14rem);
  max-width: 100%;
  height: auto;
  margin: 0 1.5rem 1rem 0;
  float: left;
  border-radius: 10px;
  filter: drop-shadow(2px 2px 4px var(--shadow));
}

/* Preserve the original post photo blocks and their inline width limits. */
.inner-page .post-content img {
  display: inline-block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
  float: none;
  vertical-align: middle;
  border-radius: 10px;
  filter: drop-shadow(2px 2px 4px var(--shadow));
}

.inner-page .post-content p[style*="grid-template-columns"] > a {
  min-width: 0;
  max-width: 100%;
}

/* Lists */
.item-list {
  max-width: 52rem;
  margin: 0 auto;
}

.item-list > li {
  margin-bottom: 1.75rem;
}

.item-list .date {
  display: block;
  font-size: 0.9em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.item-list .title {
  font-size: 1.05em;
  font-weight: 400;
}

.item-list .title a {
  text-decoration: underline;
}

.item-list .title a:hover {
  text-decoration: none;
}

.item-list .desc {
  margin-top: 0.5rem;
  font-size: 0.95em;
  line-height: 1.55;
}

.item-list .meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85em;
  color: var(--muted);
}

/* Collapsible project groups */
.project-group {
  max-width: 52rem;
  margin: 0 auto 1rem;
}

.project-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.859375rem 1.375rem;
  background: none;
  border: solid 2px var(--border);
  border-radius: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 1em;
  font-weight: 400;
  color: var(--heading);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.25s ease, color 0.25s ease;
  gap: 0.75rem;
  list-style: none;
}

.project-toggle::-webkit-details-marker {
  display: none;
}

.project-toggle svg {
  flex-shrink: 0;
  height: 1.71875rem;
  width: 1.5em;
  margin-right: 0;
  fill: var(--muted);
  transition: fill 0.25s ease, transform 0.25s ease;
}

.project-toggle:hover {
  border-color: var(--accent);
}

.project-group[open] .project-toggle svg {
  transform: rotate(180deg);
}

.project-toggle .year {
  margin-left: auto;
  font-size: 0.9em;
  color: var(--muted);
  white-space: nowrap;
}

.project-content {
  padding: 1.5rem 0 0.5rem 1rem;
}

.rss-link {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9em;
}

/* Dedicated service pages */
.service-page {
  width: 100%;
}

.service-breadcrumb {
  max-width: 80rem;
  margin: 1.75rem auto 0;
  padding-inline: clamp(1.25rem, 4vw, 3.5rem);
  font-size: 0.9em;
  color: var(--muted);
}

.service-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  text-decoration: none;
}

.service-breadcrumb a:hover {
  color: var(--accent);
}

.service-hero {
  max-width: 80rem;
  margin-inline: auto;
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 0;
}

.service-hero--collage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.service-hero--text {
  max-width: 58rem;
  padding-bottom: 2rem;
}

.service-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-title {
  margin: 0 0 1.25rem;
  color: var(--heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.service-intro {
  color: var(--heading);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.service-lead > p {
  max-width: 60ch;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.85em;
  color: var(--muted);
}

.service-tags li {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 1.75rem;
}

.tour-collage {
  position: relative;
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 8 / 11;
  margin: 1rem auto;
  isolation: isolate;
}

.tour-collage__photo {
  position: absolute;
  display: block;
  width: 80%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.tour-collage__photo img {
  display: block;
  width: 100%;
  height: auto;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: 0 0.75rem 2rem var(--shadow);
}

.tour-collage__photo--one {
  top: 0;
  left: 5%;
  z-index: 1;
  transform: rotate(-4deg);
}

.tour-collage__photo--two {
  top: 26%;
  right: 3%;
  z-index: 2;
  transform: rotate(4deg);
}

.tour-collage__photo--three {
  top: 55%;
  left: 6%;
  z-index: 3;
  transform: rotate(-3deg);
}

.tour-collage--pair .tour-collage__photo--two {
  top: 51%;
}

.tour-collage__photo.is-front {
  z-index: 5;
  transform: translateY(-0.25rem) rotate(0) scale(1.04);
}

.tour-collage__photo:focus-visible {
  z-index: 10;
  transform: translateY(-0.25rem) rotate(0) scale(1.04);
  outline-offset: 5px;
  border-radius: 0.85rem;
}

@media (hover: hover) {
  .tour-collage__photo:hover {
    z-index: 10;
    transform: translateY(-0.25rem) rotate(0) scale(1.04);
  }
}

.service-reviews,
.service-details,
.service-contact {
  max-width: 80rem;
  margin: clamp(3rem, 6vw, 5rem) auto 0;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
}

.service-contact {
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.service-details h2 {
  color: var(--heading);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.025em;
}

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

.service-details__grid > div {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--surface);
}

.service-details__grid h3 {
  margin: 0 0 0.6rem;
  color: var(--heading);
  font-size: 1.1em;
}

.service-details__grid p {
  margin: 0;
  color: var(--muted);
}

@media screen and (max-width: 800px) {
  .service-hero--collage,
  .service-details__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tour-collage {
    max-width: 28rem;
  }
}

/* Guest reviews: a complete grid without JS, a scroll-snap carousel with JS. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.reviews-section {
  max-width: 74rem;
  margin-inline: auto;
}

.reviews-heading {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.reviews-eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reviews-heading .section-heading {
  margin: 0 0 0.9rem;
  text-align: left;
}

.reviews-intro {
  margin: 0;
  color: var(--muted);
}

.reviews-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.reviews-filters,
.reviews-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.reviews-filter,
.reviews-arrow {
  min-height: 2.75rem;
  border: 1px solid var(--control-border);
  border-radius: 0.65rem;
  background: transparent;
  color: var(--heading);
  font: inherit;
  cursor: pointer;
}

.reviews-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.9em;
}

.reviews-filter[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.reviews-filter__count {
  font-size: 0.9em;
}

.reviews-arrow {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  padding: 0.5rem;
}

.reviews-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.reviews-filter:hover,
.reviews-arrow:not(:disabled):hover {
  border-color: var(--accent);
}

.reviews-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.reviews-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0 0 0.9rem;
}

.is-carousel .reviews-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1px;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--control-border) transparent;
}

.review-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.is-carousel .review-card {
  flex: 0 0 calc((100% - 2.5rem) / 3);
  scroll-snap-align: start;
}

.review-card article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85em;
}

.review-source {
  color: var(--heading);
  font-weight: 600;
}

.review-meta time {
  color: var(--muted);
}

.review-stars {
  margin-top: 0.75rem;
  color: var(--accent);
  font-size: 1.1em;
  letter-spacing: 0.12em;
}

.review-quote {
  margin: 1rem 0 0.5rem;
  overflow-wrap: anywhere;
}

.review-quote p {
  margin: 0;
}

.review-quote.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 8;
  overflow: hidden;
}

.review-quote-toggle {
  align-self: flex-start;
  min-height: 2.75rem;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.9em;
  text-decoration: underline;
  cursor: pointer;
}

.review-footer {
  margin-top: auto;
  padding-top: 1.25rem;
}

.review-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--control-border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.85em;
  font-weight: 600;
}

.review-author {
  margin: 0;
  color: var(--heading);
  font-weight: 600;
}

.review-organization {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.8em;
}

.reviews-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.75em;
}

.reviews-note,
.reviews-position {
  margin: 0;
}

.review-card[hidden],
.reviews-filters[hidden],
.reviews-controls[hidden],
.review-quote-toggle[hidden],
.reviews-position[hidden] {
  display: none !important;
}

@media screen and (max-width: 1100px) {
  .is-carousel .review-card {
    flex-basis: calc((100% - 1.25rem) / 2);
  }
}

@media screen and (max-width: 700px) {
  .is-carousel .review-card {
    flex-basis: 88%;
    padding: 1.25rem;
  }
}

@media screen and (max-width: 640px) {
  .hero-actions,
  .service-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  .hero-actions > a,
  .service-actions > a {
    width: 100%;
  }
}

/* Contact form */
.contact-form {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

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

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}

.contact-field label {
  color: var(--heading);
  font-weight: 400;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text);
  font: inherit;
  font-size: max(1rem, 16px);
}

.contact-field__hint {
  margin: 0;
  font-size: 0.85em;
  color: var(--muted);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  border-color: var(--control-border);
}

.contact-field textarea {
  resize: vertical;
}

.contact-field input:focus-visible,
.contact-field select:focus-visible,
.contact-field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-form__note {
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

#contact-form-status {
  margin: 1rem 0 0;
}

.contact-form .contact-cta {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-list {
  max-width: 32rem;
  margin: 0 auto;
}

.contact-list li {
  display: flex;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list .contact-label {
  flex: 0 0 8rem;
  font-weight: 400;
  color: var(--heading);
}

.contact-list a {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 3rem 4rem;
  color: var(--muted);
  font-size: 0.85em;
  line-height: 1.6;
}

.site-footer p {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Inner pages (posts, etc.) */
.inner-page {
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem 3rem 6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.95em;
  color: var(--heading);
  text-decoration: none;
  border: solid 2px var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.back-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.inner-page .post-title,
.inner-page h1 {
  text-align: center;
  text-transform: uppercase;
  color: var(--heading);
  letter-spacing: 0.05rem;
  font-size: 1.5em;
  line-height: 1.25;
  font-weight: 300;
  margin-bottom: 1rem;
}

.inner-page .post-meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.9em;
  margin-bottom: 2.5rem;
}

.inner-page .post-content {
  line-height: 1.6;
}

.inner-page .post-content h2 {
  font-size: 1.15em;
  font-weight: 600;
  color: var(--heading);
  margin: 2rem 0 0.75rem;
}

.inner-page .post-content pre,
.inner-page .post-content code {
  background-color: var(--surface);
  border-radius: 0.25em;
  font-family: 'Lucida Console', 'Courier New', monospace;
  font-size: 0.9em;
}

.inner-page .post-content pre {
  padding: 1rem;
  overflow-x: auto;
}

.inner-page .post-content code {
  padding: 0.15em 0.4em;
}

.inner-page .post-content::after {
  content: "";
  display: table;
  clear: both;
}

@media screen and (max-width: 800px) {
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .topbar__identity,
  .topbar__nav {
    width: 100%;
  }

  .topbar__nav {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem;
    margin-left: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
  }

  .bio-split {
    grid-template-columns: minmax(0, 1fr);
    max-width: 36rem;
  }

  .bio-split__photo {
    max-width: 22rem;
    justify-self: center;
  }

  .hero-split__photo {
    height: clamp(10rem, 52vw, 19rem);
  }

  .hero-split__content {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 1.75rem 1.25rem 0;
  }

  .project-toggle {
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
  }

  .project-toggle > span[data-i18n] {
    flex: 1 1 12rem;
  }

}

@media screen and (max-width: 736px) {
  .page-sections {
    padding: 3rem 1.25rem 2rem;
  }

  .site-main > .inner {
    padding: 2.5rem 0 4rem;
  }

  .nav-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .nav-btn {
    width: auto;
  }

  .inner-page {
    padding: 2rem 1.5rem 4rem;
  }

  .contact-list .contact-label {
    flex: 0 0 6rem;
  }

  .contact-list li {
    align-items: flex-start;
  }

  .contact-list li > a,
  .contact-list li > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

@media screen and (max-width: 380px) {
  .topbar__nav {
    grid-template-columns: 1fr auto auto;
  }

  .language-options {
    grid-column: 1 / -1;
  }
}
