:root {
  --md-sys-color-primary: #0f766e;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-surface: #f9fbfb;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-on-surface: #101211;
  --md-sys-color-outline-variant: #d7e3e1;
  --container-max: 1120px;
  --elev-0: none;
  --elev-1: 0 1px 2px rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .08);
  --elev-2: 0 2px 4px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .10);
  --elev-3: 0 4px 8px rgba(0, 0, 0, .16), 0 6px 12px rgba(0, 0, 0, .10);
}

/* Dark theme overrides */
:root[data-theme="dark"] {
  --md-sys-color-primary: #22c55e;
  --md-sys-color-on-primary: #03160c;
  --md-sys-color-surface: #020617;
  --md-sys-color-surface-container: #020617;
  --md-sys-color-on-surface: #e5e7eb;
  --md-sys-color-outline-variant: #1f2937;
}

/* Dark theme tweaks for services card */
:root[data-theme="dark"] .service-item {
  background: color-mix(in srgb, var(--md-sys-color-primary) 20%, #020617);
}

:root[data-theme="dark"] .service-item:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 28%, #020617);
  box-shadow: var(--elev-1);
}

:root[data-theme="dark"] .service-title {
  color: var(--md-sys-color-on-surface);
}

:root[data-theme="dark"] .service-text {
  color: #d1fae5; /* light minty text, good contrast */
}

:root[data-theme="dark"] .service-icon {
  background: color-mix(in srgb, var(--md-sys-color-primary) 45%, #020617);
  color: #022c22;
}

/* Make sure background / text use the variables */
body {
  margin: 0;
  font-family: "Roboto Flex", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
}


/* Reset / base */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto Flex", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--md-sys-color-on-surface);
  background: var(--md-sys-color-surface);
}

/* ========== TOP BAR & NAV ========== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #ffffffcc;
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--md-sys-color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--md-sys-color-primary) 20%, transparent);
}

.brand-name {
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-link {
  background: none;
  border: 0;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font: inherit;
}

.nav-link:hover {
  text-decoration: underline;
}

.btn-link {
  border-radius: 10px;
}

/* Language switcher */
.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}

.lang-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  color: var(--md-sys-color-on-surface);
}

.lang-btn.active {
  border-color: var(--md-sys-color-outline-variant);
  background: #ffffff80;
}

.theme-toggle {
  margin-left: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    transform .12s ease,
    box-shadow .12s ease;
}

.theme-toggle .material-symbols-outlined {
  font-size: 1.4rem;
}

.theme-toggle:hover {
  background: #ffffff33;
  border-color: var(--md-sys-color-outline-variant);
  transform: translateY(-1px);
  box-shadow: var(--elev-1);
}

/* in dark mode, make the chip slightly brighter */
:root[data-theme="dark"] .theme-toggle:hover {
  background: #020617;
}

/* Tiny top hint under the bar */
.top-contact-hint {
  max-width: var(--container-max);
  margin: 6px auto 0;
  padding: 0 20px 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #475b57;
  font-size: .95rem;
}

.top-contact-hint .material-symbols-outlined {
  font-size: 1.1rem;
  vertical-align: -2px;
}

.top-contact-hint .sep {
  opacity: .4;
}

/* ========== LAYOUT ========== */

main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px;
}

/* ========== HERO ========== */

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 28px;
  padding: 24px 0 8px;
}

.hero-copy h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
}

.lede {
  color: #304542;
  font-size: 1.1rem;
  margin: 8px 0 16px;
}

.hero-cta md-filled-button,
.hero-cta md-tonal-button {
  margin-right: 8px;
}

.hero-media img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  object-fit: cover;
}

.hero-rotator {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.hero-rotator img {
  display: block;
  transition: opacity .28s ease, transform .28s ease;
}

.hero-cta-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  background: rgba(4, 10, 12, 0.58);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  opacity: 0;
  transition:
    opacity .18s ease,
    background .18s ease,
    transform .18s ease;
}

.hero-cta-overlay .material-symbols-outlined {
  font-size: 1.15rem;
}

.hero-cta-overlay:hover,
.hero-cta-overlay:focus-visible {
  background: rgba(15, 118, 110, 0.76);
  transform: translate(-50%, -50%) translateY(-1px);
}

.hero-rotator:hover .hero-cta-overlay,
.hero-cta-overlay:focus-visible {
  opacity: 1;
}

.hero-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20%;
  min-width: 56px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background .18s ease,
    color .18s ease;
}

.hero-nav .material-symbols-outlined {
  font-size: 2rem;
}

.hero-nav:hover,
.hero-nav:focus-visible {
  color: rgba(255, 255, 255, 0.94);
}

.hero-nav-prev {
  left: 0;
}

