:root {
  --bg: #08090c;
  --fg: #f6f6f1;
  --muted: rgba(246, 246, 241, 0.7);
  --accent: #92afe6;
  --accent-strong: #ffe08a;
  --card: rgba(12, 15, 21, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --body-font: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono-font: "IBM Plex Mono", "SFMono-Regular", Consolas, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--fg);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.6;
  padding: 0 5vw 8rem;
  position: relative;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body::selection {
  background: var(--accent-strong);
  color: #10131b;
}

.background-gradient,
.background-glow,
.texture {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.background-gradient {
  background: radial-gradient(circle at var(--pointer-x, 60%) var(--pointer-y, 20%), #2a344a, transparent 55%),
    radial-gradient(circle at 20% 80%, #222326, transparent 55%),
    radial-gradient(circle at 80% 60%, rgba(255, 224, 138, 0.4), transparent 60%),
    linear-gradient(135deg, #050608, #0e1017 55%);
  mix-blend-mode: screen;
}

.background-glow {
  z-index: -3;
  background: radial-gradient(circle at 30% 20%, rgba(255, 224, 138, 0.2), transparent 60%),
    radial-gradient(circle at 80% 10%, rgba(146, 175, 230, 0.3), transparent 70%),
    radial-gradient(circle at 50% 80%, rgba(65, 227, 186, 0.18), transparent 60%);
  filter: blur(60px);
}

.texture {
  z-index: -1;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"%3E%3Crect fill="none" width="160" height="160"/%3E%3Cg fill="%23ffffff" fill-opacity="0.015"%3E%3Cpath d="M0 0h1v160H0z"/%3E%3Cpath d="M0 0h160v1H0z"/%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(8, 9, 12, 0.6);
  z-index: 10;
}

.logo {
  font-weight: 600;
  letter-spacing: 0.2rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a,
.resume {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.resume:hover {
  color: var(--fg);
}

.resume {
  font-family: var(--mono-font);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.hero {
  padding: 6rem 0 4rem;
  max-width: 1200px;
  display: flex;
  gap: 4rem;
  align-items: center;
}

.hero-copy {
  flex: 1 1 60%;
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
}

.headline-primary,
.headline-secondary {
  display: block;
}

.headline-primary {
  color: rgb(170, 177, 249);
}

.hero p {
  color: var(--muted);
  margin-bottom: 2rem;
}

.eyebrow {
  font-family: var(--mono-font);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--fg);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(120deg, #92afe6, #ffe08a);
  border-color: transparent;
  color: #060606;
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-media {
  flex: 0 0 260px;
  border-radius: 32px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: rgba(13, 18, 27, 0.8);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(146, 175, 230, 0.35), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
  filter: saturate(0.9) contrast(1.05);
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 2rem;
  background: var(--card);
  backdrop-filter: blur(30px);
}

.panel-heading {
  font-family: var(--mono-font);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.panel-content {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.about-intro {
  align-items: flex-start;
}

.about-copy {
  flex: 2 1 360px;
  min-width: 280px;
}

.panel h2 {
  margin-top: 0;
  font-size: 2rem;
}

.panel p {
  color: var(--muted);
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pill-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.9rem;
}

.project-roll {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.project-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.project-row:last-child {
  border-bottom: none;
}

.project-row-meta {
  flex: 0 0 160px;
}

.project-label,
.project-sub {
  display: block;
  font-family: var(--mono-font);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.project-label {
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.project-sub {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
}

.project-row-body {
  flex: 1 1 320px;
  min-width: 250px;
}

.project-row-body h3 {
  margin: 0 0 0.35rem;
}

.project-row-actions {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-end;
}


.project-row-actions.single {
  flex: 0 0 220px;
  width: 220px;
  align-items: stretch;
}

.project-row-actions.single .project-row-cta {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  padding: 1.8rem 1.4rem;
}

.project-row-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono-font);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  text-decoration: none;
  color: var(--accent-strong);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-row-cta:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.project-row-cta.secondary {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--muted);
}

.contact {
  align-items: center;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer {
  margin: 4rem 0 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.985);
  filter: blur(10px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.8s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.project-row.reveal {
  transform: translateY(26px);
}

.project-row.reveal.is-visible {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.is-visible,
  .project-row.reveal,
  .project-row.reveal.is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (max-width: 768px) {
  body {
    padding: 0 1.5rem 5rem;
  }

  .site-header {
    flex-direction: column;
    gap: 1rem;
    position: static;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .panel {
    padding: 1.5rem;
  }

  .hero {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-media {
    width: 100%;
    max-width: 320px;
  }

  .project-row {
    flex-direction: column;
  }

  .project-row-meta {
    width: 100%;
  }

  .project-row-actions {
    width: 100%;
    margin-left: 0;
    align-items: stretch;
  }

  .project-row-cta {
    width: 100%;
  }

  .project-row-actions.single {
    width: 100%;
  }

  .project-row-actions.single .project-row-cta {
    aspect-ratio: auto;
  }
}
