:root {
  --bg: #f3eee2;
  --panel: rgba(255, 251, 245, 0.86);
  --panel-strong: #fffdf8;
  --ink: #1d2f4a;
  --muted: #5e6976;
  --line: rgba(29, 47, 74, 0.14);
  --accent: #0b7079;
  --accent-soft: rgba(11, 112, 121, 0.1);
  --gold: #ae7c3e;
  --radius-lg: 26px;
  --radius-md: 18px;
  --max-width: 1120px;
  --shadow: 0 18px 42px rgba(29, 47, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(11, 112, 121, 0.17), transparent 34%),
    radial-gradient(circle at 100% 10%, rgba(174, 124, 62, 0.15), transparent 36%),
    linear-gradient(180deg, #f8f3ea 0%, #f3eee2 42%, #efe8dc 100%);
}

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

/* <picture> wrappers must not create a box, so existing layout rules keep
   targeting the inner <img> exactly as they did before. */
picture {
  display: contents;
}

.page-shell {
  width: min(calc(100% - 28px), var(--max-width));
  margin: 0 auto;
  padding: 20px 0 40px;
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 2px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.02em;
}

.brand strong {
  display: block;
  font-size: 1.04rem;
}

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

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  flex: 0 0 auto;
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px;
  background: rgba(255, 251, 245, 0.82);
}

.nav a {
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  color: var(--muted);
}

.nav a:hover,
.nav a:focus-visible {
  background: var(--panel-strong);
  color: var(--ink);
}

main {
  display: grid;
  gap: 16px;
}

.intro {
  padding: 28px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

.profile-photo {
  display: grid;
  gap: 12px;
  align-content: start;
}

.profile-circle {
  width: 270px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid rgba(29, 47, 74, 0.18);
  overflow: hidden;
  background: #f2e8d8;
}

.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.intro-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 3.4rem);
}

.intro-copy p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.value-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.value-row span {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
}

.module {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.2rem);
}

.module-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.module-logo {
  width: auto;
  max-width: 78px;
  height: auto;
  max-height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.module-head a,
.inline-link {
  color: var(--accent);
  font-weight: 800;
}

.module-intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

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

.project-tile,
.testimonial,
.photo-slide,
.two-column article {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  padding: 16px;
}

.project-tile h3,
.two-column h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.tilt9-feature {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 14px;
}

.tilt9-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #211f4f;
}

.project-tile p,
.two-column p,
.two-column li {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.testimonial small {
  color: var(--muted);
  font-weight: 700;
}

.testimonial-read-more {
  display: inline;
  margin-left: 6px;
  font-size: 0.92rem;
}

.testimonial-layout {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: start;
}

.testimonial-photo {
  width: 94px;
  height: 94px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(29, 47, 74, 0.16);
  display: block;
}

.photo-carousel-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.carousel-control {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.carousel-control:hover,
.carousel-control:focus-visible {
  background: #fff;
  border-color: rgba(29, 47, 74, 0.28);
}

.photo-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.photo-carousel::-webkit-scrollbar {
  display: none;
}

.photo-slide {
  margin: 0;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  scroll-snap-align: start;
}

.photo-slide img {
  width: 100%;
  min-height: 122px;
  max-height: 122px;
  border-radius: 12px;
  border: 1px solid rgba(29, 47, 74, 0.1);
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.photo-slide figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.footer {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.footer a {
  color: var(--accent);
  font-weight: 800;
}

.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 15, 24, 0.72);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  width: min(92vw, 860px);
  max-height: 92vh;
  border-radius: 16px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.lightbox-close {
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.lightbox-content img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  background: #f4f4f4;
}

.lightbox-caption {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .profile-circle {
    width: 220px;
  }

  .project-strip,
  .two-column {
    grid-template-columns: 1fr;
  }

  .tilt9-feature,
  .testimonial-layout {
    grid-template-columns: 1fr;
  }

  .tilt9-logo,
  .testimonial-photo {
    width: 94px;
    height: 94px;
  }

  .photo-carousel {
    grid-auto-columns: minmax(220px, 1fr);
  }
}

@media (max-width: 640px) {
  .photo-carousel-shell {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .carousel-control {
    width: 100%;
    border-radius: 10px;
    height: 34px;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(calc(100% - 18px), var(--max-width));
    padding-top: 12px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .intro,
  .module {
    padding: 18px;
  }

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