/* iamtudor.com — direction C, "Night to morning".
   The page always starts at night and ends near morning: the scroll is the day.
   It looks the same in light and dark mode on purpose.
   No JavaScript. Without scroll-driven animations (or with reduced motion)
   every line is simply visible and the sky is shown at its morning state. */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #0a0d14;
  --fg: #e9e6df;
  --soft: #8a8f9c;
  --dawn-1: #2a2140;
  --dawn-2: #c9785a;
  --dawn-3: #f2c38f;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  /* Apple's San Francisco on Apple devices (system font, never hosted here), Inter elsewhere. */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
}
body {
  background: var(--night);
  color: var(--fg);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible {
  outline: 1px solid var(--dawn-3);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--night);
  font: 500 14px/1 var(--sans);
  text-decoration: none;
}
.skip:focus { top: 16px; }

/* The sky: a glow at the bottom that rises as you read. */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(150% 75% at 50% 108%, var(--dawn-3) 0%, var(--dawn-2) 20%, var(--dawn-1) 50%, transparent 78%);
  opacity: .9;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .07;
  background: url("grain.svg") repeat;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .sky {
      opacity: 0; /* stays night if the timeline resolves a frame late */
      animation: rise linear both;
      animation-timeline: scroll(root);
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(60%); }
  to   { opacity: .95; transform: translateY(0); }
}

/* Header */
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(20px, env(safe-area-inset-top)) max(16px, 4vw, env(safe-area-inset-right)) 20px max(16px, 4vw, env(safe-area-inset-left));
  font: 500 13px/1 var(--sans);
  color: var(--soft);
}
.top a { text-decoration: none; padding: 6px 0; }
.top a:hover { color: var(--fg); }
.top nav { display: flex; gap: 22px; }

main { position: relative; z-index: 1; }

.screen {
  min-height: 88vh;
  min-height: 88svh;
  display: grid;
  place-items: center;
  padding: 0 clamp(16px, 6vw, 80px);
  text-align: center;
}

