@font-face {
  font-family: "Thicker";
  src: url("../fonts/Thicker-Variable-Roman-TRIAL.ttf") format("truetype");
  font-weight: 100 950;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Thicker";
  src: url("../fonts/Thicker-Variable-Italic-TRIAL.ttf") format("truetype");
  font-weight: 100 950;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #efefec;
  --bg-elevated: #f8f8f6;
  --bg-soft: #e7e7e3;
  --bg-soft-strong: #ddddda;
  --text: #111111;
  --text-soft: #666661;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.18);
  --shadow-soft: 0 16px 34px rgba(17, 17, 17, 0.06);
  --shadow-card: 0 26px 60px rgba(17, 17, 17, 0.08);
  --hero-glow: rgba(255, 236, 172, 0.18);
  --container: 1480px;
  --header-height: 108px;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-elevated: #171717;
  --bg-soft: #1f1f1f;
  --bg-soft-strong: #262626;
  --text: #f3f3f1;
  --text-soft: #b3b3ae;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow-soft: 0 18px 34px rgba(0, 0, 0, 0.30);
  --shadow-card: 0 30px 64px rgba(0, 0, 0, 0.32);
  --hero-glow: rgba(255, 219, 124, 0.52);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Thicker", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body.is-locked {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

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

button {
  font: inherit;
}

input,
textarea,
select {
  font: inherit;
}

.page-shell {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 0 24px 42px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: var(--header-height);
  padding: 24px 0 18px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 95%, transparent) 0%, color-mix(in srgb, var(--bg) 95%, transparent) 72%, transparent 100%);
}

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

.brand__logo {
  width: clamp(72px, 7vw, 116px);
  height: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  position: relative;
  font-size: 2rem;
  color: var(--text-soft);
  transition: color 0.25s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a.is-active::after {
  transform: scaleX(1);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible,
.gallery-card:hover,
.gallery-card:focus-visible,
.project-card:hover,
.project-card:focus-visible {
  box-shadow: var(--shadow-soft);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--bg-soft);
}

.theme-toggle__track::before,
.theme-toggle__track::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text);
  transform: translateY(-50%);
  opacity: 0.92;
}

.theme-toggle__track::before {
  left: 10px;
}

.theme-toggle__track::after {
  right: 10px;
}

.theme-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: transform 0.28s ease, background-color 0.28s ease;
}

[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(20px);
}

.hero {
  display: grid;
  align-items: center;
  gap: 52px;
  padding: 74px 0 36px;
}

.hero--home {
  grid-template-columns: minmax(0, 760px) minmax(280px, 1fr);
}

.hero__content {
  max-width: 780px;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero h1,
.section-head h2,
.project-hero h1 {
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 0.98;
  font-weight: 600;
}

.hero h1 {
  max-width: 840px;
  font-size: 3rem;
}

.hero__text,
.project-hero__text,
.contact-text,
.about-card p,
.project-card__text {
  color: var(--text-soft);
  line-height: 1.68;
}

.hero__text {
  max-width: 700px;
  margin: 24px 0 0;
  font-size: clamp(17px, 1.7vw, 20px);
}

.hero__actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions {
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  font-size: 1.3rem;
}

.button:hover,
.button:focus-visible,
.project-pagination__link:hover,
.project-pagination__link:focus-visible,
.project-back:hover,
.project-back:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.button--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.button--ghost {
  background: transparent;
  color: var(--text);
}

.hero-lamp {
  position: relative;
  justify-self: end;
  display: grid;
  place-items: center;
  width: min(100%, 560px);
  min-height: 520px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.hero-lamp__glow {
  position: absolute;
  inset: 9% 10%;
  border-radius: 999px;
  background: radial-gradient(circle, var(--hero-glow) 0%, rgba(255, 231, 179, 0.18) 20%, rgba(255, 231, 179, 0.08) 36%, transparent 68%);
  opacity: 0;
  filter: blur(26px);
  transform: scale(0.82);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

[data-theme="dark"] .hero-lamp__glow {
  opacity: 1;
  transform: scale(1.2);
}

.hero-lamp__image {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
}

.hero-lamp:hover .hero-lamp__image,
.hero-lamp:focus-visible .hero-lamp__image {
  transform: scale(1);
}

.section {
  padding: 56px 0 24px;
}

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.section-head--compact h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

.section-head h2 {
  font-size: 2rem;
}


.projects-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.projects-tabs__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.projects-tabs__button:hover,
.projects-tabs__button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  border-color: var(--line-strong);
}

.projects-tabs__button.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-soft);
}

