/* =========================================================
   Abir Hossain — Portfolio
   Editorial, typography-led system
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/InterTight-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --ink: #1C1B19;
  --ink-2: #4E4C48;
  --muted: #6B6964;
  --faint: #8E8B85;
  --soft: #F2F1EE;
  --soft-2: #EAE8E3;
  --line: #E8E6E1;
  --accent: #3E8EF7;

  --shadow-card:
    0 0 14px -5px rgba(28, 27, 25, 0.07),
    0 1px 2px 0 rgba(28, 27, 25, 0.03),
    0 10px 28px -16px rgba(28, 27, 25, 0.12);

  --font: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --container: 1200px;
  --gutter: 16px;
  --section-space: 72px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);

  --r-sm: 10px;
  --r-btn: 14px;
  --r-media: 18px;
  --r-card: 24px;
  --r-row: 34px;
}

@media (min-width: 640px) {
  :root { --gutter: 32px; --section-space: 96px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 48px; --section-space: 120px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: 'ss01' 0, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.section { padding-top: var(--section-space); }
.section-title {
  font-size: clamp(28px, 2.1vw + 14px, 36px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.mark {
  background: var(--soft);
  border-radius: 0.18em;
  padding: 0 0.16em;
  margin: 0 -0.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #33312D; }
.btn-soft { background: var(--soft); color: var(--ink); }
.btn-soft:hover { background: var(--soft-2); }
.btn img { width: 16px; height: 16px; }

/* ---------- Navigation ---------- */
.nav-wrap {
  position: fixed;
  inset: 18px 0 auto;
  z-index: 50;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding-inline: 12px;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}
