:root {
  --bg: #020403;
  --panel: #07110a;
  --panel-strong: #0b180f;
  --border: rgba(104, 255, 156, 0.18);
  --text: #d9ffe1;
  --muted: #8ab899;
  --accent: #68ff9c;
  --accent-rgb: 104, 255, 156;
  --accent-blue: #74d7ff;
  --accent-blue-rgb: 116, 215, 255;
  --accent-violet: #b7a0ff;
  --accent-violet-rgb: 183, 160, 255;
  --accent-warm: #ffcc66;
  --accent-warm-rgb: 255, 204, 102;
  --shadow: 0 0 0 1px rgba(104, 255, 156, 0.08), 0 12px 28px rgba(0, 0, 0, 0.45);
  --radius: 0px;
  --radius-sm: 0px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-monospace, "sfmono-regular", "sf mono", "cascadia mono", "deja vu sans mono", monospace;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(104, 255, 156, 0.08), transparent 26%),
    radial-gradient(circle at 85% 18%, rgba(116, 215, 255, 0.06), transparent 22%),
    linear-gradient(180deg, #010201 0%, var(--bg) 40%, #010201 100%);
  animation: page-in 520ms ease-out both;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(104, 255, 156, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 255, 156, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.32;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(104, 255, 156, 0.03) 50%, transparent 100%);
  background-size: 100% 6px;
  animation: scan 10s linear infinite;
  opacity: 0.35;
}

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

button {
  font: inherit;
}

p {
  margin: 0;
}

.wrap {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  margin-top: 10px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: #050b06;
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 0;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(104, 255, 156, 0.18);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 0;
  border: 1px solid transparent;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.05);
  transform: translateY(-1px);
  outline: none;
}

main {
  padding: 28px 0 60px;
}

section {
  --section-accent: var(--accent);
  --section-accent-rgb: var(--accent-rgb);
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(var(--section-accent-rgb), 0.05), rgba(5, 11, 6, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
}

section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--section-accent), transparent);
  opacity: 0.95;
  pointer-events: none;
}

section {
  position: relative;
  overflow: hidden;
}

main > section:not(#home),
.mood-only {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}

#home {
  --section-accent: var(--accent);
  --section-accent-rgb: var(--accent-rgb);
}

#projects {
  --section-accent: var(--accent-blue);
  --section-accent-rgb: var(--accent-blue-rgb);
}

#links {
  --section-accent: var(--accent-violet);
  --section-accent-rgb: var(--accent-violet-rgb);
}

#about {
  --section-accent: var(--accent-warm);
  --section-accent-rgb: var(--accent-warm-rgb);
}

.mood-only {
  margin-top: 26px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  min-height: 72vh;
  padding-top: 34px;
  padding-bottom: 34px;
}

.nav,
.hero-copy,
.hero-card,
main > section {
  animation: rise-in 680ms ease-out both;
}

.nav {
  animation-delay: 60ms;
}

.hero-copy {
  animation-delay: 120ms;
}

.hero-card {
  animation-delay: 180ms;
}

main > section:nth-of-type(2) {
  animation-delay: 240ms;
}

main > section:nth-of-type(3) {
  animation-delay: 300ms;
}

main > section:nth-of-type(4) {
  animation-delay: 360ms;
}

main > section:nth-of-type(5) {
  animation-delay: 420ms;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(125, 247, 198, 0.85);
  animation: pulse 2.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

.title {
  margin: 0;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-transform: lowercase;
  position: relative;
}

.title::after {
  content: "_";
  display: inline-block;
  margin-left: 4px;
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

.tagline {
  margin-top: 18px;
  color: var(--accent);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  max-width: 36rem;
}

.subtext {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 42rem;
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.quick-link {
  --tile-accent-rgb: var(--accent-rgb);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--tile-accent-rgb), 0.18);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(var(--tile-accent-rgb), 0.08), rgba(0, 0, 0, 0.02)),
    var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.quick-link:hover,
.quick-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--tile-accent-rgb), 0.28);
  background:
    linear-gradient(135deg, rgba(var(--tile-accent-rgb), 0.14), rgba(0, 0, 0, 0.03)),
    var(--panel-strong);
  outline: none;
}

