:root {
  --bg-deep: #04060d;
  --bg-mid: #0a1020;
  --ink: #e8eef8;
  --ink-muted: #8b9bb8;
  --ink-dim: #5c6d8a;
  --accent: #7ec8e3;
  --accent-soft: rgba(126, 200, 227, 0.14);
  --line: rgba(140, 170, 210, 0.18);
  --star: #dce9f7;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --space: clamp(1.25rem, 4vw, 2.25rem);
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.55;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, #121a32 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 60%, #0c1528 0%, transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, #0b1424 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 40%, rgba(2, 4, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(4, 6, 13, 0.15) 0%, transparent 20%, transparent 70%, rgba(4, 6, 13, 0.65) 100%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 2;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem var(--space);
}

.nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;
  transition: color 0.25s ease;
}

.nav a:hover {
  color: var(--accent);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--space) 4.5rem;
  animation: rise 1s ease-out both;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
}

.hero-copy {
  min-width: 0;
  max-width: 26rem;
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-shadow: 0 0 48px rgba(126, 200, 227, 0.16);
}

.hero-photo {
  margin: 0;
  width: clamp(12.5rem, 32vw, 20rem);
  flex-shrink: 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 2px;
  filter: saturate(0.92) contrast(1.05);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  color: var(--ink-muted);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #061018;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: #a5daf0;
  border-color: #a5daf0;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem var(--space);
}

.section-head {
  margin-bottom: 2.25rem;
  max-width: 36rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.project {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    border-color 0.3s ease;
}

.project.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.project:last-child {
  border-bottom: 1px solid var(--line);
}

.project:hover {
  border-color: rgba(126, 200, 227, 0.35);
}

.project-index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 0.35rem;
}

.project-body h3 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-body h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-body h3 a:hover {
  color: var(--accent);
  border-bottom-color: rgba(126, 200, 227, 0.45);
}

.project-meta {
  margin: 0 0 0.85rem;
  color: var(--ink-dim);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.project-body > p:not(.project-meta) {
  margin: 0;
  max-width: 48rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.project-media {
  display: block;
  margin: 0 0 1.25rem;
  max-width: min(100%, 60rem);
  padding: 0.65rem;
  background: linear-gradient(160deg, rgba(18, 28, 48, 0.95), rgba(8, 12, 22, 0.98));
  border: 1px solid rgba(150, 185, 220, 0.28);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(4, 6, 13, 0.5) inset,
    0 18px 48px rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.project-media:hover {
  border-color: rgba(126, 200, 227, 0.5);
  box-shadow:
    0 0 0 1px rgba(4, 6, 13, 0.5) inset,
    0 22px 54px rgba(0, 0, 0, 0.42);
  transform: translateY(-2px);
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid rgba(140, 170, 210, 0.16);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
}

.contact-links a {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--space) 3rem;
  color: var(--ink-dim);
  font-size: 0.88rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .nav {
    gap: 1rem;
  }

  .nav a {
    font-size: 0.85rem;
  }

  .hero {
    padding-top: 1.75rem;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-photo {
    width: min(100%, 14.5rem);
  }

  .project {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero,
  .project {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .project-media:hover {
    transform: none;
  }
}
