/* ============================================================
   style.css — Nix · UI/UX Designer Portfolio
   Direction : Dark editorial · warm sand accent (drawn from the
               portrait's taupe backdrop) · "design artboard" framing
   Type      : Clash Display (display) / Satoshi (body) / Space Mono (labels)
   Standard  : Built to WCAG 2.2 Level AA
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Design tokens ───────────────────────────────────────── */
:root {
  /* Surfaces */
  --ink:      #0B0B0D;   /* page background            */
  --ink-2:    #131316;   /* raised surface / fields    */
  --ink-3:    #1A1A1F;   /* cards                      */
  --line:     #2C2C33;   /* decorative hairlines       */
  --line-2:   #3A3A42;   /* stronger decorative line   */
  --control:  #7A766C;   /* form-control borders (>=3:1 AA for UI) */

  /* Warm accent — sampled from the portrait background */
  --sand:      #D8C5A4;
  --sand-deep: #B49A72;
  --sand-soft: rgba(216, 197, 164, 0.10);

  /* Text — all values verified >= 4.5:1 on --ink */
  --text:      #F3F1EC;  /* ~13:1  */
  --text-dim:  #C3BFB6;  /* ~10.9:1 */
  --text-mute: #97938B;  /* ~6.6:1  */

  /* Type */
  --font-display: 'Clash Display', Georgia, serif;
  --font-body:    'Satoshi', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  /* Metrics */
  --nav-h: 64px;
  --radius:    14px;
  --radius-lg: 24px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ────────────────────────────────────────────────── */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:where(h1, h2, h3) { font-family: var(--font-display); font-weight: 600; line-height: 1.04; }

/* Anchor targets clear the fixed nav (2.4.11 focus not obscured) */
[id] { scroll-margin-top: calc(var(--nav-h) + 28px); }

/* ── Focus: visible, high-contrast (2.4.7 / 2.4.11 / 2.4.13) ─ */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Skip link (2.4.1 Bypass Blocks) ─────────────────────── */
.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -160%);
  z-index: 1000;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 22px;
  border-radius: 100px;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Screen-reader-only utility */
.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;
}

/* ── Shared layout ───────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
main { display: block; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--sand-deep);
}

.section-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.02em;
  margin-top: 0.8rem;
}
.section-title em { font-style: normal; color: var(--sand); }

/* ============================================================
   NAV — floating pill
   ============================================================ */
.site-header {
  position: fixed;
  top: 18px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 1140px;
  height: 52px;
  background: rgba(17, 17, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 100px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 18px;
  z-index: 500;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; letter-spacing: 0.06em;
  color: var(--text);
  padding: 6px 8px; border-radius: 100px;
}
.brand img { width: 26px; height: auto; }

.site-nav ul { list-style: none; display: flex; gap: 0.2rem; }
.site-nav a {
  display: inline-flex; align-items: center;
  min-height: 38px; /* target size 2.5.8 */
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-mute);
  padding: 4px 14px; border-radius: 100px;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--text); background: var(--line); }
/* Current page: not signalled by colour alone (1.4.1) — also gets a fill + box */
.site-nav a[aria-current="page"] {
  color: var(--ink); background: var(--sand); font-weight: 700;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: calc(var(--nav-h) + 56px) 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line-2);
  padding: 7px 14px; border-radius: 100px;
}
.badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #6FCF8E; box-shadow: 0 0 0 4px rgba(111,207,142,0.18);
}

.hero h1 {
  font-size: clamp(2.9rem, 9vw, 6.2rem);
  letter-spacing: -0.03em;
  margin: 1.4rem 0 1.6rem;
}
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--sand);
  text-stroke: 1.4px var(--sand);
}
.hero-sub {
  max-width: 46ch; color: var(--text-dim);
  font-size: 1.05rem;
}
.hero-sub strong { color: var(--text); font-weight: 500; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 48px;
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0 22px; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-primary { background: var(--sand); color: var(--ink); font-weight: 700; }
.btn-primary:hover { transform: translateY(-2px); background: #E6D6B9; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--sand); color: var(--sand); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateY(3px); }

/* Photo as a framed "artboard" — the page's signature element */
.hero-photo { position: relative; }
.photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 12px;
  background:
    linear-gradient(160deg, rgba(216,197,164,0.18), rgba(180,154,114,0.04));
  border: 1px solid var(--line-2);
}
.photo-frame img {
  width: 100%; border-radius: 16px; display: block;
}
.photo-spec {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem;
  justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text);
  background: rgba(11,11,13,0.78);
  backdrop-filter: blur(6px);
  border-radius: 12px; padding: 10px 14px;
}
.photo-spec span { color: var(--sand); }

