:root {
  --bg: #050607;
  --panel: #0b0d0f;
  --panel-2: #101214;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f2;
  --muted: #9ca1a4;
  --soft: #676d70;
  --accent: #d9efe6;
  --sidebar-width: 96px;
  --page-gap: 12px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 16%, rgba(74, 96, 89, 0.12), transparent 34rem),
    linear-gradient(135deg, #1d1f1f 0%, #08090a 42%, #0e1011 100%);
  color: var(--text);
  font-family: Archivo, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

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

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.skip-link,
.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;
}

.skip-link:focus {
  z-index: 50;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  margin: 0;
  clip: auto;
  background: var(--text);
  color: var(--bg);
  border-radius: 4px;
}

.sidebar {
  position: fixed;
  inset: var(--page-gap) auto var(--page-gap) 0;
  z-index: 10;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  align-items: center;
  padding: 28px 0;
  border-right: 1px solid var(--line);
  background: rgba(5, 6, 7, 0.58);
  backdrop-filter: blur(18px);
}

.mark {
  font-family: "Space Grotesk", Archivo, sans-serif;
  max-width: calc(var(--sidebar-width) - 18px);
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0;
}

.side-nav {
  display: grid;
  gap: 28px;
  width: 100%;
  margin-top: 92px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.side-nav a {
  position: relative;
  display: block;
  padding-left: 34px;
  transition: color 180ms ease;
}

.side-nav a::before {
  position: absolute;
  top: 50%;
  left: 21px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  content: "";
  transform: translateY(-50%);
}

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

.side-nav a.is-active::before {
  background: var(--text);
}

.side-social {
  display: grid;
  gap: 12px;
  margin-top: auto;
  margin-bottom: 72px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.side-social a {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.side-social a::after {
  position: absolute;
  top: 50%;
  left: calc(100% + 10px);
  z-index: 20;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(12, 14, 15, 0.94);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  white-space: nowrap;
}

.side-social a:hover::after,
.side-social a:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.side-social img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 180ms ease;
}

.side-social a[aria-label="Behance"] img {
  width: 24px;
  height: 24px;
}

.side-social a:hover,
.side-social a:focus-visible {
  color: #fff;
  transform: translateY(-2px);
}

.side-social a:hover img,
.side-social a:focus-visible img {
  opacity: 1;
}

.copyright {
  margin: 0;
  color: var(--soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.mobile-top,
.mobile-menu {
  display: none;
}

.page-shell {
  position: fixed;
  inset: var(--page-gap) var(--page-gap) var(--page-gap) var(--sidebar-width);
  width: auto;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 80px clamp(18px, 1.6vw, 30px) 102px;
  border-radius: 0 18px 18px 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 1px) 0 0 / 88px 88px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--bg);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.portfolio {
  width: 100%;
  margin: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 34px 24px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  max-width: 520px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
  font-size: 16px;
}

.empty-state span {
  font-size: 13px;
  line-height: 1.6;
}

.project-grid.is-pinterest {
  display: block;
  column-count: 5;
  column-gap: 24px;
}

.project-card {
  min-width: 0;
}

.project-grid.is-pinterest .project-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 24px;
  break-inside: avoid;
}

.project-card.is-hidden {
  display: none;
}

.project-grid.is-pinterest .project-card.is-hidden {
  display: none;
}

.project-card a {
  position: relative;
  display: block;
  min-height: 100%;
  overflow: visible;
  background: transparent;
  outline: 0;
  transition:
    outline-color 200ms ease,
    transform 220ms ease,
    background 220ms ease;
}

.project-card a:hover,
.project-card a:focus-visible {
  transform: translateY(-3px);
}

.project-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  background: #111;
  outline: 1px solid rgba(255, 255, 255, 0.07);
  transition: box-shadow 220ms ease;
}

.project-grid.is-pinterest .project-media {
  aspect-ratio: auto;
  background: transparent;
  outline-color: rgba(255, 255, 255, 0.1);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.03);
  transition:
    filter 220ms ease,
    transform 320ms ease;
}

.project-grid.is-pinterest .project-card img {
  height: auto;
  object-fit: contain;
}

.project-grid.is-pinterest .project-body {
  display: none;
}

.project-grid.is-pinterest .project-tag {
  display: none;
}

.project-card a:hover .project-media,
.project-card a:focus-visible .project-media {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

.project-card a:hover img,
.project-card a:focus-visible img {
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.01);
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 9px 2px 0;
}

.project-body strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.project-body > span:not(.project-tag) {
  display: none;
}

