/* ---------------- Base / Reset / Global ---------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

:root {
  /* ====== FONTS ====== */
  --font-hero: "Satoshi", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-logo: "IBM Plex Mono", sans-serif;

  /* ====== COLORS ====== */
  --color-bg: #121212; /* page background */
  --color-text: #f4ede4; /* main text color */
  --color-accent: #ff6600; /* highlight / brand */
  --color-muted: #a9a29c; /* subtext / less emphasis */
  --color-hover: #f1f1f1; /* hover state color */
  --color-white: #fff;

  /* ====== SPACING ====== */
  --space-1: 0.5rem; /* 8px */
  --space-2: 1rem; /* 16px */
  --space-3: 1.5rem; /* 24px */
  --space-4: 2rem; /* 32px */
  --space-5: 3rem; /* 48px */

  /* ====== TYPE SCALE ====== */
  --text-sm: 0.875rem; /* 14px */
  --text-base: 1rem; /* 16px */
  --text-lg: 1.25rem; /* 20px */
  --text-xl: 2rem; /* 32px */
  --text-xxl: clamp(2rem, 6vw, 3rem); /* responsive hero size */

  /* ====== EFFECTS ====== */
  --radius-pill: 9999px;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;

  --shadow-accent: 0 0 12px rgba(196, 87, 24, 0.6);
}

/* ---------------- Global Layout ---------------- */
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text); /*main-text color*/
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

main {
  padding-inline: var(--space-4);
}

.container {
  max-width: 72rem;
  margin-inline: auto;
}

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

header {
  padding-block: var(--space-3);
  padding-inline: var(--space-4);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-logo);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .05rem;
  color: inherit;
}

.logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

a:hover {
  /* optional hover style */
  color: var(--color-accent);
}

/* ---------------- Typography ---------------- */
.hero-text {
  font-family: var(--font-hero);
  font-weight: 700;
  font-size: var(--text-xxl);
  line-height: 1.1;
}

.highlighted {
  color: var(--color-accent);
}

.bio-text {
  font-weight: 400;
  color: var(--color-muted);
  font-size: var(--text-base);
  margin-block-start: var(--space-4);
  line-height: 1.6;
  max-width: 50ch;
  transition: color 0.2s ease;
}

.bio-text:hover {
  color: var(--hover-light);
}

/* ---------------- Navigation ---------------- */
nav {
  font-family: var(--font-hero);
}

nav ul {
  display: flex;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  justify-content: flex-end; /* align links to the right */
}

nav a {
  font-weight: 400;
  letter-spacing: 0.05rem;
  display: inline-block;
  padding: var(--space-1) var(--space-2);
}

nav a:hover {
  animation: glitch 0.3s ease-in-out;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Modifier */
.pill {
  border: 1px solid var(--color-white);
  border-radius: var(--radius-pill);
}

.pill:hover {
  box-shadow: var(--shadow-accent);
}

/* ---------------- Footer ---------------- */
footer {
  text-align: center;
  padding: var(--space-4);
  font-size: var(--text-sm);
  transition: transform 0.3s ease;
}

footer:hover {
  transform: translateY(-5px) scale(1.03);
}

/* ---------------- Animations ---------------- */
@keyframes glitch {
  from,
  to {
    text-shadow: 0 0 2px var(--color-white), 0 0 4px var(--color-accent);
    transform: translate(0);
  }
  20% {
    transform: translate(-1px, 0);
  }
  40% {
    transform: translate(1px, 0);
  }
  60% {
    transform: translate(-1px, 1px);
  }
  80% {
    transform: translate(1px, -1px);
  }
}

@keyframes zoomBounce {
  0% {
    opacity: 0;
    transform: scale(0.6) translateZ(-100px);
  }
  60% {
    opacity: 1;
    transform: scale(1.2);
  }
  80% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes hangDrop {
  0% {
    transform: rotate(0deg) translateY(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  40% {
    transform: rotate(25deg) translateY(10px);
  }
  60% {
    transform: rotate(15deg) translateY(20px);
  }
  80% {
    transform: rotate(18deg) translateY(25px);
  }
  100% {
    transform: rotate(18deg) translateY(25px);
    opacity: 1;
  }
}

.zoom {
  display: inline-block;
  animation: zoomBounce 1.2s ease-out 0s forwards;
  will-change: transform, opacity;
}

.dev-hang {
  display: inline-block;
  transform-origin: left top;
  animation: hangDrop 1.2s ease-in-out 1.1s forwards;
  will-change: transform;
}

.dev-stable {
  display: inline-block;
}

.glitch-wrapper {
  display: inline-block;
  position: relative;
  overflow: visible;
  height: 1.2em;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 480px) {
  header {
    padding: var(--space-2) var(--space-2);
  }

  nav ul {
    gap: var(--space-1);
  }

  nav a {
    font-size: var(--text-sm);
    letter-spacing: 0.02rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.2;
    white-space: nowrap; /* keep "Contacts" on one line (mobile) */
  }

  .logo {
    font-size: var(--text-sm);
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #000;
  color: #fff;
  border-radius: var(--radius-sm);
}

/* ====== TEMP STUFFS ====== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
