:root {
  --navy-950: #040f1c;
  --navy-900: #061624;
  --navy-850: #071d31;
  --navy-800: #082744;
  --gold: #d5aa4b;
  --gold-soft: #f0d58c;
  --ivory: #f4efe4;
  --muted: #aebed0;
  --panel: rgba(15, 27, 42, 0.9);
  --line: rgba(213, 170, 75, 0.28);
  --sidebar-open: 270px;
  --sidebar-closed: 78px;
  --sidebar: var(--sidebar-open);
}

* {
  box-sizing: border-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at 84% 20%, rgba(21, 92, 148, 0.32), transparent 34rem),
    linear-gradient(135deg, var(--navy-950), var(--navy-900) 48%, var(--navy-800));
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(90deg, transparent, black 16%, black 94%);
}

body.nav-collapsed {
  --sidebar: var(--sidebar-closed);
}

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

a.is-disabled {
  cursor: default;
}

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

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 22px 18px;
  overflow: hidden;
  background: rgba(4, 15, 28, 0.9);
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  transition: width 220ms ease;
}

.nav-toggle {
  position: absolute;
  top: 18px;
  right: 15px;
  z-index: 2;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(213, 170, 75, 0.4);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 2px;
  background: var(--gold-soft);
  transition: transform 180ms ease;
}

.nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-collapsed .nav-toggle span {
  transform: none;
}

body.nav-collapsed .nav-toggle span:nth-child(2) {
  opacity: 1;
}

body:not(.nav-collapsed) .nav-toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

body:not(.nav-collapsed) .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body:not(.nav-collapsed) .nav-toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-brand {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding-top: 36px;
}

.brand-mark-only {
  width: min(138px, 68%);
  transition: opacity 180ms ease, transform 180ms ease;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
}

body.nav-collapsed .brand-mark-only {
  width: 46px;
}

.nav-links {
  display: grid;
  align-content: center;
  gap: 10px;
}

.nav-links a {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  color: rgba(244, 239, 228, 0.68);
  border: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-links span {
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 900;
}

.nav-links b {
  white-space: nowrap;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-soft);
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(213, 170, 75, 0.34);
}

body.nav-collapsed .nav-links a {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

body.nav-collapsed .nav-links b {
  display: none;
}

.top-socials {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 35;
  display: flex;
  gap: 9px;
}

.social-mini,
.brand-button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.social-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 52px;
  height: 42px;
  padding: 0 13px;
  color: var(--gold-soft);
  background: rgba(4, 15, 28, 0.72);
  border: 1px solid rgba(213, 170, 75, 0.34);
  backdrop-filter: blur(14px);
  transition: width 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.social-mini svg,
.brand-button svg,
.social-symbol svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 20px;
  fill: currentColor;
}

.social-mini svg path,
.brand-button svg path,
.social-symbol svg path {
  fill: currentColor;
}

.social-mini use,
.brand-button use,
.social-symbol use {
  fill: currentColor;
}

.top-socials .social-mini {
  color: #f0d58c;
}

.top-socials .social-mini svg,
.top-socials .social-mini svg path {
  color: #f0d58c;
  fill: #f0d58c;
  opacity: 1;
}

.social-mini b {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  transition: opacity 120ms ease, max-width 180ms ease;
}

.social-mini:hover {
  width: 118px;
  color: #fff;
  transform: translateY(-2px);
}

.top-socials .social-mini:hover svg,
.top-socials .social-mini:hover svg path {
  color: #fff;
  fill: #fff;
}

.social-mini--patreon {
  width: 132px;
  border-color: rgba(240, 213, 140, 0.7);
  background: linear-gradient(135deg, rgba(213, 170, 75, 0.24), rgba(4, 15, 28, 0.78));
}

.social-mini--patreon b {
  opacity: 1;
  max-width: 92px;
}

.social-mini--patreon:hover {
  width: 146px;
}

.social-mini:hover b {
  opacity: 1;
  max-width: 82px;
}

