* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #232324;
  --bg-soft: #0b0b12;
  --bg-softer: #121220;
  --fg: #ede3d8;
  --muted: #b6aa9d;
  --accent: #8f7bff;
  --accent-soft: rgba(143, 123, 255, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.6);
}

html,
body {
  height: 100%;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
}

main {
  width: min(1100px, 100% - 3rem);
  margin: 0 auto 5rem;
}

/* NAV */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1100px, 100% - 3rem);
  margin: 1.2rem auto 0;
  padding: 0.5rem 0;
  border-radius: 0;
  background: transparent;
  border: none;
  backdrop-filter: none;
  transform-origin: top;
}

.nav--scrolled {
  background: transparent;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  width: 80px;
  height: 80px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.3rem;
  font-size: 0.88rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), #5ee6ff);
  transition: width 220ms ease-out;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-links a:hover::after {
  width: 100%;
}

/* SECTIONS */

.section {
  padding: 6.5rem 0 4.5rem;
  scroll-margin-top: 6rem;
}

.section:first-of-type {
  padding-top: 10rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.section-label {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--fg);
}

.section-body {
  border-radius: 22px;
  padding: 1.8rem 1.8rem 2rem;
  background: linear-gradient(145deg, #26262a, #1c1c20);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

/* HERO */

.hero {
  padding-top: 9rem;
  padding-bottom: 5.5rem;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2.6rem;
  min-height: calc(100vh - 11rem);
  max-width: 1100px;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

.hero-title {
  font-size: clamp(3.1rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.hero-body {
  max-width: 40rem;
  color: var(--fg);
  font-size: 1.06rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  justify-content: center;
}

.hero-pixel-field {
  position: absolute;
  inset: -80px;
  background-image:
    linear-gradient(rgba(237, 227, 216, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 227, 216, 0.07) 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
  animation: heroPixelsDrift 40s linear infinite;
}

.hero-logo {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  background: rgba(5, 5, 9, 0.9);
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ABOUT */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.about-grid p {
  color: var(--fg);
  font-size: 0.98rem;
  line-height: 1.7;
}

.about-meta {
  display: grid;
  gap: 1.2rem;
}

.meta-block {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(145deg, #26262a, #1c1c20);
}

.meta-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.meta-value {
  font-size: 0.92rem;
}

/* WORK */

.work-shell {
  display: flex;
  flex-direction: column;
  gap: 2.4rem;
}

.work-title-wrap {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 1.6rem;
}

.work-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.work-title {
  margin-top: 0.5rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem;
}

.project-card {
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(150deg, #29292f, #1b1b20);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 55%);
  opacity: 0;
  transition: opacity 260ms ease-out;
}

.project-card:hover::before {
  opacity: 1;
}

.project-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.project-title {
  font-size: 1rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.project-description {
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  margin-top: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.project-link:hover {
  color: var(--fg);
}

.cursor-hint {
  position: fixed;
  top: 0;
  left: 0;
  width: 78px;
  height: 78px;
  margin-top: -39px;
  margin-left: -39px;
  border-radius: 999px;
  background: rgba(35, 35, 38, 0.85);
  border: 1px solid rgba(237, 227, 216, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  backdrop-filter: blur(18px);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0;
  z-index: 40;
}

/* INTRO LOADER */

.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #272742 0, #0a0a13 60%);
  pointer-events: none;
}

.loader-mark {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 9, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
  margin-bottom: 1.4rem;
}

.loader-logo {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  background: rgba(5, 5, 9, 0.9);
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: block;
}

.loader-mark {
  animation: loaderGlow 4s ease-in-out infinite;
}

.loader-initials {
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
}

.loader-text {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* CONTACT */

.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 2.4rem;
  align-items: center;
}

.contact-shell p {
  color: var(--fg);
  font-size: 0.98rem;
  line-height: 1.7;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: flex-end;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out,
    background 200ms ease-out, border-color 200ms ease-out;
}

.btn-primary {
  background: #ede3d8;
  color: #232324;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8);
}

.btn-secondary {
  background: #2b2b30;
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
  background: #34343a;
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: rgba(237, 227, 216, 0.32);
}

.btn-ghost:hover {
  color: var(--fg);
  background: rgba(237, 227, 216, 0.06);
}

@keyframes heroDotsDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 30px 30px;
  }
}

@keyframes heroPixelsDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 40px 40px, -40px -40px;
  }
}

@keyframes loaderGlow {
  0%,
  100% {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.16);
  }
  50% {
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  main,
  .nav {
    width: min(100% - 2.4rem, 760px);
  }

  .hero-inner {
    min-height: calc(100vh - 9rem);
    gap: 2rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 6vw, 3rem);
  }

  .hero-body {
    font-size: 0.98rem;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .about-grid,
  .contact-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .cursor-hint {
    display: none;
  }
}

@media (max-width: 640px) {
  main,
  .nav {
    width: 100%;
    margin-inline: auto;
  }

  .nav {
    border-radius: 0;
    margin-top: 0;
  }

  .section {
    padding-inline: 1.25rem;
  }

  .section-body {
    padding: 1.4rem 1.3rem 1.7rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8.5vw, 2.6rem);
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
