/* ============================================================
   misilab.com — styles v3 (impeccable pass)
   Mobile-first. Editorial restraint. Quiet living detail.
   ============================================================ */

@font-face { font-family: 'ITCGaramondStd'; src: url('fonts/ITCGaramondStd-LtNarrow.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'ITCGaramondStd'; src: url('fonts/ITCGaramondStd-LtNarrowItalic.ttf') format('truetype'); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'RethinkSans'; src: url('fonts/RethinkSans-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'RethinkSans'; src: url('fonts/RethinkSans-Italic.ttf') format('truetype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'RethinkSans'; src: url('fonts/RethinkSans-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'RethinkSans'; src: url('fonts/RethinkSans-ExtraBold.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'AstonScript'; src: url('fonts/AstonScript.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --gold:         #D3AF37;
  --gold-soft:    #B5942C;
  --brown:        #3B2E26;
  --brown-dark:   #2A1F19;
  --off-white:    #F0ECE3;
  --beige:        #E0D7C5;
  --beige-deep:   #D4C8B2;
  --misilab-blue: #26A9FE;

  --bg:           var(--off-white);
  --bg-card:      #F6F2E9;
  --bg-inset:     var(--beige);
  --fg:           var(--brown-dark);
  --fg-muted:     #7A6A5A;
  --fg-faint:     #A89A88;
  --border:       rgba(59, 46, 38, 0.14);
  --border-strong: rgba(59, 46, 38, 0.28);
  --accent:       var(--misilab-blue);

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  --font-serif: 'ITCGaramondStd', 'Garamond', Georgia, serif;
  --font-sans:  'RethinkSans', 'Helvetica Neue', Arial, sans-serif;
  --font-script:'AstonScript', cursive;

  --section-gap: clamp(40px, 7vw, 72px);
  --gutter: clamp(20px, 5vw, 32px);

  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --bg:          #1C140F;
  --bg-card:     #241811;
  --bg-inset:    #2E2017;
  --fg:          #F0ECE3;
  --fg-muted:    #B0A18E;
  --fg-faint:    #6B5A4A;
  --border:      rgba(240, 236, 227, 0.10);
  --border-strong: rgba(240, 236, 227, 0.24);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #1C140F;
    --bg-card:     #241811;
    --bg-inset:    #2E2017;
    --fg:          #F0ECE3;
    --fg-muted:    #B0A18E;
    --fg-faint:    #6B5A4A;
    --border:      rgba(240, 236, 227, 0.10);
    --border-strong: rgba(240, 236, 227, 0.24);
  }
}
[data-accent="off"]    { --accent: var(--gold); }
[data-accent="subtle"] { --accent: var(--misilab-blue); }
[data-accent="present"]{ --accent: var(--misilab-blue); }

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 400ms var(--ease), color 400ms var(--ease);
}

body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--off-white); }

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

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- TIME TICKER ---------- */
.ticker {
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg);
}
.ticker-track {
  display: flex;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: ticker-scroll 60s linear infinite;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--fg-faint);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 860px) {
  .ticker-track { gap: 120px; }
}
[data-ticker="static"] .ticker-track  { animation: none; justify-content: center; width: 100%; }
[data-ticker="cycle"] .ticker-track   { animation: ticker-cycle 12s ease-in-out infinite; justify-content: center; width: 100%; }
.ticker-item { display: inline-flex; gap: 10px; align-items: baseline; }
.ticker-item .city { color: var(--fg-muted); transition: color 600ms var(--ease); }
.ticker-item .time { color: var(--fg); font-weight: 700; }
.ticker-sep { color: var(--fg-faint); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes ticker-cycle {
  0%, 20%   { opacity: 1; }
  25%, 45%  { opacity: 0.15; }
  50%, 70%  { opacity: 1; }
  75%, 95%  { opacity: 0.15; }
  100%      { opacity: 1; }
}

/* ---------- TOP MARK / WORDMARK ---------- */
.top-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: clamp(20px, 4vw, 32px);
  padding-bottom: 8px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  position: relative;
  line-height: 0;
  opacity: 0.92;
  transition: opacity 200ms var(--ease);
}
.wordmark:hover { opacity: 1; }
.wordmark-img {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
}
.wordmark--sm .wordmark-img { height: 22px; }
.wordmark--md .wordmark-img { height: 28px; }
@media (min-width: 720px) {
  .wordmark--sm .wordmark-img { height: 24px; }
  .wordmark--md .wordmark-img { height: 32px; }
}
/* Light/dark auto-swap */
.wordmark-img--dark { display: none; }
[data-theme="dark"] .wordmark-img--light { display: none; }
[data-theme="dark"] .wordmark-img--dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wordmark-img--light { display: none; }
  :root:not([data-theme="light"]) .wordmark-img--dark { display: block; }
}

/* ---------- HERO ---------- */
.hero {
  padding-top: clamp(48px, 11vw, 96px);
  padding-bottom: clamp(48px, 11vw, 96px);
  text-align: center;
}

