/* ------------------------------------------------------------------
   milos.design — "Index × Spotlight"
   Swiss editorial typography + dark atmosphere, hand-crafted.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Tokens ----------------------------------------------------------- */
:root {
  color-scheme: dark;

  --bg: #060607;
  --fg: #ededf0;
  --mut: #8e8e96;
  --faint: #55555c;
  --line: rgba(255, 255, 255, 0.11);
  --a1: #ffb03a;
  --a2: #ff6d3c;
  --glow: rgba(255, 150, 60, 0.3);
  --focus: #2997ff;
  --selection: rgba(255, 176, 58, 0.25);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --col: 760px;
  --gutter: clamp(1.25rem, 4.5vw, 2rem);
}

/* Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-feature-settings: "cv11", "ss03", "calt", "kern";
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
main { flex: 1; position: relative; z-index: 2; }

/* Atmosphere -------------------------------------------------------- */
.spot, .grain { position: fixed; inset: 0; pointer-events: none; }
.spot {
  z-index: 0;
  background:
    radial-gradient(560px 560px at var(--mx, 72%) var(--my, 18%), var(--glow), transparent 65%),
    radial-gradient(900px 500px at 85% -10%, rgba(255, 150, 60, 0.12), transparent 60%);
  filter: opacity(0.55);
}
.grain {
  z-index: 1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
}
.grain { opacity: 0.26; }

/* Layout ----------------------------------------------------------- */
.wrap { width: min(100% - (var(--gutter) * 2), var(--col)); margin-inline: auto; position: relative; z-index: 2; }