.quick-link:nth-child(1) {
  --tile-accent-rgb: var(--accent-rgb);
}

.quick-link:nth-child(2) {
  --tile-accent-rgb: var(--accent-blue-rgb);
}

.quick-link:nth-child(3) {
  --tile-accent-rgb: var(--accent-violet-rgb);
}

.quick-link:nth-child(4) {
  --tile-accent-rgb: var(--accent-warm-rgb);
}

.quick-link-label {
  font-size: 0.98rem;
  font-weight: 600;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(var(--accent-blue-rgb), 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(var(--accent-blue-rgb), 0.06), rgba(5, 10, 6, 0.98)),
    var(--panel);
}

.hero-avatar {
  display: block;
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  margin-left: auto;
  margin-bottom: 14px;
  border: 1px solid rgba(var(--accent-blue-rgb), 0.22);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.32));
}

.hero-card h2,
.section-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--section-accent);
}

.hero-metrics {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.metric {
  --metric-accent-rgb: var(--section-accent-rgb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(var(--metric-accent-rgb), 0.18);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(var(--metric-accent-rgb), 0.08), rgba(0, 0, 0, 0.02));
}

.metric span {
  color: var(--muted);
}

.metric strong {
  font-weight: 600;
}

.grid-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-lead {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.6;
}

.cards {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.card {
  --card-accent-rgb: var(--section-accent-rgb);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(var(--card-accent-rgb), 0.16);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(var(--card-accent-rgb), 0.06), rgba(0, 0, 0, 0.02)),
    var(--panel);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(var(--card-accent-rgb), 0.28);
  background: var(--panel-strong);
  outline: none;
}

.project-card:nth-child(2n) {
  --card-accent-rgb: var(--accent-blue-rgb);
}

.project-card:nth-child(3n) {
  --card-accent-rgb: var(--accent-violet-rgb);
}

.project-card:nth-child(4n) {
  --card-accent-rgb: var(--accent-warm-rgb);
}

.link-card:nth-child(4n + 1) {
  --card-accent-rgb: var(--accent-rgb);
}

.link-card:nth-child(4n + 2) {
  --card-accent-rgb: var(--accent-blue-rgb);
}

.link-card:nth-child(4n + 3) {
  --card-accent-rgb: var(--accent-violet-rgb);
}

.link-card:nth-child(4n + 4) {
  --card-accent-rgb: var(--accent-warm-rgb);
}

.project-card,
.link-card,
.photo {
  animation: rise-in 650ms ease-out both;
}

.project-card:nth-child(1),
.link-card:nth-child(1),
.photo:nth-child(1) { animation-delay: 80ms; }
.project-card:nth-child(2),
.link-card:nth-child(2),
.photo:nth-child(2) { animation-delay: 120ms; }
.project-card:nth-child(3),
.link-card:nth-child(3),
.photo:nth-child(3) { animation-delay: 160ms; }
.project-card:nth-child(4),
.link-card:nth-child(4),
.photo:nth-child(4) { animation-delay: 200ms; }

.project-card {
  grid-column: span 6;
}

.link-card {
  grid-column: span 3;
  min-height: 168px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-badge {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(104, 255, 156, 0.22);
  border-radius: 0;
  background: rgba(104, 255, 156, 0.08);
  color: var(--accent);
}

.icon-badge svg {
  width: 20px;
  height: 20px;
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(var(--card-accent-rgb), 0.18);
  border-radius: 0;
  background: rgba(var(--card-accent-rgb), 0.08);
  color: rgb(var(--card-accent-rgb));
  font-size: 0.82rem;
  white-space: nowrap;
}

.card h3 {
  margin: 0;
  font-size: 1.14rem;
}

.card p {
  color: var(--muted);
  line-height: 1.65;
}

.card-link {
  margin-top: auto;
  width: fit-content;
  color: #dbe8ff;
  font-weight: 600;
  transition: color 160ms ease, transform 160ms ease;
}

.card-link:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.link-title {
  font-size: 1.02rem;
  font-weight: 600;
}

.link-arrow {
  margin-top: auto;
  color: var(--muted);
  font-size: 1.2rem;
  align-self: end;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 12px;
}

.photo {
  --photo-accent-rgb: var(--section-accent-rgb);
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border: 1px solid rgba(var(--photo-accent-rgb), 0.18);
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(var(--photo-accent-rgb), 0.08), rgba(0, 0, 0, 0.02)),
    #040703;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.02);
  transition: transform 220ms ease, filter 220ms ease;
}

.photo:hover img {
  transform: scale(1.03);
}

.photo .caption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(var(--photo-accent-rgb), 0.28);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.78);
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.photo:nth-child(4n + 1) {
  --photo-accent-rgb: var(--accent-rgb);
}

