:root {
  --canvas: #0f1110;
  --paper: #191d1a;
  --ink: #ece9de;
  --muted: #99a297;
  --line: rgba(236, 233, 222, 0.16);
  --line-strong: rgba(236, 233, 222, 0.3);
  --accent: #909d90;
  --glow: rgba(144, 157, 144, 0.34);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Archivo", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.3;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(
      circle at 12% 16%,
      rgba(158, 172, 158, 0.18),
      rgba(158, 172, 158, 0) 46%
    ),
    radial-gradient(
      circle at 82% 84%,
      rgba(248, 244, 231, 0.06),
      rgba(248, 244, 231, 0) 40%
    ),
    linear-gradient(145deg, #0b0d0c 0%, #111513 44%, #0b0d0c 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.18;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(236, 233, 222, 0),
      rgba(236, 233, 222, 0) 9px,
      rgba(236, 233, 222, 0.05) 10px
    ),
    linear-gradient(90deg, rgba(236, 233, 222, 0.05) 1px, transparent 1px);
  background-size:
    100% 10px,
    34px 100%;
}

.background-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(236, 233, 222, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 233, 222, 0.06) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle at 50% 42%, black 18%, transparent 84%);
}

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  aspect-ratio: 1;
  border-radius: 999px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.4;
  background: radial-gradient(circle, var(--glow) 0%, rgba(144, 157, 144, 0) 68%);
  filter: blur(6px);
  transition: transform 180ms ease-out;
}

.shell {
  width: min(920px, calc(100vw - 3rem));
  margin: 0 auto;
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 2.8rem;
  padding: clamp(2rem, 4.2vw, 4rem) 0 clamp(1.8rem, 4vw, 3rem);
}

.masthead {
  align-self: end;
}

.kicker {
  margin: 0 0 1rem;
  font: 600 0.75rem/1 "Space Mono", "Consolas", monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 5.8rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.lede {
  margin: 1.3rem 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(0.97rem, 2.1vw, 1.1rem);
}

.panel {
  position: relative;
  border: 1px solid var(--line-strong);
  background: linear-gradient(
    160deg,
    rgba(24, 29, 26, 0.86),
    rgba(24, 29, 26, 0.54)
  );
  backdrop-filter: blur(3px);
}

.panel::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(236, 233, 222, 0),
    rgba(236, 233, 222, 0.56) 50%,
    rgba(236, 233, 222, 0)
  );
  animation: scan 6s linear infinite;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.15rem;
  font: 700 0.74rem/1 "Space Mono", "Consolas", monospace;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.count {
  opacity: 0.7;
}

.project-list {
  display: grid;
}

.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 3rem 1fr 2rem;
  gap: 0.9rem;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  padding: 1.05rem 1.15rem;
  transition:
    background-color 200ms ease,
    transform 200ms ease;
}

.project-item:last-child {
  border-bottom: 0;
}

.project-item::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1px;
  width: 0;
  background: var(--ink);
  transition: width 240ms ease;
}

.project-item:hover,
.project-item:focus-visible {
  background: rgba(236, 233, 222, 0.08);
  transform: translateX(6px);
  outline: none;
}

.project-item:hover::before,
.project-item:focus-visible::before {
  width: 100%;
}

.index {
  font: 700 0.76rem/1 "Space Mono", "Consolas", monospace;
  color: var(--muted);
}

.title-group {
  display: grid;
  gap: 0.18rem;
}

.title {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.domain {
  font: 400 0.77rem/1.25 "Space Mono", "Consolas", monospace;
  color: var(--muted);
}

.arrow {
  justify-self: end;
  font: 700 1rem/1 "Space Mono", "Consolas", monospace;
  color: var(--muted);
  transition: transform 200ms ease;
}

.project-item:hover .arrow,
.project-item:focus-visible .arrow {
  transform: translateX(4px);
  color: var(--ink);
}

footer {
  display: flex;
  justify-content: flex-end;
}

.mail {
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.2rem;
  font: 700 0.92rem/1 "Space Mono", "Consolas", monospace;
  letter-spacing: 0.03em;
  transition: border-color 200ms ease;
}

.mail:hover,
.mail:focus-visible {
  border-color: var(--ink);
  outline: none;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

body.loaded .reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 450ms ease,
    transform 540ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.loaded .panel {
  transition-delay: 120ms;
}

body.loaded footer {
  transition-delay: 220ms;
}

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

@media (max-width: 720px) {
  .shell {
    grid-template-rows: auto auto auto;
    gap: 2rem;
    width: min(920px, calc(100vw - 1.4rem));
  }

  .panel-head,
  .project-item {
    padding-inline: 0.9rem;
  }

  .project-item {
    grid-template-columns: 2.4rem 1fr 1.5rem;
  }

  footer {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }

  .panel::after {
    animation: none;
  }

  .reveal,
  body.loaded .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .project-item,
  .arrow,
  .project-item::before {
    transition: none;
  }
}
