/* ============================================================
   PORTFOLIO V2 — Vanilla CSS (neo-brutalist "paper" theme)
   ============================================================ */

:root {
  --background: #f5f5f5;
  --foreground: #0d0d0d;
  --muted: #e6e6e6;
  --muted-fg: #666666;
  --border: #333333;
  --hairline: #d9d9d9;
  --glitch-m: #ff00c1;
  --glitch-c: #00fff9;
  --ink: #111111;
  --header-h: 64px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--hairline);
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  background-attachment: fixed;
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--foreground);
  color: var(--background);
}

:focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
}

img,
svg,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

/* ---------- Typography ---------- */

.display {
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

strong,
b {
  font-weight: 900;
}

.mono {
  font-family: "Space Mono", ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted-fg);
  letter-spacing: 0.02em;
}

.eyebrow {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted-fg);
}

.section-title {
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-top: 0.75rem;
}

.body-text {
  font-weight: 300;
  line-height: 1.625;
  color: rgba(13, 13, 13, 0.8);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

.nav-link {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover {
  color: rgba(13, 13, 13, 0.65);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 2rem;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1400px;
  }
}

.section {
  padding-block: clamp(4rem, 9vw, 8rem);
  border-top: 1.5px solid rgba(13, 13, 13, 0.2);
}

.hero,
.section,
#finale {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

/* ---------- Components ---------- */

.card {
  background: var(--background);
  border: 1.5px solid var(--foreground);
  box-shadow: 4px 4px 0 var(--foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2px solid var(--foreground);
  background: var(--foreground);
  color: var(--background);
  box-shadow: 3px 3px 0 var(--foreground);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.15s ease,
    transform 0.1s ease;
}

.btn:hover {
  background: var(--background);
  color: var(--foreground);
}

.btn:active {
  box-shadow: 1px 1px 0 var(--foreground);
  transform: translate(2px, 2px) scale(0.98);
}

.btn--ghost {
  background: var(--background);
  color: var(--foreground);
}

.btn--ghost:hover {
  background: var(--foreground);
  color: var(--background);
}

.btn--sm {
  min-height: 44px;
  padding: 0 12px;
  font-size: 0.65rem;
}

.btn--full {
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1.5px solid var(--foreground);
  background: var(--background);
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chip--dashed {
  border-style: dashed;
  opacity: 0.7;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--foreground);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(13, 13, 13, 0.4);
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(13, 13, 13, 0.7);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--foreground);
  color: var(--background);
  transform: translateY(-3px);
}

.icon-btn--lg {
  width: 44px;
  height: 44px;
  border-width: 2px;
  border-color: var(--foreground);
}

/* ---------- Reveal on scroll ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Preloader ---------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--background);
  transition: opacity 0.5s ease;
}

#preloader.is-done {
  opacity: 0;
  pointer-events: none;
}

#preloader-canvas {
  position: absolute;
  inset: 0;
}

.preloader__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  max-width: 420px;
  padding-inline: 1.5rem;
}

.preloader__line {
  display: none;
  animation: fadeIn 0.5s ease-out both;
}

.preloader__line.is-shown {
  display: block;
}

.preloader__status {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--foreground);
}

.preloader__bar {
  margin-top: 0.5rem;
  height: 8px;
  border: 1.5px solid var(--foreground);
}

#preloader-fill {
  height: 100%;
  width: 0%;
  background: var(--foreground);
}

/* ---------- Background canvases ---------- */

#dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#cursor-trail {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  #cursor-trail {
    display: block;
  }
}

/* ---------- Header ---------- */

#site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  border-bottom: 1.5px solid rgba(13, 13, 13, 0.15);
  background: rgba(245, 245, 245, 0.8);
  backdrop-filter: blur(12px);
  transition: transform 0.3s ease;
}

#site-header.is-hidden {
  transform: translateY(-100%);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--foreground);
}

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

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chip-btn {
  padding: 6px 12px;
  border: 1.5px solid rgba(13, 13, 13, 0.3);
  background: none;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: var(--foreground);
  color: var(--background);
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  border-top: 0 solid rgba(13, 13, 13, 0.15);
  background: rgba(245, 245, 245, 0.97);
  backdrop-filter: blur(12px);
  transition:
    max-height 0.3s ease,
    border-top-width 0.3s ease;
}

.mobile-menu.is-open {
  max-height: 340px;
  border-top-width: 1.5px;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-block: 1.5rem;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }

  #menu-toggle {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 4rem;
}

