/* ============================================================
   Austin Teague — personal landing page
   Dark, motion-driven. Space Grotesk / Inter / JetBrains Mono.
   ============================================================ */

:root {
  --bg: #0a0a0c;
  --surface: #121216;
  --surface-2: #17171c;
  --text: #f2f2ee;
  --muted: #a3a3ad;
  --accent: #c8f542;
  --accent-dim: rgba(200, 245, 66, 0.12);
  --border: rgba(255, 255, 255, 0.09);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #0a0a0c; }

a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
ul { list-style: none; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: #0a0a0c;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* Film grain */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: 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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scroll progress */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 110;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.nav__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__right { display: flex; align-items: center; gap: 14px; }

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* ============ MENU OVERLAY ============ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.menu.is-open { opacity: 1; visibility: visible; }

.menu__inner { display: flex; flex-direction: column; gap: 8px; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(38px, 9vw, 72px);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 6px 0;
  color: var(--text);
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), color 0.25s;
}
.menu.is-open .menu__link { transform: translateY(0); opacity: 1; }
.menu.is-open .menu__link:nth-child(1) { transition-delay: 0.08s; }
.menu.is-open .menu__link:nth-child(2) { transition-delay: 0.14s; }
.menu.is-open .menu__link:nth-child(3) { transition-delay: 0.2s; }
.menu.is-open .menu__link:nth-child(4) { transition-delay: 0.26s; }
.menu__link:hover { color: var(--accent); }
.menu__foot {
  position: absolute;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: var(--pad);
  right: var(--pad);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.menu__foot a { padding: 8px 0; transition: color 0.25s; }
.menu__foot a:hover { color: var(--accent); }
.menu__social { display: flex; gap: 24px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 100px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    color 0.25s var(--ease), border-color 0.25s var(--ease);
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn--primary {
  background: var(--accent);
  color: #0a0a0c;
  border-color: var(--accent);
}
.btn--primary:hover { background: #d9ff66; border-color: #d9ff66; }

.btn--ghost { color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--small { padding: 10px 20px; font-size: 13.5px; }
.btn--small:hover { border-color: var(--accent); color: var(--accent); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

#webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 120px var(--pad) clamp(48px, 8vh, 96px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.4vw, 13px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
  margin-bottom: clamp(20px, 4vh, 40px);
  background: rgba(10, 10, 12, 0.4);
  backdrop-filter: blur(6px);
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero__title {
  font-size: clamp(64px, 14.5vw, 218px);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  line-height: 0.92;
  margin-left: -0.04em;
}
.hero__line { display: block; overflow: hidden; }
.hero__line--accent { color: var(--accent); }
.hero__line .char { display: inline-block; will-change: transform; }

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(28px, 5vh, 56px);
  flex-wrap: wrap;
}
.hero__sub {
  max-width: 520px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
}
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  right: var(--pad);
  top: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.hero__scroll span { writing-mode: vertical-rl; }
.hero__scroll svg { animation: drift 2.2s ease-in-out infinite; }
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding: 22px 0;
  background: var(--surface);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
}
.marquee__track i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ SECTIONS ============ */
.section { padding: clamp(80px, 14vh, 160px) var(--pad); }

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(36px, 6vh, 64px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.section__label {
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ ABOUT ============ */
.about__statement {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 52px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.015em;
  max-width: 1100px;
}
.about__statement em {
  font-style: normal;
  color: var(--accent);
}

/* ============ WORK ============ */
.work__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.card { grid-column: span 5; }
.card--wide { grid-column: span 7; }

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
  will-change: transform;
}
.card:hover { border-color: rgba(200, 245, 66, 0.45); }

.card__visual {
  position: relative;
  aspect-ratio: 16 / 8.5;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card__logo {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 22px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s var(--ease);
}
.card__logo--tile { background: #fff; padding: 14px; }
.card:hover .card__logo { transform: scale(1.1) rotate(-3deg); }
.card__visual--revv      { background: radial-gradient(120% 140% at 20% 10%, #2b3d12 0%, #131509 55%, #0d0d10 100%); }
.card__visual--liveframe { background: radial-gradient(120% 140% at 80% 0%, #14323b 0%, #0c161d 60%, #0d0d10 100%); }
.card__visual--vendly    { background: radial-gradient(120% 140% at 30% 90%, #3b1d33 0%, #170d18 60%, #0d0d10 100%); }
.card__visual--grub      { background: radial-gradient(120% 140% at 70% 80%, #3b2a12 0%, #17120b 60%, #0d0d10 100%); }
.card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--surface) 0%, transparent 35%);
}

.card__body { padding: clamp(20px, 2.6vw, 32px); }
.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
}
.card__top h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.card__role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.card__body > p {
  color: var(--muted);
  font-size: 15px;
  max-width: 56ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tags li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 13px;
  transition: color 0.25s, border-color 0.25s;
}
.card:hover .tags li { color: var(--text); border-color: rgba(255, 255, 255, 0.2); }

/* ============ EXPERIENCE ============ */
.xp { position: relative; padding-left: clamp(28px, 4vw, 48px); }
.xp__line {
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.xp__line span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

.xp__item {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px 40px;
  padding: clamp(28px, 4vh, 44px) 0;
  border-bottom: 1px solid var(--border);
}
.xp__item:last-child { border-bottom: none; }
.xp__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(28px, 4vw, 48px) + 0.5px);
  top: clamp(40px, 5vh, 56px);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background 0.3s, box-shadow 0.3s;
}
.xp__item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 16px rgba(200, 245, 66, 0.5);
}

.xp__date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 6px;
}
.xp__main h3 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}
.xp__item:hover .xp__main h3 { color: var(--accent); }
.xp__role {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  margin: 6px 0 12px;
}
.xp__desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 62ch;
}

/* ============ CAPABILITIES ============ */
.caps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.cap {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 34px);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.cap:hover {
  transform: translateY(-6px);
  border-color: rgba(200, 245, 66, 0.4);
  background: var(--surface-2);
}
.cap__icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 22px;
}
.cap h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.cap p { color: var(--muted); font-size: 14px; }

/* ============ CONTACT ============ */
.contact {
  padding: clamp(80px, 14vh, 160px) var(--pad) 0;
  background:
    radial-gradient(60% 50% at 50% 110%, rgba(200, 245, 66, 0.07) 0%, transparent 70%),
    var(--bg);
}
.contact__title {
  font-size: clamp(56px, 11vw, 160px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  text-transform: uppercase;
}
.contact__title span { color: var(--accent); }
.contact__sub {
  margin-top: 28px;
  max-width: 480px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
}

.contact__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(36px, 6vh, 56px);
  font-family: var(--font-display);
  font-size: clamp(19px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
  overflow-wrap: anywhere;
}
.contact__link:hover { color: var(--accent); gap: 22px; }
.contact__link svg { flex: none; transition: transform 0.3s var(--ease); }
.contact__link:hover svg { transform: translate(3px, -3px); }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: clamp(64px, 10vh, 120px);
  padding: 28px 0 max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}
.footer__links { display: flex; gap: 26px; }
.footer a { padding: 8px 0; transition: color 0.25s; }
.footer a:hover { color: var(--accent); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .card, .card--wide { grid-column: span 6; }
  .caps__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__links, .nav__right .btn { display: none; }
  .nav__burger { display: flex; }

  .hero__title { font-size: clamp(58px, 17.5vw, 120px); }
  .hero__scroll { display: none; }
  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1; min-width: 150px; }

  .card, .card--wide { grid-column: span 12; }

  .xp__item { grid-template-columns: 1fr; gap: 8px; }
  .xp__date { padding-top: 0; }
  .xp__item::before { top: clamp(32px, 4vh, 44px); }

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

@media (max-width: 480px) {
  .caps__grid { grid-template-columns: 1fr; }
  .contact__link { font-size: 18px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@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;
  }
  .marquee__track { animation: none; }
  #webgl { display: none; }
}
