/* amirli.com stylesheet. Drawn for the mock-ups; becomes the real site's CSS.
   Same system as the lawblog.az mock-ups: Source Serif 4 for headlines and
   reading text, Inter for everything around it. Both cover ə ğ ı ş ç ö ü.
   The mock-ups load the fonts from Google Fonts. The real build self-hosts
   them with @font-face, so the site makes no third-party requests.
   The site loads no JavaScript, so dark mode follows the device only. */

/* Self-hosted faces. Latin-ext is listed first, then latin, matching the
   subset files in ../fonts/. Families stay "Source Serif 4" and "Inter". */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-ext-opsz-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-opsz-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+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-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #1b1b1d;
  --ink-2: #44444a;
  --muted: #6b6b72;
  --rule: #e7e3dc;
  --rule-strong: #d6d1c8;
  --brand: #1d6b4f;          /* deep green; passes AA on white and on --bg */
  --brand-hover: #14503b;
  --tint: #e9f3ee;
  --focus: #1f5fd1;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1040px;
  --read: 680px;
  --gutter: 16px;
  --radius: 6px;
  --on-brand: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416; --surface: #1b1b1e; --ink: #ecebe8; --ink-2: #c9c8c4;
    --muted: #9b9a97; --rule: #2c2c30; --rule-strong: #3a3a3f;
    --brand: #5fc79c; --brand-hover: #86d9b6; --tint: #18291f; --focus: #7aa7ff;
    --on-brand: #0d1f17;     /* dark text on the light green button: 9:1 */
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 8px; }

