/* Abi Sa'd portfolio — strictly monochrome dark. No external fonts, no CDN. */
:root {
  --bg: #0D0D0D;
  --surface: #141414;
  --surface-2: #1C1C1C;
  --text: #FFFFFF;
  --body: #F2F2F2;
  --secondary: #A0A0A0;
  --secondary-2: #A3A3A3;
  --hairline: #2A2A2A;
  --hairline-soft: #222222;
  --serif: Georgia, 'Palatino Linotype', 'Times New Roman', 'Noto Serif Bengali', 'Bangla Sangam MN', serif;
  --bn-serif: 'Noto Serif Bengali', 'Bangla Sangam MN', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', 'Bangla Sangam MN', sans-serif;
  --shell: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: var(--sans); font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); color: var(--text); font-weight: 600; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 14px; }
button { font-family: var(--sans); cursor: pointer; }
input, textarea, select {
  font-family: var(--sans); font-size: 15px; color: var(--text);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 4px; padding: 11px 12px; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 1px solid var(--secondary); border-color: var(--secondary); }
label { display: block; font-size: 13px; color: var(--secondary); margin: 0 0 6px; letter-spacing: .02em; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .shell { padding: 0 20px; } }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 13, .96);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { text-decoration: none; line-height: 1.15; flex-shrink: 0; }
.brand-name { display: block; font-family: var(--serif); font-size: 17px; letter-spacing: .14em; color: var(--text); }
.brand-pen { display: block; font-family: var(--serif); font-size: 13px; color: var(--secondary); letter-spacing: .05em; }
.site-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none; color: var(--secondary); font-size: 14px;
  padding: 8px 11px; border-radius: 4px; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); background: var(--surface-2); }
.lang-toggle {
  background: transparent; border: 1px solid var(--hairline); color: var(--secondary);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; white-space: nowrap;
}
.lang-toggle strong { color: var(--text); }
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; flex-wrap: nowrap; }
  .lang-toggle { margin-left: auto; }
}

