@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-latin.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #080808;
  --ink: #f4f4f1;
  --muted: #b7b7b0;
  --faint: #9a9a93;
  --line: rgba(244, 244, 241, 0.14);
  --line-strong: rgba(244, 244, 241, 0.46);
  --display: "Syne", "Segoe UI", sans-serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --wrap: 1120px;
  --section: clamp(4.75rem, 9vw, 8rem);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(880px 460px at 12% -8%, rgba(255, 255, 255, 0.055), transparent 58%),
    radial-gradient(640px 380px at 100% 0%, rgba(255, 255, 255, 0.04), transparent 52%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

::selection {
  background: #f4f4f1;
  color: #111;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

[id] {
  scroll-margin-top: 1.25rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  z-index: 50;
  transform: translateY(-140%);
  background: var(--ink);
  color: #111;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.narrow {
  width: min(760px, calc(100% - 2.5rem));
}

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 4.5rem 0;
}

.hero__glow,
.hero__stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__glow {
  background: radial-gradient(540px circle at var(--mx, 74%) var(--my, 30%), rgba(255, 255, 255, 0.07), transparent 62%);
}

.hero__stage {
  overflow: hidden;
  perspective: 1200px;
}

.hero__plane {
  position: absolute;
  width: min(38vw, 460px);
  height: min(42vh, 360px);
  right: -2vw;
  top: 8vh;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 58%);
  transform: rotateX(58deg) rotateZ(-18deg);
}

.hero__grid {
  position: absolute;
  left: -12%;
  right: -12%;
  bottom: -30%;
  height: 62%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 76px 76px;
  transform: rotateX(74deg);
  transform-origin: center top;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent 78%);
}

.hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
  width: min(1180px, calc(100% - 2.5rem));
}

.hero__copy,
.hero__text,
.hero-tilt {
  min-width: 0;
}

.hero-tilt {
  transform-style: preserve-3d;
  container-type: inline-size;
}

.hero-title {
  --sx: 1;
  --sy: 1;
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.15rem, 8.4vw, 6.4rem);
  font-size: min(8.5cqw, 6.6rem);
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-wrap: balance;
  text-shadow:
    calc(var(--sx) * 1px) calc(var(--sy) * 1px) 0 #3a3a3a,
    calc(var(--sx) * 2px) calc(var(--sy) * 2px) 0 #333,
    calc(var(--sx) * 3px) calc(var(--sy) * 3px) 0 #2b2b2b,
    calc(var(--sx) * 4px) calc(var(--sy) * 4px) 0 #242424,
    calc(var(--sx) * 5px) calc(var(--sy) * 5px) 0 #1d1d1d,
    calc(var(--sx) * 6px) calc(var(--sy) * 6px) 0 #161616,
    calc(var(--sx) * 7px) calc(var(--sy) * 7px) 0 #101010;
}

.hero-title__line {
  display: block;
}

.hero__subtitle {
  margin-top: 1.35rem;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.15rem);
  letter-spacing: 0.01em;
}