.skip-link {
  position: absolute; top: 0.75rem; left: 0.75rem; z-index: 100;
  padding: 0.5rem 0.75rem; background: var(--fg); color: var(--bg);
  border-radius: 8px; font-size: 0.875rem;
  transform: translateY(-200%); transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Type helpers ----------------------------------------------------- */
.caps {
  font-size: 0.6875rem;
  font-weight: 520;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.num { font-variant-numeric: tabular-nums; }
.acc { color: var(--a1); }

/* Meta strip (header) ---------------------------------------------- */
.meta {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.75rem 0 0;
  color: var(--mut);
  position: relative; z-index: 2;
}
.meta a { transition: color 0.2s var(--ease); }
.meta a:hover, .meta a[aria-current="page"] { color: var(--fg); }
.meta .right { display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand__mark { width: 16px; height: 16px; flex: none; }
@media (max-width: 620px) {
  .meta .right { gap: 1.1rem; }
}

/* Hero ------------------------------------------------------------- */
.hero { padding: clamp(4rem, 11vh, 7.5rem) 0 clamp(3rem, 8vh, 5.5rem); }
.display {
  font-size: clamp(2.75rem, 8.2vw, 5.25rem);
  line-height: 1.01;
  letter-spacing: -0.045em;
  font-weight: 640;
  text-wrap: balance;
}
.display .dl { display: block; }
.display .g {
  white-space: nowrap;
  /* tight tracking makes the last round glyph overhang the box; pad the
     paint area so background-clip:text doesn't cut it, pull layout back */
  padding-right: 0.07em;
  margin-right: -0.07em;
  background: linear-gradient(100deg, var(--a1), var(--a2) 55%, var(--a1)) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sheen 8s linear infinite;
}
.caret {
  display: inline-block;
  width: 0.05em;
  height: 1em;
  vertical-align: -0.18em;
  margin-left: 0.07em;
  border-radius: 0.025em;
  background: linear-gradient(var(--a1), var(--a2));
}
.caret.blink { animation: caret-blink 1.1s step-end infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
@keyframes sheen { to { background-position: 200% 0; } }
.display .face {
  display: inline-block; width: 0.82em; height: 0.82em; border-radius: 50%;
  object-fit: cover; vertical-align: -0.08em; margin: 0 0.06em;
  transition: transform 0.5s var(--ease-out);
}
.display .face:hover { transform: scale(1.12) rotate(6deg); }
.hero__lede {
  margin-top: 2.125rem;
  font-size: 1.1875rem; line-height: 1.6; letter-spacing: -0.01em;
  color: var(--mut); max-width: 34em; text-wrap: pretty;
}
.hero__lede a {
  color: var(--fg);
  background: linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 100% 1px;
  padding-bottom: 2px;
}
.hero__lede a:hover { background-image: linear-gradient(var(--a1), var(--a1)); }

/* Sections --------------------------------------------------------- */
.section { padding: 3.25rem 0; }
.sh { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 2.125rem; }
.sh .n { color: var(--a1); display: flex; align-self: center; }
.sh .n svg { width: 10px; height: 10px; display: block; }
.sh .caps { color: var(--mut); }
.sh::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }

/* Dock ------------------------------------------------------------- */
.dock { display: flex; gap: 1.125rem; flex-wrap: wrap; }
.dock a, .dock > span {
  position: relative;
  display: block; width: 4rem; height: 4rem; flex: none;
}
.dock img {
  width: 100%; height: 100%; border-radius: 22.5%;
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 4px 10px -2px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.35s var(--ease);
}
.dock a:hover img {
  box-shadow:
    0 0 0 1px var(--line),
    0 1px 2px rgba(0, 0, 0, 0.55),
    0 4px 10px -2px rgba(0, 0, 0, 0.45),
    0 14px 32px -12px var(--glow);
}

/* Dock tooltips: "Launching Soon" above the unreleased, name below the shipped */
.dock [data-tip]::after {
  content: attr(data-tip);
  position: absolute; left: 50%;
  white-space: nowrap;
  font-size: 0.625rem; font-weight: 550; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.4375rem 0.6875rem; border-radius: 999px;
  background: #1a1a1c;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s var(--ease), transform 0.12s var(--ease);
}
.dock span[data-tip]::after {
  bottom: calc(100% + 0.625rem);
  color: var(--a1);
  transform: translateX(-50%) translateY(4px) scale(0.95);
  transform-origin: bottom center;
}
.dock a[data-tip]::after {
  top: calc(100% + 0.625rem);
  color: var(--fg);
  transform: translateX(-50%) translateY(-4px) scale(0.95);
  transform-origin: top center;
}
@media (hover: hover) {
  .dock span[data-tip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  }
  .dock a[data-tip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-out);
  }
}

/* Index rows ------------------------------------------------------- */
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline; gap: 1.25rem;
  padding: 1.0625rem 0; border-bottom: 1px solid var(--line);
}
.rows .row:first-child { border-top: 1px solid var(--line); }
.row .t {
  font-size: 1.25rem; font-weight: 530; letter-spacing: -0.022em; line-height: 1.3;
  transition: transform 0.45s var(--ease-out);
}
.row .m { font-size: 0.8125rem; color: var(--mut); text-align: right; }
a.row .t::after {
  content: "→"; display: inline-block; margin-left: 0.625rem;
  color: var(--a1); opacity: 0; transform: translateX(-6px);
  transition: 0.35s var(--ease-out);
}
@media (hover: hover) {
  a.row:hover .t { transform: translateX(10px); }
  a.row:hover .t::after { opacity: 1; transform: none; }
}
@media (max-width: 620px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .m { display: none; }
  .row .t { font-size: 1.0938rem; }
}

/* View all pill ---------------------------------------------------- */
.view-all {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.5625rem 1rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--mut);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.view-all .ar { color: var(--a1); transition: transform 0.35s var(--ease-out); }
.view-all:hover { color: var(--fg); border-color: var(--faint); }
.view-all:hover .ar { transform: translateX(3px); }

/* Tags ------------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.tag {
  font-size: 0.6875rem; font-weight: 520; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mut); padding: 0.4375rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tag:hover { color: var(--fg); border-color: var(--faint); }

/* Prose ------------------------------------------------------------ */
.prose { font-size: 1.0625rem; line-height: 1.7; text-wrap: pretty; }
.prose p + p { margin-top: 1.25em; }
.prose a {
  color: var(--fg);
  background: linear-gradient(var(--line), var(--line)) no-repeat 0 100% / 100% 1px;
  padding-bottom: 2px;
}
.prose a:hover { background-image: linear-gradient(var(--a1), var(--a1)); }
.prose--muted { color: var(--mut); }
.prose--muted a, .prose--muted strong { color: var(--fg); }
.prose h2 { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.25em 0 0.75em; color: var(--fg); }
.prose h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.014em; margin: 1.75em 0 0.5em; color: var(--fg); }
.prose blockquote { border-left: 2px solid var(--a1); padding-left: 1.25rem; color: var(--mut); margin: 1.5em 0; }
.prose ul { list-style: disc; padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }

/* Intro statement (about) ------------------------------------------ */
.statement {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  line-height: 1.35; letter-spacing: -0.028em; font-weight: 560;
  max-width: 26em; text-wrap: balance; margin-bottom: 1.75rem;
}
.statement-by { margin: -1rem 0 1.75rem; font-size: 0.8125rem; color: var(--mut); }
.statement .g {
  padding-right: 0.07em;
  margin-right: -0.07em;
  background: linear-gradient(100deg, var(--a1), var(--a2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Away from the computer (about) ----------------------------------- */
.away { margin-top: 2.75rem; }

/* A loose pile of prints. Each figure is a still hover target; the
   tilt and lift live on the img, so the hit area never moves out from
   under the cursor. Add photos as more <figure class="snap">. */
.snaps {
  display: flex;
  margin-top: 2.25rem;
  padding: 0.75rem 0 0.5rem 0.375rem; /* room for tilted corners */
}
.snap {
  position: relative; z-index: 0;
  flex: 0 1 14.5rem; min-width: 0;
  margin: 0;
  /* on leave, stay on top until the print has settled back */
  transition-property: z-index;
  transition-duration: 0s;
  transition-delay: 0.3s;
}
.snap + .snap { margin-left: -2.75rem; }
.snap img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 10px;
  background: #151517;
  box-shadow:
    0 0 0 1px var(--line),
    0 2px 4px rgba(0, 0, 0, 0.45),
    0 22px 44px -16px rgba(0, 0, 0, 0.75);
  transform: translateY(var(--y, 0)) rotate(var(--r, -4deg));
  transition: transform 0.3s var(--ease-out);
}
.snap:nth-child(5n+1) { --r: -4deg; --y: 0.375rem; }
.snap:nth-child(5n+2) { --r: 3deg;  --y: -0.25rem; }
.snap:nth-child(5n+3) { --r: -2deg; --y: 0.625rem; }
.snap:nth-child(5n+4) { --r: 5deg;  --y: 0; }
.snap:nth-child(5n+5) { --r: -3deg; --y: 0.25rem; }
@media (hover: hover) and (pointer: fine) {
  .snap:hover { z-index: 1; transition-delay: 0s; }
  .snap:hover img {
    transform: translateY(-0.375rem) rotate(0deg) scale(1.03);
    transition-duration: 0.45s;
  }
}
@media (max-width: 620px) {
  .snap + .snap { margin-left: -2rem; }
}

/* Experience ------------------------------------------------------- */
.xp {
  /* date column just fits the widest period ("2012 – 2018" ≈ 5rem), so
     the visible space before the company is ~the 1.25rem gap */
  display: grid; grid-template-columns: 5.125rem minmax(0, 1fr) auto;
  gap: 1.25rem; align-items: baseline;
  padding: 1.0625rem 0; border-bottom: 1px solid var(--line);
}
.xps .xp:first-child { border-top: 1px solid var(--line); }
.xp .p { font-size: 0.75rem; color: var(--faint); letter-spacing: 0.04em; white-space: nowrap; }
.xp .c { font-size: 1.0625rem; font-weight: 550; letter-spacing: -0.018em; }
.xp .c a:hover { color: var(--a1); }
.xp .r { font-size: 0.8125rem; color: var(--mut); text-align: right; max-width: 18em; }
@media (max-width: 620px) {
  .xp { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .xp .r { text-align: left; }
  .xp .p { order: 3; }
}

/* Quotes ----------------------------------------------------------- */
/* Masonry: two independent columns, each stacking its own quotes, so
   short and long quotes don't leave row gaps. Column membership is set
   in the markup (.quotes__col); on phones they stack in source order. */
.quotes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 2.5rem; align-items: start;
}
.quotes__col { display: flex; flex-direction: column; gap: 2.25rem; }
.quotes figure { display: flex; flex-direction: column; gap: 0.875rem; margin: 0; }
.quote {
  font-size: 1rem; line-height: 1.6; letter-spacing: -0.012em; font-weight: 470;
  text-wrap: pretty;
}
.quote b, .quote strong { font-weight: 560; }
.qby { font-size: 0.8125rem; color: var(--mut); margin-top: auto; }
.qby b { color: var(--fg); font-weight: 550; }
@media (max-width: 620px) {
  .quotes { grid-template-columns: 1fr; gap: 1.75rem; }
  .quotes__col { gap: 1.75rem; }
}

/* Contact ---------------------------------------------------------- */
.email-row {
  --efs: clamp(1.75rem, 5.4vw, 3.375rem); /* email font size, shared with the pill offset */
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.25rem; margin-top: 0.75rem;
}
.email {
  display: inline-block; padding-bottom: 0.375rem;
  font-size: var(--efs);
  font-weight: 620; letter-spacing: -0.042em; line-height: 1.1;
  background: linear-gradient(90deg, var(--a1), var(--a2)) no-repeat 0 100% / 0% 3px;
  transition: background-size 0.6s var(--ease-out);
  overflow-wrap: anywhere;
}
.email:hover { background-size: 100% 3px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 0.4375rem;
  /* center the pill on the email's x-height band (the "m"), not its line box:
     x-band center sits 0.1035em below box center for Inter at line-height 1.1,
     and the email's underline padding (0.375rem) shifts box center up half that */
  position: relative;
  top: calc(var(--efs) * 0.1035 - 0.1875rem);
  padding: 0.4375rem 0.75rem; border-radius: 999px;
  font-size: 0.6875rem; font-weight: 520; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mut); border: 1px solid var(--line);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.copy-btn:hover { color: var(--fg); border-color: var(--faint); }
.copy-btn:active { transform: scale(0.95); }
.copy-btn svg { width: 0.8125rem; height: 0.8125rem; }
.copy-btn__idle, .copy-btn__done { display: inline-flex; align-items: center; gap: 0.4375rem; }
.copy-btn .copy-btn__done { display: none; }
.copy-btn.is-done { color: var(--a1); border-color: var(--a1); }
.copy-btn.is-done .copy-btn__idle { display: none; }
.copy-btn.is-done .copy-btn__done { display: inline-flex; }

.avail {
  display: inline-flex; align-items: center; gap: 0.625rem;
  margin-top: 2.5rem; color: var(--mut);
}
.avail .dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--a1); flex: none; }
.avail .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--a1);
  animation: avail-pulse 2.4s ease-out infinite;
}
@keyframes avail-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(2.8); opacity: 0; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* Footer ----------------------------------------------------------- */
.footer { position: relative; z-index: 2; padding: 2.5rem 0 max(2.75rem, env(safe-area-inset-bottom)); }
.footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  border-top: 1px solid var(--line); padding-top: 1.5rem; color: var(--faint);
}
.footer a:hover { color: var(--fg); }
.footer .fsoc { display: flex; gap: 0.75rem 1.5rem; flex-wrap: wrap; }

