/* self-hosted fonts (variable files, so one file covers every weight) */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* Unbounded is trimmed to capitals, numbers and punctuation: it is only used for uppercase headings */
@font-face {
  font-family: "Unbounded";
  src: url("fonts/unbounded-caps.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  line-height: 1.3;
  margin: 0;
  background-color: #222;
}

/*          Navbar style          */

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  text-decoration: none;
}

#header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 76px;
  padding: 0 32px;
  background: rgba(20, 20, 20, 0.6);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s, box-shadow 0.3s;
}

#header.scrolled {
  background: rgba(10, 10, 10, 0.85);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* initials badge, top left */
.nav-brand {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid #defe47;
  border-radius: 12px;
  color: #defe47;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.04rem;
  transition: box-shadow 0.2s;
}

.nav-brand {
  position: relative;
}

/* glitch on hover: shaking box, split-colour letters and sliced copies */
.nav-brand::before,
.nav-brand::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
}

.nav-brand::before {
  color: #00fffc;
}

.nav-brand::after {
  color: #fc00ff;
}

.nav-brand:hover {
  box-shadow: 0 0 18px rgba(222, 254, 71, 0.4);
  animation: brand-shake 0.4s steps(2) infinite, glitch 0.5s steps(2) infinite;
}

.nav-brand:hover::before {
  animation: brand-slice-a 0.6s steps(1) infinite;
}

.nav-brand:hover::after {
  animation: brand-slice-b 0.6s steps(1) infinite;
}

@keyframes brand-shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

@keyframes brand-slice-a {
  0% { opacity: 1; clip-path: inset(0 0 65% 0); transform: translate(-3px, 0); }
  25% { opacity: 1; clip-path: inset(55% 0 20% 0); transform: translate(3px, 0); }
  50% { opacity: 0; }
  75% { opacity: 1; clip-path: inset(30% 0 45% 0); transform: translate(-2px, 0); }
  100% { opacity: 0; }
}

@keyframes brand-slice-b {
  0% { opacity: 0; }
  25% { opacity: 1; clip-path: inset(70% 0 5% 0); transform: translate(3px, 0); }
  50% { opacity: 1; clip-path: inset(10% 0 60% 0); transform: translate(-3px, 0); }
  75% { opacity: 0; }
  100% { opacity: 1; clip-path: inset(40% 0 35% 0); transform: translate(2px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-brand:hover,
  .nav-brand:hover::before,
  .nav-brand:hover::after {
    animation: none;
  }
}

.nav-brand:focus-visible {
  outline: 2px solid #defe47;
  outline-offset: 3px;
}

.main-nav a {
  position: relative;
  display: block;
  padding: 10px 16px;
  color: #f8f8f8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
  transition: color 0.2s;
}

/* sliding underline */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2px;
  background: #defe47;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #defe47;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a:focus-visible {
  outline: 2px solid #defe47;
  outline-offset: 2px;
  border-radius: 999px;
}

/* contact as a pill button */
.main-nav #nav_contact {
  margin-left: 8px;
  border: 1.5px solid #defe47;
  border-radius: 999px;
  color: #defe47;
}

.main-nav #nav_contact::after {
  display: none;
}

.main-nav #nav_contact:hover {
  background: #defe47;
  color: #111;
}

/* hamburger button (mobile only) */
.nav-toggle {
  display: none;
}

/* menu-only extras: arrows and social links show inside the mobile menu */
.main-nav .nav-arrow,
.main-nav .nav-socials {
  display: none;
}