.project-tag {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.project-arrow {
  display: none;
}

.project-card a:hover .project-arrow,
.project-card a:focus-visible .project-arrow {
  transform: translate(2px, -2px);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 48px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.pagination a {
  display: grid;
  min-width: 24px;
  min-height: 44px;
  place-items: center;
}

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

.page-shell.is-pinterest .pagination {
  display: none;
}

.mobile-footer {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6vh 7vw;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(2px);
}

.project-modal[hidden] {
  display: none;
}

.modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 3px solid #126fb4;
  border-radius: 50%;
  background: rgba(24, 28, 31, 0.88);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: #2b9dff;
  background: rgba(31, 36, 40, 0.96);
  transform: scale(1.04);
}

.modal-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(78vw, 1220px);
  height: 82vh;
  max-width: 100%;
  max-height: 100%;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.modal-hero {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  background: transparent;
  cursor: grab;
  filter: drop-shadow(0 24px 52px rgba(0, 0, 0, 0.48));
  transform-origin: center center;
  transition: transform 120ms ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  will-change: transform;
}

.project-modal.is-dragging .modal-hero {
  cursor: grabbing;
  transition: none;
}

.modal-gallery {
  display: none;
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e8e8e8;
}

.modal-copy {
  display: none;
}

.modal-kicker {
  margin: 0 0 8px;
  color: #6c7075;
  font-size: 13px;
  font-weight: 700;
}

.modal-copy h2 {
  margin: 0 0 10px;
  color: #111;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
}

.modal-copy p {
  margin: 0;
  color: #62666b;
  font-size: clamp(18px, 2vw, 26px);
  line-height: 1.35;
}

@media (min-width: 1120px) {
  .page-shell {
    inset: var(--page-gap) var(--page-gap) var(--page-gap) var(--sidebar-width);
    width: auto;
    margin: 0;
    padding: 80px clamp(20px, 1.8vw, 34px) 112px;
    border-radius: 0 22px 22px 0;
  }
}

@media (max-width: 1500px) and (min-width: 761px) {
  .project-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-grid.is-pinterest {
    column-count: 4;
  }
}

@media (min-width: 1440px) {
  :root {
    --sidebar-width: 108px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  body {
    background:
      radial-gradient(circle at 90% 8%, rgba(120, 148, 137, 0.12), transparent 16rem),
      linear-gradient(135deg, #171919 0%, #08090a 48%, #101112 100%);
  }

  .sidebar {
    display: none;
  }

  .mobile-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    padding: max(18px, env(safe-area-inset-top)) 26px 12px;
    background: linear-gradient(180deg, rgba(5, 6, 7, 0.94), rgba(5, 6, 7, 0.68));
    backdrop-filter: blur(18px);
  }

  .menu-button {
    position: relative;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text);
  }

  .menu-button span {
    position: absolute;
    width: 18px;
    height: 1px;
    background: currentColor;
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .menu-button span:first-child {
    transform: translateY(-4px);
  }

  .menu-button span:last-child {
    transform: translateY(4px);
  }

  body.menu-open .menu-button span:first-child {
    transform: rotate(45deg);
  }

  body.menu-open .menu-button span:last-child {
    transform: rotate(-45deg);
  }

  .mobile-menu {
    position: fixed;
    top: 82px;
    right: 16px;
    left: 16px;
    z-index: 25;
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(8, 9, 10, 0.96);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.44);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  body.menu-open .mobile-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu a {
    min-height: 44px;
    padding: 12px 14px;
    border-radius: 4px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-menu a.is-active,
  .mobile-menu a:hover,
  .mobile-menu a:focus-visible {
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
  }

  .page-shell {
    position: static;
    width: auto;
    min-height: calc(100dvh - 24px);
    overflow: visible;
    margin: 0 13px 12px;
    padding: 14px 18px 26px;
    border-radius: 0 0 18px 18px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 1px) 0 0 / 64px 64px,
      linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
      var(--bg);
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .project-grid.is-pinterest {
    display: block;
    column-count: 1;
  }

  .project-grid.is-pinterest .project-card {
    margin-bottom: 14px;
  }

  .project-card a {
    min-height: 0;
  }

  .project-media {
    aspect-ratio: 4 / 3;
  }

  .project-body {
    gap: 2px 8px;
    padding: 8px 2px 0;
  }

  .project-body strong {
    font-size: 12px;
  }

  .project-body > span:not(.project-tag) {
    font-size: 11px;
  }

  .project-tag {
    font-size: 10px;
  }

  .project-arrow {
    display: none;
  }

  .pagination {
    margin-top: 23px;
    gap: 11px;
  }

  .pagination a {
    min-height: 44px;
  }

  .mobile-footer {
    display: grid;
    justify-items: center;
    gap: 18px;
    margin-top: 10px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    color: var(--soft);
  }

  .mobile-social {
    display: flex;
    justify-content: center;
    gap: 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-social a {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
  }

  .mobile-social a::after {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 20;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(12, 14, 15, 0.94);
    color: #fff;
    content: attr(data-tooltip);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
    white-space: nowrap;
  }

  .mobile-social a:hover::after,
  .mobile-social a:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .mobile-social img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.9;
  }

  .mobile-social a[aria-label="Behance"] img {
    width: 24px;
    height: 24px;
  }

  .mobile-footer p {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
  }

  .project-modal {
    padding: 70px 16px 24px;
  }

  .modal-close {
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-width: 2px;
    font-size: 30px;
  }

  .modal-panel {
    width: calc(100vw - 32px);
    height: calc(100dvh - 118px);
    min-height: 0;
  }

  .modal-hero {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-height: 0;
    aspect-ratio: auto;
  }

  .modal-gallery img {
    aspect-ratio: auto;
  }

  .modal-copy {
    display: none;
  }

}

@media (max-width: 380px) {
  .page-shell {
    margin-inline: 8px;
    padding-inline: 12px;
  }

  .mobile-top {
    padding-inline: 20px;
  }
}

@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;
  }
}