.hero-nav-next {
  right: 0;
}

.hero-nav-prev:hover,
.hero-nav-prev:focus-visible {
  background: linear-gradient(90deg, rgba(4, 10, 12, 0.28), rgba(4, 10, 12, 0));
}

.hero-nav-next:hover,
.hero-nav-next:focus-visible {
  background: linear-gradient(270deg, rgba(4, 10, 12, 0.28), rgba(4, 10, 12, 0));
}

/* Subtle entrance pop for main CTA (KEEPING AS YOU MODIFIED IT) */
md-filled-button.accent-cta {
  filter: drop-shadow(0 4px 10px rgba(15, 118, 110, 0.35));
  transform-origin: center center;
  animation: cta-pop 0.45s cubic-bezier(.17, .89, .32, 1.28) 1.1s 1;
}

@keyframes cta-pop {
  0% {
    transform: scale(.99);
  }

  55% {
    transform: scale(1.02);
  }

  100% {
    transform: scale(1);
  }
}

/* ========== GRID LAYOUTS ========== */

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 26px;
}

.grid-two h2 {
  margin-top: 6px;
}

/* ========== CARDS (Material-ish) ========== */

.m-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--elev-1);
  border: 1px solid var(--md-sys-color-outline-variant);
  transition:
    box-shadow .18s ease,
    transform .18s ease,
    border-color .18s ease;
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp .45s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.m-card.e1 {
  box-shadow: var(--elev-1);
}

.m-card.e2 {
  box-shadow: var(--elev-2);
}

.m-card.e3 {
  box-shadow: var(--elev-3);
}

.m-card.clickable {
  cursor: pointer;
}

.m-card.clickable:hover {
  transform: translateY(-1px);
  box-shadow: var(--elev-2);
}

.m-card:focus-within {
  box-shadow: var(--elev-2);
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 35%, var(--md-sys-color-outline-variant));
}

.m-card md-ripple {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.m-card-body {
  padding: 18px;
}

/* Simple list inside cards */
.clean-list {
  margin: 0;
  padding-left: 18px;
}

.actions md-filled-button,
.actions md-tonal-button {
  margin-right: 8px;
}

/* ========== SKILL GROUPS / TAGS (credentials card) ========== */

.skill-group {
  margin-bottom: 10px;
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  color: #304542;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.skill-group-header .material-symbols-outlined {
  font-size: 1.15rem;
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-chip {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 80%, transparent);
  background: color-mix(in srgb, var(--md-sys-color-primary) 6%, #ffffff);
  padding: 4px 10px;
  font-size: .83rem;
  cursor: pointer;
  transition:
    background .16s ease,
    border-color .16s ease,
    transform .12s ease;
}

.skill-chip:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 10%, #ffffff);
  transform: translateY(-1px);
}

.skill-chip.active {
  border-color: var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 16%, #ffffff);
  color: #064e3b;
}

/* ==== SERVICES LIST ==== */

.services-card {
  display: grid;
  gap: 10px;
}

.service-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  /*background: color-mix(in srgb, var(--md-sys-color-primary) 3%, #ffffff);*/
  transition:
    background .16s ease,
    transform .12s ease,
    box-shadow .16s ease;
}

.service-item:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 7%, #ffffff);
  transform: translateY(-1px);
  box-shadow: var(--elev-1);
}

.service-icon {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--md-sys-color-primary) 16%, #ffffff);
  color: #064e3b;
}

.service-icon .material-symbols-outlined {
  font-size: 1.4rem;
}

.service-copy {
  flex: 1;
}

.service-title {
  margin: 0 0 2px;
  font-size: .97rem;
}

.service-text {
  margin: 0;
  font-size: .86rem;
  color: #4a625f;
  text-align: justify;
}


/* ========== PROJECTS LIST, PAGER & TAGS ========== */

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.projects-pager {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .85rem;
  color: #475b57;
}

.pager-btn {
  border-radius: 999px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background: #ffffff;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background .15s ease,
    border-color .15s ease,
    transform .12s ease,
    opacity .12s ease;
}

.pager-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

.pager-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, #ffffff);
  transform: translateY(-1px);
}

.pager-btn:disabled {
  opacity: .4;
  cursor: default;
}

.pager-status {
  min-width: 64px;
  text-align: center;
}

/* Project tags inside cards */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 4px;
}

.project-tag {
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-outline-variant) 80%, transparent);
  background: color-mix(in srgb, var(--md-sys-color-primary) 3%, #ffffff);
  padding: 2px 8px;
  font-size: .78rem;
  cursor: pointer;
  transition:
    background .16s ease,
    border-color .16s ease,
    transform .12s ease;
}