.hero-quote {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(20px, 4.6vw, 30px);
  line-height: 1.32;
  color: var(--fg);
  max-width: none;
  margin: 0 auto;
  text-wrap: balance;
  letter-spacing: -0.01em;
}
.hq-line {
  display: block;
}
@media (max-width: 480px) {
  /* On the narrowest screens, allow natural wrap if the line is too long;
     the explicit block-break still preserves the intended split */
  .hero-quote { font-size: clamp(18px, 5.2vw, 24px); }
}

/* ---------- LINK LIST (linkinbio-style) ---------- */
.link-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(20px, 5vw, 32px) 0;
  border-top: 1px solid var(--border);
}

.link-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: clamp(12px, 3vw, 18px);
  align-items: center;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.link-row::before {
  /* Faint left-edge accent that fades in on hover */
  content: '';
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 2px;
  background: var(--fg);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: translateX(-2px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
  pointer-events: none;
  z-index: 1;
}
.link-row.is-linked:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.link-row.is-linked:hover::before {
  opacity: 0.6;
  transform: translateX(0);
}

@media (min-width: 720px) {
  .link-row { grid-template-columns: 84px 1fr auto; padding: 16px; }
}

.link-thumb {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--fg-faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  border: 1px solid var(--border);
}
/* Subtle inset highlight (only on text-thumb fallback, not on image-thumb) */
.link-row:not(.has-img) .link-thumb::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 40%, rgba(0,0,0,0.04) 100%);
  pointer-events: none;
}
.link-thumb-tag {
  position: relative;
  z-index: 1;
  padding: 0 6px;
  text-align: center;
  text-wrap: balance;
}
.link-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Unobtrusive tone match — slight warm desaturation */
  filter: saturate(0.9) brightness(0.98) contrast(1.02) sepia(0.04);
  transition: transform 600ms var(--ease), filter 400ms var(--ease);
}
.link-row.is-linked:hover .link-thumb-img {
  transform: scale(1.04);
}

.link-body { min-width: 0; }
.link-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(22px, 5vw, 28px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}
.link-title-link {
  color: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
/* Overlay link expands the title's hit area to the entire card */
.link-row.is-linked .link-title-link::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}
.link-title.sans {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: clamp(18px, 4vw, 22px);
  text-transform: uppercase;
}
.link-title .script {
  font-family: var(--font-script);
  color: var(--gold);
  font-size: 0.85em;
  line-height: 1;
  margin-left: 2px;
}
.link-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-muted);
  margin-top: 4px;
  text-wrap: pretty;
}
.link-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg-inset);
  color: var(--fg-muted);
}
.tag-chip .dot { width: 5px; height: 5px; border-radius: 999px; background: var(--accent); }
.tag-chip.gold { color: var(--gold-soft); }
.tag-chip.gold .dot { background: var(--gold); }
.tag-chip.coming-soon {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-muted);
}
.tag-chip.coming-soon .dot { background: var(--misilab-blue); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Inline tag — sits beside the social icons, height-matches them */
.tag-chip--inline {
  height: 32px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--bg-inset);
  color: var(--fg-muted);
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-left: 4px;
}
@media (max-width: 380px) {
  /* Drop to its own line on the smallest screens */
  .tag-chip--inline { margin-left: 0; }
}

/* Social icon row */
.icon-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}
.icon-btn {
  width: 32px; height: 32px;
  min-width: 32px;
  border-radius: var(--r-pill);
  display: inline-flex;
  box-sizing: border-box;
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  background: transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
  flex-shrink: 0;
}
.icon-btn:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: var(--bg);
}
.icon-btn svg { width: 14px; height: 14px; flex-shrink: 0; display: block; }
.icon-row svg { width: 14px; height: 14px; }

/* Right-side affordance arrow */
.link-arrow {
  width: 36px; height: 36px;
  min-width: 36px;
  border-radius: 999px;
  display: inline-flex;
  box-sizing: border-box;
  align-items: center; justify-content: center;
  color: var(--fg-faint);
  transition: color 200ms var(--ease), transform 200ms var(--ease);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.link-row.is-linked:hover .link-arrow {
  color: var(--fg);
  transform: translateX(2px);
}
.link-arrow svg { width: 14px; height: 14px; flex-shrink: 0; display: block; }

/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- ABOUT ---------- */
.about {
  padding-top: var(--section-gap);
  border-top: 1px solid var(--border);
  margin-top: var(--section-gap);
}
.sect-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: clamp(20px, 4vw, 28px);
}
.sect-eyebrow::before {
  content: ''; height: 1px; width: 24px; background: currentColor;
}
.about-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(30px, 6.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: clamp(24px, 5vw, 32px);
  text-wrap: balance;
}
.about-title em { font-style: italic; color: var(--fg-muted); padding: 0 0.05em; }

