/* akhilkulal.in — shared styles
   Look: ink-navy bands (header, page titles, contact) over a light page, electric cobalt accent,
   Bricolage Grotesque for headings, Source Serif for reading, Inter for the resume. */

@font-face { font-family: "Bricolage Grotesque"; src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif-4-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --ink: #0f1530;
  --muted: #4a5470;
  --rule: #d8ddea;
  --accent: #2f4be0;
  --accent-ink: #ffffff;

  --band: #e4eafc;
  --band-ink: #0f1530;
  --band-muted: #44506f;
  --band-accent: #2f4be0;
  --band-line: rgba(15, 21, 48, 0.22);
  --band-grid: rgba(47, 75, 224, 0.07);
  --band-hover: rgba(47, 75, 224, 0.1);

  --ui: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --prose: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090c17;
    --surface: #121830;
    --ink: #e9ecf8;
    --muted: #a4aec9;
    --rule: #252c47;
    --accent: #8fa8ff;
    --accent-ink: #090c17;
    --band: #0f1740;
    --band-ink: #f5f7ff;
    --band-muted: #b4bedf;
    --band-accent: #8fa8ff;
    --band-line: rgba(255, 255, 255, 0.16);
    --band-grid: rgba(255, 255, 255, 0.05);
    --band-hover: rgba(255, 255, 255, 0.1);
  }
}
:root[data-theme="dark"] {
  --bg: #090c17;
  --surface: #121830;
  --ink: #e9ecf8;
  --muted: #a4aec9;
  --rule: #252c47;
  --accent: #8fa8ff;
  --accent-ink: #090c17;
  --band: #0f1740;
  --band-ink: #f5f7ff;
  --band-muted: #b4bedf;
  --band-accent: #8fa8ff;
  --band-line: rgba(255, 255, 255, 0.16);
  --band-grid: rgba(255, 255, 255, 0.05);
  --band-hover: rgba(255, 255, 255, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; font-family: var(--ui); z-index: 10; }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- bands: one look for the top of every page and the contact block ---------- */

.band, .band-top, .contact-band {
  background-color: var(--band);
  color: var(--band-ink);
  --accent: #4a63f5;
  --accent-ink: #ffffff;
}
.band-top, .contact-band {
  background-image:
    linear-gradient(var(--band-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--band-grid) 1px, transparent 1px);
  background-size: 56px 56px;
}
.band-top { position: relative; overflow: hidden; }
.band-top :focus-visible, .contact-band :focus-visible { outline-color: var(--band-accent); }
.band-top a, .contact-band a { text-decoration: none; }

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

.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--ui); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.1rem); letter-spacing: -0.03em; line-height: 1; color: var(--band-ink); }
.brand:hover { color: #fff; }

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--ui); font-weight: 600; font-size: 1.2rem; }
.site-nav a { color: var(--band-ink); padding: 10px 16px; border-radius: 6px; border-bottom: 3px solid transparent; }
.site-nav a:hover { background: rgba(255, 255, 255, 0.1); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--band-accent); border-radius: 6px 6px 0 0; }

.theme-toggle {
  display: none;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 500;
  color: var(--band-muted);
  background: none;
  border: 1px solid var(--band-line);
  border-radius: 6px;
  padding: 9px 14px;
  margin-left: 8px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--band-ink); border-color: var(--band-muted); }
.js .theme-toggle { display: inline-block; }

/* ---------- headings ---------- */

h1, h2, h3 { font-family: var(--ui); margin: 0; }
h1 { font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  padding: 15px 26px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--surface); }
.band-top .btn-secondary, .contact-band .btn-secondary { color: var(--band-ink); border-color: var(--band-muted); }
.band-top .btn-secondary:hover, .contact-band .btn-secondary:hover { background: var(--band-hover); border-color: var(--band-ink); }

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