@media (max-width: 768px) {
  #header {
    height: 64px;
    padding: 0 16px;
    justify-content: space-between;
  }

  .nav-brand {
    width: 44px;
    height: 44px;
    font-size: 17px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: 1.5px solid rgba(222, 254, 71, 0.5);
    border-radius: 12px;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: #defe47;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }

  /* morph into an X when open */
  #header.menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  #header.menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  #header.menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* full-screen menu panel with the landing page's CRT scanlines */
  .main-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    height: calc(100svh - 64px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 20px 24px 28px;
    overflow-y: auto;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0,
        rgba(0, 0, 0, 0.3) 1px,
        transparent 1px,
        transparent 3px
      ),
      radial-gradient(ellipse 80% 50% at 20% 20%, rgba(222, 254, 71, 0.08), transparent 70%),
      #111310;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  #header.menu-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  /* links slide in one after another */
  .main-nav li {
    opacity: 0;
    transform: translateX(-16px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #header.menu-open .main-nav li {
    opacity: 1;
    transform: none;
  }

  #header.menu-open .main-nav li:nth-child(1) { transition-delay: 0.05s; }
  #header.menu-open .main-nav li:nth-child(2) { transition-delay: 0.1s; }
  #header.menu-open .main-nav li:nth-child(3) { transition-delay: 0.15s; }
  #header.menu-open .main-nav li:nth-child(4) { transition-delay: 0.2s; }
  #header.menu-open .main-nav li:nth-child(5) { transition-delay: 0.25s; }

  .main-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: "Unbounded", "Space Grotesk", sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0;
    text-align: left;
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav .nav-arrow {
    display: inline-block;
    color: rgba(248, 248, 248, 0.4);
    font-size: 20px;
    transition: transform 0.25s ease, color 0.25s ease;
  }

  .main-nav a:hover .nav-arrow,
  .main-nav a:focus-visible .nav-arrow,
  .main-nav a.active .nav-arrow {
    color: #defe47;
    transform: translateX(6px);
  }

  .main-nav #nav_contact {
    justify-content: center;
    margin: 28px 0 0;
    padding: 16px;
    border: none;
    border-radius: 999px;
    background: #defe47;
    color: #111;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    letter-spacing: 0.1rem;
  }

  .main-nav #nav_contact:hover {
    background: #e9ff7a;
  }

  /* social links at the bottom of the menu */
  .main-nav .nav-socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 28px;
  }

  .main-nav .nav-socials a {
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #defe47;
    font-size: 20px;
  }

  .main-nav .nav-socials a:hover {
    border-color: #defe47;
    background: rgba(222, 254, 71, 0.08);
  }
}

.title-text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  padding: 120px 15px 80px;
  background-color: #161815;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* retro CRT: horizontal scanlines over a fine film grain */
.title-text::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.32) 0,
      rgba(0, 0, 0, 0.32) 1px,
      transparent 1px,
      transparent 3px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, 180px 180px;
  opacity: 0.85;
  pointer-events: none;
}