.youtube:hover { background: #ff0033; }
.instagram:hover { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.facebook:hover { background: #1877f2; }
.tiktok:hover { background: #111; box-shadow: inset 0 0 0 1px rgba(37, 244, 238, 0.75); }
.patreon:hover { background: #ff424d; }

.site {
  width: calc(100% - var(--sidebar));
  margin-left: var(--sidebar);
  transition: width 220ms ease, margin-left 220ms ease;
}

.section {
  min-height: 100vh;
  padding: 84px clamp(28px, 5vw, 82px);
  scroll-margin-top: 0;
}

.hero-section {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(11, 61, 104, 0.56), transparent 36rem),
    linear-gradient(90deg, rgba(4, 15, 28, 0.9), rgba(4, 15, 28, 0.08), rgba(4, 15, 28, 0.86));
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0 33%, rgba(4, 15, 28, 0.78) 74%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(840px, 92vw);
  display: grid;
  justify-items: center;
  text-align: center;
}

.hero-logo {
  width: min(560px, 62vw);
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.48));
  animation: float-logo 5.5s ease-in-out infinite;
}

.hero-content p {
  margin: 8px 0 26px;
  color: rgba(244, 239, 228, 0.76);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-actions--support {
  margin-top: 16px;
}

.brand-button {
  min-width: 156px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: #081525;
  background: linear-gradient(135deg, var(--gold-soft), #bd8735);
  border: 1px solid rgba(240, 213, 140, 0.78);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.brand-button svg {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: var(--gold-soft);
  padding: 7px;
  background: #081525;
  border-radius: 999px;
  font-size: 11px;
}

.brand-button--patreon svg {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.brand-button--patreon {
  min-width: 300px;
  height: 66px;
  font-size: 14px;
}

.brand-button:hover {
  color: #fff;
  transform: translateY(-3px);
}

.section-head {
  max-width: 900px;
  margin-bottom: 34px;
}

.section-head span,
.contact-section span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: #fff8df;
  font-size: clamp(3rem, 8vw, 7.8rem);
  line-height: 0.88;
  letter-spacing: -0.04em;
}

.projects-section {
  display: grid;
  align-content: center;
}

.project-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 42px);
}

.project-panel {
  min-height: min(64vh, 680px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: clamp(18px, 2vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.075)),
    var(--panel);
  border: 1px solid rgba(213, 170, 75, 0.24);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.22);
}

.project-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.project-panel-head span {
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.carousel-controls {
  display: flex;
  gap: 8px;
}

.carousel-controls button {
  width: 42px;
  height: 42px;
  color: var(--gold-soft);
  background: rgba(4, 15, 28, 0.58);
  border: 1px solid rgba(213, 170, 75, 0.42);
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.carousel-controls button:hover {
  color: #081525;
  background: linear-gradient(135deg, var(--gold-soft), #bd8735);
  transform: translateY(-2px);
}

.carousel-controls button:disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
}

.project-carousel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  background: rgba(4, 15, 28, 0.34);
}

.project-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transform: scale(1.025);
  pointer-events: none;
  transition: opacity 320ms ease, transform 520ms ease;
}

.project-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.project-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid rgba(213, 170, 75, 0.22);
  background: #061624;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.project-slide:hover img {
  filter: brightness(1.08);
}

.project-empty,
.video-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(244, 239, 228, 0.58);
  border: 1px dashed rgba(213, 170, 75, 0.24);
  font-weight: 800;
}

.more-videos-section {
  display: grid;
  align-content: center;
  gap: 22px;
}

.small-video-carousel {
  position: relative;
  display: grid;
  gap: 18px;
}

.video-carousel-controls {
  justify-content: flex-end;
}

.small-video-window {
  overflow: hidden;
}

.small-video-track {
  --video-gap: 20px;
  display: flex;
  gap: var(--video-gap);
  transition: transform 420ms ease;
  will-change: transform;
}

.small-video-card {
  flex: 0 0 calc((100% - 60px) / 4);
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.075)),
    var(--panel);
  border: 1px solid rgba(213, 170, 75, 0.22);
  transition: transform 180ms ease, border-color 180ms ease;
}

.small-video-card:hover {
  transform: translateY(-8px);
  border-color: rgba(240, 213, 140, 0.72);
}

.small-video-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(213, 170, 75, 0.18);
  background: #061624;
}

.small-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #061624;
}

.small-video-card b {
  color: #fff8df;
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.contact-section {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 400px) minmax(0, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
  overflow: hidden;
}

.contact-section > div {
  min-width: 0;
}

.contact-section h1 {
  max-width: 980px;
  font-size: clamp(3.4rem, 6.8vw, 7.2rem);
  overflow-wrap: anywhere;
}

.contact-section img {
  width: min(410px, 72vw);
  justify-self: center;
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.44));
}

.mail-link {
  display: inline-flex;
  margin-top: 28px;
  padding: 22px 30px;
  color: #081525;
  background: linear-gradient(135deg, var(--gold-soft), #bd8735);
  border: 1px solid rgba(240, 213, 140, 0.75);
  font-size: clamp(0.95rem, 1.3vw, 1.2rem);
  font-weight: 950;
  letter-spacing: 0.08em;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@keyframes slow-pan {
  from { transform: scale(1.02) translateX(-1.2%); }
  to { transform: scale(1.06) translateX(1.2%); }
}

@keyframes float-logo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

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

  .small-video-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 780px) {
  :root {
    --sidebar-open: 238px;
    --sidebar-closed: 0px;
  }

  body:not(.nav-collapsed) .site {
    filter: blur(2px);
    pointer-events: none;
  }

  .side-nav {
    transform: translateX(0);
  }

  body.nav-collapsed .side-nav {
    transform: translateX(-100%);
  }

  .nav-toggle {
    right: -54px;
    background: rgba(4, 15, 28, 0.92);
  }

  .top-socials {
    top: 18px;
    right: 18px;
    gap: 6px;
  }

  .social-mini {
    width: 36px;
    height: 36px;
    padding: 0 10px;
  }

  .social-mini:hover {
    width: 36px;
  }

  .social-mini--patreon {
    width: 48px;
  }

  .social-mini b {
    display: none;
  }

  .section {
    padding: 82px 20px;
  }

  .hero-logo {
    width: min(420px, 92vw);
  }

  .hero-content p {
    max-width: 310px;
    letter-spacing: 0.12em;
  }

  .hero-actions,
  .project-columns {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
    width: min(320px, 100%);
  }

  .project-panel {
    min-height: 250px;
  }

  .project-carousel {
    min-height: 300px;
  }

  .small-video-card {
    flex-basis: 100%;
  }
}
