/* Areeb Pasha. Young Serif for voice, Alegreya for reading. */
:root {
  --paper: #FAF8F4;
  --ink: #1A1A1A;
  --body: #2E2B27;
  --grey: #6E6A63;
  --rule: #E3DDD2;
  --accent: #A3461F;            /* terracotta: links + the scribble */
  --marker: rgba(255, 213, 92, .55);
  --display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --text: "Alegreya", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --caps: "Alegreya SC", "Alegreya", Georgia, serif;
  --measure: 640px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--text);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
}

.page { max-width: var(--measure); margin: 0 auto; padding: 44px 24px 64px; }

a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: rgba(163, 70, 31, .4); }
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--marker); color: var(--ink); }

.skip { position: absolute; left: -9999px; top: 12px; background: var(--ink); color: var(--paper); padding: 6px 12px; text-decoration: none; }
.skip:focus { left: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

strong { color: var(--ink); font-weight: 700; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 400; }

/* Masthead */
.masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.masthead .name { font-family: var(--display); font-size: 19px; color: var(--ink); text-decoration: none; }
.masthead nav { display: flex; gap: 20px; font-family: var(--caps); font-size: 18px; letter-spacing: .03em; }
.masthead nav a { color: var(--grey); text-decoration: none; }
.masthead nav a:hover { color: var(--accent); }

/* Intro */
.intro { padding: 64px 0 8px; }
.hello { font-family: var(--text); font-style: italic; font-size: 22px; color: var(--grey); margin-bottom: 14px; }
.intro h1 { font-family: var(--display); font-size: 46px; line-height: 1.24; letter-spacing: -.012em; margin-bottom: 36px; text-wrap: balance; }
.portrait { display: block; width: 104px; height: 128px; object-fit: cover; border-radius: 6px; margin-bottom: 24px; }

/* Hand-drawn underline */
.scribble { position: relative; white-space: nowrap; }
.scribble svg { position: absolute; left: -3%; bottom: .02em; width: 106%; height: .22em; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

/* Highlighter marker */
mark {
  color: inherit;
  background: none;
  padding: 0 .12em;
  margin: 0 -.12em;
  border-radius: .3em .5em .4em .2em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background-image: linear-gradient(100deg, transparent 0 1%, var(--marker) 2% 98%, transparent 100%);
  background-repeat: no-repeat;
  background-size: 100% 62%;
  background-position: 0 78%;
}

/* Sections */
main > section + section { margin-top: 64px; }
h2 { font-family: var(--display); font-size: 28px; line-height: 1.2; margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--rule); transform: translateY(2px); }

.label { font-family: var(--caps); font-size: 19px; letter-spacing: .04em; color: var(--grey); margin: 40px 0 10px; }

/* Right now */
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 6px; }
.ticks li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--text); }

/* Pull line */
.pull { font-family: var(--display); font-size: 29px; line-height: 1.32; color: var(--ink); margin: 4px 0 28px; text-wrap: balance; }
.pull-label { display: block; font-family: var(--text); font-style: italic; font-size: 20px; color: var(--accent); margin-bottom: 4px; }

.practice p { margin-bottom: .55em; }

/* Beliefs */
.beliefs { list-style: none; counter-reset: b; margin: 0; padding: 0; }
.beliefs li { counter-increment: b; position: relative; padding: 7px 0 7px 38px; border-bottom: 1px dashed var(--rule); }
.beliefs li:last-child { border-bottom: 0; }
.beliefs li::before { content: counter(b, lower-roman) "."; position: absolute; left: 0; top: 7px; font-family: var(--text); font-style: italic; color: var(--accent); }

