@font-face {
  font-family: "Intel One Display";
  src: url("assets/fonts/intel-one-display-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Conduit";
  src: url("assets/fonts/Condui2i.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --column-border-width: 1px;
  --band-center-width: 26rem;
  --band-vertical-pad: 1.15rem;
  --content-column-radius: 1rem;
  --gallery-focus-radius: 1rem;
  --gallery-thumb-radius: 0.55rem;
  --gallery-thumb-width: 5.75rem;
  --gallery-focus-width: 28rem;
  --gallery-track-gap: 0.35rem;
}

:root[data-theme="light"] {
  --paper: #dedede;
  --paper-2: #ece8e0;
  --ink-soft: #75706a;
  --ink-strong: #22201d;
  --brand-text: #75706a;
  --line: rgba(34, 32, 29, 0.12);
  --line-strong: rgba(34, 32, 29, 0.22);
  --toggle-bg: rgba(34, 32, 29, 0.04);
  --toggle-border: rgba(34, 32, 29, 0.12);
}

:root[data-theme="dark"] {
  --paper: #303030;
  --paper-2: #3b3b3b;
  --ink-soft: #8b8c8c;
  --ink-strong: #d6d8d8;
  --brand-text: #d6d8d8;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --toggle-bg: rgba(255, 255, 255, 0.04);
  --toggle-border: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
}

body {
  font-family: "Intel One Display", "Georgia", serif;
  overflow: auto;
  background: var(--paper);
}

img {
  max-width: 100%;
}

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

.page-shell {
  width: 100vw;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.layout-row {
  min-height: 0;
}

.layout-row-top,
.layout-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--band-center-width)) minmax(0, 1fr);
}

.layout-row-middle {
  background: var(--paper);
  overflow: hidden;
}

.gallery-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: calc(28rem + 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2.4vw, 1.8rem) 0;
  overflow: visible;
}

.gallery-shell::before,
.gallery-shell::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(7rem, 16vw, 14rem);
  pointer-events: none;
  z-index: 2;
}

.gallery-shell::before {
  left: 0;
  background: linear-gradient(90deg, var(--paper) 0%, rgba(0, 0, 0, 0) 100%);
}

.gallery-shell::after {
  right: 0;
  background: linear-gradient(270deg, var(--paper) 0%, rgba(0, 0, 0, 0) 100%);
}

.gallery-viewport {
  min-width: 0;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2.2rem;
}

.gallery-viewport::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: var(--gallery-track-gap);
  width: max-content;
  padding-inline: calc(50vw - (var(--gallery-focus-width) / 2));
  overflow: visible;
}

.gallery-item {
  position: relative;
  flex: 0 0 auto;
  width: var(--gallery-thumb-width);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: width 320ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: visible;
}

.gallery-item.is-selected {
  width: var(--gallery-focus-width);
  cursor: default;
}

.gallery-item-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--gallery-thumb-radius);
  transition: border-radius 320ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, transform 0.2s ease;
}

.gallery-item.is-selected .gallery-item-image {
  border-radius: var(--gallery-focus-radius);
  box-shadow: none;
}

.gallery-item-meta {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 3;
}

.gallery-item.is-selected .gallery-item-meta {
  opacity: 1;
  pointer-events: auto;
}

.gallery-item-meta-link {
  color: inherit;
}

.gallery-item-meta-link:hover,
.gallery-item-meta-link:focus-visible {
  color: var(--ink-strong);
}

.gallery-item-meta-arrow {
  font-size: 0.85rem;
  line-height: 1;
}

.gallery-item:hover .gallery-item-image,
.gallery-item:focus-visible .gallery-item-image {
  opacity: 1;
  transform: translateY(-2px);
}

.layout-side {
  background: var(--paper);
}

.layout-center {
  min-width: 0;
  min-height: 0;
  background: var(--paper-2);
  border-left: var(--column-border-width) solid var(--line);
  border-right: var(--column-border-width) solid var(--line);
  container-type: inline-size;
}

.layout-row-top .layout-center {
  border-bottom: var(--column-border-width) solid var(--line);
  border-bottom-left-radius: var(--content-column-radius);
  border-bottom-right-radius: var(--content-column-radius);
}