.hero__bg {
  position: absolute;
  inset: 4rem 0 0 0;
  opacity: 0.55;
  z-index: -1;
}

.hero__bg canvas {
  width: 100%;
  height: 100%;
}

.hero__inner {
  position: relative;
}

.hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero .eyebrow {
  margin-top: 2rem;
}

.hero__name {
  margin-top: 1rem;
  font-size: 18vw;
  line-height: 0.85;
  letter-spacing: -0.06em;
}

.hero__name-last {
  color: var(--muted-fg);
}

.hero__role {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted-fg);
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.hero__notes {
  display: none;
}

.hero__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1.5px solid rgba(13, 13, 13, 0.2);
}

.scroll-hint {
  display: flex;
  animation: float 6s ease-in-out infinite;
}

/* ---------- Glitch ---------- */

.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--glitch-m);
  text-shadow: -1px 0 var(--glitch-m);
  animation: glitch-1 5s infinite linear alternate-reverse;
}

.glitch::after {
  color: var(--glitch-c);
  text-shadow: 1px 0 var(--glitch-c);
  animation: glitch-2 1s infinite linear alternate-reverse;
}

.caret {
  animation: caret 1s steps(1) infinite;
}

/* ---------- About ---------- */

.about__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

.about__aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.avatar-card {
  position: relative;
  padding: 1.5rem;
}

.avatar-card__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1.5px solid rgba(13, 13, 13, 0.3);
  background: #000;
}

.avatar-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
  transform: scale(0.94) translateX(2.5%);
}

.avatar-card__tag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--foreground);
  color: var(--background);
  padding: 2px 8px;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.id-card {
  padding: 1.25rem;
  font-size: 0.72rem;
  line-height: 1.8;
}

.id-card__title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-bottom: 1.5px solid rgba(13, 13, 13, 0.2);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.id-card span {
  color: var(--muted-fg);
}

.id-card strong,
.id-card b {
  -webkit-text-stroke: 0.3px currentColor;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.stats {
  display: grid;
  gap: 1rem;
  width: 100%;
  margin-top: 1.25rem;
}

.stat {
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.stat:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--foreground);
}

.stat strong {
  display: block;
  font-size: 2.25rem;
}

.stat span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted-fg);
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .about__grid {
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
  }
}

/* ---------- Timeline ---------- */

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 3rem;
}

.timeline__item {
  position: relative;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.timeline__item:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--foreground);
}

.timeline__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline__item h3 {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.timeline__item h3 span {
  color: var(--muted-fg);
}

.timeline__item p {
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted-fg);
}

.timeline__item ul {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline__item li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.875rem;
}

.timeline__item li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  background: var(--foreground);
}

/* ---------- Projects ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.filter {
  padding: 0.5rem 1rem;
  border: 2px solid var(--foreground);
  background: transparent;
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter:hover {
  background: rgba(13, 13, 13, 0.1);
}

.filter.is-active {
  background: var(--foreground);
  color: var(--background);
  box-shadow: 3px 3px 0 var(--foreground);
}

.projects__grid {
  display: grid;
  gap: 2rem;
  margin-top: 2.5rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
  padding: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 var(--foreground);
}

.project-card.is-hidden {
  display: none;
}

.project-card__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-new {
  background: #fef08a;
  border: 1.5px solid var(--foreground);
  box-shadow: 2px 2px 0 var(--foreground);
  padding: 2px 8px;
  font-family: "Space Mono", monospace;
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.badge-flat {
  background: var(--foreground);
  color: var(--background);
  padding: 2px 8px;
  font-family: "Space Mono", monospace;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.project-card__num {
  font-size: 4rem;
  line-height: 1;
  opacity: 0.1;
  will-change: transform;
}

.project-card__body {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
}

.project-card__body h3 {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.project-card__tagline {
  margin-top: 0.5rem;
}

.project-card__body .body-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 1.25rem;
}

.tech-tags span {
  border: 1.5px solid rgba(13, 13, 13, 0.3);
  padding: 2px 8px;
  font-family: "Space Mono", monospace;
  font-size: 0.62rem;
}

.project-card__hint {
  position: absolute;
  left: 6px;
  top: 50%;
  z-index: 2;
  display: none;
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
  opacity: 0.4;
}

.zone-badge {
  position: absolute;
  z-index: 5;
  display: none;
  transform: translate(-50%, -50%);
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

.zone-badge.is-live {
  background: rgba(14, 12, 40, 0.93);
  border-color: rgba(120, 100, 255, 0.25);
}

.project-card__links {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: none;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

@media (min-width: 768px) {
  .project-card__links {
    display: flex;
  }
}

.project-card:hover .project-card__links,
.project-card:focus-within .project-card__links {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.project-card__links a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--foreground);
  background: var(--background);
  color: var(--foreground);
  box-shadow: 3px 3px 0 var(--foreground);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card__links a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--foreground);
}

.project-card__links a:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--foreground);
}

.scanline {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.045) 3px 4px);
  overflow: hidden;
}

.scanline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.06), transparent);
  transform: translateY(-120%);
}

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

.project-card:hover .scanline::after {
  animation: crt-sweep 0.8s ease-out forwards;
}

.project-card__mobile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

@media (min-width: 640px) {
  .project-card {
    min-height: 420px;
  }
}

@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card__mobile {
    display: none;
  }

  .project-card__hint {
    display: block;
  }
}

/* ---------- Skills ---------- */

