:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --surface-muted: #f4f4f2;
  --text: #181817;
  --text-soft: #6d6d68;
  --line: #dfdfda;
  --accent: #566246;
  --accent-strong: #303b26;
  --overlay: rgba(18, 18, 17, 0.78);
  --max-width: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
  --header-height: 76px;
  --shadow: 0 22px 60px rgba(24, 24, 23, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.has-lightbox {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 200;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--surface);
  padding: 10px 14px;
  border-radius: 4px;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 251, 0.9);
  border-bottom: 1px solid rgba(223, 223, 218, 0.82);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100%, calc(var(--max-width) + var(--gutter) * 2));
  height: var(--header-height);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: grid;
  gap: 0;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 650;
  font-size: 0.82rem;
}

.brand span:last-child {
  color: var(--text-soft);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  color: var(--text-soft);
  font-size: 0.94rem;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after,
.text-link::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after,
.nav-links a[aria-current="page"]::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  width: min(100%, calc(var(--max-width) + var(--gutter) * 2));
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) var(--gutter) clamp(58px, 9vw, 112px);
}

.hero-media {
  position: relative;
  overflow: hidden;
  background: var(--surface-muted);
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.18);
}

.hero-media img {
  width: 100%;
  height: min(68vh, 740px);
  min-height: 420px;
  object-fit: cover;
}

.hero-media h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(90%, 980px);
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.36);
  transform: translate(-50%, -50%);
}

.hero-copy {
  max-width: 780px;
  padding-top: clamp(26px, 4vw, 46px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: 0;
}

h1 {
  max-width: 900px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

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

p {
  margin: 0;
}

.text-link {
  position: relative;
  display: inline-block;
  margin-top: 28px;
  color: var(--accent-strong);
  font-weight: 700;
}

.section-block,
.gallery-section,
.about-layout {
  width: min(100%, calc(var(--max-width) + var(--gutter) * 2));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section-block {
  padding-bottom: clamp(64px, 10vw, 126px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(24px, 4vw, 42px);
}

.featured-grid {
  column-count: 3;
  column-gap: clamp(14px, 2vw, 24px);
}

.photo-tile {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  break-inside: avoid;
}

.featured-tile {
  min-width: 0;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.photo-tile figure {
  margin: 0;
}

.photo-tile img {
  width: 100%;
  background: var(--surface-muted);
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.featured-tile img {
  aspect-ratio: auto;
}

.photo-tile:hover img,
.photo-tile:focus-visible img {
  filter: saturate(0.9) contrast(1.03);
  transform: translateY(-3px);
}

.photo-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

.photo-tile figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.photo-tile figcaption span:first-child {
  color: var(--text);
  font-weight: 650;
}

.gallery-section {
  padding-top: clamp(54px, 8vw, 104px);
  padding-bottom: clamp(70px, 10vw, 132px);
}

.gallery-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 4vw, 42px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible,
.filter-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--surface);
}

.masonry-gallery {
  column-count: 3;
  column-gap: clamp(14px, 2vw, 24px);
}

.masonry-gallery .photo-tile {
  margin-bottom: clamp(20px, 3vw, 34px);
}

.masonry-gallery .photo-tile img.is-portrait {
  aspect-ratio: 4 / 5;
}

.masonry-gallery .photo-tile img.is-landscape {
  aspect-ratio: 3 / 2;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.lightbox-panel figure {
  min-width: 0;
  margin: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lightbox-panel img {
  width: 100%;
  max-height: calc(100vh - 148px);
  object-fit: contain;
  background: #101010;
  opacity: 1;
  transition: opacity 140ms ease;
}

.lightbox.is-loading .lightbox-panel img {
  opacity: 0;
}

.lightbox-panel figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.lightbox-panel figcaption span:first-child {
  color: var(--text);
  font-weight: 700;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface);
  transform: translateY(-1px);
}

.lightbox-close {
  position: absolute;
  right: -10px;
  top: -54px;
}

.about-layout {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 440px);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  padding-top: clamp(52px, 8vw, 96px);
  padding-bottom: clamp(64px, 10vw, 126px);
}

.about-copy {
  max-width: 690px;
}

.about-copy p:not(.eyebrow) {
  margin-top: 22px;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.about-portrait {
  margin: 0;
  width: min(100%, 440px);
  justify-self: end;
}

.about-portrait img {
  width: 100%;
  max-height: min(68vh, 620px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  background: var(--surface-muted);
}

.about-portrait figcaption {
  padding-top: 12px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.site-footer {
  width: min(100%, calc(var(--max-width) + var(--gutter) * 2));
  margin: 0 auto;
  padding: 32px var(--gutter) 42px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.footer-name {
  font-weight: 700;
}

.footer-note {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  color: var(--text-soft);
}

.social-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.social-icon[aria-label="LinkedIn"] {
  color: #0a66c2;
}

.social-icon[aria-label="GitHub"] {
  color: #181717;
}

.social-icon[aria-label="Instagram"] {
  color: #e4405f;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.social-icon:hover,
.social-icon:focus-visible {
  border-color: currentColor;
  transform: scale(1.16);
  box-shadow: 0 10px 24px rgba(24, 24, 23, 0.12);
}

.social-icon:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .hero-media img {
    min-height: 360px;
  }

  .featured-grid {
    column-count: 2;
  }

  .gallery-topbar,
  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .masonry-gallery {
    column-count: 2;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    width: min(100%, 520px);
    justify-self: start;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(var(--header-height) - 4px);
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .js .nav-links {
    display: none;
  }

  .js .nav-links.is-open {
    display: grid;
    gap: 10px;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-media img {
    height: 56vh;
    min-height: 320px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .featured-grid {
    column-count: 1;
  }

  .photo-tile figcaption,
  .lightbox-panel figcaption {
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  .masonry-gallery {
    column-count: 1;
  }

  .lightbox {
    padding: 12px;
  }

  .lightbox-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .lightbox-prev,
  .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-prev {
    left: 8px;
  }

  .lightbox-next {
    right: 8px;
  }

  .lightbox-close {
    right: 8px;
    top: 8px;
  }

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

  .social-links {
    justify-content: flex-start;
  }
}