/* CRT glass: faint lime phosphor glow behind the title and dark, rounded-off edges */
.title-text::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 55% 45% at 50% 48%, rgba(222, 254, 71, 0.09), transparent 70%),
    radial-gradient(ellipse 110% 95% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
  box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 1200px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* call-to-action buttons */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn:focus-visible {
  outline: 2px solid #defe47;
  outline-offset: 3px;
}

.btn--primary {
  background: #defe47;
  color: #111;
  box-shadow: 0 0 0 rgba(222, 254, 71, 0);
}

.btn--primary:hover {
  box-shadow: 0 8px 28px rgba(222, 254, 71, 0.35);
}

.btn--ghost {
  border: 1.5px solid rgba(248, 248, 248, 0.6);
  color: #f8f8f8;
}

.btn--ghost:hover {
  border-color: #defe47;
  color: #defe47;
}

/* code editor window */
.code-card {
  display: none;
  width: 100%;
  max-width: 500px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(14, 14, 14, 0.85);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(222, 254, 71, 0.06);
  text-align: left;
  overflow: hidden;
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.code-card__bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.code-card__bar span:nth-child(2) {
  background: #febc2e;
}

.code-card__bar span:nth-child(3) {
  background: #28c840;
}

.code-card__bar p {
  margin: 0 0 0 8px;
  color: rgba(248, 248, 248, 0.5);
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
}

.code-card pre {
  margin: 0;
  padding: 22px 24px 26px;
  color: #f8f8f8;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre;
}

.tok-key { color: #fc79c4; }
.tok-var { color: #00fffc; }
.tok-prop { color: #f8f8f8; }
.tok-str { color: #defe47; }

.code-cursor {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: text-bottom;
  background: #defe47;
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  50% {
    opacity: 0;
  }
}

/* wide screens: text on the left, code window on the right
   (extra right padding keeps the code window clear of the fixed social icons) */
@media (min-width: 1200px) {
  .hero-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 120px 0 48px;
  }

  .hero-copy {
    align-items: flex-start;
    text-align: left;
  }

  .hero-ctas {
    justify-content: flex-start;
  }

  .code-card {
    display: block;
    flex-shrink: 0;
  }

}

.title-sub {
  margin: 0.75em 0 0;
  color: #defe47;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.arrow-button__hero {
  position: absolute;
  bottom: 24px;
  color: #defe47;
  font-size: 48px;
}

h1 {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  color: #fffdff;
  text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
    0.025em 0.04em 0 #fffc00;
}

/* glitch burst on load, and again on hover */
.hero-title {
  position: relative;
  cursor: default;
  animation: glitch 160ms steps(2) 4;
}

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

.hero-title::before {
  color: #00fffc;
  animation: glitch-slice-a 0.7s steps(1) 1;
}

.hero-title::after {
  color: #fc00ff;
  animation: glitch-slice-b 0.7s steps(1) 1;
}

.hero-title:hover {
  animation: glitch-hover 160ms steps(2) 4;
}

.hero-title:hover::before {
  animation: glitch-slice-a-hover 0.7s steps(1) 1;
}

.hero-title:hover::after {
  animation: glitch-slice-b-hover 0.7s steps(1) 1;
}

@keyframes glitch-slice-a {
  0% { opacity: 1; clip-path: inset(10% 0 70% 0); transform: translate(-6px, 0); }
  20% { opacity: 1; clip-path: inset(55% 0 20% 0); transform: translate(6px, 0); }
  40% { opacity: 1; clip-path: inset(30% 0 50% 0); transform: translate(-4px, 0); }
  60% { opacity: 1; clip-path: inset(75% 0 5% 0); transform: translate(5px, 0); }
  80% { opacity: 1; clip-path: inset(0 0 85% 0); transform: translate(-3px, 0); }
  100% { opacity: 0; }
}

@keyframes glitch-slice-b {
  0% { opacity: 1; clip-path: inset(65% 0 10% 0); transform: translate(6px, 0); }
  20% { opacity: 1; clip-path: inset(15% 0 65% 0); transform: translate(-6px, 0); }
  40% { opacity: 1; clip-path: inset(45% 0 35% 0); transform: translate(4px, 0); }
  60% { opacity: 1; clip-path: inset(5% 0 80% 0); transform: translate(-5px, 0); }
  80% { opacity: 1; clip-path: inset(85% 0 0 0); transform: translate(3px, 0); }
  100% { opacity: 0; }
}

/* identical copies so the animation restarts on hover */
@keyframes glitch-slice-a-hover {
  0% { opacity: 1; clip-path: inset(10% 0 70% 0); transform: translate(-6px, 0); }
  20% { opacity: 1; clip-path: inset(55% 0 20% 0); transform: translate(6px, 0); }
  40% { opacity: 1; clip-path: inset(30% 0 50% 0); transform: translate(-4px, 0); }
  60% { opacity: 1; clip-path: inset(75% 0 5% 0); transform: translate(5px, 0); }
  80% { opacity: 1; clip-path: inset(0 0 85% 0); transform: translate(-3px, 0); }
  100% { opacity: 0; }
}

@keyframes glitch-slice-b-hover {
  0% { opacity: 1; clip-path: inset(65% 0 10% 0); transform: translate(6px, 0); }
  20% { opacity: 1; clip-path: inset(15% 0 65% 0); transform: translate(-6px, 0); }
  40% { opacity: 1; clip-path: inset(45% 0 35% 0); transform: translate(4px, 0); }
  60% { opacity: 1; clip-path: inset(5% 0 80% 0); transform: translate(-5px, 0); }
  80% { opacity: 1; clip-path: inset(85% 0 0 0); transform: translate(3px, 0); }
  100% { opacity: 0; }
}

@keyframes glitch-hover {
  0% { text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff, -0.05em -0.05em 0 #fffc00; }
  50% { text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff, 0 -0.04em 0 #fffc00; }
  100% { text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff, 0.025em 0.04em 0 #fffc00; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-title:hover,
  .hero-title::before,
  .hero-title::after,
  .hero-title:hover::before,
  .hero-title:hover::after,
  .code-cursor {
    animation: none;
  }
}

@media (max-width: 769px) {
  h1 {
    font-size: 40px;
  }

  .title-sub {
    font-size: 18px;
  }

  .hero-ctas {
    margin-top: 24px;
    gap: 10px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  .arrow-button__hero {
    font-size: 36px;
  }
}

/*    social icons    */
.social-icons {
  z-index: 100;
  position: fixed;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  right: 18px;
  bottom: 0;
}

#contact_button {
  background: none;
  border: none;
}

.social-icons i {
  object-fit: contain;
  font-size: 24px;
  padding: 12px;
  color: #defe47;
  filter: drop-shadow(0px 0px 2px #defe47);
}

.social-icons i:hover {
  cursor: pointer;
  transform: translateX(-7px);
  transition: ease-in-out 0.3s;
}

.vl {
  border-left: 1.9px solid #defe47;
  height: 160px;
}

@media (max-width: 769px) {
  /* on phones, show the icons as a row on the landing screen (between the subtitle and arrow)
     instead of a fixed column that collides with the title and section text */
  .social-icons {
    position: absolute;
    top: calc(100vh - 138px);
    top: calc(100svh - 138px);
    bottom: auto;
    left: 0;
    right: 0;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 0;
    z-index: 5;
  }

  .social-icons i {
    font-size: 22px;
  }

  .social-icons i:hover {
    transform: translateY(-4px);
  }

  .vl {
    display: none;
  }
}

#about-me__container {
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: black;
  padding: 96px 24px 120px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* soft ambient light behind the photo and copy */
#about-me__container::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 45% 55% at 28% 50%, rgba(222, 254, 71, 0.1), transparent 70%),
    radial-gradient(ellipse 40% 50% at 78% 60%, rgba(0, 255, 252, 0.06), transparent 70%);
  pointer-events: none;
}

.about-layout {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: 1050px;
}

/* memoji in a rounded, softly glowing card */
.about-photo {
  flex-shrink: 0;
  width: min(300px, 70vw);
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(222, 254, 71, 0.3);
  border-radius: 28px;
  background: rgba(24, 24, 24, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 50px rgba(222, 254, 71, 0.14);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 60%, rgba(222, 254, 71, 0.22), transparent 70%);
}

.about-photo:hover {
  transform: translateY(-6px);
  border-color: rgba(222, 254, 71, 0.55);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 70px rgba(222, 254, 71, 0.24);
}

.about-photo:hover img {
  animation: memoji-bob 0.9s ease-in-out infinite;
}

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

.about-copy {
  text-align: center;
}

#about-me__container h2 {
  margin-top: 0;
}

#about-me__container hr {
  width: 80px;
  margin: 0 auto 24px;
  border: none;
  height: 3px;
  border-radius: 999px;
  background-color: #defe47;
  box-shadow: 0 0 14px rgba(222, 254, 71, 0.6);
}

#about-me__container p {
  max-width: 620px;
  margin: 0 auto;
  color: #f8f8f8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  line-height: 1.6;
}

/* glowing lime accents */
.hl {
  color: #defe47;
  font-weight: bold;
  text-shadow: 0 0 18px rgba(222, 254, 71, 0.45);
}

.about-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.about-facts li {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #f8f8f8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.about-facts i {
  margin-right: 6px;
  color: #defe47;
}

.about-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 32px;
}

/* slide in when the section scrolls into view (only once JS has marked the page) */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .about-photo.reveal {
  transform: translateY(24px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .about-photo.reveal.is-visible {
  transform: none;
}

.js .about-photo.reveal.is-visible:hover {
  transform: translateY(-6px);
}

.about-copy .reveal:nth-child(2) { transition-delay: 0.05s; }
.about-copy .reveal:nth-child(3) { transition-delay: 0.1s; }
.about-copy .reveal:nth-child(4) { transition-delay: 0.2s; }
.about-copy .reveal:nth-child(5) { transition-delay: 0.3s; }

@media (min-width: 900px) {
  .about-layout {
    flex-direction: row;
    justify-content: center;
    gap: 72px;
  }

  .about-copy {
    text-align: left;
  }

  #about-me__container h2 {
    text-align: left;
  }

  #about-me__container hr {
    margin-left: 0;
  }

  #about-me__container p {
    margin-left: 0;
  }

  .about-facts,
  .about-ctas {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .about-photo.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .about-photo:hover img {
    animation: none;
  }
}

.arrow-button__about-me {
  position: absolute;
  bottom: 18px;
  left: 50%;
  margin-left: -25px;
  color: #defe47;
  font-size: 48px;
}

.arrow-button__about-me:hover {
  cursor: pointer;
}

@media (max-width: 769px) {
  #about-me__container {
    padding: 88px 16px 110px;
  }

  #about-me__container p {
    font-size: 18px;
  }

  .about-facts li {
    font-size: 14px;
  }

}

/*    tech section    */
#tech-sect__container {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #1c1c1c;
  padding-top: 64px;
  padding-bottom: 110px;
  min-height: 100vh;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

#tech-sect__container h2 {
  text-align: center;
}

/* layered background: drifting glows, dot grid, vignette */
.tech-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.tech-bg__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: tech-drift 18s ease-in-out infinite alternate;
}