.skills__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

.skill-group {
  padding: 1.5rem;
}

.skill-group h3 {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.skill-group__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skill-group__items .chip {
  transition: all 0.15s ease;
}

.skill-group__items .chip:hover {
  transform: translateY(-2px);
  background: var(--foreground);
  color: var(--background);
}

.skill-group--dashed {
  border: 2px dashed rgba(13, 13, 13, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: none;
}

@media (min-width: 640px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pulse-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
}

.pulse-divider hr {
  flex: 1;
  border: none;
  border-top: 1.5px solid var(--foreground);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--foreground);
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.pulse-dot--green {
  background: #22c55e;
  border-radius: 50%;
}

/* ---------- Contact ---------- */

.contact__grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

.contact__headline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.contact__grid .body-text {
  margin-top: 1rem;
}

.email-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-top: 2rem;
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--foreground);
}

.email-card__value {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--foreground);
}

.connect-label {
  margin-top: 2rem;
}

.contact__form-card {
  padding: 1.5rem;
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field .eyebrow {
  margin-bottom: 0.5rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 2px solid var(--foreground);
  background: var(--background);
  padding: 0.75rem 1rem;
  font-family: "Space Mono", monospace;
  font-size: 0.8rem;
  outline: none;
  transition: background 0.2s ease;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  background: #fff;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(102, 102, 102, 0.7);
}

.field__error {
  display: block;
  margin-top: 0.25rem;
  font-family: "Space Mono", monospace;
  font-size: 0.68rem;
  color: #dc2626;
}

.field__error:empty {
  display: none;
}

.form-note {
  margin-top: 1rem;
}

.form-success {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.form-success[hidden] {
  display: none;
}

.form-success__check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--foreground);
}

.form-success h4 {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.form-success .body-text {
  margin-top: 0.75rem;
  max-width: 24rem;
}

.form-success__note {
  margin-top: 0.75rem;
}

.form-success .btn {
  margin-top: 1.5rem;
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact__form-card {
    padding: 2rem;
  }
}

/* ---------- Finale ---------- */

.finale {
  position: relative;
  overflow: hidden;
  border-top: 1.5px solid rgba(13, 13, 13, 0.2);
  padding-top: 0.5rem;
}

.marquee {
  overflow: hidden;
  border-block: 1.5px solid rgba(13, 13, 13, 0.2);
  padding-block: 1rem;
}

.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 60s linear infinite;
}

.marquee__track span {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  opacity: 0.3;
}

.finale__inner {
  position: relative;
  padding-block: 6rem 4rem;
}

.finale__watermark {
  position: absolute;
  left: 50%;
  top: 2.5rem;
  transform: translateX(-50%);
  font-size: 22vw;
  line-height: 1;
  white-space: nowrap;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

.finale__title {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(2.5rem, 9vw, 6rem);
  line-height: 1.05;
}

.finale__title u {
  text-underline-offset: 8px;
  text-decoration-thickness: 4px;
}

.finale__pill {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.finale__links {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 42rem;
  margin: 3rem auto 0;
}

.finale__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: all 0.2s ease;
}

a.finale__link:hover,
.finale__link--cta:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--foreground);
}

.finale__link--cta {
  grid-column: span 2;
}

@media (min-width: 640px) {
  .finale__links {
    grid-template-columns: repeat(4, 1fr);
  }

  .finale__link--cta {
    grid-column: span 2;
  }
}