.project-card.is-filtered-out {
  display: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.projects-more__button {
  min-width: 200px;
}

.project-card {
  display: block;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}

.project-card__media {
  overflow: hidden;
  aspect-ratio: 1.2 / 1;
  background: var(--bg-soft);
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .project-card__media img,
.project-card:focus-visible .project-card__media img {
  transform: scale(1.04);
}

.project-card__body {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
}

.project-card__meta,
.project-back {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.project-card__title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.05;
}

.project-card__text {
  margin: 0;
  font-size: 15px;
}

.reveal-enabled .reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal-enabled .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

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

.about-card,
.contact-card,
.gallery-card,
.project-pagination__link {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.about-card,
.contact-card {
  padding: 28px;
}

.about-card p,
.contact-text {
  margin: 0;
  font-size: clamp(16px, 1.45vw, 18px);
}

.contact-links {
  margin-top: 22px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.project-hero {
  padding: 54px 0 20px;
}

.project-back {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 24px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
}

.project-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: start;
}

.project-hero h1 {
  font-size: clamp(2.5rem, 4.2vw, 4.3rem);
}

.project-hero__text {
  margin: 22px 0 0;
  font-size: clamp(17px, 1.55vw, 19px);
}

.project-cover {
  overflow: hidden;
  min-height: 420px;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  padding: 0;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: var(--line-strong);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  transition: transform 0.42s ease;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.04);
}

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

.project-pagination__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 20px;
  color: var(--text);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(100%, 1320px);
}

.lightbox__media-wrap {
  position: relative;
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox__image {
  width: 100%;
  max-height: min(80vh, 960px);
  object-fit: contain;
}

.lightbox__caption,
.lightbox__counter {
  position: absolute;
  left: 16px;
  color: #ffffff;
  font-size: 14px;
}

.lightbox__caption {
  bottom: 16px;
  right: 88px;
}

.lightbox__counter {
  top: 16px;
}

.lightbox__close,
.lightbox__nav {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 20, 20, 0.74);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover,
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  background: rgba(35, 35, 35, 0.94);
}

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 46px;
  height: 46px;
  font-size: 26px;
  border-radius: 999px;
}

.lightbox__nav {
  width: 58px;
  height: 58px;
  font-size: 44px;
}

@media (max-width: 1180px) {
  .hero--home,
  .project-hero__grid {
    grid-template-columns: 1fr;
  }

  .hero-lamp {
    justify-self: start;
    width: min(100%, 420px);
    min-height: 380px;
  }

  .projects-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    padding: 0 18px 32px;
  }

  .site-header {
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 18px 0 14px;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
}

  .site-header,
  .site-footer,
  .header-actions {
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .site-nav {
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .site-nav a {
    font-size: clamp(1.1rem, 6vw, 1.55rem);
  }

  .projects-tabs {
    gap: 8px;
  }

  .projects-tabs__button {
    min-height: 40px;
    padding: 0 14px;
  }

  .projects-grid,
  .about-grid,
  .gallery-grid,
  .project-pagination {
    grid-template-columns: 1fr;
  }

  .project-cover {
    min-height: 280px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox__dialog {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lightbox__nav {
    display: none;
  }

  .lightbox__caption {
    right: 16px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-enabled .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}