/* ---------- header ---------- */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; min-height: 64px; flex-wrap: wrap; }
.wordmark { font: 600 20px/1 var(--serif); text-decoration: none; letter-spacing: -.01em; padding: 8px 0; }
.nav { display: flex; gap: 22px; align-items: center; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; color: var(--ink-2); padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); }
.lang { font: 600 13px/1 var(--sans); color: var(--muted); text-decoration: none; letter-spacing: .04em;
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 6px 10px; }
.lang:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- buttons and small type ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 14px/1 var(--sans); padding: 11px 16px; border-radius: var(--radius);
  border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); text-decoration: none;
}
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--tint); }
.kicker { font: 600 12px/1.2 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--brand); text-decoration: none; }
.kicker:hover { text-decoration: underline; }
.meta { font-size: 14px; color: var(--muted); }
.meta .dot::before { content: "·"; margin: 0 6px; }
.section-title {
  font: 600 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.more-link { display: inline-block; margin-top: 18px; font-weight: 600; color: var(--brand); text-decoration: none; }
.more-link:hover { text-decoration: underline; }

/* ---------- home ---------- */
.hello { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: center; padding: 56px 0 48px; border-bottom: 1px solid var(--rule); }
.hello img { width: 300px; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: 50%; }
.hello h1 { font: 600 44px/1.1 var(--serif); letter-spacing: -.015em; margin: 0 0 14px; }
.hello p { font: 19px/1.6 var(--serif); color: var(--ink-2); margin: 0 0 22px; max-width: 560px; }
.hello .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.focus-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.focus-list li { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--tint); color: var(--brand-hover); font-weight: 500; }
@media (prefers-color-scheme: dark) { .focus-list li { color: var(--brand); } }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 40px 0 64px; }
.side-block { margin-bottom: 36px; }
.side-block p { font-size: 15px; color: var(--ink-2); margin: 12px 0 0; }
.proj { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.proj:last-child { border-bottom: 0; }
.proj a { font-weight: 600; text-decoration: none; }
.proj a:hover { text-decoration: underline; }
.proj p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.proj img { display: block; width: 150px; max-width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-top: 10px; }

/* ---------- post list ---------- */
.post-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.post-row h2, .post-row h3 { font: 600 21px/1.28 var(--serif); margin: 6px 0 8px; }
.post-row :is(h2, h3) a { text-decoration: none; }
.post-row :is(h2, h3) a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-row p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row img { width: 150px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

/* ---------- archive ---------- */
.archive-head { padding: 40px 0 20px; border-bottom: 1px solid var(--rule); }
.archive-head h1 { font: 600 40px/1.15 var(--serif); margin: 0 0 8px; letter-spacing: -.01em; }
.archive-head p { margin: 0; color: var(--ink-2); max-width: 640px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { font-size: 13.5px; padding: 6px 12px; border: 1px solid var(--rule-strong); border-radius: 999px; text-decoration: none; color: var(--ink-2); background: var(--surface); }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.archive-list { max-width: 820px; padding: 4px 0 64px; }
.other-lang { margin-top: 28px; font-size: 14.5px; color: var(--muted); }
.other-lang a { color: var(--brand); }

/* ---------- article ---------- */
.article-head { max-width: var(--read); margin: 0 auto; padding: 44px var(--gutter) 0; }
.article-head h1 { font: 600 42px/1.14 var(--serif); letter-spacing: -.015em; margin: 12px 0 14px; }
.article-head .meta { padding-bottom: 26px; border-bottom: 1px solid var(--rule); }
.prose { max-width: var(--read); margin: 0 auto; padding: 30px var(--gutter) 8px; font: 19px/1.72 var(--serif); color: var(--ink); }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font: 600 27px/1.25 var(--serif); margin: 1.8em 0 .6em; }
.prose a { color: var(--brand); text-underline-offset: 3px; }
.prose ol, .prose ul { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin: .35em 0; }
.prose iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.prose pre {
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14.5px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--tint);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.prose pre code {
  font-family: inherit;
  font-size: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
  overflow-wrap: normal;
}
.prose img { max-width: 100%; height: auto; }
.prose .example { font: 16.5px/1.6 var(--sans); background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 1.4em; }
.prose .example dt { font-weight: 600; margin-top: 6px; }
.prose .example dt:first-child { margin-top: 0; }
.prose .example dd { margin: 0 0 4px; color: var(--ink-2); }
.article-foot { max-width: var(--read); margin: 0 auto; padding: 24px var(--gutter) 64px; }
.article-foot .chips { margin: 0 0 28px; }
.author-box { display: flex; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.author-box img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; }
.author-box strong { display: block; font-size: 16px; }
.author-box p { margin: 2px 0 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- resume ---------- */
.cv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding: 48px 0 28px; border-bottom: 1px solid var(--rule); }
.cv-head h1 { font: 600 42px/1.12 var(--serif); margin: 0 0 8px; letter-spacing: -.015em; }
.cv-head .role { font: 19px/1.5 var(--serif); color: var(--ink-2); margin: 0; }
.cv-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding: 32px 0 64px; }
.cv-about { font: 18px/1.65 var(--serif); color: var(--ink); margin: 0 0 36px; }
.cv-section { margin-bottom: 36px; }
.cv-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.cv-item:last-child { border-bottom: 0; }
.cv-item .when { font-size: 14px; color: var(--muted); padding-top: 3px; }
.cv-item h3 { font: 600 18px/1.3 var(--serif); margin: 0 0 2px; }
.cv-item .where { font-size: 14.5px; color: var(--brand); font-weight: 500; margin: 0 0 6px; }
.cv-item .role-when { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; }
.cv-item p { margin: 0; font-size: 15px; color: var(--ink-2); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.facts li:last-child { border-bottom: 0; }
.facts span { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.facts a { color: var(--brand); text-decoration: none; }
.facts a:hover { text-decoration: underline; }
.lang-bars { list-style: none; margin: 0; padding: 0; }
.lang-bars li { padding: 8px 0; font-size: 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); }
.lang-bars li:last-child { border-bottom: 0; }
.lang-bars em { font-style: normal; color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); background: var(--surface); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-top: 22px; padding-bottom: 22px; font-size: 14px; color: var(--muted); }
.site-foot nav { display: flex; gap: 18px; margin-left: auto; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .home-grid, .cv-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .site-head .wrap { gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; white-space: nowrap; padding: 2px 2px 4px; }
  .lang { margin-left: auto; }
  .hello { grid-template-columns: 1fr; gap: 22px; padding: 32px 0 32px; text-align: left; }
  .hello img { width: 132px; }
  .hello h1 { font-size: 32px; }
  .hello p { font-size: 17px; }
  .post-row { grid-template-columns: minmax(0, 1fr) 92px; gap: 14px; padding: 16px 0; }
  .post-row img { width: 92px; }
  .post-row :is(h2, h3) { font-size: 18px; }
  .post-row p { display: none; }
  .archive-head h1, .cv-head h1 { font-size: 30px; }
  .article-head { padding-top: 28px; }
  .article-head h1 { font-size: 30px; }
  .prose { font-size: 18px; }
  .prose table { display: block; max-width: 100%; overflow-x: auto; }
  .cv-head { grid-template-columns: 1fr; gap: 16px; padding-top: 32px; }
  .cv-item { grid-template-columns: 1fr; gap: 4px; }
  .site-foot nav { margin-left: 0; }
}

/* ---------- print: the resume prints on plain paper ---------- */
@media print {
  .site-head, .site-foot, .skip, .btn, .lang { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .cv-grid { grid-template-columns: 1fr 200px; gap: 24px; padding-top: 12px; }
  a { color: inherit; text-decoration: none; }
}