/* ---------- Footer ---------- */

#footer {
  border-top: 1.5px solid rgba(13, 13, 13, 0.2);
  padding-block: 2rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: center;
  padding-right: 0;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    text-align: left;
    padding-right: 5rem;
  }
}

/* ---------- Resume modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9996;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal[hidden] {
  display: none;
}

.modal__window {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 48rem;
  height: 85vh;
  border: 2px solid var(--foreground);
  background: var(--background);
  box-shadow: 8px 8px 0 #000;
}

.modal__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1.5px solid rgba(13, 13, 13, 0.2);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot--red { background: #ff5f56; }
.dot--yellow { background: #ffbd2e; }
.dot--green { background: #27c93f; }

.modal__title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: rgba(13, 13, 13, 0.6);
}

.modal__close:hover {
  color: var(--foreground);
}

.modal__body {
  position: relative;
  flex: 1;
  background: #fff;
}

.modal__body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #fff;
  text-align: center;
  padding-inline: 1.5rem;
}

.modal__hint {
  max-width: 24rem;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.45);
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1.5px solid rgba(13, 13, 13, 0.2);
}

.project-modal__body {
  display: flex;
  flex-direction: column;
  background: var(--background);
  min-height: 0;
}

.project-modal__content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  min-height: 0;
}

.project-modal__shot {
  margin: -2rem -2rem 1.75rem;
  border-bottom: 1.5px solid rgba(13, 13, 13, 0.2);
  background: var(--muted);
  overflow: hidden;
}

.project-modal__shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 44vh;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1);
  transition: filter 0.35s ease;
}

.project-modal__shot:hover img {
  filter: none;
}

.project-modal__content h3 {
  margin-top: 1rem;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.project-modal__content .body-text {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 54ch;
}

.project-modal__content .tech-tags {
  margin-top: 1.5rem;
}

/* ---------- Scroll top ---------- */

#scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1rem;
  z-index: 9994;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition: all 0.3s ease;
}

#scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#scroll-top svg {
  color: var(--foreground);
}

.scroll-top__track {
  fill: var(--background);
  stroke: var(--hairline);
  stroke-width: 2;
}

.scroll-top__progress {
  fill: none;
  stroke: var(--foreground);
  stroke-width: 2;
  stroke-dasharray: 131.9;
  stroke-dashoffset: 131.9;
  transform: rotate(-90deg);
  transform-origin: center;
}

.scroll-top__pct {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 5rem;
  z-index: 9998;
  padding: 0.7rem 1.1rem;
  background: var(--foreground);
  color: var(--background);
  border: 2px solid var(--foreground);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast.is-shown {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Keyframes ---------- */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes float {
  0%, 100% { transform: translateY(-6px); }
  50% { transform: translateY(6px); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.5); }
}

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

@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 88% 0); transform: translate(-2px, -1px); }
  20% { clip-path: inset(45% 0 30% 0); transform: translate(2px, 1px); }
  40% { clip-path: inset(72% 0 8% 0); transform: translate(-1px, 2px); }
  60% { clip-path: inset(20% 0 60% 0); transform: translate(1px, -2px); }
  80% { clip-path: inset(60% 0 20% 0); transform: translate(2px, 0); }
}

@keyframes glitch-2 {
  0%, 100% { clip-path: inset(80% 0 0 0); transform: translate(2px, 1px); }
  25% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, -1px); }
  50% { clip-path: inset(55% 0 25% 0); transform: translate(1px, 2px); }
  75% { clip-path: inset(30% 0 50% 0); transform: translate(-2px, 1px); }
}

@keyframes crt-sweep {
  from { transform: translateY(-120%); opacity: 1; }
  to { transform: translateY(320%); opacity: 0; }
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 639px) {
  .container {
    padding-inline: 1.25rem;
  }

  .hero__name {
    font-size: 17vw;
  }

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

  .hero__bottom .mono:last-child {
    display: none;
  }

  .toast {
    right: 1rem;
    left: 1rem;
  }
}

@media (min-width: 768px) {
  .hero__name {
    font-size: 12vw;
  }

  .hero__notes {
    display: flex;
    position: absolute;
    right: 2rem;
    bottom: 7rem;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    text-align: right;
  }
}

/* ---------- Reduced motion / touch ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .glitch::before,
  .glitch::after {
    display: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (hover: none) {
  .scanline {
    display: none;
  }
}
