/* ============================================================
   Usf (Godde3s) — v18 · fenrir-inspired editorial
   cream paper · serif display · hairlines · red accent
   ============================================================ */

:root {
  --paper: #F1EEE6;
  --paper-soft: #EBE7DC;
  --ink: #201E19;
  --muted: #6E6A5E;
  --accent: #BE3D26;
  --line: rgba(32, 30, 25, .16);
  --line-soft: rgba(32, 30, 25, .09);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --wrap: 1120px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:not(.motion-off) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ol, ul { margin: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }

.container { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px;
}
.skip:focus { left: 12px; top: 12px; }

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

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.motion-off .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(241, 238, 230, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--ink); color: var(--paper); border-radius: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .5px;
}
.nav-links { display: flex; gap: 26px; margin-inline: auto; }
.nav-links a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--muted);
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-gh {
  margin-left: auto; text-decoration: none; font-size: 13px;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
  transition: background .2s ease, color .2s ease;
}
.nav-gh:hover { background: var(--ink); color: var(--paper); }
.nav-links + .nav-gh { margin-left: 0; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 0; }
.hero-eyebrow {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.new-tag {
  color: var(--accent); font-size: 12.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
}
.eyebrow-right { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; }

.display {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.04; letter-spacing: -.015em;
  margin-top: clamp(22px, 3.5vw, 40px);
  text-wrap: balance;
}
.h1-kicker {
  display: block; font-family: var(--mono); font-weight: 500;
  font-size: clamp(14px, 1.8vw, 19px); letter-spacing: .02em;
  color: var(--accent);
  margin: 0 0 clamp(12px, 2vw, 18px);
}
.byline { margin-top: clamp(14px, 2vw, 22px); color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); }
.byline a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); transition: text-decoration-color .2s ease; }
.byline a:hover { text-decoration-color: var(--accent); }

.wolf-stage { position: relative; margin-top: clamp(8px, 2vw, 24px); text-align: center; }
.wolf-img {
  width: min(640px, 86vw); height: auto; display: inline-block;
  animation: wolfFloat 6s ease-in-out infinite;
  will-change: transform;
}
.wolf-stage::after {
  content: ""; display: block; width: min(380px, 52vw); height: 14px;
  margin: -2px auto 0; border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(32,30,25,.30), rgba(32,30,25,0) 70%);
  animation: wolfShadow 6s ease-in-out infinite;
}
@keyframes wolfFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(-1.2deg); }
}
@keyframes wolfShadow {
  0%, 100% { transform: scaleX(1); opacity: .8; }
  50% { transform: scaleX(.82); opacity: .4; }
}
.motion-off .wolf-img, .motion-off .wolf-stage::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .wolf-stage::after { animation: none; }
}

.motion-btn {
  position: absolute; left: 0; bottom: 6px;
  background: transparent; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 16px; font-size: 13px; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.motion-btn:hover { background: var(--ink); color: var(--paper); }
.motion-btn .mb-off { display: none; }
.motion-btn[aria-pressed="true"] .mb-on { display: none; }
.motion-btn[aria-pressed="true"] .mb-off { display: inline; }

/* ---------- stats band ---------- */
.stats-band { margin-top: clamp(30px, 5vw, 64px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: clamp(22px, 3.5vw, 44px) 12px clamp(24px, 3.5vw, 46px);
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong {
  display: block; font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -.02em;
}
.stat strong i { font-style: normal; color: var(--accent); }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0 0; }
.section-soft { background: var(--paper-soft); }
.section-soft .container { padding-bottom: 2px; }
.section-head { max-width: 720px; }
.display-2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(28px, 4vw, 48px); line-height: 1.12; letter-spacing: -.01em;
}
.display-2 em { font-style: italic; }
.section-sub { margin-top: 12px; color: var(--muted); font-size: clamp(15px, 1.6vw, 17px); max-width: 60ch; }

/* ---------- work: filters + compact grid ---------- */
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: clamp(26px, 4vw, 44px) 0 0; }
.work-chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.work-chip span { opacity: .6; margin-left: 2px; }
.work-chip:hover { border-color: var(--ink); color: var(--ink); }
.work-chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.work-chip.is-active span { opacity: .55; }