.nav-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex: none;
  transition: background-color 0.2s var(--ease);
}
.nav-avatar:hover { background: var(--soft); }
.nav-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.nav-link {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); background: var(--soft); }
.nav-divider { width: 1px; height: 20px; background: var(--line); margin: 0 6px 0 4px; }
.nav-email {
  height: 38px;
  padding: 0 14px 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.2s var(--ease);
}
.nav-email:hover { background: #33312D; }

/* ---------- Hero ---------- */
.hero {
  padding-top: 148px;
  display: grid;
  gap: 40px;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 22px;
}
.dot-sep { color: var(--faint); }
.hero-title {
  font-size: clamp(34px, 3.4vw + 13px, 62px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.028em;
  max-width: 15ch;
}
.hero-lede {
  margin-top: 18px;
  max-width: 36ch;
  font-size: clamp(19px, 0.4vw + 16px, 22px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.hero-path {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 17px;
  color: var(--muted);
}
.path-item { color: var(--ink); font-weight: 500; }
.path-arrow { color: var(--faint); }
.path-status { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(62, 142, 247, 0.16);
  display: inline-block;
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero-card { padding: 8px 0; align-self: end; }

/* Facts (definition list used in hero + about) */
.facts { display: grid; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 20px;
  font-size: 14.5px;
}
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt { color: var(--muted); }
.fact dd { font-weight: 500; text-align: right; }

/* ---------- Work ---------- */
.work-list { display: grid; gap: 12px; }
.work-row {
  display: grid;
  gap: 20px;
  padding: 12px;
  margin-inline: -12px;
  border-radius: var(--r-row);
  transition: background-color 0.25s var(--ease);
}
.work-row:hover { background: var(--soft); }

.work-media {
  position: relative;
  aspect-ratio: 1.6;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--soft-2);
  display: grid;
  place-items: center;
}
.work-media img {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 84%;
  width: auto;
  max-width: none;
  aspect-ratio: 571 / 552;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(28, 27, 25, 0.06), 0 18px 40px -22px rgba(28, 27, 25, 0.45);
  transition: transform 0.5s var(--ease);
}
.work-row:hover .work-media img { transform: scale(1.025); }
.work-index {
  position: absolute;
  left: 16px; top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.work-body { padding: 4px 8px 8px; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 12px;
}
.work-meta .company { color: var(--ink); font-weight: 500; }
.work-title {
  font-size: clamp(24px, 0.8vw + 18px, 30px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.028em;
  max-width: 22ch;
}
.work-highlight {
  margin-top: 12px;
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.work-desc {
  margin-top: 10px;
  max-width: 48ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}
.work-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  transition: background-color 0.25s var(--ease);
}
.work-row:hover .tag { background: var(--surface); }
.work-link {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
}
.work-link svg { transition: transform 0.25s var(--ease); }
.work-row:hover .work-link svg { transform: translateX(3px); }

/* ---------- Split sections (Capabilities, About) ---------- */
.split { display: grid; gap: 8px; }
.aside-note {
  font-size: 16px;
  color: var(--muted);
  max-width: 28ch;
  margin-top: -16px;
  margin-bottom: 24px;
}

.cap-list {
  display: grid;
  border-bottom: 1px solid var(--line);
  counter-reset: cap;
}
.cap-item {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(18px, 0.4vw + 15px, 21px);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.cap-num {
  width: 24px;
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.about-card { padding: 8px 0; margin-bottom: 32px; }
.about-statement {
  font-size: clamp(24px, 1.3vw + 15px, 33px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.016em;
  max-width: 30ch;
}
.about-text {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  max-width: 60ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

.quotes {
  margin-top: 48px;
  display: grid;
  border-top: 1px solid var(--line);
}
.quote {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.quote-logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--ink);
  display: grid; place-items: center;
  overflow: hidden;
}
.quote-logo img { width: 26px; height: 26px; object-fit: contain; }
.quote-text { font-size: 16.5px; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.quote-by { margin-top: 8px; font-size: 14px; color: var(--muted); }
.quote-by strong { color: var(--ink); font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  min-height: 62px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: #FCFCFB; }
.faq-icon {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--soft);
  display: grid; place-items: center;
  transition: transform 0.3s var(--ease), background-color 0.2s var(--ease);
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 20px 22px;
  max-width: 736px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- Footer / CTA ---------- */
.footer {
  padding: calc(var(--section-space) + 40px) 0 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-title {
  font-size: clamp(28px, 1.8vw + 16px, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.022em;
  max-width: 20ch;
  text-wrap: balance;
}
@media (min-width: 900px) { .footer-title { max-width: none; } }
.footer-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.footer-links {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 22px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
}
.footer-links a { padding: 6px 0; display: inline-block; transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--ink); }
.to-top {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.to-top:hover { color: var(--ink); background: var(--soft-2); }
.footer-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  font-size: 14px;
  color: var(--muted);
}
.footer-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.footer-meta time { font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  transition: opacity 0.2s var(--ease), transform 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal (subtle, never blocks content) ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================
   Breakpoints
   ========================================================= */

/* Small phones: icon-only email in nav */
@media (max-width: 420px) {
  .nav-link { padding: 0 11px; font-size: 14px; }
  .nav-email { width: 38px; padding: 0; justify-content: center; }
  .nav-email-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-divider { margin: 0 4px 0 2px; }
  .hero-actions .btn-dark { width: 100%; justify-content: center; }
}

/* Tablet */
@media (min-width: 640px) {
  .hero { padding-top: 176px; }
  .cap-list { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 40px; border-bottom: 0; }
  .cap-list .cap-item:nth-child(5n) { border-bottom: 1px solid var(--line); }
  .work-body { padding: 4px 12px 12px; }
}

/* Small desktop / large tablet landscape */
@media (min-width: 900px) {
  .work-row {
    grid-template-columns: minmax(0, 48.5%) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 14px;
    margin-inline: -14px;
  }
  .work-body { padding: 0 40px 0 0; }

  .split { grid-template-columns: 330px minmax(0, 1fr); gap: 72px; }
  .split-aside .section-title { margin-bottom: 24px; }
  .aside-note { margin-top: 0; }
}

@media (min-width: 1024px) {
  .hero {
    padding-top: 236px;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 72px;
    align-items: end;
  }
  .hero-card { margin-bottom: 4px; }
}
