:root {
  --bg: #0c0c0d;
  --fg: #e6e6e3;
  --muted: #8a8a85;
  --accent: #c4a574;
  --line: rgba(230, 230, 227, 0.08);
  --font: "Instrument Sans", "Noto Sans", system-ui, sans-serif;
  --space: clamp(1.25rem, 4vw, 2.5rem);
  --glow-gold: rgba(196, 165, 116, 0.45);
  --glow-gold-mid: rgba(196, 165, 116, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 165, 116, 0.42) #121214;
}

html::-webkit-scrollbar {
  width: 11px;
}

html::-webkit-scrollbar-track {
  background: #0a0a0b;
  border-left: 1px solid rgba(230, 230, 227, 0.06);
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    rgba(196, 165, 116, 0.38) 0%,
    rgba(196, 165, 116, 0.22) 100%
  );
  border-radius: 999px;
  border: 3px solid #0a0a0b;
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    rgba(196, 165, 116, 0.55) 0%,
    rgba(196, 165, 116, 0.32) 100%
  );
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:active {
  background: rgba(196, 165, 116, 0.45);
  background-clip: padding-box;
}

html::-webkit-scrollbar-corner {
  background: #0a0a0b;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font);
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.55;
  color: var(--fg);
  background-color: var(--bg);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  top: -25%;
  left: 50%;
  transform: translateX(-50%);
  width: min(130vw, 100rem);
  height: min(48vh, 28rem);
  background: radial-gradient(
    ellipse 58% 48% at 50% 32%,
    var(--glow-gold) 0%,
    var(--glow-gold-mid) 38%,
    transparent 78%
  );
  filter: blur(56px);
  opacity: 0.68;
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  top: var(--space);
  left: var(--space);
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 0.75rem;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  border-radius: 4px;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: min(100%, 92rem);
  padding: clamp(2rem, 8vh, 5rem) var(--space);
}

.header {
  margin-bottom: clamp(2.5rem, 10vh, 5rem);
}

.header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.header__brand {
  min-width: 0;
}

.lang-switch {
  flex-shrink: 0;
}

.lang-dropdown {
  position: relative;
}

.lang-dropdown__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--fg);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.55rem 0.45rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.lang-dropdown__btn:hover {
  border-color: rgba(196, 165, 116, 0.35);
  background-color: rgba(255, 255, 255, 0.06);
}

.lang-dropdown.is-open .lang-dropdown__btn {
  border-color: rgba(196, 165, 116, 0.45);
  background-color: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 1px rgba(196, 165, 116, 0.12);
}

.lang-dropdown__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lang-dropdown__current {
  min-width: 5.5rem;
  text-align: left;
}

.lang-dropdown__caret {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--accent);
  opacity: 0.85;
  transition: transform 0.22s ease;
  flex-shrink: 0;
}

.lang-dropdown.is-open .lang-dropdown__caret {
  transform: rotate(180deg);
}

.lang-dropdown__list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  min-width: calc(100% + 2.5rem);
  background: linear-gradient(165deg, #151516 0%, #0e0e10 100%);
  border: 1px solid rgba(230, 230, 227, 0.1);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(196, 165, 116, 0.06), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  z-index: 300;
}

.lang-dropdown__list[hidden] {
  display: none !important;
}

.lang-dropdown__list li {
  margin: 0;
}

.lang-dropdown__option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.24s ease, color 0.24s ease;
}

.lang-dropdown__option:hover {
  background-color: rgba(196, 165, 116, 0.12);
  color: var(--accent);
}

.lang-dropdown__option.lang-dropdown__option--current {
  background-color: rgba(196, 165, 116, 0.1);
  color: var(--accent);
}

.lang-dropdown__option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.logo {
  margin: 0;
  font-size: clamp(2.75rem, 10vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.main {
  flex: 1;
}

.lead {
  margin: 0 0 1rem;
  max-width: min(52ch, 100%);
  color: var(--muted);
  font-weight: 400;
}

.tagline {
  margin: 0 0 2.25rem;
  max-width: min(52ch, 100%);
  font-size: 0.9375rem;
  color: var(--fg);
  font-weight: 500;
  line-height: 1.5;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project {
  padding: 1.35rem 0;
  height: 100%;
}

.project-thumb {
  margin: 0 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(230, 230, 227, 0.1);
  aspect-ratio: 16 / 9;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

@media (hover: hover) {
  .project:hover .project-thumb img {
    transform: scale(1.03);
  }
}

@media (min-width: 52rem) {
  .project-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 0 2rem;
    align-items: stretch;
  }

  .project-list > li .project {
    padding-top: 0.25rem;
    padding-bottom: 0;
  }
}

.project-title {
  margin: 0 0 0.4rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.project-desc {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: none;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.65rem;
}

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.badge--store {
  color: var(--fg);
  border-color: rgba(196, 165, 116, 0.35);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-link::after {
  content: "→";
  font-size: 0.85em;
  transition: transform 0.2s ease;
}

.project-link:hover {
  color: var(--fg);
}

.project-link:hover::after {
  transform: translateX(3px);
}

.project-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.link {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  position: relative;
  padding-bottom: 0.15rem;
  transition: color 0.2s ease;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.link:hover {
  color: var(--accent);
}

.link:hover::after,
.link:focus-visible::after {
  transform: scaleX(1);
}

.link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer {
  margin-top: auto;
  padding-top: clamp(3rem, 12vh, 6rem);
}

.footer-orion {
  margin: 0 0 0.65rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.45;
}

.footer-orion__link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-orion__link:hover {
  color: var(--fg);
}

.footer-orion__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-copy {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}

.page--error {
  justify-content: center;
}

.error-top {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 0.5rem;
}

.error-main {
  text-align: center;
  padding: clamp(2rem, 6vh, 4rem) 0;
}

.error-code {
  margin: 0 0 0.5rem;
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(196, 165, 116, 0.35);
}

.error-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.error-text {
  margin: 0 auto 1.75rem;
  max-width: 28ch;
  color: var(--muted);
  font-size: 0.9375rem;
}

.error-actions {
  margin: 0;
}

.link--standalone {
  font-size: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    filter: blur(40px);
  }

  .project-thumb img {
    transition: none;
  }

  .project:hover .project-thumb img {
    transform: none;
  }

  .link,
  .link::after,
  .project-link,
  .project-link::after {
    transition: none;
  }

  .project-link:hover::after {
    transform: none;
  }

  .lang-dropdown__btn,
  .lang-dropdown__caret,
  .lang-dropdown__option {
    transition: none;
  }

  .lang-dropdown.is-open .lang-dropdown__caret {
    transform: none;
  }
}

@media (max-width: 51.99rem) {
  .project-list > li + li {
    border-top: 1px solid var(--line);
  }

  .project-list > li + li .project {
    padding-top: 1.35rem;
  }
}