.photo:nth-child(4n + 2) {
  --photo-accent-rgb: var(--accent-blue-rgb);
}

.photo:nth-child(4n + 3) {
  --photo-accent-rgb: var(--accent-violet-rgb);
}

.photo:nth-child(4n + 4) {
  --photo-accent-rgb: var(--accent-warm-rgb);
}

.photo.wide {
  grid-column: span 8;
  min-height: 240px;
}

.photo.square {
  grid-column: span 4;
  min-height: 240px;
}

.photo.tall {
  grid-column: span 4;
  min-height: 300px;
}

.photo.small {
  grid-column: span 3;
  min-height: 180px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: start;
}

.about-box {
  padding: 20px;
  border: 1px solid rgba(var(--section-accent-rgb), 0.18);
  border-radius: 0;
  background: linear-gradient(135deg, rgba(var(--section-accent-rgb), 0.07), rgba(0, 0, 0, 0.02));
}

.about-box p {
  color: var(--muted);
  line-height: 1.7;
}

.meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(var(--section-accent-rgb), 0.16);
  border-radius: 0;
  background: rgba(var(--section-accent-rgb), 0.04);
  color: var(--muted);
}

.meta-list strong {
  color: var(--text);
  font-weight: 600;
}

.copy-row {
  margin-top: 14px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(var(--section-accent-rgb), 0.22);
  border-radius: 0;
  background: rgba(var(--section-accent-rgb), 0.08);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(var(--section-accent-rgb), 0.12);
  border-color: rgba(var(--section-accent-rgb), 0.34);
  outline: none;
}

.copy-feedback {
  min-height: 1.2em;
  margin-top: 10px;
  color: var(--accent);
  font-size: 0.95rem;
}

footer {
  padding: 18px 0 34px;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

@keyframes blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

@keyframes scan {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(100%);
  }
}

@media (max-width: 920px) {
  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card,
  .link-card {
    grid-column: span 12;
  }

  .photo.wide,
  .photo.square,
  .photo.tall,
  .photo.small {
    grid-column: span 6;
    min-height: 220px;
  }

  .grid-head {
    flex-direction: column;
    align-items: start;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(calc(100% - 20px), var(--max));
  }

  main {
    padding: 18px 0 44px;
  }

  section {
    padding: 18px;
    margin-top: 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .title {
    font-size: clamp(2.4rem, 18vw, 4rem);
  }

  .nav {
    padding: 12px 14px;
  }

  .nav-links a {
    padding: 7px 10px;
  }

  .metric {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .hero-links {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-card,
  main > section,
  .project-card,
  .link-card,
  .photo {
    animation-duration: 1ms;
  }

  .project-card,
  .link-card,
  .photo.wide,
  .photo.square,
  .photo.tall,
  .photo.small {
    grid-column: span 12;
    min-height: 200px;
  }
}

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

  body,
  .nav,
  .hero-copy,
  .hero-card,
  main > section,
  .project-card,
  .link-card,
  .photo {
    animation: none !important;
  }

  body::after,
  .title::after {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
