/* fadhil.app — one stylesheet, light only. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bg: #f2f1ee;
  --paper: #fbfaf8;
  --ink: #141414;
  --ink-2: #3a3936;
  --muted: #76746f;
  --line: #d8d6d0;
  --line-soft: #e6e4df;
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --rail: 72px;
  --max: 1360px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--bg); }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 50;
}
.skip:focus { top: 12px; }

.it { font-style: italic; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- header ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
}
.top.solid { position: relative; border-bottom: 1px solid var(--line); }
.top__inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 88px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.logo {
  display: inline-flex;
  width: 34px;
  height: 34px;
  text-decoration: none;
}
.logo svg { width: 100%; height: 100%; }

.nav {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a,
.cta {
  font-style: italic;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav a { position: relative; }
.nav a::after,
.cta::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.cta {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cta::after { transform: scaleX(1); }
.cta:hover::after { transform: scaleX(.35); }
.cta svg { width: 11px; height: 11px; transition: transform .3s; }
.cta:hover svg { transform: translate(2px, -2px); }

.menu-btn {
  display: none;
  margin-left: auto;
  border: 0;
  background: none;
  font: italic 15px var(--font);
  color: var(--ink);
  padding: 10px 0 10px 12px;
  cursor: pointer;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: max(100svh, 680px);
  max-height: 1100px;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  height: 100%;
  min-height: inherit;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.rail {
  position: absolute;
  top: 150px;
  bottom: 40px;
  left: var(--gutter);
  width: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .02em;
}
.rail span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}
.rail i {
  flex: 1;
  width: 1px;
  background: var(--line);
}

.hero__copy {
  position: relative;
  z-index: 2;
  padding-left: calc(var(--rail) + 8px);
  padding-top: 170px;
  display: flex;
  flex-direction: column;
  min-height: inherit;
}

.stats {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stat b {
  display: block;
  font-style: italic;
  font-weight: 400;
  font-stretch: 85%;
  font-size: clamp(36px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.stat b sup {
  font-size: .42em;
  vertical-align: top;
  position: relative;
  top: .1em;
  margin-right: .06em;
  letter-spacing: 0;
}
.stat span {
  display: block;
  margin-top: 8px;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-2);
}

.hello {
  margin: auto 0 0;
  font-style: italic;
  font-weight: 460;
  font-stretch: 75%;
  font-size: clamp(120px, 17vw, 268px);
  line-height: .8;
  letter-spacing: -0.055em;
  padding-bottom: .04em;
}
.hello .ch {
  display: inline-block;
  animation: rise 1s cubic-bezier(.2, .8, .2, 1) both;
}
.hello .ch:nth-child(2) { animation-delay: .06s; }
.hello .ch:nth-child(3) { animation-delay: .12s; }
.hello .ch:nth-child(4) { animation-delay: .18s; }
@keyframes rise {
  from { transform: translateY(.5em); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.tagline {
  margin: 18px 0 0 .3em;
  font-style: italic;
  font-size: clamp(17px, 1.4vw, 21px);
  letter-spacing: -0.01em;
}

.scroll {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 48px 0 40px;
  font-style: italic;
  font-size: 14px;
  text-decoration: none;
  align-self: flex-start;
}
.scroll svg { width: 11px; height: 11px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }

.portrait {
  position: absolute;
  right: max(0px, calc(var(--gutter) - 40px));
  bottom: 0;
  z-index: 1;
  width: min(58vw, 860px);
  aspect-ratio: 1;
  margin: 0;
  pointer-events: none;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* the photo ends at the shirt; let it dissolve rather than stop on a line */
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  animation: fade 1.2s .1s ease both;
}
@keyframes fade { from { opacity: 0; transform: scale(1.02); } }

/* ---------- sections ---------- */

.section {
  padding: clamp(80px, 11vw, 160px) 0;
  border-top: 1px solid var(--line);
}
.kicker {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(36px, 5vw, 64px);
  font-size: 14px;
  color: var(--muted);
}
.kicker h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .01em;
}
.kicker h2 em { color: var(--muted); font-weight: 400; margin-right: 10px; }
.kicker a { font-style: italic; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* featured project */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name cta" "line line";
  align-items: end;
  gap: 18px 32px;
  padding: 0 0 clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}
