/* ─────────────────────────────────────────────
   tony utter — linktree landing page
   v03JUN26
   Design Language: Swiss Modernist
   Palette: #818199  #0B6FA2  #FFFFF0  #F5FAE6  #0F171A  #64748B  #DCEAF8
   ───────────────────────────────────────────── */



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

:root {
  --lavender-gray:   #818199;
  --cornflower-ocean:#0B6FA2;
  --ivory:           #FFFFF0;
  --beige:           #F5FAE6;
  --ink-black:       #0F171A;
  --text-muted:      #64748B;
  --border-subtle:   #DCEAF8;

  /* Spacing scale */
  --sp-4:   4px;
  --sp-8:   8px;
  --sp-12:  12px;
  --sp-16:  16px;
  --sp-24:  24px;
  --sp-32:  32px;
  --sp-48:  48px;
  --sp-64:  64px;
  --sp-96:  96px;

  /* Status colors */
  --status-error:   #C0392B;
  --status-success: #2E7D52;
  --status-warning: #B45309;

  /* Font stacks */
  --font-logotype: "Slabo 13px", serif;
  --font-display:  "DM Sans", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-sans:     "DM Sans", "Inter", system-ui, sans-serif;
  --font-mono:     "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Z-index scale */
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-overlay:  200;
  --z-toast:    300;
}

/* ─────────────────────────────────────────────
   Base
   ───────────────────────────────────────────── */

html { height: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-black);
  background-color: var(--beige);
  position: relative;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-64) var(--sp-24) var(--sp-48);
}


/* ─────────────────────────────────────────────
   Skip navigation (accessibility)
   ───────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: 0.5rem 1.25rem;
  background: var(--ivory);
  color: var(--ink-black);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(15,23,42,0.12);
}

/* ─────────────────────────────────────────────
   Card wrapper — centered column
   ───────────────────────────────────────────── */

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

/* ─────────────────────────────────────────────
   Hero — stars.jpg background at 50 % opacity
   ───────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-32) var(--sp-16);
  margin-bottom: var(--sp-32);
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

/* Background image layer — fades to transparent at bottom */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('photos/stars.jpg') center / cover no-repeat;
  opacity: 0.5;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
          mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

/* Keep content above the background */
.hero > * {
  position: relative;
  z-index: 1;
}

/* ─────────────────────────────────────────────
   Avatar
   ───────────────────────────────────────────── */

.avatar-wrap {
  width: 96px;
  height: 96px;
  margin-bottom: var(--sp-24);
}

/* Beige disc behind the avatar — punches through the starfield */
.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  background: var(--beige);
  border-radius: 50%;
  z-index: -1;
}

.avatar-wrap img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  /* Swiss: thin ruled border, no heavy shadow */
  border: 2px solid var(--lavender-gray);
}

/* ─────────────────────────────────────────────
   Identity — logotype, tagline, pills
   ───────────────────────────────────────────── */

.identity {
  text-align: center;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-8);
}

/* Logotype: Slabo 13px per design spec — display scale, -0.02em tracking */
.identity h1 {
  font-family: var(--font-logotype);
  font-style: normal;
  font-size: 1.75rem;   /* Design spec: hero/display tier */
  font-weight: 400;
  color: var(--ink-black);
  letter-spacing: -0.02em; /* Spec: Display/Hero: -0.02em */
}

/* Horizontal ruled divider under logotype */
.identity h1::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--lavender-gray);
  margin: var(--sp-8) auto 0;
}

.identity .tagline {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em; /* Spec: Labels/Caps: +0.08em */
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Pills row */
.pills-row {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  flex-wrap: wrap;
  justify-content: center;
}

/* Location pill — Swiss: rectangular, light border */
.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.75rem;
  border-radius: 3px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--ivory);
  border: 1px solid var(--border-subtle);
}

.location-pill svg {
  width: 10px;
  height: 10px;
  color: var(--lavender-gray);
  flex-shrink: 0;
}

/* Motto pill */
.motto-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.75rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-style: italic;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--ivory);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.03em;
}

/* Study pill */
.study-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.75rem;
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--cornflower-ocean);
  background: var(--ivory);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.15s ease;
}

.study-pill:hover {
  background: var(--cornflower-ocean);
  color: var(--ivory);
  border-color: var(--cornflower-ocean);
}

/* ─────────────────────────────────────────────
   Links list
   ───────────────────────────────────────────── */