/* Projects */
.projects ul { list-style: none; margin: 0; padding: 0; }
.projects .label { margin: 34px 0 12px; }
.projects .label:first-child { margin-top: 8px; }
.projects li { margin-bottom: 26px; }
.projects li:last-child { margin-bottom: 0; }
.projects h4 { margin: 0 0 2px; font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.3; color: var(--ink); }
.projects .hook { display: block; font-family: var(--text); font-style: italic; font-size: 19.5px; line-height: 1.35; color: var(--grey); margin: 1px 0 4px; }
.projects p { margin: 0; }
.projects .links { margin-top: 4px; font-family: var(--caps); font-size: 17px; letter-spacing: .03em; color: var(--grey); }

/* Dated lists */
.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 104px 1fr; gap: 18px; padding: 8px 0; }
.dated .when { font-family: var(--caps); font-size: 17px; letter-spacing: .03em; color: var(--grey); padding-top: 2px; font-variant-numeric: lining-nums; }
.dated h3 { font-family: var(--text); font-weight: 700; font-size: 20px; line-height: 1.4; }
.dated p { margin: 0; }
.certs { margin: 0; }
.lead-in { font-style: italic; color: var(--grey); margin-bottom: 8px; }

/* Contact */
.big { font-family: var(--display); font-size: 27px; line-height: 1.35; color: var(--ink); margin-bottom: 18px; text-wrap: balance; }

/* Margin asides (desktop) */
.aside-wrap { position: relative; }
.aside { display: block; margin-top: 6px; font-style: italic; font-size: 17px; color: var(--grey); }
.dated li.aside-wrap .aside { grid-column: 2; margin-top: -4px; }
@media (min-width: 1120px) {
  .aside { position: absolute; top: 4px; left: calc(100% + 40px); width: 190px; margin: 0; font-size: 16.5px; line-height: 1.4; transform: rotate(-1.5deg); }
  .aside::before { content: "←"; color: var(--accent); font-style: normal; margin-right: 6px; }
  .dated li.aside-wrap .aside { margin: 0; }
}

/* Footer */
.colophon { margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 17px; color: var(--grey); }
.colophon p { margin: 0 0 4px; }
.colophon p:first-child { font-style: italic; }
.colophon a { color: var(--grey); }
.colophon a:hover { color: var(--accent); }


/* Certifications */
.certs { display: grid; gap: 18px; }
.cert-group h4 { margin: 0 0 4px; font-family: var(--caps); font-weight: 500; font-size: 17px; letter-spacing: .04em; color: var(--ink); }
.cert-group ul { list-style: none; margin: 0; padding: 0; }
.cert-group li { display: grid; grid-template-columns: 1fr 84px 76px; gap: 16px; align-items: baseline; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.cert-group li:last-child { border-bottom: 0; }
.cert-code { font-family: var(--caps); font-size: 16px; letter-spacing: .04em; color: var(--grey); font-variant-numeric: lining-nums; }
.cert-group li a { font-family: var(--caps); font-size: 16px; letter-spacing: .03em; justify-self: end; }

/* Post lists */
.postlist { list-style: none; margin: 0; padding: 0; }
.postlist li { display: grid; grid-template-columns: 136px 1fr; gap: 18px; padding: 10px 0; }
.postlist time { font-family: var(--caps); font-size: 16px; letter-spacing: .03em; color: var(--grey); padding-top: 4px; font-variant-numeric: lining-nums; }
.postlist h2, .postlist h3 { font-family: var(--display); font-size: 22px; line-height: 1.3; margin: 0 0 2px; display: block; }
.postlist h2::after { content: none; }
.postlist h2 a, .postlist h3 a { color: var(--ink); text-decoration-color: rgba(163, 70, 31, .45); }
.postlist h2 a:hover, .postlist h3 a:hover { color: var(--accent); }
.postlist p { margin: 0; color: var(--grey); font-style: italic; }
.more { margin-top: 14px; font-family: var(--caps); font-size: 17px; letter-spacing: .03em; }

.intro--small { padding: 56px 0 28px; }
.intro--small h1 { font-family: var(--display); font-size: 44px; line-height: 1.15; margin-bottom: 14px; }

/* Article */
.post { padding-top: 40px; }
.post-back { font-family: var(--caps); font-size: 17px; letter-spacing: .03em; margin-bottom: 28px; }
.post-back a { text-decoration: none; }
.post-head h1 { font-family: var(--display); font-size: 46px; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
.post-meta { margin-top: 12px; font-family: var(--caps); font-size: 17px; letter-spacing: .03em; color: var(--grey); font-variant-numeric: lining-nums; }
.prose { margin-top: 36px; font-size: 21px; line-height: 1.65; }
.prose > p:first-child::first-letter { font-family: var(--display); float: left; font-size: 3.4em; line-height: .9; padding: .06em .1em 0 0; color: var(--accent); }
.prose h2 { font-size: 27px; margin: 44px 0 12px; display: block; }
.prose h2::after { content: none; }
.prose p { margin-bottom: 1.05em; }
.prose blockquote { margin: 28px 0; font-family: var(--display); font-size: 27px; line-height: 1.35; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.2em; }
.post-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--rule); }
.post-sign { font-style: italic; font-size: 22px; color: var(--ink); margin-bottom: 16px; }
.post-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--caps); font-size: 17px; letter-spacing: .03em; }
.post-nav__end { color: var(--grey); }