.layout-row-bottom .layout-center {
  border-top: var(--column-border-width) solid var(--line);
  border-top-left-radius: var(--content-column-radius);
  border-top-right-radius: var(--content-column-radius);
}

.brand-mark {
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.brand-block {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.top-bar {
  height: 100%;
  width: 100%;
  margin: 0 auto;
  padding: var(--band-vertical-pad) clamp(0.9rem, 2vw, 1.6rem);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
}

.brand-mark-model {
  width: 3.35rem;
  height: 3.35rem;
  flex: 0 0 auto;
  background: transparent;
  --poster-color: transparent;
  filter: brightness(0.6) saturate(0.8) contrast(1.04) sepia(0.12) hue-rotate(-8deg);
}

:root[data-theme="dark"] .brand-mark-model {
  filter: brightness(0.88) saturate(0.95) contrast(1.02);
}

.brand-mark-model::part(default-progress-bar),
.brand-mark-model::part(progress-bar),
.brand-mark-model::part(poster) {
  display: none;
}

.dmca-mark {
  flex: 0 0 auto;
}

.dmca-logo {
  display: block;
  width: 4.75rem;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.dmca-logo-dark {
  display: none;
}

:root[data-theme="dark"] .dmca-logo-light {
  display: none;
}

:root[data-theme="dark"] .dmca-logo-dark {
  display: block;
}

.brand-mark-copy {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-mark-text {
  display: block;
  color: var(--brand-text);
  font-family: "Conduit", "Intel One Display", sans-serif;
  font-size: clamp(1.9rem, 11cqi, 3.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.brand-mark-slogan {
  margin: 0;
  max-width: 100%;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
}

.bottom-bar {
  min-height: 0;
  width: 100%;
  margin: 0 auto;
  padding: var(--band-vertical-pad) clamp(0.9rem, 2vw, 1.6rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.bottom-actions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.contact-strip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.72rem;
  max-width: 100%;
  min-width: 0;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 1rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.contact-link:hover,
.contact-link:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--ink-strong);
}

.contact-link-arrow {
  font-size: 0.82rem;
  line-height: 1;
}

.theme-toggle {
  position: relative;
  width: 2.8rem;
  height: 1.5rem;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--toggle-border);
  border-radius: 999px;
  background: var(--toggle-bg);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 50%;
  left: 0.16rem;
  width: 0.98rem;
  height: 0.98rem;
  border-radius: 50%;
  background: #ffffff;
  transform: translateY(-50%);
  transition: left 0.2s ease, right 0.2s ease;
}

.theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
  left: auto;
  right: 0.16rem;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--line-strong);
}


@media (max-width: 960px) {
  :root {
    --gallery-thumb-width: 3.6rem;
    --gallery-focus-width: 16rem;
    --gallery-track-gap: 0.25rem;
  }

  .page-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .layout-row-top,
  .layout-row-bottom {
    grid-template-columns: 1rem minmax(0, 1fr) 1rem;
  }

  .gallery-shell {
    min-height: calc(16rem + 3rem);
    padding: 0.9rem 0;
  }

  .gallery-track {
    padding-inline: calc(50vw - (var(--gallery-focus-width) / 2));
  }

  .brand-mark {
    gap: 0.75rem;
  }

  .brand-block {
    gap: 0.45rem;
  }

  .top-bar {
    padding: 1rem;
    gap: 0.75rem;
  }

  .brand-mark-model {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-mark-text {
    font-size: clamp(1.9rem, 11cqi, 2.6rem);
  }

  .brand-mark-slogan {
    font-size: 0.9rem;
    max-width: 100%;
  }

  .dmca-logo {
    width: 4.1rem;
  }

  .contact-link {
    font-size: 0.94rem;
  }

  .bottom-bar {
    padding: 1rem;
    gap: 0.8rem;
  }

  .bottom-actions {
    gap: 0.7rem;
  }

  .theme-toggle {
    width: 2.7rem;
    height: 1.45rem;
  }

  .theme-toggle-thumb {
    left: 0.15rem;
    width: 0.93rem;
    height: 0.93rem;
  }

  .theme-toggle[aria-pressed="true"] .theme-toggle-thumb {
    right: 0.15rem;
  }
}
