/*
  tesfa.xyz design. Every look-and-feel value lives here.
  Tokens first; change a token and the whole site follows.
  Measured from the Framer site on 2026-11-27.
*/

@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dm-sans-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
/* Arial resized to DM Sans's measurements (same numbers Framer used), so text doesn't jump if the font arrives late. */
@font-face { font-family: "DM Sans Fallback"; src: local("Arial"); ascent-override: 94.36%; descent-override: 29.49%; line-gap-override: 0%; size-adjust: 105.13%; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-italic-latin.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  /* colour */
  --bg: #fff;
  --text: #000;
  --body-text: rgba(0, 0, 0, 0.8);
  --muted: #999;
  --accent: #ff5314;          /* month badge on hover and for the open note */
  --link: #de5421;            /* "tesfa.xyz" back link */
  --link-hover: #111;
  --rule: rgba(34, 34, 34, 0.1);
  --badge-bg: rgba(0, 0, 0, 0.02);
  --badge-border: rgba(0, 0, 0, 0.12);
  --quote-text: #999;
  --quote-bar: #ddd;

  /* type */
  --font: "DM Sans", "DM Sans Fallback", Arial, sans-serif;
  --quote-font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --features: "blwf" on, "cv03" on, "cv04" on, "cv09" on, "cv11" on;
  --size: 16px;
  --leading: 1.6;
  --tracking: -0.02em;
  --title-size: 26px;
  --title-tracking: -0.04em;

  /* space */
  --page-width: 680px;
  --gutter: 20px;
  --paragraph-gap: 10px;
  --list-gap: 20px;
  --badge: 44px;
  --badge-radius: 12px;
  --ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size);
  line-height: var(--leading);
  letter-spacing: var(--tracking);
  font-feature-settings: var(--features);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
p, h1, blockquote { margin: 0; }

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

/* ---------- note list (home page and under every note) ---------- */
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--list-gap);
}
.note-link {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
  text-decoration: none;
}
.badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--badge);
  height: var(--badge);
  border: 1px solid var(--badge-border);
  border-radius: var(--badge-radius);
  background: var(--badge-bg);
  color: var(--text);
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.note-title {
  font-weight: 500;
  line-height: 1.4;
}
.note-link:hover .badge,
.note-link:focus-visible .badge,
.note-link[aria-current="page"] .badge {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.note-link:hover .note-title,
.note-link:focus-visible .note-title { text-decoration: underline; }
.note-link[aria-current="page"] { cursor: default; }
.note-link[aria-current="page"] .note-title { text-decoration: none; }
.note-link:focus-visible { outline: none; }
.note-link:focus-visible .badge { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- a note ---------- */
.note {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.note-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.note-header p { color: var(--muted); }
.note-header h1 {
  font-size: var(--title-size);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: var(--title-tracking);
}
.home-link { color: var(--link); text-decoration: none; }
.home-link:hover { color: var(--link-hover); text-decoration: underline; }

.content {
  color: var(--body-text);
  overflow-wrap: break-word;
}
.content > * + * { margin-top: var(--paragraph-gap); }
.content strong { font-weight: 700; }
.content a { color: var(--link); }
.content a:hover { color: var(--link-hover); }
.content blockquote {
  position: relative;
  padding-left: 22px;
  font-family: var(--quote-font);
  font-style: italic;
  font-feature-settings: normal;
  letter-spacing: 0;
  line-height: 1.8;
  color: var(--quote-text);
}
.content blockquote::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 2px; height: 100%;
  border-radius: 1px;
  background: var(--quote-bar);
}
.content blockquote > * + * { margin-top: 20px; }

.more {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
}

/* ---------- portfolio (/work) ---------- */
@font-face { font-family: "DM Mono"; src: url("/fonts/dm-mono-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

.work {
  --work-gutter: 40px;
  padding: var(--work-gutter);
  min-height: 100vh;
}
.work-headline {
  max-width: 880px;
  margin: 0;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
}
.work-section { margin-top: 72px; }
.work-section h2 {
  margin: 0 0 32px;
  font-family: "DM Mono", ui-monospace, monospace;
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: normal;
  font-feature-settings: normal;
}
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card { display: flex; flex-direction: column; gap: 10px; color: var(--text); text-decoration: none; }
.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9.15;
  object-fit: cover;
  border-radius: 4px;
}
.work-section.square .work-card img { aspect-ratio: 1; }
.work-card-title { font-weight: 500; line-height: 1.4; }

.work-item {
  min-height: calc(100vh - 2 * var(--work-gutter));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
}
.work-category { color: var(--muted); }
.player { position: relative; aspect-ratio: 16 / 9; }
.player.audio { aspect-ratio: 1200 / 719; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.work-nav { display: flex; justify-content: space-between; gap: 20px; }
.work-nav a { color: var(--link); text-decoration: none; }
.work-nav a:hover { color: var(--link-hover); text-decoration: underline; }
.prev-next { display: flex; gap: 20px; }
.prev-next .short { display: none; }

@media (max-width: 1199px) {
  .work-headline { font-size: 44px; }
}
@media (max-width: 809px) {
  .work { --work-gutter: 24px; }
  .work-headline { font-size: 32px; }
  .work-section { margin-top: 45px; }
  .work-headline + .work-section { margin-top: 32px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-item { gap: 24px; }
  .prev-next .long { display: none; }
  .prev-next .short { display: inline; }
}