/* About image — real photo with typographic monogram fallback */
.about-image {
  position: relative;
  aspect-ratio: 3 / 4;
  width: 100%;
  border-radius: var(--r-lg);
  background: var(--brown-dark);
  overflow: hidden;
  margin-bottom: clamp(24px, 5vw, 36px);
  isolation: isolate;
  border: 1px solid var(--border);
}
@media (min-width: 720px) {
  .about-image { aspect-ratio: 4 / 5; max-width: 480px; }
}
.about-image-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  z-index: 5;
  filter: saturate(0.92) brightness(0.98) contrast(1.02) sepia(0.04);
}
/* Hide image silently if it 404s, exposing the fallback */
.about-image-photo:not([src]),
.about-image-photo[src=""] { display: none; }

/* Fallback typographic monogram (visible only when photo is missing) */
.ai-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ai-w, .ai-a, .ai-amp {
  position: absolute;
  line-height: 1;
  user-select: none;
}
.ai-w {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(220px, 56vw, 380px);
  color: var(--off-white);
  letter-spacing: -0.05em;
  left: 4%;
  top: 50%;
  transform: translateY(-52%);
  z-index: 1;
}
.ai-a {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(280px, 70vw, 460px);
  color: var(--gold);
  right: 0%;
  bottom: -12%;
  z-index: 2;
  mix-blend-mode: screen;
  opacity: 0.94;
}
.ai-amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 5vw, 42px);
  color: var(--off-white);
  opacity: 0.42;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}
.ai-grain {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}

/* About lede stack — multi-paragraph editorial */
.about-lede-stack {
  max-width: 50ch;
  margin-bottom: clamp(32px, 6vw, 44px);
}
.about-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(20px, 4.4vw, 26px);
  line-height: 1.4;
  color: var(--fg);
  text-wrap: pretty;
  margin-bottom: clamp(16px, 3vw, 20px);
}
.about-lede-stack > .about-lede:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  float: left;
  font-size: 4.4em;
  line-height: 0.78;
  margin: 4px 10px 0 -2px;
  color: var(--fg);
}
.about-lede--secondary {
  font-style: normal;
  font-size: clamp(16px, 3.6vw, 19px);
  line-height: 1.55;
  color: var(--fg-muted);
}

/* Bios — two-column on desktop, stacked on mobile */
.bios {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 5vw, 32px);
}
@media (min-width: 720px) {
  .bios { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.bio {
  padding-top: clamp(20px, 4vw, 28px);
  border-top: 1px solid var(--border);
}
.bio-name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(28px, 6.5vw, 36px);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--fg);
  /* Block layout (not flex) so the literal space before "Zerlett" / "Seraj" renders */
  display: block;
  white-space: normal;
}
.bio-name .gold-letter {
  font-family: var(--font-script);
  color: var(--gold);
  font-size: 1.6em;
  line-height: 0.85;
  margin-right: 0.04em;
  display: inline-block;
  vertical-align: baseline;
  transform: translateY(0.06em);
  font-weight: 400;
}
.bio-name .rest {
  display: inline;
}
.bio-role {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: clamp(12px, 3vw, 16px);
}
.bio-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 56ch;
}

/* ---------- TRACKER ---------- */
.tracker {
  padding-top: var(--section-gap);
  border-top: 1px solid var(--border);
  margin-top: var(--section-gap);
}
.tracker-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(36px, 8vw, 52px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: clamp(12px, 3vw, 16px);
}
.tracker-title em { font-style: italic; color: var(--fg-muted); padding: 0 0.04em; }
.tracker-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-muted);
  max-width: 50ch;
  margin-bottom: clamp(20px, 4vw, 28px);
}

/* Two columns on desktop (achieved left, pending right), single column on mobile */
.tr-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 clamp(24px, 4vw, 40px);
}
@media (min-width: 640px) {
  .tr-columns { grid-template-columns: 1fr 1fr; }
}

.tr-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
}
.tr-item.pending {
  color: var(--fg-muted);
}

/* Shovel icon — span with CSS mask for full color control */
.tr-shovel-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
  /* Achieved (default): gold-filled — show the PNG as background */
  background: url(assets/shovel-logo.png) center / contain no-repeat;
}
/* Pending: same silhouette, flat light grey via CSS mask */
.tr-item.pending .tr-shovel-icon {
  background: none;
  -webkit-mask: url(assets/shovel-logo.png) center / contain no-repeat;
          mask: url(assets/shovel-logo.png) center / contain no-repeat;
  background-color: var(--fg-faint);
  opacity: 0.55;
}

.tr-text {
  text-wrap: pretty;
}

/* ---------- FOOTER ---------- */
footer {
  margin-top: var(--section-gap);
  padding: clamp(36px, 7vw, 56px) 0 clamp(40px, 6vw, 56px);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  align-items: center;
}
.foot-icons {
  display: flex; gap: 8px; align-items: center;
}
.foot-cred {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fg-faint);
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
}

/* ---------- DESKTOP ---------- */
@media (min-width: 860px) {
  .page { max-width: 720px; }
}

/* ---------- NO-MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none !important; justify-content: center; width: 100%; }
  .tag-chip.coming-soon .dot { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { transition-duration: 0.01ms !important; }
}