.project-tag:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 10%, #ffffff);
  transform: translateY(-1px);
}

.project-tag.active {
  border-color: var(--md-sys-color-primary);
  background: color-mix(in srgb, var(--md-sys-color-primary) 18%, #ffffff);
  color: #064e3b;
}

.project-tag-static {
  cursor: default;
}

.project-tag-static:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 3%, #ffffff);
  transform: none;
}

/* ==== GENERIC ERROR CARD ==== */

.error-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 24px 20px;
  border-radius: 18px;
  background: var(--md-sys-color-surface-container);
  box-shadow: var(--elev-1);
  text-align: center;
  color: var(--md-sys-color-on-surface);
}

.error-card p {
  margin: 10px 0 0;
  font-size: .95rem;
}

.error-illustration {
  max-width: 60%;
  min-width: 30%;
  height: auto;
  margin: 0 auto 8px;
  display: block;
  opacity: .9;
}


/* ========== CONTACT BLOCK & FORMS ========== */

.contact-block {
  max-width: 920px;
  margin: 36px auto 40px;
  padding: 16px 20px 40px;
  border-top: 1px dashed var(--md-sys-color-outline-variant);
}

.contact-block h2 {
  text-align: center;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
}

.contact-meta {
  color: #46615e;
  text-align: center;
}

/* ==== CONTACT LAYOUT (BOTTOM) ==== */

.contact-layout-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 10px 0 4px;
}

.swap-cols-btn {
  border-radius: 999px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background: #ffffff;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: .8rem;
  color: #58716e;
  transition:
    background .15s ease,
    border-color .15s ease,
    transform .12s ease,
    box-shadow .15s ease;
}

.swap-cols-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

.swap-cols-btn:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 6%, #ffffff);
  box-shadow: var(--elev-1);
  transform: translateY(-1px);
}

/* main two-column layout */
.contact-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 10px;
}

.contact-col {
  flex: 1;
  min-width: 0;
  transition:
    transform .28s ease,
    opacity .28s ease;
}

/* when flipped: swap order + add a little slide */
.contact-layout.flipped .contact-col:first-child {
  order: 2;
  transform: translateX(10px);
}

.contact-layout.flipped .contact-col:last-child {
  order: 1;
  transform: translateX(-10px);
}


.form-status {
  margin: 6px 0 0;
  font-size: .95rem;
  color: #46615e;
  text-align: center;
}

.form-status.error {
  color: #b42318;
}

/* Dialog form */
.dialog-form {
  display: grid;
  gap: 12px;
  min-width: min(84vw, 560px);
}

/* ========== FOOTER ========== */

.footer {
  border-top: 1px solid var(--md-sys-color-outline-variant);
  padding: 18px 20px;
  text-align: center;
  color: #58716e;
}

/* ========== PROJECT PAGE STYLES ========== */

.project-hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 24px;
  margin-top: 18px;
}

.project-hero-copy {
  display: grid;
  gap: 12px;
  align-content: start;
}

.project-eyebrow {
  margin: 0;
  color: var(--md-sys-color-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project-angle {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 14%, var(--md-sys-color-outline-variant));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--md-sys-color-primary) 12%, #ffffff) 0%,
      color-mix(in srgb, var(--md-sys-color-primary) 4%, #ffffff) 100%);
  color: #24423d;
  font-size: 1rem;
  line-height: 1.55;
}

.project-meta {
  display: grid;
  gap: 8px;
}

.project-aside {
  position: sticky;
  top: 90px;
  align-self: flex-start;
}

.badge {
  display: inline-block;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: 999px;
  padding: 6px 10px;
  margin: 4px 6px 0 0;
  font-size: .9rem;
}

.stack {
  margin-top: 6px;
}

.m-section {
  margin: 26px 0;
}

.detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.detail-block {
  margin: 0;
}

.detail-block-outcomes {
  grid-column: 1 / -1;
}

.detail-block-head {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  align-items: start;
}

.detail-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--md-sys-color-primary) 12%, #ffffff);
  color: #064e3b;
  font-size: 1.25rem;
}

.detail-kicker {
  margin: 0 0 6px;
  color: var(--md-sys-color-primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.detail-block h2 {
  margin: 0;
}

.detail-note {
  margin: 8px 0 0;
  color: #49615e;
  line-height: 1.55;
}

.detail-points {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.detail-point {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--md-sys-color-primary) 10%, var(--md-sys-color-outline-variant));
  background: color-mix(in srgb, var(--md-sys-color-primary) 4%, #ffffff);
  line-height: 1.55;
}

.detail-point-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 10px;
  background: color-mix(in srgb, var(--md-sys-color-primary) 16%, #ffffff);
  color: #064e3b;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.gallery-item {
  margin: 0;
}

.gallery-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--elev-1);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.gallery-open:hover img,
.gallery-open:focus-visible img {
  transform: scale(1.035);
  box-shadow: var(--elev-2);
  filter: saturate(1.03);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 12, 0.82);
  backdrop-filter: blur(4px);
}