.tech-bg__glow--lime {
  top: 8%;
  left: -6%;
  background: #defe47;
  opacity: 0.18;
}

.tech-bg__glow--cyan {
  right: -8%;
  bottom: 4%;
  background: #00fffc;
  opacity: 0.14;
  animation-duration: 22s;
  animation-direction: alternate-reverse;
}

/* dot grid that fades out toward the edges */
.tech-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
}

/* vignette pulls focus to the middle */
.tech-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

@keyframes tech-drift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-30px, 80px) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-bg__glow {
    animation: none;
  }
}

@media (max-width: 768px) {
  .tech-bg__glow {
    width: 320px;
    height: 320px;
    filter: blur(70px);
  }
}

.tech-groups {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 960px;
  margin: 16px auto 0;
}

.tech-group h3 {
  margin: 0 0 14px;
  color: #defe47;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2rem;
  text-align: center;
  text-transform: uppercase;
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.tech-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 120px;
  height: 112px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(24, 24, 24, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tech-tile i {
  font-size: 42px;
  color: rgba(248, 248, 248, 0.85);
  transition: color 0.2s ease, filter 0.2s ease;
}

.tech-tile span {
  color: rgba(248, 248, 248, 0.75);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  letter-spacing: 0.03rem;
}

/* tech logos: self-hosted SVGs drawn as masks so they recolour like text on hover */
.tech-icon {
  display: block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* light up in each tool's brand colour */
.tech-tile:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tech-tile:hover i {
  color: var(--brand);
  filter: drop-shadow(0 0 10px var(--brand));
}

/* touch screens have no hover, so show the brand colours by default */
@media (hover: none) {
  .tech-tile i {
    color: var(--brand);
  }
}

@media (max-width: 768px) {
  .tech-grid {
    gap: 10px;
  }

  .tech-tile {
    width: 96px;
    height: 92px;
    gap: 8px;
  }

  .tech-tile i {
    font-size: 34px;
  }

  .tech-tile span {
    font-size: 12px;
  }
}

.glitch {
  font-family: "Unbounded", "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fffdff;
  position: relative;
  text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
    0.025em 0.04em 0 #fffc00;
  animation: glitch 725ms infinite;
}

@media (max-width: 769px) {
  .glitch {
    font-size: 28px;
  }
}

.glitch span {
  position: absolute;
  top: 0;
  left: 0;
}

.glitch span:first-child {
  animation: glitch 500ms infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  transform: translate(-0.04em, -0.03em);
  opacity: 0.75;
}

.glitch span:last-child {
  animation: glitch 375ms infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  transform: translate(0.04em, 0.03em);
  opacity: 0.75;
}

@keyframes glitch {
  0% {
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
      0.025em 0.04em 0 #fffc00;
  }

  15% {
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
      0.025em 0.04em 0 #fffc00;
  }

  16% {
    text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
      -0.05em -0.05em 0 #fffc00;
  }

  49% {
    text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
      -0.05em -0.05em 0 #fffc00;
  }

  50% {
    text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
      0 -0.04em 0 #fffc00;
  }

  99% {
    text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
      0 -0.04em 0 #fffc00;
  }

  100% {
    text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
      -0.04em -0.025em 0 #fffc00;
  }
}

.arrow-button__tech-sect {
  position: absolute;
  bottom: 18px;
  left: 50%;
  margin-left: -25px;
  color: #defe47;
  font-size: 48px;
}

.arrow-button__tech-sect:hover {
  cursor: pointer;
}

/*       project section        */
#projects-sect__container {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: black;
  padding-top: 64px;
  padding-bottom: 64px;
  min-height: 100vh;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

#projects-sect__container h2 {
  text-align: center;
}

/* desktop: keep every section's content clear of the fixed social icons on the right edge */
@media (min-width: 770px) {
  #about-me__container,
  #tech-sect__container,
  #projects-sect__container {
    padding-left: 40px;
    padding-right: 112px;
  }
}

/* background: top glow and perspective grid floor */
.projects-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(222, 254, 71, 0.12), transparent 70%);
}