.feature__name {
  grid-area: name;
  font-style: italic;
  font-weight: 450;
  font-stretch: 75%;
  font-size: clamp(64px, 11vw, 176px);
  line-height: .86;
  letter-spacing: -0.05em;
}
.feature__line {
  grid-area: line;
  max-width: 30ch;
  font-stretch: 90%;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}
.feature__line em { color: var(--ink); }
.feature__cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-style: italic;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color .25s, color .25s;
}
.feature__cta svg { width: 11px; height: 11px; transition: transform .3s; }
.feature:hover .feature__cta { background: var(--ink); color: var(--bg); }
.feature:hover .feature__cta svg { transform: translate(2px, -2px); }

.modlist {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-stretch: 85%;
  font-size: clamp(22px, 2.3vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.modlist li:not(:last-child)::after {
  content: "/";
  margin: 0 .42em;
  color: var(--line);
}
.modlist a { text-decoration: none; color: var(--muted); transition: color .2s; }
.modlist a:hover { color: var(--ink); font-style: italic; }

.live-dot { color: var(--ink) !important; }
.live-dot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #2f9e44;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, .18);
  vertical-align: .08em;
}

/* work list */

.work {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}
.work li { border-bottom: 1px solid var(--line); }
.work a,
.work .row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr) 190px 24px;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  text-decoration: none;
  transition: padding .35s cubic-bezier(.2, .7, .2, 1), background-color .35s;
}
.work .n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work .name {
  font-stretch: 85%;
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.work .what { color: var(--ink-2); font-size: 15px; }
.work .yr { display: flex; justify-content: flex-end; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.work .st { font-style: italic; color: var(--muted); }
.work .go { width: 14px; height: 14px; align-self: center; justify-self: end; transition: transform .35s; }
.work a:hover { padding-left: 14px; padding-right: 14px; background: var(--paper); }
.work a:hover .name { font-style: italic; }
.work a:hover .go { transform: translate(3px, -3px); }
.work .soon { color: var(--muted); }

/* writing list */

.posts { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: baseline;
  padding: 26px 0;
  text-decoration: none;
}
.posts time,
.posts .len { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.posts .len { text-align: right; }
.posts .ttl {
  font-stretch: 88%;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.posts .sum { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-2); font-stretch: 100%; letter-spacing: 0; line-height: 1.5; max-width: 60ch; }
.posts a:hover .ttl { font-style: italic; }

/* contact */

.contact { padding-bottom: 48px; }
.contact__big {
  display: inline-block;
  margin: 0;
  font-style: italic;
  font-weight: 450;
  font-stretch: 75%;
  font-size: clamp(64px, 12vw, 190px);
  line-height: .9;
  letter-spacing: -0.05em;
  text-decoration: none;
}
.contact__big svg { width: .42em; height: .42em; vertical-align: .32em; margin-left: .06em; transition: transform .4s; }
.contact__big:hover svg { transform: translate(.06em, -.06em); }
.contact__mail {
  margin: 28px 0 0;
  font-size: clamp(17px, 1.6vw, 22px);
}
.contact__mail a { text-decoration-thickness: 1px; text-underline-offset: 4px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(80px, 10vw, 140px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.foot nav { display: flex; gap: 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- article ---------- */

.article { padding-top: clamp(56px, 8vw, 110px); }
.article__head { max-width: 900px; }
.article__meta { display: flex; gap: 18px; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.article h1 {
  margin: 0;
  font-weight: 450;
  font-stretch: 85%;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.nf { margin: 0; }
.nf__back { margin-top: 28px; }
.article__lede { margin: 26px 0 0; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; color: var(--ink-2); max-width: 38ch; }

.prose {
  max-width: 680px;
  margin: clamp(48px, 6vw, 80px) 0 0 auto;
  margin-right: max(0px, calc((100% - 680px) / 4));
  font-size: 18px;
  line-height: 1.7;
}
/* One spacing rule for every block; headings set their own. Elements get
   margin from this rule only, so a more specific `p { margin: 0 }` can never
   silently remove the gap between paragraphs again. */
.prose > * { margin: 1.1em 0 0; }
.prose > :first-child { margin-top: 0; }
.prose > h2 + *, .prose > h3 + * { margin-top: .55em; }
.prose > h2 {
  margin: 2.2em 0 0;
  font-weight: 500;
  font-stretch: 90%;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.prose > h3 { margin: 1.8em 0 0; font-size: 20px; font-weight: 600; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0; }
.prose li + li { margin-top: .35em; }
.prose blockquote {
  padding: 0 0 0 22px;
  border-left: 1px solid var(--ink);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-2);
}
.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .86em;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: .08em .35em;
}
.prose pre {
  padding: 18px 20px;
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose > hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--muted); font-size: 13px; }

.article__end {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(64px, 8vw, 110px);
  padding: 22px 0;
  border-top: 1px solid var(--ink);
  font-style: italic;
}
.article__end a { text-decoration: none; }
.article__end a:hover { text-decoration: underline; text-underline-offset: 3px; }

.page-title {
  margin: 0;
  padding: clamp(56px, 8vw, 110px) 0 clamp(36px, 5vw, 64px);
  font-style: italic;
  font-weight: 450;
  font-stretch: 75%;
  font-size: clamp(72px, 13vw, 200px);
  line-height: .85;
  letter-spacing: -0.05em;
}

/* ---------- mobile menu ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) 32px;
  background: var(--bg);
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s, visibility 0s .25s;
}
.sheet.open { visibility: visible; opacity: 1; transition: opacity .25s; }
.sheet__top { display: flex; align-items: center; height: 72px; }
.sheet__top button {
  margin-left: auto;
  border: 0;
  background: none;
  font: italic 15px var(--font);
  color: var(--ink);
  padding: 10px 0 10px 12px;
  cursor: pointer;
}
.sheet ul { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.sheet li { border-bottom: 1px solid var(--line); }
.sheet li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  font-style: italic;
  font-stretch: 80%;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.sheet li a small { font-style: normal; font-stretch: 100%; font-size: 13px; letter-spacing: 0; color: var(--muted); }
.sheet__mail { margin-top: auto; font-size: 15px; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .portrait { width: min(62vw, 700px); right: -6vw; }
}

@media (max-width: 860px) {
  :root { --rail: 0px; }
  body { font-size: 16px; }
  .top__inner { height: 72px; gap: 16px; }
  .nav, .top .cta { display: none; }
  .menu-btn { display: block; }

  .rail { display: none; }

  .hero { min-height: 0; max-height: none; }
  .hero__inner { min-height: 0; }
  .hero__copy { padding-top: 104px; padding-left: 0; min-height: 0; }
  .stats { gap: 36px; }
  .hello { margin-top: 36px; font-size: clamp(104px, 34vw, 220px); }
  .tagline { margin-left: .15em; }
  .scroll { display: none; }
  .portrait {
    position: relative;
    right: auto;
    width: calc(100% + 2 * var(--gutter));
    max-width: 640px;
    margin: 8px calc(-1 * var(--gutter)) 0 auto;
  }
  .portrait img {
    -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  }


  .work a, .work .row {
    grid-template-columns: 34px minmax(0, 1fr) 20px;
    grid-template-areas: "n name go" ". what what" ". yr yr";
    row-gap: 4px;
    padding: 18px 0;
  }
  .work .n { grid-area: n; }
  .work .name { grid-area: name; }
  .work .what { grid-area: what; font-size: 14px; }
  .work .yr { grid-area: yr; justify-content: flex-start; font-size: 13px; }
  .work .go { grid-area: go; }
  .work a:hover { padding-left: 0; padding-right: 0; background: none; }

  .feature { grid-template-columns: 1fr; grid-template-areas: "name" "line" "cta"; gap: 14px; }
  .feature__cta { justify-self: start; margin-top: 6px; }


  .posts a { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; padding: 20px 0; }
  .posts time { grid-column: 1; grid-row: 1; }
  .posts .len { grid-column: 2; grid-row: 1; }
  .posts .ttl { grid-column: 1 / -1; grid-row: 2; }

  .prose { margin: 40px 0 0; font-size: 17px; }
  .article__end { flex-direction: column; }
}

@media (max-width: 420px) {
  .stat b { font-size: 34px; }
}