.hero { position: relative; z-index: 1; padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 9vw, 120px); }
.hero h1 { font-size: clamp(3.6rem, 13vw, 9rem); line-height: 0.92; letter-spacing: -0.05em; color: var(--band-ink); }
.hero-role { font-family: var(--ui); font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 2.1rem); letter-spacing: -0.02em; color: var(--band-accent); margin: 18px 0 0; }
.hero-lede { font-family: var(--ui); font-weight: 500; font-size: clamp(1.25rem, 2.4vw, 1.7rem); line-height: 1.3; letter-spacing: -0.01em; max-width: 30em; margin: 28px 0 0; color: var(--band-ink); text-wrap: balance; }
.hero-sub { max-width: 34rem; margin: 16px 0 0; color: var(--band-muted); font-size: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; font-family: var(--ui); font-size: 0.95rem; font-weight: 500; }
.chips li { padding: 5px 13px; border: 1px solid var(--band-line); border-radius: 999px; color: var(--band-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-mark { display: none !important; position: absolute; z-index: 0; right: max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); top: 50%; width: clamp(200px, 30vw, 380px); transform: translateY(-46%); color: var(--band-accent); opacity: 0.28; pointer-events: none; }
@media (max-width: 900px) { .hero-mark { display: none !important; top: auto; bottom: 24px; transform: none; width: 180px; opacity: 0.14; } }

/* ---------- inner page title band ---------- */

.page-head { position: relative; z-index: 1; padding: clamp(24px, 4vw, 48px) 0 clamp(44px, 7vw, 80px); }
.page-head h1 { font-size: clamp(2.6rem, 7vw, 5rem); color: var(--band-ink); }
.page-head p { max-width: 38rem; color: var(--band-muted); font-size: 1.2rem; margin: 20px 0 0; }
.page-head .post-meta { font-family: var(--ui); color: var(--band-muted); margin-top: 18px; font-size: 1.05rem; }
.back-link { display: inline-block; font-family: var(--ui); font-weight: 600; margin-bottom: 20px; color: var(--band-accent); }
.back-link:hover { text-decoration: underline; }

/* ---------- sections on the light page ---------- */

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section > .wrap > h2::before, .bar-title::before { content: ""; display: block; width: 52px; height: 5px; background: var(--accent); margin-bottom: 16px; border-radius: 2px; }
.section > .wrap > h2 { margin-bottom: 32px; }
.section-note { max-width: var(--prose); color: var(--muted); margin: -12px 0 32px; }

/* project rows */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 14px 56px;
  padding: 34px 0 34px 22px;
  border-top: 1px solid var(--rule);
  border-left: 4px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.row:last-child { border-bottom: 1px solid var(--rule); }
.row:hover, .row:focus-within { border-left-color: var(--accent); background: var(--surface); }
.row h3, .row h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -0.025em; }
.row h3 a, .row h2 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover, .row h2 a:hover { color: var(--accent); }
.row p { margin: 10px 0 0; color: var(--muted); max-width: 36rem; }
.row .more { display: inline-block; margin-top: 14px; font-family: var(--ui); font-weight: 700; }
.row .tags { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; list-style: none; margin: 0; padding: 4px 0 0; font-family: var(--ui); font-size: 0.95rem; font-weight: 500; }
.row .tags li { padding: 5px 13px; border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); background: var(--surface); }

/* skills */
.skills { margin: 0; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 40px; }
.skills dt { font-family: var(--ui); font-weight: 700; font-size: 1.1rem; padding: 16px 0; border-top: 1px solid var(--rule); }
.skills dd { margin: 0; padding: 16px 0; border-top: 1px solid var(--rule); }
.skills dt:last-of-type, .skills dd:last-of-type { border-bottom: 1px solid var(--rule); }

/* other security work list on the projects page */
.plain-list { margin: 0; padding-left: 1.2em; max-width: var(--prose); }
.plain-list li { margin-bottom: 0.6em; }

/* ---------- prose (case studies, posts) ---------- */

.prose { max-width: var(--prose); padding-bottom: 72px; }
.prose h2 { margin: 2.2em 0 0.6em; font-size: 1.7rem; }
.prose h3 { margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose code { font-family: var(--code); font-size: 0.88em; background: var(--surface); border: 1px solid var(--rule); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; overflow-x: auto; line-height: 1.5; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.9rem; }
.prose blockquote { margin: 1.4em 0; padding-left: 1.2em; border-left: 4px solid var(--accent); color: var(--muted); }

.facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 0 28px; margin: 48px 0 8px; max-width: 44rem; font-family: var(--ui); }
.facts dt { font-weight: 700; padding: 12px 0; border-top: 1px solid var(--rule); }
.facts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--rule); color: var(--muted); }

/* blog index */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 28px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 32px; }
.post-list li:last-child { border-bottom: 1px solid var(--rule); }
.post-list time { font-family: var(--ui); font-weight: 500; color: var(--muted); }
.post-list h2 { font-size: 1.6rem; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); text-decoration: underline; }
.post-list p { margin: 8px 0 0; color: var(--muted); }
.empty-state { padding: 32px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: var(--prose); }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 10px; }
.empty-state p { margin: 0; color: var(--muted); }

/* ---------- contact band ---------- */

.contact-band { padding: clamp(56px, 8vw, 104px) 0; }
.contact-band h2 { font-size: clamp(2.6rem, 7vw, 5rem); letter-spacing: -0.04em; line-height: 1; color: var(--band-ink); }
.contact-band p { max-width: 34rem; color: var(--band-muted); font-size: 1.2rem; margin: 20px 0 32px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }

/* ---------- footer ---------- */

.site-footer { padding: 28px 0 40px; color: var(--muted); font-family: var(--ui); font-size: 1rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .row, .post-list li, .skills { grid-template-columns: 1fr; }
  .row { padding-left: 16px; }
  .skills dt { padding-bottom: 0; }
  .skills dd { border-top: 0; padding-top: 4px; }
  .skills dt:last-of-type { border-bottom: 0; }
  .skills dd:last-of-type { border-bottom: 1px solid var(--rule); }
  .facts { grid-template-columns: 1fr; margin-top: 36px; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
  .facts dd { border-top: 0; padding-top: 2px; }
  .site-nav { font-size: 1.1rem; }
  .site-nav a { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- logo mark (home link) ---------- */
.brand .mark { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--band-accent); color: var(--band); font-family: var(--ui); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.04em; flex: none; }
.brand:hover .mark { transform: rotate(-4deg); }
.brand .mark { transition: transform 0.15s ease; }
@media (prefers-reduced-motion: reduce) { .brand .mark { transition: none; } .brand:hover .mark { transform: none; } }

/* ---------- resume page ---------- */
.pdf-frame { display: block; width: 100%; height: 80vh; min-height: 520px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.section .contact-links { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0; }