/* Opening screen */
.intro { min-height: 100vh; min-height: 100svh; }
.intro h1 {
  font-weight: 400;
  font-size: clamp(64px, 14vw, 180px);
  line-height: .9;
  letter-spacing: -.02em;
}
.intro h1 em { display: block; }
.hint {
  margin-top: 28px;
  font: 400 13px/1 var(--sans);
  color: var(--soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* The five lines of the bio, one screen each */
.line p {
  font-size: clamp(34px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -.01em;
  max-width: 14em;
  text-wrap: balance;
}
.line p em { color: var(--dawn-3); }
.num {
  display: block;
  margin-bottom: 22px;
  font: 500 12px/1 var(--sans);
  color: var(--soft);
  letter-spacing: .1em;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .line > div {
      animation: focus linear both;
      animation-timeline: view();
      animation-range: cover 10% cover 90%;
    }
  }
}
@keyframes focus {
  0%       { opacity: 0; filter: blur(10px); transform: translateY(24px); }
  35%, 65% { opacity: 1; filter: blur(0); transform: none; }
  100%     { opacity: .1; filter: blur(6px); transform: translateY(-24px); }
}

/* Last screen: where to go next */
.end {
  min-height: 90vh;
  min-height: 90svh;
  align-content: end;
  padding-bottom: max(56px, env(safe-area-inset-bottom));
}
.end nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px clamp(28px, 6vw, 72px);
  justify-content: center;
  font-size: clamp(30px, 4vw, 44px);
}
.end nav a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  text-shadow: 0 1px 24px rgba(10, 13, 20, .5);
}
.end nav a:hover { color: #fff; }
.end footer {
  margin-top: 28px;
  font: 500 12px/1 var(--sans);
  color: rgba(233, 230, 223, .75);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Not-found page */
.lost h1 {
  font-weight: 400;
  font-size: clamp(48px, 9vw, 112px);
  line-height: .95;
}
.lost p {
  margin-top: 24px;
  font: 400 16px/1.5 var(--sans);
  color: var(--soft);
}
.lost p a { color: var(--fg); }

/* ── Inner pages (/projects, /now) ─────────────────────────────────────
   Calmer than the home page: the sky is fixed at dusk, low on the screen,
   and the text reads as one column. */
.page .sky {
  animation: none;
  opacity: .55;
  transform: translateY(38%);
}
.top a[aria-current="page"] { color: var(--fg); }
.page .top {
  background: linear-gradient(rgba(10, 13, 20, .7), rgba(10, 13, 20, 0));
  padding-bottom: 28px;
}

.sheet {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(120px, 22vh, 200px) clamp(16px, 6vw, 40px) clamp(80px, 14vh, 140px);
}
.sheet h1 {
  font-weight: 400;
  font-size: clamp(56px, 11vw, 120px);
  line-height: .92;
  letter-spacing: -.02em;
}
.lede {
  margin-top: 20px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.3;
  color: var(--soft);
  max-width: 24em;
}
.stamp {
  margin-top: 18px;
  font: 500 12px/1 var(--sans);
  color: var(--soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.draft-note {
  margin-top: 28px;
  display: inline-block;
  padding: 8px 12px;
  border: 1px dashed rgba(242, 195, 143, .5);
  border-radius: 6px;
  font: 500 12px/1.4 var(--sans);
  color: var(--dawn-3);
  letter-spacing: .04em;
}

/* Now list */
.now-list { list-style: none; padding: 0; margin-top: clamp(48px, 9vh, 88px); counter-reset: now; }
.now-list li {
  counter-increment: now;
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid rgba(233, 230, 223, .12);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  text-wrap: pretty;
}
.now-list li:last-child { border-bottom: 1px solid rgba(233, 230, 223, .12); }
.now-list li::before {
  content: counter(now, decimal-leading-zero);
  font: 500 12px/1 var(--sans);
  letter-spacing: .1em;
  color: var(--soft);
}

.back {
  margin-top: clamp(56px, 10vh, 96px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  font-size: clamp(24px, 3vw, 32px);
}
.back a { text-decoration: none; border-bottom: 1px solid currentColor; }
.back a:hover { color: var(--dawn-3); }

/* ── Liquid Glass navigation ───────────────────────────────────────────
   A floating glass capsule at Apple's touch size (44 px targets, SF text).
   The current page sits under a brighter glass lens. On phones it becomes a
   tab bar floating at the bottom of the screen, like iOS 26. */
.top .brand { font: 600 15px/1 var(--sans); color: var(--fg); letter-spacing: -.01em; padding: 12px 0; }
.glass-nav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .09)),
    rgba(22, 24, 32, .42);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 -1px 1px rgba(255, 255, 255, .08),
    inset 0 0 18px rgba(255, 255, 255, .04),
    0 12px 32px rgba(0, 0, 0, .35),
    0 2px 6px rgba(0, 0, 0, .2);
}
/* specular highlight along the top edge */
.glass-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 30% -20%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.top .glass-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 500 15px/1 var(--sans);
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .78);
  transition: color .25s, background .25s, box-shadow .25s;
}
.top .glass-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.top .glass-nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .08), 0 4px 12px rgba(0, 0, 0, .25);
}
.top .glass-nav a:focus-visible { outline: 2px solid var(--dawn-3); outline-offset: 2px; }
@media (min-width: 701px) {
  .glass-nav { position: absolute; left: 50%; top: max(14px, env(safe-area-inset-top)); transform: translateX(-50%); }
}
@media (max-width: 700px) {
  .glass-nav {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    padding: 5px;
  }
  .top .glass-nav a { min-height: 48px; padding: 0 22px; font-size: 16px; }
  .page main { padding-bottom: 80px; }
}

/* Bigger name; the menu island stays centered (Tudor, 24 Oct) */
.top .brand { font: 600 clamp(19px, 1.6vw, 24px)/1 var(--display); letter-spacing: -.02em; }
@media (max-width: 700px) {
  .top .brand { font-size: 19px; }
}
@media (max-width: 700px) {
  .top .glass-nav a { padding: 0 clamp(11px, 3.6vw, 18px); font-size: 15px; }
}
@media (max-width: 360px) {
  .glass-nav { max-width: calc(100vw - 16px); }
  .top .glass-nav a { padding: 0 9px; font-size: 14px; flex: 1 1 auto; }
}
