/* ---------------------------------------------------------
   Naser Hossain — personal site
   Design language borrowed from gather.do: fixed sidebar app
   shell, bold grotesk sans, hairline dividers, uppercase
   micro-labels, bordered pill buttons, black hero block.
--------------------------------------------------------- */

:root {
  --text: #141414;
  --muted: #8a8a8a;
  --muted-2: #b4b4b4;
  --hairline: #e6e6e4;
  --active-bg: #f1f1ef;
  --bg: #ffffff;
  --sidebar-w: 300px;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --text: #ededeb;
  --muted: #8f8f8a;
  --muted-2: #55554f;
  --hairline: #262622;
  --active-bg: #191917;
  --bg: #0a0a09;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

.flash-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 1;
  transition: opacity 0.42s ease;
  z-index: 9999;
  pointer-events: none;
}

a {
  color: var(--text);
  text-decoration: none;
}

.main a:not(.pill-button) {
  text-decoration: underline;
  text-decoration-color: var(--hairline);
  text-underline-offset: 3px;
}

.main a:not(.pill-button):hover { text-decoration-color: var(--text); }

/* ---------------- Shell / Sidebar ---------------- */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 56px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--hairline);
}

.wordmark {
  display: inline-block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.wordmark-rule {
  width: 40px;
  height: 3px;
  background: var(--text);
  margin: 14px 0 20px;
}

.sidebar-tagline {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 14px;
}

.sidebar-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  margin: 44px 0 0;
  flex-grow: 1;
}

.sidebar-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 10px 12px;
  margin: 0 -12px 2px;
  border-radius: 6px;
}

.sidebar-nav a:hover { background: var(--active-bg); }

.sidebar-nav a.active {
  background: var(--active-bg);
  font-weight: 600;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
  margin-top: 20px;
}

.theme-toggle:hover { color: var(--text); }

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--text);
  border-radius: 100px;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 16px;
}

.pill-button:hover { background: var(--text); color: #fff; }
.pill-button span { transition: transform 0.15s ease; }
.pill-button:hover span { transform: translateX(2px); }

/* ---------------- Main content ---------------- */

.main {
  flex: 1;
  min-width: 0;
  padding: 56px 64px 0;
}

.main h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.main h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 4px;
  line-height: 1.35;
}

.main h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 6px;
}

.main p { margin: 0 0 16px; color: var(--text); }
.main ul, .main ol { margin: 0 0 16px; padding-left: 20px; }
.main li { margin-bottom: 6px; }

.tagline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 24px;
}

/* Hero */

.hero-media {
  width: 100%;
  max-height: 560px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.hero-media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.img-credit {
  font-size: 11px;
  color: var(--muted-2);
  margin: 0 0 28px;
}

.img-credit a { color: #faadac; text-decoration-color: rgba(250, 173, 172, 0.45); }
.img-credit a:hover { color: #ffc9c7; }

/* Minimal dashed placeholder used everywhere an image used to sit */

.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px dashed var(--muted-2);
  border-radius: 8px;
  background: transparent;
  position: relative;
}

.img-placeholder::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 1px dashed var(--muted-2);
  border-radius: 50%;
}

.hero-media.img-placeholder {
  aspect-ratio: 16 / 7;
  border-radius: 10px;
}

.divider {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 40px 0;
}

/* Pillars / feature grid */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 8px;
}

.pillar-icon {
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
}

.pillars h2 { margin-top: 0; font-size: 17px; }
.pillars p { color: var(--muted); font-size: 14px; margin-bottom: 0; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 8px 0 8px;
}

.cta-row a {
  text-decoration: none !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
}

/* Entry list (Work) */

.entry {
  padding: 28px 0;
  border-top: 1px solid var(--hairline);
}

.entry:first-of-type { margin-top: 12px; }

.entry > .img-placeholder {
  margin-bottom: 16px;
}

.entry-media {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.entry-media .img-placeholder {
  flex: 1 1 45%;
  aspect-ratio: 4 / 3;
  margin-bottom: 0;
}

.entry h2 { margin-top: 0; }

.entry .meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

/* Timeline (Resume) */

.timeline-item {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
}

.timeline-item:first-of-type { margin-top: 12px; }

.timeline-date {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.timeline-body h2 { margin-top: 0; font-size: 17px; }
.timeline-body .org { color: var(--muted); margin: 0 0 10px; font-style: normal; font-size: 14px; }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.skill-tags li {
  font-size: 12px;
  border: 1px solid var(--hairline);
  border-radius: 100px;
  padding: 6px 14px;
  color: var(--text);
  margin: 0;
}

/* ---------------- Footer ---------------- */

.site-footer {
  margin-top: 56px;
  padding: 28px 0 64px;
  border-top: 1px solid var(--hairline);
}

.footer-mark {
  font-size: 18px;
  color: var(--muted-2);
  margin-bottom: 16px;
}

.footer-col {
  min-width: 120px;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.6;
  margin: 0;
}

.footer-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0 0 8px;
}

.footer-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.footer-text a { color: var(--muted); text-decoration: none; }
.footer-text a:hover { color: var(--text); text-decoration: underline; }

.social-icons {
  display: flex;
  gap: 8px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--muted);
}

.social-icon svg { width: 16px; height: 16px; }

.social-icon:hover { color: var(--text); border-color: var(--text); }

/* ---------------- Responsive ---------------- */

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--hairline);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 28px 24px;
  }
  .sidebar-top { flex: 1 1 240px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; margin: 0; gap: 4px 8px; }
  .sidebar-nav a { margin: 0; }
  .pill-button { margin-top: 0; }
  .main { padding: 40px 24px 0; }
  .pillars { grid-template-columns: 1fr; gap: 24px; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .footer-row { grid-template-columns: 1fr; gap: 20px; }
  .entry-media .img-placeholder { flex-basis: 100%; }
}