/* Hero additions */
.intro .sub { font-size: 23px; line-height: 1.45; color: var(--ink); margin-bottom: 18px; }
.ctas { font-family: var(--caps); font-size: 19px; letter-spacing: .03em; margin-bottom: 6px; }
.ctas a { text-decoration-thickness: 1.5px; white-space: nowrap; }
.ctas .sep { color: var(--grey); margin: 0 12px; }
.avail { font-style: italic; color: var(--grey); margin-bottom: 36px; }

/* Skills */
.skills { border-top: 1px solid var(--rule); }
.skill { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px dashed var(--rule); }
.skill h3 { font-family: var(--text); font-weight: 700; font-size: 20px; line-height: 1.4; }
.skill p { margin: 0; }
.skill .stack { margin-top: 4px; font-family: var(--caps); font-size: 16.5px; letter-spacing: .03em; color: var(--grey); line-height: 1.5; font-variant-numeric: lining-nums; }

/* Featured marker: plain small caps, no badge */
.featured { font-family: var(--caps); font-size: 15px; letter-spacing: .05em; color: var(--accent); vertical-align: .18em; margin-left: 4px; white-space: nowrap; }
.lead-in .featured { vertical-align: baseline; margin: 0; font-size: 17px; }

/* Small screens */
@media (max-width: 560px) {
  body { font-size: 19px; }
  .page { padding: 24px 20px 48px; }
  .intro { padding: 44px 0 0; }
  .intro h1 { font-size: 34px; margin-bottom: 28px; }
  h2 { font-size: 25px; }
  .pull { font-size: 24px; }
  .big { font-size: 23px; }
  main > section + section { margin-top: 52px; }
  .masthead nav { gap: 14px; font-size: 17px; }
  .dated li { grid-template-columns: 1fr; gap: 0; }
  .dated li.aside-wrap .aside { grid-column: 1; margin-top: 4px; }
  .skill { grid-template-columns: 1fr; gap: 2px; }
  .intro .sub { font-size: 20px; }
  .ctas { font-size: 18px; }
  .ctas { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
  .ctas .sep { display: none; }
  .cert-group li { grid-template-columns: 1fr auto; row-gap: 0; }
  .cert-group .cert-name { grid-column: 1 / -1; }
  .cert-code:empty { display: none; }
  .postlist li { grid-template-columns: 1fr; gap: 2px; }
  .post { padding-top: 28px; }
  .post-head h1 { font-size: 34px; }
  .prose { font-size: 19px; margin-top: 28px; }
  .prose h2 { font-size: 24px; margin-top: 36px; }
  .intro--small h1 { font-size: 36px; }
}

/* Writing index spacing + current nav item */
main > section.intro--small + section { margin-top: 12px; }
.masthead nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .3em; }