.links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  list-style: none;
}



/* ─────────────────────────────────────────────
   Link button — Swiss card-ruled style
   ───────────────────────────────────────────── */

.link-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  width: 100%;
  padding: var(--sp-16) var(--sp-16);
  min-height: 60px;
  text-decoration: none;
  color: var(--ink-black);

  /* Swiss: ivory surface, top rule, light border */
  background: var(--ivory);
  border-top: 3px solid var(--lavender-gray);
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;

  transition:
    border-top-color 0.15s ease,
    background       0.15s ease,
    color            0.15s ease;

  cursor: pointer;
}

.link-btn:hover {
  border-top-color: var(--cornflower-ocean);
  background: #FAFFF0;
  outline: none;
  color: var(--cornflower-ocean);
}

.link-btn:focus-visible {
  border-top-color: var(--cornflower-ocean);
  background: #FAFFF0;
  color: var(--cornflower-ocean);
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 4px;
}

.link-btn:active {
  background: var(--ivory);
}

/* ─────────────────────────────────────────────
   Icon box — flat, grid-aligned
   ───────────────────────────────────────────── */

.link-icon {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: var(--beige);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.link-btn:hover .link-icon {
  background: rgba(11,111,162,0.08);
  border-color: rgba(11,111,162,0.2);
}

.link-icon svg { width: 18px; height: 18px; }

.link-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 2px;
}

/* ─────────────────────────────────────────────
   Label + chevron
   ───────────────────────────────────────────── */

.link-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em; /* Spec: Labels/Caps: +0.08em */
  text-transform: uppercase;
  color: inherit;
  transition: color 0.15s ease;
}

.link-arrow {
  flex-shrink: 0;
  color: var(--lavender-gray);
  transition: color 0.15s ease, transform 0.18s ease;
}

.link-btn:hover .link-arrow {
  color: var(--cornflower-ocean);
  transform: translateX(3px);
}

/* ─────────────────────────────────────────────
   Section rule between links and footer
   Spec: rule-heavy = 3px solid lavender-gray
   ───────────────────────────────────────────── */

.rule {
  border: none;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  margin: var(--sp-32) 0 0;
}

/* Heavy rule variant — primary section separator */
.rule-heavy {
  border: none;
  border-top: 3px solid var(--lavender-gray);
  width: 100%;
  margin: var(--sp-32) 0 0;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */

.footer {
  margin-top: var(--sp-24);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
}

.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer a:hover {
  color: var(--cornflower-ocean);
  border-color: var(--cornflower-ocean);
}

/* ─────────────────────────────────────────────
   Scrollbar
   ───────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--beige); }
::-webkit-scrollbar-thumb {
  background-color: var(--lavender-gray);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  border-width: 0px;
}

/* ─────────────────────────────────────────────
   Inline links (design.md §4 Links)
   ───────────────────────────────────────────── */

a {
  color: var(--cornflower-ocean);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink-black);
}

a:focus-visible {
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─────────────────────────────────────────────
   Buttons (design.md §4 Buttons)
   ───────────────────────────────────────────── */

.button-primary {
  background: var(--lavender-gray);
  color: #fff;
  border: none;
  border-radius: 3px;
  min-height: 44px;
  padding: 0 24px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s ease;
  cursor: pointer;
}

.button-primary:hover {
  background: var(--cornflower-ocean);
}

.button-primary:focus-visible {
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 3px;
}

.button-secondary {
  background: transparent;
  color: var(--ink-black);
  border: 1.5px solid var(--lavender-gray);
  border-radius: 3px;
  min-height: 44px;
  padding: 0 24px;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.button-secondary:hover {
  border-color: var(--cornflower-ocean);
  color: var(--cornflower-ocean);
}

.button-secondary:focus-visible {
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────
   Forms (design.md §4 Forms)
   ───────────────────────────────────────────── */

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-black);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--ivory);
  border: 1.5px solid var(--border-subtle);
  border-radius: 3px;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-black);
  transition: border-color 0.15s ease;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}

.form-input:hover,
.form-textarea:hover {
  border-color: var(--lavender-gray);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--cornflower-ocean);
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 2px;
}

.form-input--error {
  border-color: var(--status-error);
}

.form-input--success {
  border-color: var(--status-success);
}