/* Decorative scrolling strip */
.marquee {
  margin-top: clamp(3rem, 8vw, 6rem);
  border-block: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
}
.marquee-track {
  display: inline-flex; gap: 0; padding-block: 16px;
  animation: scroll-x 38s linear infinite;
  will-change: transform;
}
.marquee-track:hover, .marquee-track:focus-within { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.1rem; color: var(--text-dim);
  padding-inline: 1.6rem; display: inline-flex; align-items: center; gap: 1.6rem;
}
.marquee-track span::after { content: "✦"; color: var(--sand-deep); font-size: 0.8rem; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ============================================================
   WORK / bento grid
   ============================================================ */
.work { padding: clamp(4.5rem, 10vw, 8rem) 0 0; }
.work-head { margin-bottom: 2.8rem; }

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Feature project cards (image + caption) */
.feature { grid-column: span 6; display: flex; flex-direction: column; }
.feature .shot {
  position: relative; background: var(--ink-2);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 28px 28px 0; overflow: hidden;
  max-height: 360px;
}
.feature .shot img {
  width: 100%; max-width: 460px;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
}
.feature .body { padding: 1.6rem 1.7rem 1.9rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sand);
}
.feature h3 { font-size: 1.5rem; margin: 0.5rem 0 0.6rem; }
.feature p { color: var(--text-dim); font-size: 0.95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.1rem; }
.chips li {
  list-style: none;
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute);
  border: 1px solid var(--line-2); border-radius: 100px; padding: 5px 11px;
}

/* Text note cards */
.note { grid-column: span 6; padding: 1.9rem 1.8rem; display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 200px; }
.note.portfolio { background: linear-gradient(155deg, var(--sand), var(--sand-deep)); color: var(--ink); border: none; }
.note.portfolio .tag { color: rgba(11,11,13,0.65); }
.note.portfolio h3 { font-size: 1.6rem; }
.note.portfolio p { color: rgba(11,11,13,0.82); font-size: 0.95rem; }
.note.soon { align-items: flex-start; }
.note.soon .mark { font-size: 1.6rem; color: var(--sand); line-height: 1; }
.note.soon h3 { font-size: 1.1rem; color: var(--text); font-weight: 500; }
.note.soon p { color: var(--text-mute); font-size: 0.9rem; }

/* More-views gallery */
.gallery { margin-top: 2.6rem; }
.gallery h3 {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 1.2rem;
}
.gallery-track {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}
.gallery figure {
  flex: 0 0 auto; width: 200px; scroll-snap-align: start;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.gallery figure img { width: 100%; height: 280px; object-fit: cover; object-position: top; }
.gallery figcaption {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mute);
  padding: 10px 12px; border-top: 1px solid var(--line);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding: calc(var(--nav-h) + 48px) 0 0; }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 2.4rem; }

.intro-card {
  grid-column: span 12;
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem); align-items: center;
}
.intro-card h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -0.02em; }
.intro-card h1 em { font-style: normal; color: var(--sand); }
.intro-card .copy p { color: var(--text-dim); margin-bottom: 1rem; }
.intro-card .copy p:last-child { margin-bottom: 0; }
.intro-card .copy strong { color: var(--text); font-weight: 500; }

.portrait-card { grid-column: span 5; grid-row: span 2; }
.portrait-card .photo-frame { height: 100%; }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }

.panel {
  grid-column: span 7;
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.9rem 1.8rem;
}
.panel h2 {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sand); margin-bottom: 1.4rem;
}
.tools { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.tools li {
  list-style: none; display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: 100px; padding: 8px 16px 8px 10px;
  font-size: 0.9rem; color: var(--text);
}
.tools li img { width: 22px; height: 22px; border-radius: 5px; }
.tools li .glyph { font-size: 1.1rem; }

.now-list { display: grid; gap: 0.9rem; }
.now-list li {
  list-style: none; display: flex; align-items: baseline; gap: 0.9rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--line);
}
.now-list li:last-child { border-bottom: none; padding-bottom: 0; }
.now-list .k {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mute); flex: 0 0 110px;
}
.now-list .v { color: var(--text-dim); }
.now-list .v b { color: var(--text); font-weight: 500; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding: calc(var(--nav-h) + 56px) 0 0; }
.contact-grid {
  display: grid; grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem); margin-top: 2.4rem; align-items: start;
}
.contact-left h1 { font-size: clamp(2.8rem, 8vw, 5rem); letter-spacing: -0.02em; }
.contact-left h1 em { font-style: normal; color: var(--sand); }
.contact-left p { color: var(--text-dim); max-width: 42ch; margin-top: 1.2rem; }
.contact-methods { margin-top: 2rem; display: grid; gap: 0.2rem; }
.contact-methods a, .contact-methods span {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em;
  color: var(--text-dim); padding: 8px 0; min-height: 40px;
}
.contact-methods a:hover { color: var(--sand); }
.contact-methods .k { color: var(--text-mute); width: 84px; flex: 0 0 84px; text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.12em; }

/* Form */
.form-card {
  background: var(--ink-3); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.2rem);
}
.field { margin-bottom: 1.3rem; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.55rem;
}
.field label .req { color: var(--sand); }
.field input, .field textarea {
  width: 100%; background: var(--ink-2); color: var(--text);
  border: 1px solid var(--control); border-radius: var(--radius);
  padding: 13px 15px; font-family: var(--font-body); font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .field textarea::placeholder { color: #8F8B83; } /* >=4.5:1 */
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field textarea:hover { border-color: var(--sand-deep); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--sand);
  box-shadow: 0 0 0 3px rgba(216,197,164,0.30);
}
/* Invalid state — not colour alone; paired with text message + icon */
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: #F2A9A0; }
.field .error {
  display: none; align-items: center; gap: 0.4rem; margin-top: 0.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: #F2A9A0;
}
.field[data-invalid="true"] .error { display: flex; }
.field .error::before { content: "⚠"; }

.form-status {
  margin-top: 0.4rem; margin-bottom: 1.2rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.03em;
  color: var(--sand); padding: 12px 15px; border-radius: var(--radius);
  background: var(--sand-soft); border: 1px solid var(--sand-deep);
  display: none;
}
.form-status.show { display: block; }
.form-card .btn-primary { width: 100%; justify-content: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: clamp(5rem, 12vw, 9rem);
  border-top: 1px solid var(--line);
  padding: 2.6rem 0;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.2rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-brand img { width: 30px; }
.footer-brand span { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.06em; }
.site-footer p { color: var(--text-mute); font-size: 0.85rem; font-family: var(--font-mono); letter-spacing: 0.02em; }
.footer-links { display: flex; gap: 0.4rem; }
.footer-links a {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-mute);
  padding: 8px 12px; min-height: 40px; display: inline-flex; align-items: center;
  border-radius: 100px;
}
.footer-links a:hover { color: var(--text); background: var(--line); }

/* ============================================================
   Scroll-reveal — progressive enhancement only.
   Content is fully visible without JS; .js gate hides it first.
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 420px; }
  .contact-grid { grid-template-columns: 1fr; }
  .intro-card { grid-template-columns: 1fr; }
  .portrait-card { grid-column: span 12; max-width: 420px; }
  .panel { grid-column: span 12; }
  .feature, .note { grid-column: span 12; }
}
@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .site-header { padding: 0 8px 0 12px; }
  .brand span { display: none; }      /* keep the mark, drop wordmark to save space */
  .site-nav a { padding: 4px 10px; }
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.6rem); }
}

/* ============================================================
   MOTION & CONTRAST PREFERENCES (2.3.3 / 1.4.x)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee-track { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #5A5A63; --line-2: #6E6E78; --text-dim: #EDEBE5; --text-mute: #C4C0B7; }
  .badge, .chips li, .btn-ghost { border-width: 2px; }
}

@media print {
  .site-header, .marquee, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
