:root {
  --ink: #15202b;
  --ink-muted: #3d4f5f;
  --ink-soft: #5a6d7c;
  --paper: #edf2f4;
  --paper-deep: #d8e4e8;
  --accent: #0b6e6a;
  --accent-hover: #085551;
  --rule: rgba(21, 32, 43, 0.12);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --measure: 40rem;
  --space: clamp(1.25rem, 3vw, 2.5rem);
  --header-max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  position: relative;
}

.page-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 45% at 8% 0%, rgba(11, 110, 106, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 5%, rgba(61, 79, 95, 0.14), transparent 50%),
    linear-gradient(165deg, #e8f1f3 0%, #e4ecef 42%, #dce8e6 100%);
}

.page-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1.15rem var(--space) 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: rgba(232, 241, 243, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: rise 0.7s ease-out both;
}

.site-header-inner {
  max-width: var(--header-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.brand-block {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 48rem;
}

.brand {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.4rem + 1.6vw, 2.65rem);
  font-weight: 600;
  font-optical-sizing: auto;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.tagline {
  margin: 0;
  font-size: clamp(0.82rem, 0.75rem + 0.25vw, 0.95rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-muted);
}

.site-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 0.45rem;
  font-size: 1rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover {
  border-bottom-color: currentColor;
}

.sep {
  margin: 0 0.55rem;
  color: var(--ink-soft);
}

.work {
  animation: rise 0.85s ease-out 0.08s both;
}

.work-intro {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--space) clamp(1.5rem, 3vw, 2.25rem);
}

.lede {
  margin: 0 0 1.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.work-intro h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 1.25rem + 1.3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.work-intro > p:not(.lede) {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 500;
}

.work-tiles {
  display: flex;
  flex-direction: column;
}

.work-tile {
  border-top: 1px solid var(--rule);
  padding: clamp(2rem, 5vw, 3.25rem) var(--space) clamp(2.5rem, 6vw, 4rem);
}

.tile-body {
  max-width: var(--measure);
  margin: 0 auto;
}

.tile-label {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-tile h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.35rem + 1.8vw, 2.65rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.tile-summary {
  margin: 0 0 1.1rem;
  font-size: 1.1em;
  font-weight: 500;
  color: var(--ink-muted);
}

.tile-body > p {
  margin: 0 0 1.15rem;
}

.tile-links {
  margin: 0 0 1.5rem !important;
  font-weight: 500;
}

.tile-shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.shot-thumb {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 0.35rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
  cursor: zoom-in;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.shot-thumb:hover,
.shot-thumb:focus-visible {
  border-color: rgba(11, 110, 106, 0.45);
  box-shadow: 0 0.45rem 1.25rem rgba(21, 32, 43, 0.1);
  transform: translateY(-1px);
}

.shot-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shot-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
}

.shot-hint {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(21, 32, 43, 0.72);
  color: #f4f8f9;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.shot-thumb:hover .shot-hint,
.shot-thumb:focus-visible .shot-hint {
  opacity: 1;
}

.tile-stack {
  margin: 1.15rem 0 0 !important;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.tile-body > .tile-links + .tile-stack {
  margin-top: 0.35rem !important;
}

.lightbox {
  max-width: min(96vw, 72rem);
  max-height: 92vh;
  margin: auto;
  padding: 0.75rem 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  background: #101820;
  color: #f4f8f9;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.35);
}

.lightbox::backdrop {
  background: rgba(10, 16, 22, 0.72);
  backdrop-filter: blur(4px);
}

.lightbox-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.55rem;
}

.lightbox-close {
  margin: 0;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(244, 248, 249, 0.28);
  border-radius: 0.3rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(244, 248, 249, 0.5);
}

.lightbox-close:focus-visible {
  outline: 2px solid #7ecfcb;
  outline-offset: 2px;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 3.5rem);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 0.25rem;
}

.site-footer {
  padding: clamp(2rem, 5vw, 3.5rem) var(--space);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-footer a {
  font-weight: 500;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    padding-top: 0;
    width: 100%;
  }

  .tile-shots {
    grid-template-columns: 1fr;
  }

  .shot-hint {
    opacity: 1;
  }
}

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

  .site-header,
  .work {
    animation: none;
  }

  .shot-thumb {
    transition: none;
  }

  .shot-thumb:hover,
  .shot-thumb:focus-visible {
    transform: none;
  }
}