.form-input:disabled {
  background: var(--beige);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.form-helper {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error-text {
  font-size: 13px;
  color: var(--status-error);
  margin-top: 4px;
}

/* ─────────────────────────────────────────────
   Navigation (design.md §4 Navigation)
   ───────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--ink-black);
}

.nav-link:focus-visible {
  outline: 2px solid var(--cornflower-ocean);
  outline-offset: 3px;
}

.nav-link--active {
  color: var(--ink-black);
  border-bottom: 2px solid var(--lavender-gray);
  padding-bottom: 2px;
}

@media (max-width: 767px) {
  .nav {
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }
}

/* ─────────────────────────────────────────────
   Code block (design.md §4 Code)
   ───────────────────────────────────────────── */

.code-block {
  background: var(--ink-black);
  color: var(--beige);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 20px 24px;
  overflow-x: auto;
}

/* ─────────────────────────────────────────────
   Responsive — mobile-first
   ───────────────────────────────────────────── */

/* ── Tiny phones (< 360px) ── */
@media (max-width: 359px) {
  body { padding: var(--sp-48) var(--sp-16) var(--sp-32); }

  .avatar-wrap,
  .avatar-wrap img { width: 76px; height: 76px; }

  .identity h1      { font-size: 1.25rem; }
  .identity .tagline { font-size: 0.62rem; }
  .location-pill,
  .motto-pill,
  .study-pill       { font-size: 0.58rem; padding: 0.18rem 0.55rem; }

  .link-btn         { padding: var(--sp-12) var(--sp-12); gap: var(--sp-12); }
  .link-icon        { width: 34px; height: 34px; }
  .link-icon img    { width: 18px; height: 18px; }
  .link-label       { font-size: 0.78rem; }

  .links            { gap: var(--sp-8); }
}

/* ── Standard mobile (360px – 479px) ── */
@media (max-width: 479px) {
  body { padding: var(--sp-48) var(--sp-16) var(--sp-32); }

  .avatar-wrap,
  .avatar-wrap img  { width: 84px; height: 84px; }

  .identity h1      { font-size: 1.4rem; }

  .link-btn         { min-height: 56px; }
}

/* ── Tablet (768px +) ── */
@media (min-width: 768px) {
  body { padding: var(--sp-64) var(--sp-32) var(--sp-48); }

  .card { max-width: 500px; }

  .avatar-wrap,
  .avatar-wrap img  { width: 108px; height: 108px; }

  .identity h1      { font-size: 2rem; }   /* One step up at tablet */
  .identity .tagline { font-size: 0.73rem; }
  .identity          { margin-bottom: var(--sp-32); gap: var(--sp-12); }

  .link-btn         { padding: var(--sp-16) var(--sp-24); }
  .link-icon        { width: 44px; height: 44px; }
  .link-icon img    { width: 24px; height: 24px; }
  .link-label       { font-size: 0.9rem; }

  .links            { gap: var(--sp-8); }
}

/* ── Desktop (1024px +) ── */
@media (min-width: 1024px) {
  body { padding: var(--sp-96) var(--sp-32) var(--sp-64); }

  .card { max-width: 520px; }

  .avatar-wrap,
  .avatar-wrap img  { width: 116px; height: 116px; }

  .link-btn         { padding: var(--sp-16) var(--sp-24); }
}

/* ── Landscape phone (short viewport) ── */
@media (orientation: landscape) and (max-height: 500px) {
  body {
    padding: var(--sp-24) var(--sp-24) var(--sp-16);
    justify-content: flex-start;
  }

  .card { flex-direction: row; flex-wrap: wrap; max-width: 680px; align-items: flex-start; gap: 0; }

  /* Left column: avatar + identity */
  .avatar-wrap {
    width: 56px; height: 56px;
    margin-bottom: 0;
    margin-right: var(--sp-16);
    flex-shrink: 0;
    align-self: center;
  }
  .avatar-wrap img { width: 56px; height: 56px; }

  .identity {
    flex: 1;
    text-align: left;
    align-items: flex-start;
    margin-bottom: 0;
    padding-right: var(--sp-16);
    align-self: center;
  }
  .identity h1::after { margin: var(--sp-4) 0 0; }
  .identity h1    { font-size: 1.1rem; }
  .identity .tagline { font-size: 0.6rem; }

  /* Links take full width below */
  .links { width: 100%; margin-top: var(--sp-12); gap: var(--sp-8); }
  .link-btn { padding: 0.6rem var(--sp-12); min-height: 44px; }

  .footer { width: 100%; margin-top: var(--sp-12); }
}