/* Page head (about, blog) ------------------------------------------ */
.page-head { padding: clamp(3.5rem, 9vh, 6rem) 0 clamp(2rem, 5vh, 3rem); }
.page-head .kick { color: var(--mut); margin-bottom: 1.5rem; display: inline-flex; align-items: center; gap: 0.5rem; }
a.kick:hover { color: var(--fg); }
.page-head .display { font-size: clamp(2.5rem, 6.5vw, 4rem); }
.page-head__lede { margin-top: 1.5rem; font-size: 1.125rem; color: var(--mut); max-width: 36em; line-height: 1.6; }
.page-head__meta { margin-top: 1.5rem; color: var(--faint); display: flex; gap: 0.75rem; font-size: 0.8125rem; }

/* Article ---------------------------------------------------------- */
.article { padding-bottom: 3.5rem; }
/* Cover image: 1600x840 render from design/featured-images ("Spotlight") */
.cover { margin-bottom: clamp(2rem, 5vh, 3rem); }
.cover img {
  width: 100%; height: auto; aspect-ratio: 40 / 21;
  border-radius: 16px; border: 1px solid var(--line);
  background: #0a0a0b;
}
.article .prose { font-size: 1.0938rem; }
.article__foot {
  margin-top: 3.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  color: var(--mut); font-size: 0.875rem;
}
.article__foot a:hover { color: var(--a1); }

/* Subscribe (end of post) ------------------------------------------ */
.subscribe {
  margin-top: 3.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 1.125rem 2rem;
  padding: 1.5rem 1.625rem;
  border: 1px solid var(--line); border-radius: 16px;
  background:
    radial-gradient(420px 160px at 0% 0%, rgba(255, 150, 60, 0.07), transparent 70%),
    rgba(255, 255, 255, 0.02);
}
.subscribe__t {
  flex: 1 1 18rem;
  font-size: 1.0625rem; line-height: 1.55; letter-spacing: -0.014em;
  color: var(--mut); text-wrap: pretty;
}
.subscribe__t b { color: var(--fg); font-weight: 560; }
.subscribe .view-all { margin-top: 0; flex: none; color: var(--fg); }
.subscribe .view-all:hover { border-color: var(--a1); }
.subscribe .view-all:hover .ar { transform: translate(2px, -2px); }
.subscribe + .article__foot { margin-top: 2.5rem; }

/* Follow on Instagram (about) — same card, two handle pills */
.snaps + .follow { margin-top: 2.5rem; }
.follow__links { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.follow .view-all { font-size: 0.875rem; letter-spacing: -0.005em; }
@media (max-width: 620px) {
  .subscribe { padding: 1.25rem; }
}

/* 404 -------------------------------------------------------------- */
.notfound { padding: 22vh 0; }

/* Reveal ----------------------------------------------------------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.8s var(--ease), transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Motion preferences ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .display .g { background-size: 100% 100%; }
  .caret { display: none; }
  .spot { display: none; }
}