.hero__intro {
  max-width: 38rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero__actions,
.section__action {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.8rem;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn--solid {
  background: var(--ink);
  color: #121212;
}

.btn--solid:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn--ghost:hover {
  background: var(--ink);
  color: #121212;
  transform: translateY(-1px);
}

.discord-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  width: min(100%, 320px);
  margin-left: auto;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    #101010;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  transition: border-color 0.2s ease;
}

.discord-card:hover {
  border-color: var(--line-strong);
}

.discord-card__kicker,
.eyebrow,
.label,
.timeline__date,
.badge {
  color: var(--faint);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.discord-card__kicker,
.eyebrow {
  margin: 0;
}

.discord-card__identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.discord-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #161616;
}

.discord-card__name {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.discord-card__handle,
.discord-card__hint,
.discord-card__error {
  color: var(--muted);
}

.discord-card__handle,
.discord-card__hint,
.discord-card__error,
.discord-card__status,
.discord-card__name {
  margin: 0;
}

.discord-card__status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.discord-card__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.discord-card__dot--online {
  background: var(--ink);
}

.discord-card__dot--idle {
  background: linear-gradient(to top, var(--ink) 50%, transparent 50%);
}

.discord-card__dot--dnd {
  border-radius: 2px;
  position: relative;
}

.discord-card__dot--dnd::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 3px;
  height: 1px;
  background: var(--ink);
}

.discord-card__dot--offline,
.discord-card__dot--unknown {
  border-color: var(--faint);
}

.discord-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.discord-card .btn {
  width: 100%;
}

.section {
  padding: var(--section) 0;
}

.section__header {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section__title,
.contact-panel__title,
.miss h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.section__title {
  margin-top: 0.7rem;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
}

.section__intro,
.prose p,
.project__text,
.skill p,
.server__body p,
.timeline__item p,
.contact-panel__text,
.miss p {
  color: var(--muted);
}

.section__intro {
  margin-top: 0.9rem;
  max-width: 38rem;
}

.project-board {
  display: grid;
  gap: 0.55rem;
}

.project-grid,
.skill-grid {
  display: grid;
  gap: 0.8rem;
}

.project,
.skill {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.project {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.3rem 1.2rem 1.2rem;
}

.skill {
  min-height: 148px;
  padding: 1.15rem 1.1rem 1.25rem;
}

.project:hover,
.skill:hover {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  transform: translateY(-3px);
}

.project__media {
  margin: -1.3rem -1.2rem 1.1rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: center;
}

.project h3,
.skill h3,
.server h3,
.timeline__item h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.project h3,
.skill h3 {
  font-size: 1.35rem;
}

.project__text {
  margin-top: 0.7rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tags li {
  border: 1px solid var(--line);
  padding: 0.18rem 0.48rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.project__link,
.footer__link {
  color: var(--ink);
  text-underline-offset: 0.22em;
}

.project__link {
  margin-top: 1rem;
}

.project__status {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
  text-transform: none;
}

.project__status--done {
  color: #04210f;
  background: #3ddc78;
  border: 1px solid #8dffb6;
}

.project__status--wip {
  color: #fff3a3;
  background: rgba(255, 214, 20, 0.08);
  border: 1px solid #ffe14a;
  box-shadow:
    0 0 10px rgba(255, 214, 40, 0.55),
    0 0 22px rgba(255, 186, 0, 0.28);
}

.project__status--plain {
  color: var(--muted);
  border: 1px solid var(--line);
}

.server-list {
  border-top: 1px solid var(--line);
}

.server {
  display: grid;
  gap: 0.85rem;
  padding: 1.45rem 0 1.55rem;
  border-bottom: 1px solid var(--line);
}

.server h3 {
  margin-top: 0.55rem;
  font-size: 1.55rem;
}

.server__body {
  display: grid;
  gap: 0.9rem;
}

.label {
  display: block;
  margin-bottom: 0.25rem;
}

.badge {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 0.16rem 0.45rem;
}

.timeline {
  position: relative;
  margin-left: 0.2rem;
  padding-left: 1.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 1px;
  background: var(--line);
}

.timeline__item {
  position: relative;
  padding-bottom: 2.15rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__mark {
  position: absolute;
  left: -1.6rem;
  top: 0.42rem;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--ink);
  transform: translateX(-3px);
}

.timeline__item.is-current .timeline__mark {
  background: var(--ink);
}

.timeline__date {
  margin-bottom: 0.35rem;
}

.timeline__item h3 {
  margin-bottom: 0.4rem;
  font-size: 1.4rem;
}

.timeline__item p:last-child,
.prose p {
  max-width: 40rem;
}

.prose {
  display: grid;
  gap: 1rem;
}

.contact-panel {
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 70%);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.contact-panel__title {
  max-width: 11em;
  margin-top: 0.75rem;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
}

.contact-panel__text {
  max-width: 38rem;
  margin-top: 1.1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  align-items: end;
  justify-content: space-between;
}

.footer__brand {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.footer__tag,
.footer__legal {
  margin-top: 0.2rem;
  color: var(--muted);
}

.miss {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 5rem 0;
}

.miss__inner {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}

.miss h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.04s; }
.delay-2 { transition-delay: 0.1s; }
.delay-3 { transition-delay: 0.16s; }
.delay-4 { transition-delay: 0.22s; }
.delay-5 { transition-delay: 0.28s; }
.delay-6 { transition-delay: 0.34s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes plane-drift {
  50% {
    transform: rotateX(63deg) rotateZ(-13deg) translate3d(0, -10px, 0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.85s cubic-bezier(0.16, 0.84, 0.32, 1) both;
  }

  .rise-2 { animation-delay: 0.08s; }
  .rise-3 { animation-delay: 0.16s; }
  .rise-4 { animation-delay: 0.24s; }
  .rise-5 { animation-delay: 0.32s; }

  .hero__plane {
    animation: plane-drift 18s ease-in-out infinite;
  }
}

@media (min-width: 760px) {
  .project-grid,
  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .server {
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: start;
  }
}

@media (min-width: 980px) {
  .wrap,
  .hero__layout {
    width: min(1180px, calc(100% - 6rem));
  }

  .narrow {
    width: min(760px, calc(100% - 6rem));
  }

  .hero__copy {
    display: contents;
  }

  .hero__layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas:
      "title title"
      "copy card";
    column-gap: 3.5rem;
    row-gap: 1.6rem;
    align-items: end;
  }

  .hero-tilt { grid-area: title; }
  .hero__text { grid-area: copy; }
  .hero__aside { grid-area: card; }

  .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .skill-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 979px) {
  .hero {
    align-items: flex-start;
    min-height: auto;
    padding-top: 4.25rem;
  }

  .hero__plane {
    display: none;
  }

  .discord-card {
    margin-left: 0;
  }
}

@media (max-width: 719px) {
  .project__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .project__status {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal,
  .js .reveal.is-in,
  .skill:hover,
  .project:hover,
  .btn:hover {
    opacity: 1 !important;
    transform: none !important;
  }
}
