:root {
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --bg: #050505;
  --bg-soft: #0d0d0d;
  --panel: #111111;
  --text: #f5f5f5;
  --text-soft: #b7b7b7;
  --line: #222222;
  --line-strong: #343434;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
}

body.site-loading {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(5, 5, 5, 0.96);
  opacity: 1;
  transition: opacity 0.28s ease;
}

.site-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.site-loader-inner {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}

.site-loader-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: #f0f0f0;
  animation: loader-spin 0.8s linear infinite;
}

.site-loader-text {
  color: #b8b8b8;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, transparent 0, transparent 127px, rgba(255, 255, 255, 0.05) 128px),
    linear-gradient(to bottom, transparent 0, transparent 127px, rgba(255, 255, 255, 0.04) 128px);
  background-size: 128px 128px;
  opacity: 0.28;
}

.site-header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 2.3rem;
  background: rgba(5, 5, 5, 0.96);
  border-bottom: 1px solid var(--line);
}

.glass {
  box-shadow: none;
  border-radius: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-right: auto;
  margin-left: 1.1rem;
}

.nav-links a {
  color: #9c9c9c;
  text-decoration: none;
  font-weight: 600;
  padding: 0.62rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  border-color: #ffffff;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: #d8d8d8;
  border-radius: 999px;
  padding: 0.33rem 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: #555555;
  color: #ffffff;
}

.container {
  width: min(1200px, calc(100% - 3.5rem));
  margin: 2rem auto 2rem;
}

main.container {
  flex: 1 0 auto;
}

.page-stack {
  display: grid;
  gap: 2.2rem;
}

.profile-stack {
  gap: 3.2rem;
}

.page-title {
  margin-top: 0.8rem;
}

.page-title p {
  max-width: 720px;
  margin-top: 0.7rem;
  font-size: 1.08rem;
}

.hero {
  min-height: 70vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.4rem;
  align-items: center;
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero p,
.page-title p,
.card p,
ul {
  color: var(--text-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.64rem 1.15rem;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: #6a6a6a;
}

.btn-primary {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #0d0d0d;
}

.btn-ghost {
  background: transparent;
  color: #f0f0f0;
}

.avatar-wrap {
  width: min(360px, 88vw);
  margin-inline: auto;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #090909;
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.glow {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.intro-details {
  margin-top: 7.1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.commissions-grid {
  gap: 1.4rem;
}

.card {
  background: linear-gradient(180deg, #121212, #0e0e0e);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem;
}

.tier {
  padding: 1.45rem;
}

.tier li + li {
  margin-top: 0.4rem;
}

.commissions-contact .spotlight {
  padding: 1.7rem 1.4rem;
}

.card h2,
.card h3 {
  margin-top: 0;
  font-family: var(--font-display);
}

.card h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  margin-bottom: 0.6rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.section-heading::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line-strong);
}

ul {
  margin: 0;
  padding-left: 1.2rem;
}

.spotlight {
  text-align: center;
  border-color: var(--line-strong);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0;
}

.tags span {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  color: #cdcdcd;
  font-size: 0.82rem;
}

.projects-grid {
  gap: 1.4rem;
}

.project {
  padding: 1.45rem;
}

.project h2 {
  margin-bottom: 0.45rem;
}

.project .btn {
  margin-top: 0.25rem;
}

.project-meta {
  margin-top: 0.9rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
  display: grid;
  gap: 0.42rem;
}

.project-meta p {
  margin: 0;
  color: #c8c8c8;
}

.project-meta code {
  display: inline-block;
  margin-top: 0.26rem;
  padding: 0.18rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0b0b0b;
  color: #e7e7e7;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-top: 1rem;
}

.detail-page .grid.two {
  align-items: start;
}

.detail-page .project {
  min-height: 100%;
}

.error-page {
  min-height: calc(100vh - 180px);
  display: grid;
  place-items: center;
}

.error-card {
  width: min(900px, 100%);
  padding: 2.6rem 1.6rem;
}

.error-code {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 18vw, 12rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.error-title {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.error-copy {
  margin: 0.75rem auto 0;
  max-width: 620px;
  color: #bdbdbd;
}

.user-links-section {
  margin-top: 1.3rem;
}

.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.link-list a {
  text-decoration: none;
  color: #f0f0f0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.36rem 0.8rem;
}

.link-list a:hover {
  border-color: #656565;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.social-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  color: #e5e5e5;
  background: #131313;
}

.site-footer {
  text-align: center;
  padding: 2.2rem 1rem 3rem;
  color: #8f8f8f;
}

.mega-footer {
  margin-top: 2.2rem;
  border-top: 1px solid var(--line);
  background: #2a2d31;
  color: #e9edf2;
  border-radius: 0;
  padding: 2rem 1.35rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.footer-brand {
  display: grid;
  align-content: start;
  gap: 0.85rem;
}

.footer-logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #ffffff;
}

.footer-brand p {
  margin: 0;
  color: #c2c8d0;
}

.footer-image {
  width: 74px;
  height: 74px;
  border-radius: 14px;
  border: 1px solid #4a4f56;
  overflow: hidden;
  background: #1a1c1f;
}

.footer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.footer-col {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.footer-col h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.04rem;
  color: #c7d0dd;
}

.footer-col a {
  text-decoration: none;
  color: #eef3fb;
  font-weight: 600;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  color: #8e98a8;
  margin-top: 0.7rem;
  padding-top: 0;
  border-top: 0;
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: rise 0.48s ease forwards;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .site-loader,
  .site-loader-ring {
    transition: none;
    animation: none;
  }

  .btn,
  .nav-links a {
    transition: none;
  }
}

@media (max-width: 920px) {
  .site-header {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 0.95rem;
  }

  .hero,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .intro-details {
    margin-top: 4.3rem;
  }

  .container {
    width: min(1200px, calc(100% - 1.6rem));
  }

  .page-stack {
    gap: 1.45rem;
  }

  .profile-stack {
    gap: 2rem;
  }

  .error-card {
    padding: 1.7rem 1rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .hero {
    min-height: unset;
    padding-top: 0.5rem;
  }

  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links {
    justify-content: center;
  }
}