/* ---- home: ONE full screen, split layout ---- */
.home { display: flex; flex-direction: column; min-height: calc(100dvh - 65px); }
.home-grid {
  flex: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px;
  align-items: center; padding-top: 48px; padding-bottom: 48px;
}
.home-hello { font-family: var(--serif); font-size: 20px; color: var(--secondary); margin-bottom: 10px; }
.home-name { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.12; margin-bottom: 14px; }
.home-role { font-family: var(--serif); font-size: 19px; color: var(--secondary-2); margin-bottom: 22px; }
.home-intro { font-family: var(--serif); font-size: 18px; line-height: 1.75; color: var(--body); margin-bottom: 6px; }
.home-intro.bn { font-family: var(--bn-serif); color: var(--secondary-2); }
.cta {
  display: inline-block; margin-top: 26px; font-family: var(--serif); font-size: 18px;
  color: var(--text); text-decoration: none; padding-bottom: 4px;
  border-bottom: 1px solid var(--text);
  /* hand-drawn underline feel: slightly wavy via a second offset line */
  box-shadow: 0 5px 0 -3px var(--bg), 0 6px 0 -3px rgba(255, 255, 255, .35);
}
.cta:hover { color: var(--secondary); border-color: var(--secondary); }
.home-right { position: relative; display: flex; justify-content: center; }
.hero-img {
  width: min(100%, 420px); height: auto; aspect-ratio: 1 / 2; object-fit: cover;
  border-radius: 2px;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
}
.quote-bar { border-top: 1px solid var(--hairline); padding: 20px 0 22px; }
.quote-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.quote-text { font-family: var(--bn-serif); font-size: 16px; color: var(--secondary); margin: 0; }
.socials { display: flex; gap: 14px; align-items: center; flex-shrink: 0; }
.socials a { color: var(--secondary); display: inline-flex; }
.socials a:hover { color: var(--text); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .home-right { order: -1; }
  .hero-img { width: min(100%, 300px); }
  .quote-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* ---- inner pages ---- */
.page { padding: 56px 0 72px; }
.page-no { font-size: 13px; letter-spacing: .18em; color: var(--secondary); margin-bottom: 8px; }
.page-title { font-size: clamp(30px, 4vw, 44px); margin-bottom: 10px; }
.page-lede { color: var(--secondary); max-width: 640px; margin-bottom: 32px; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 32px 0; }
.empty {
  border: 1px solid var(--hairline); border-radius: 6px; padding: 36px 24px;
  text-align: center; color: var(--secondary); background: var(--surface);
}
.empty p { margin: 0; }
.muted { color: var(--secondary); font-size: 14px; }

/* ---- writings ---- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  background: transparent; border: 1px solid var(--hairline); color: var(--secondary);
  border-radius: 999px; padding: 8px 16px; font-size: 14px;
}
.tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.writing-list { display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; }
.writing-item { background: var(--surface); padding: 22px 24px; display: block; text-decoration: none; }
.writing-item:hover { background: var(--surface-2); }
.writing-item h3 { font-size: 21px; margin-bottom: 6px; }
.writing-item .excerpt { color: var(--secondary-2); font-size: 15px; margin-bottom: 10px; }
.writing-meta { font-size: 13px; color: var(--secondary); display: flex; gap: 16px; flex-wrap: wrap; }
.load-more-wrap { text-align: center; margin-top: 28px; }
.btn {
  display: inline-block; background: var(--text); color: var(--bg); border: 1px solid var(--text);
  border-radius: 4px; padding: 11px 22px; font-size: 15px; text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--hairline); }
.btn.ghost:hover { border-color: var(--secondary); opacity: 1; }
.btn.danger { background: transparent; color: #FF8A80; border-color: #5A2A28; }
.btn.small { padding: 7px 14px; font-size: 13px; }

/* reader */
.reader-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--text); z-index: 60; width: 0; }
.reader-head { max-width: 720px; margin: 0 auto; }
.reader-body { max-width: 720px; margin: 0 auto; font-family: var(--bn-serif); }
.reader-body p { margin-bottom: 18px; white-space: pre-wrap; }
.reader-controls { display: flex; gap: 8px; align-items: center; margin: 18px 0 28px; }
.reader-controls .btn.small { min-width: 42px; }
.back-link { display: inline-block; margin-bottom: 24px; color: var(--secondary); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--text); }

/* ---- bookshelf / gallery / milestones ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--hairline); border-radius: 6px; padding: 20px 22px; background: var(--surface); margin-bottom: 14px; }
.card h3 { font-size: 19px; margin-bottom: 4px; }
.card .sub { color: var(--secondary); font-size: 14px; margin-bottom: 8px; }
.chip {
  display: inline-block; font-size: 12px; color: var(--secondary);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 3px 10px; margin-right: 6px;
}
.masonry { columns: 3 280px; column-gap: 16px; }
.masonry figure { margin: 0 0 16px; break-inside: avoid; border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; background: var(--surface); }
.masonry img { width: 100%; height: auto; }
.masonry figcaption { padding: 12px 14px; font-size: 14px; color: var(--secondary); }
.timeline { position: relative; margin-left: 8px; padding-left: 28px; border-left: 1px solid var(--hairline); }
.timeline-item { position: relative; padding-bottom: 32px; }
.timeline-item::before {
  content: ''; position: absolute; left: -33px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--text);
}
.timeline-item h3 { font-size: 20px; margin-bottom: 4px; }
.timeline-date { font-size: 13px; color: var(--secondary); letter-spacing: .06em; margin-bottom: 8px; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form-row { margin-bottom: 16px; }
.form-note { font-size: 14px; color: var(--secondary); }
.form-ok { border: 1px solid var(--hairline); background: var(--surface); border-radius: 6px; padding: 18px; color: var(--text); }

/* ---- about ---- */
.about-lines { max-width: 720px; }
.about-lines .own-words { font-family: var(--bn-serif); font-size: 18px; line-height: 1.9; }
.about-lines blockquote {
  margin: 28px 0; padding: 4px 0 4px 20px; border-left: 1px solid var(--text);
  font-family: var(--bn-serif); font-size: 18px; line-height: 1.9; color: var(--body);
}
.about-lines blockquote footer { font-size: 13px; color: var(--secondary); margin-top: 10px; font-family: var(--sans); }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-quote { font-family: var(--bn-serif); color: var(--secondary); font-size: 14px; margin: 0; }
.footer-copy { color: var(--secondary); font-size: 13px; margin: 0; }
.noscript-note { text-align: center; padding: 20px; color: var(--secondary); }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 6px;
  font-size: 14px; z-index: 100; display: flex; gap: 16px; align-items: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px);
}
.toast button { background: transparent; border: 0; color: var(--bg); font-weight: 700; text-decoration: underline; padding: 0; }