.work-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
  margin-top: 16px;
}
.work-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  gap: 5px; min-height: 128px;
  padding: 15px 42px 13px 18px;
  background: var(--paper); text-decoration: none;
  transition: background .25s ease;
}
.work-card:hover { background: rgba(32, 30, 25, .035); }
.work-card[hidden] { display: none; }
.wc-top { display: flex; align-items: baseline; gap: 12px; }
.wc-idx { font-size: 11px; color: var(--accent); }
.wc-cat { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.wc-name {
  font-family: var(--serif); font-weight: 500;
  font-size: 18px; line-height: 1.2; letter-spacing: -.01em;
}
.wc-desc {
  color: var(--muted); font-size: 12.8px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wc-tags { margin-top: auto; padding-top: 2px; color: var(--muted); font-size: 11px; }
.wc-arrow {
  position: absolute; top: 15px; right: 15px;
  font-size: 15px; color: var(--muted);
  transition: transform .25s ease, color .25s ease;
}
.work-card:hover .wc-arrow { transform: translate(2px, -2px); color: var(--accent); }
.work-more { margin-top: 26px; }
.ghost-link {
  display: inline-block; text-decoration: none; font-size: 13.5px;
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 22px;
  transition: background .2s ease, color .2s ease;
}
.ghost-link:hover { background: var(--ink); color: var(--paper); }

/* ---------- stories / laptop (kept from previous design) ---------- */
.stories-section { padding: clamp(64px, 9vw, 120px) 0 0; }
.vibe-stories-container { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.section-header { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-bottom: clamp(26px, 4vw, 44px); }
.section-header .section-sub { margin: 0; }

.laptop-wrapper { position: relative; width: 100%; }
.laptop-container {
  position: relative; isolation: isolate;
  width: 100%; max-width: 760px; margin: 0 auto;
  aspect-ratio: 1400 / 813;
}
.laptop-frame {
  position: relative; z-index: 10; width: 100%; height: auto;
  display: block; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 18px 22px rgba(32, 30, 25, .16)) drop-shadow(0 44px 80px rgba(32, 30, 25, .18));
}
.screen-content {
  position: absolute; z-index: 1;
  top: var(--screen-top); left: var(--screen-left);
  width: var(--screen-width); height: var(--screen-height);
  background: #0b0b0f; overflow: hidden;
  transform: translateZ(0);
}
.screen-link { position: absolute; inset: 0; display: block; background: transparent; overflow: hidden; border-radius: inherit; }
.screen-link:focus, .screen-link:focus-visible { outline: none; }
.screen-image-wrapper { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.screen-image {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.slide-left-enter-active, .slide-left-leave-active,
.slide-right-enter-active, .slide-right-leave-active {
  transition: transform .6s cubic-bezier(.25, 1, .5, 1);
  will-change: transform;
}
.slide-left-enter-from { transform: translateX(100%); }
.slide-left-leave-to { transform: translateX(-100%); }
.slide-right-enter-from { transform: translateX(-100%); }
.slide-right-leave-to { transform: translateX(100%); }
.motion-off .slide-left-enter-active, .motion-off .slide-left-leave-active,
.motion-off .slide-right-enter-active, .motion-off .slide-right-leave-active { transition: none; }

.nav-btn {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 20;
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(32, 30, 25, .12);
  border-radius: 50%; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink);
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 14px rgba(32, 30, 25, .2);
}
.nav-btn:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.nav-btn.prev { left: 4px; }
.nav-btn.next { right: 4px; }

.indicators { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; }
.indicator-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(32, 30, 25, .22); border: none; padding: 0; cursor: pointer;
  transition: all .3s ease;
}
.indicator-dot:hover { background: rgba(32, 30, 25, .4); }
.indicator-dot.active { width: 26px; border-radius: 5px; background: var(--accent); }

/* ---------- skills: categorized bands ---------- */
.skill-langs { margin-top: 10px; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.skill-bands { margin-top: clamp(26px, 4vw, 44px); border-top: 1px solid var(--line); }
.skill-band {
  display: grid; grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(20px, 3vw, 30px) 0;
  border-bottom: 1px solid var(--line);
}
.sb-idx { display: block; font-size: 12px; color: var(--accent); }
.sb-head h3 {
  margin-top: 8px; font-family: var(--serif); font-weight: 500;
  font-size: 22px; line-height: 1.2; letter-spacing: -.01em;
}
.sb-note { margin-top: 5px; color: var(--muted); font-size: 13.5px; font-family: var(--serif); font-style: italic; }
.sb-pills {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; color: var(--ink);
  background: transparent;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.pill:hover { border-color: var(--ink); }
.pill.is-hot { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 600; }
.pill.is-hot:hover { background: #000; }
.pill.is-hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.pill-new {
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--accent); color: var(--paper);
  padding: 3px 8px; border-radius: 999px;
}
.pill.is-learning { border-style: dashed; color: var(--muted); }

/* language stack cards (backend band) */
.stack-wrap { display: flex; flex-direction: column; gap: 14px; }
.stack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stack-card {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px;
}
.stack-name { font-weight: 600; font-size: 15.5px; }
.stack-sub { font-size: 11px; letter-spacing: .01em; color: var(--muted); }
.stack-card.is-hot { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: inset 3px 0 0 var(--accent); }
.stack-card.is-hot .stack-sub { color: rgba(241, 238, 230, .72); }
.stack-more { font-size: 11.5px; color: var(--muted); }

/* ---------- process ---------- */
.steps-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: clamp(30px, 4.5vw, 56px); }
.step { border-top: 1px solid var(--line); padding-top: 22px; }
.step-n { font-size: 13px; color: var(--accent); }
.step h3 { margin-top: 12px; font-size: 18px; font-weight: 600; }
.step p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

/* ---------- footer ---------- */
.footer { margin-top: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.footer-cta { text-align: center; padding: clamp(56px, 8vw, 100px) 0 clamp(40px, 6vw, 72px); position: relative; }
.footer-wolf {
  width: clamp(140px, 20vw, 220px); height: auto; opacity: .9;
  animation: wolfFloatSoft 7s ease-in-out infinite;
}
@keyframes wolfFloatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.motion-off .footer-wolf { animation: none; }
.display-1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 5.4vw, 68px); line-height: 1.06; letter-spacing: -.015em;
  margin-top: clamp(16px, 2.5vw, 28px);
}
.footer-cta-sub { margin-top: 14px; color: var(--muted); font-size: clamp(15px, 1.7vw, 17.5px); }
.cta-row { margin-top: clamp(24px, 3.5vw, 36px); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-ink, .btn-line {
  display: inline-block; text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 14px 28px; border-radius: 999px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn-ink { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-ink:hover { transform: translateY(-2px); background: #000; }
.btn-line { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { background: rgba(32, 30, 25, .05); transform: translateY(-2px); }

.footer-mid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid var(--line-soft);
  padding: clamp(34px, 5vw, 52px) 0;
}
.f-col h4 { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.f-col a { display: block; text-decoration: none; color: var(--ink); font-size: 14.5px; padding: 5px 0; opacity: .85; transition: opacity .2s ease; }
.f-col a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.f-col p { font-size: 14.5px; color: var(--muted); padding: 5px 0; display: flex; align-items: center; gap: 8px; }
.f-col p:first-of-type { color: var(--ink); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3E9B5F; flex: none;
  box-shadow: 0 0 0 3px rgba(62, 155, 95, .18);
}

.footer-wordmark {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(64px, 17vw, 264px);
  line-height: .95; letter-spacing: -.02em;
  text-align: center; white-space: nowrap;
  color: var(--ink);
  padding: clamp(10px, 2vw, 24px) 8px 0;
  user-select: none;
}

.footer-base {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  margin-top: clamp(10px, 2vw, 24px);
  padding-top: 18px; padding-bottom: 26px;
  font-size: 13.5px; color: var(--muted);
}
.footer-dim { font-size: 12px; }
.to-top { text-decoration: none; color: var(--ink); font-size: 12.5px; }
.to-top:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 960px) {
  .skill-band { grid-template-columns: 230px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --gutter: 18px; }
  .nav-links { display: none; }
  .section { padding: 46px 0 0; }
  .work-filters { margin-top: 20px; }
  .work-grid { grid-template-columns: 1fr; margin-top: 10px; }
  .work-card { min-height: 0; padding: 10px 34px 10px 14px; gap: 3px; }
  .wc-name { font-size: 16.5px; }
  .wc-desc { font-size: 12px; line-height: 1.4; -webkit-line-clamp: 1; }
  .wc-tags { font-size: 10.5px; padding-top: 1px; }
  .wc-arrow { top: 12px; right: 12px; font-size: 13px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .steps-grid { grid-template-columns: 1fr; }
  .motion-btn { position: static; margin-top: 6px; }
}

@media (max-width: 560px) {
  .skill-band { grid-template-columns: 1fr; gap: 14px; padding: 18px 0; }
  .sb-head h3 { margin-top: 6px; font-size: 20px; }
  .stack-grid { grid-template-columns: 1fr; }
  .work-chip { padding: 8px 13px; font-size: 11.5px; }
  .footer-mid { grid-template-columns: 1fr; gap: 26px; }
  .footer-base { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wolf-img { width: min(560px, 94vw); }
}