.projects-bg__floor {
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 55%;
  background-image: linear-gradient(rgba(222, 254, 71, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(222, 254, 71, 0.28) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, black 10%, transparent 85%);
  mask-image: linear-gradient(to top, black 10%, transparent 85%);
  animation: grid-scroll 6s linear infinite;
}

/* grid slowly rolls toward the viewer */
@keyframes grid-scroll {
  from { background-position: 0 0; }
  to { background-position: 0 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-bg__floor {
    animation: none;
  }
}

.project-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 24px auto 0;
}

.project-card {
  flex: 0 1 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: #151515;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(222, 254, 71, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 24px rgba(222, 254, 71, 0.12);
}

.project-card__visual {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 1;
  background: radial-gradient(circle at center, rgba(57, 255, 20, 0.18), transparent 65%), #050505;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* screenshot variant: full-bleed image instead of an icon */
.project-card__visual--image {
  display: block;
  overflow: hidden;
  background: #050505;
}

.project-card__visual--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__visual--image img {
  transform: scale(1.04);
}

.project-card__visual i {
  font-size: 64px;
  color: #39ff14;
  filter: drop-shadow(0 0 14px rgba(57, 255, 20, 0.55));
  transition: transform 0.3s ease;
}

.project-card:hover .project-card__visual i {
  transform: scale(1.08);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 16px 18px;
  text-align: left;
}

/* small brutalist label for the throwback project */
.project-card__badge {
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 2px 7px;
  border: 2px solid #000;
  background: #defe47;
  box-shadow: 3px 3px 0 #f8f8f8;
  color: #000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0 0 8px;
  color: #fffdff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

.project-card p {
  margin: 0 0 12px;
  color: rgba(248, 248, 248, 0.8);
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.project-card__body > p:not(.project-card__note) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* phones: full-width cards so text wraps less */
@media (max-width: 600px) {
  .project-card {
    flex-basis: 100%;
  }
}

.project-card .project-card__note {
  margin-top: -4px;
  padding: 8px 10px;
  border-left: 3px solid #defe47;
  background: rgba(222, 254, 71, 0.06);
  color: #f8f8f8;
  font-size: 13px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.project-card__tags li {
  padding: 3px 8px;
  border: 1px solid rgba(222, 254, 71, 0.35);
  border-radius: 999px;
  color: #defe47;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
}

.project-card__links {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
}

/*        footer        */
.site-footer {
  position: relative;
  background-color: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 24px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  font-family: "Space Grotesk", sans-serif;
}

.site-footer p {
  margin: 0;
  color: rgba(248, 248, 248, 0.6);
  font-size: 14px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-footer__links a {
  color: rgba(248, 248, 248, 0.8);
  font-size: 14px;
  transition: color 0.2s;
}

.site-footer__links a:hover {
  color: #defe47;
}

@media (max-width: 768px) {
  .site-footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__links {
    justify-content: center;
    gap: 16px;
  }
}

/*        modal css (brutalist: thick borders, sharp corners, hard offset shadows)        */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.modal-container.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100% - 12px);
  overflow-y: auto;
  padding: 28px 26px 24px;
  border: 3px solid #defe47;
  border-radius: 0;
  background: #151515;
  box-shadow: 10px 10px 0 #defe47;
  text-align: center;
}

.modal h3 {
  margin: 0;
  color: #fffdff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  font-weight: bold;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

#thread2 {
  height: 3px;
  margin: 14px 0;
  border: none;
  background-color: #f8f8f8;
}

.modal .modal__intro {
  margin: 0;
  color: #f8f8f8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: bold;
}

.contact_form_modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: 16px;
  text-align: left;
}

.contact_form_modal label {
  margin: 12px 0 6px;
  color: #defe47;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.contact_form_modal label:first-of-type {
  margin-top: 0;
}

.modal-container input:not([type="submit"]),
.modal-container textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #f8f8f8;
  border-radius: 0;
  background: #0a0a0a;
  color: #f8f8f8;
  font-family: "Space Grotesk", sans-serif;
  font-size: 16px;
  box-shadow: 5px 5px 0 #000;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.modal-container textarea {
  height: 110px;
  resize: vertical;
}

.modal-container input:not([type="submit"]):focus,
.modal-container textarea:focus {
  outline: none;
  border-color: #defe47;
  background: #000;
  box-shadow: 5px 5px 0 #defe47;
}

.modal-container input::placeholder,
.modal-container textarea::placeholder {
  color: rgba(248, 248, 248, 0.4);
}

.modal-container input:focus::placeholder,
.modal-container textarea:focus::placeholder {
  color: transparent;
}

/* buttons press down into their shadow */
#submit-button {
  margin-top: 22px;
  padding: 12px;
  border: 3px solid #000;
  border-radius: 0;
  background: #defe47;
  color: #000;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  box-shadow: 6px 6px 0 #f8f8f8;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}

#submit-button:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 #f8f8f8;
}

#submit-button:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 #f8f8f8;
}

#submit-button:focus-visible {
  outline: 3px solid #f8f8f8;
  outline-offset: 4px;
}

#submit-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 #f8f8f8;
}

.modal .form-status {
  min-height: 1.25em;
  margin: 14px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
}

.modal .form-status.success {
  color: #defe47;
}

.modal .form-status.error {
  color: #ff6b6b;
}

#close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #f8f8f8;
  border-radius: 0;
  background: #000;
  color: #f8f8f8;
  font-size: 18px;
  box-shadow: 3px 3px 0 #defe47;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, color 0.1s;
}

#close:hover {
  color: #defe47;
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #defe47;
}

#close:focus-visible {
  outline: 3px solid #defe47;
  outline-offset: 2px;
}

@media (max-width: 769px) {
  .modal {
    padding: 26px 18px 20px;
    box-shadow: 7px 7px 0 #defe47;
  }

  .modal h3 {
    font-size: 24px;
    padding: 0 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav li,
  #header.menu-open .main-nav li {
    transition: none;
    transform: none;
  }
}

/* keep the page behind the open mobile menu from scrolling */
body.menu-locked {
  overflow: hidden;
}