/* ---- admin ---- */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100dvh - 65px); }
.admin-sidebar { border-right: 1px solid var(--hairline); padding: 24px 18px; background: var(--surface); }
.admin-sidebar h2 { font-size: 13px; letter-spacing: .14em; color: var(--secondary); text-transform: uppercase; margin: 22px 0 8px; font-family: var(--sans); }
.admin-sidebar h2:first-child { margin-top: 0; }
.admin-sidebar a {
  display: block; padding: 9px 12px; border-radius: 4px; color: var(--secondary);
  text-decoration: none; font-size: 15px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { color: var(--text); background: var(--surface-2); }
.admin-main { padding: 28px 32px 96px; min-width: 0; }
.admin-topbar {
  display: none; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--hairline); background: var(--surface);
  position: sticky; top: 0; z-index: 40;
}
.admin-topbar strong { font-family: var(--serif); font-size: 15px; }
.admin-bottombar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--surface); border-top: 1px solid var(--hairline);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.admin-bottombar nav { display: grid; grid-template-columns: repeat(5, 1fr); }
.admin-bottombar a {
  text-align: center; color: var(--secondary); text-decoration: none;
  font-size: 11px; padding: 6px 2px;
}
.admin-bottombar a.active { color: var(--text); }
.admin-bottombar .ic { display: block; font-size: 18px; line-height: 1.2; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0 28px; }
.stat { border: 1px solid var(--hairline); border-radius: 6px; padding: 18px; background: var(--surface); }
.stat .num { font-family: var(--serif); font-size: 30px; color: var(--text); line-height: 1.1; }
.stat .lbl { font-size: 13px; color: var(--secondary); margin-top: 4px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.list-head h2 { margin: 0; font-size: 24px; }
.list-head .count { color: var(--secondary); font-size: 14px; }
.list-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.list-tools input { max-width: 280px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; border: 1px solid var(--hairline); border-radius: 6px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.admin-table th { background: var(--surface); color: var(--secondary); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-cards { display: none; }
.admin-card { border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface); padding: 16px; margin-bottom: 12px; }
.admin-card h3 { font-size: 17px; margin-bottom: 4px; }
.admin-card .meta { font-size: 13px; color: var(--secondary); margin-bottom: 10px; }
.admin-card .actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.editor { border: 1px solid var(--hairline); border-radius: 6px; background: var(--surface); padding: 22px; margin-bottom: 24px; }
.editor textarea { min-height: 220px; font-family: var(--bn-serif); line-height: 1.9; }
.login-wrap { max-width: 400px; margin: 80px auto; padding: 0 20px; }
.login-wrap h1 { font-size: 26px; text-align: center; }
.login-wrap p { text-align: center; color: var(--secondary); font-size: 14px; }
.login-wrap .form-row { margin-bottom: 14px; }
.login-wrap .btn { width: 100%; }
.field-error { color: #FF8A80; font-size: 13px; margin-top: 6px; min-height: 18px; }
@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-topbar { display: flex; }
  .admin-bottombar { display: block; }
  .admin-main { padding: 20px 20px 110px; }
  .admin-table { display: none; }
  .admin-cards { display: block; }
}