.lightbox-shell {
  position: relative;
  width: min(1280px, calc(100vw - 64px));
  max-height: calc(100vh - 36px);
  min-height: min(680px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .16s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 360px;
  width: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lightbox-stage img {
  width: auto;
  max-width: calc(100% - 120px);
  max-height: min(72vh, 860px);
  object-fit: contain;
  display: block;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .26);
}

.lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: max(72px, calc((100vw - min(1280px, calc(100vw - 64px))) / 2 + 56px));
  border: 0;
  padding: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0));
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background .18s ease,
    color .18s ease;
}

.lightbox-nav .material-symbols-outlined {
  font-size: 2rem;
}

.lightbox-nav:hover {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.28), rgba(0, 0, 0, 0));
  color: #ffffff;
}

.lightbox-nav-prev {
  left: 0;
}

.lightbox-nav-next {
  right: 0;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0));
}

.lightbox-nav-next:hover {
  background: linear-gradient(270deg, rgba(15, 118, 110, 0.28), rgba(0, 0, 0, 0));
}

.lightbox-bottom {
  margin-top: 18px;
  width: min(1040px, 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 14px 16px 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
}

.lightbox-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.lightbox-caption {
  margin: 0;
  color: #f5fbfa;
  font-size: .95rem;
}

.lightbox-count {
  color: rgba(255, 255, 255, 0.72);
  font-size: .88rem;
  white-space: nowrap;
}

.lightbox-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  justify-content: center;
  max-width: 100%;
}

.lightbox-thumb {
  flex: 0 0 clamp(88px, 11vw, 120px);
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  cursor: pointer;
  opacity: .68;
  transition:
    opacity .16s ease,
    border-color .16s ease,
    transform .16s ease;
}

.lightbox-thumb img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  border-radius: 0;
  box-shadow: none;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--md-sys-color-primary);
  transform: translateY(-1px);
}

body.lightbox-open {
  overflow: hidden;
}

/* back button on project page */
.backbar {
  margin-top: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 4px 8px;
  border-radius: 999px;
  transition:
    background .15s ease,
    transform .12s ease;
}

.back-link .material-symbols-outlined {
  font-size: 1.2rem;
}

.back-link:hover {
  background: color-mix(in srgb, var(--md-sys-color-primary) 8%, #ffffff);
  transform: translateY(-1px);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    flex-direction: column;
  }

  .contact-col {
    order: 0;
    transform: none !important;
  }

  .contact-layout-toolbar {
    display: none;
  }
}


@media (max-width: 480px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .project-hero {
    grid-template-columns: 1fr;
  }

  .project-aside {
    position: static;
  }

  .detail-sections {
    grid-template-columns: 1fr;
  }

  .detail-block-outcomes {
    grid-column: auto;
  }

  .lightbox {
    padding: 0;
  }

  .lightbox-shell {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
    justify-content: center;
  }

  .lightbox-stage {
    min-height: 0;
  }

  .lightbox-stage img {
    max-width: calc(100% - 56px);
    max-height: 68vh;
  }

  .lightbox-nav {
    width: 56px;
  }

  .lightbox-bottom {
    padding: 12px;
    width: 100%;
  }

  .lightbox-meta {
    align-items: start;
    flex-direction: column;
  }

  .lightbox-thumb {
    flex-basis: 82px;
  }

  .lightbox-thumb img {
    height: 62px;
  }
}

@media (min-width: 921px) {
  .credentials .m-card:first-of-type {
    margin-top: 30px;
  }
}

:root[data-theme="dark"] .project-angle {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 20%, var(--md-sys-color-outline-variant));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--md-sys-color-primary) 18%, #020617) 0%,
      color-mix(in srgb, var(--md-sys-color-primary) 8%, #020617) 100%);
  color: #d1fae5;
}

:root[data-theme="dark"] .detail-note {
  color: #bdd9d4;
}

:root[data-theme="dark"] .detail-icon-wrap,
:root[data-theme="dark"] .detail-point-index {
  color: #03160c;
  background: color-mix(in srgb, var(--md-sys-color-primary) 55%, #020617);
}

:root[data-theme="dark"] .detail-point {
  border-color: color-mix(in srgb, var(--md-sys-color-primary) 14%, var(--md-sys-color-outline-variant));
  background: color-mix(in srgb, var(--md-sys-color-primary) 10%, #020617);
}
