/* Palette: Bangladesh flag — bottle-green field, red sun disc, green-tinted paper.
   Structure: sections styled as REST request lines (GET /projects → 200 OK). */
:root {
  --paper: #f4f7f3;
  --field: #05392b;
  --ink: #14231b;
  --muted: #5c7166;
  --green: #006a4e;
  --green-soft: #0e8563;
  --red: #f42a41;
  --card: #ffffff;
  --line: #d9e4db;
  --chip: #e6efe8;
  --band-ink: #f2f7f0;
  --band-muted: rgba(242, 247, 240, 0.8);
  --band-link: #8fd8b4;
  --max: 46rem;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c110e;
    --field: #082419;
    --ink: #e5ede6;
    --muted: #8ea396;
    --green: #4fc48f;
    --green-soft: #3aa578;
    --red: #ff5a48;
    --card: #121a15;
    --line: #223029;
    --chip: #1a251f;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16.5px/1.65 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--red); color: #fff; }
.route, .status, .chip, .label, .nav-links, .job-period, .hero-kicker, .site-meta {
  font-family: var(--mono);
}
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* ---- nav: dark field bar framing the page ---- */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--field);
  border-bottom: 1px solid rgba(242, 247, 240, 0.12);
}
.nav-inner {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 0.85rem 1.25rem;
}
.nav-name {
  font-weight: 800; font-size: 1.2rem; text-decoration: none;
  color: var(--band-ink); letter-spacing: -0.01em;
}
.nav-dot { color: var(--red); }
.nav-links { display: flex; gap: 0.9rem; font-size: 0.8rem; flex-wrap: wrap; align-items: baseline; }
.nav-links a { text-decoration: none; color: var(--band-muted); }
.nav-links a:hover { color: var(--band-ink); }
.nav-cv {
  border: 1px solid var(--red); border-radius: 999px; padding: 0.05rem 0.65rem;
  color: var(--band-ink) !important;
}
.nav-cv:hover { background: var(--red); }
@media (max-width: 40rem) {
  .nav-inner { align-items: center; padding: 0.7rem 1rem; }
  .nav-links a:not(.nav-cv) { display: none; }
}

/* ---- hero: the flag — green field, red sun disc behind the name ---- */
.hero {
  position: relative;
  background: var(--field);
  color: var(--band-ink);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 2.4rem; left: calc(50% - 25rem);
  width: 14rem; height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--red),
    color-mix(in srgb, var(--red) 76%, #160a0c) 82%);
  filter: blur(14px);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -6rem; right: calc(50% - 32rem);
  width: 26rem; height: 26rem;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--band-link) 16%, transparent), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
@media (max-width: 56rem) {
  .hero::before { left: -3.5rem; }
  .hero::after { right: -8rem; }
}
.hero .wrap { position: relative; padding-top: 5.5rem; padding-bottom: 4.75rem; }
.hero-kicker {
  color: var(--band-ink); font-size: 0.8rem; letter-spacing: 0.05em; font-weight: 500;
  text-shadow: 0 1px 3px rgba(5, 25, 18, 0.35);
}
.hero-name {
  font-size: clamp(2.7rem, 8.5vw, 4.6rem);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.028em;
  margin: 0.5rem 0 0.4rem;
}
.hero-title {
  font-size: 1.3rem; font-weight: 700; color: var(--band-ink);
  text-shadow: 0 1px 3px rgba(5, 25, 18, 0.35);
}
.hero-name { text-shadow: 0 2px 6px rgba(5, 25, 18, 0.25); }
.hero-tagline { margin-top: 0.8rem; color: var(--band-muted); max-width: 33rem; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.75rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-links { margin-top: 1.6rem; display: flex; gap: 1.1rem; align-items: center; }
.hero-links a { color: var(--band-link); display: block; transition: color 0.15s ease, transform 0.15s ease; }
.hero-links a:hover { color: var(--band-ink); transform: translateY(-2px); }
.hero-links svg { width: 1.4rem; height: 1.4rem; fill: currentColor; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .hero-kicker, .hero-name, .hero-title, .hero-tagline, .hero-actions, .hero-links {
    animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  }
  .hero-name { animation-delay: 0.06s; }
  .hero-title { animation-delay: 0.12s; }
  .hero-tagline { animation-delay: 0.18s; }
  .hero-actions { animation-delay: 0.26s; }
  .hero-links { animation-delay: 0.34s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

.btn {
  display: inline-block; padding: 0.55rem 1.3rem; border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.hero .btn-primary { background: var(--band-ink); color: var(--field); }
.hero .btn:not(.btn-primary) { border-color: rgba(242, 247, 240, 0.5); color: var(--band-ink); }
.hero .btn:not(.btn-primary):hover { background: var(--band-ink); color: var(--field); }

/* ---- sections as request/response pairs ---- */
.section { padding: 3.4rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section .wrap > :first-child { margin-top: 0; }
.request-line {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap;
  font-size: 0.78rem; letter-spacing: 0.03em;
}
.route { color: var(--green-soft); }
.status { color: var(--muted); }
.status-code { color: var(--green-soft); }
.section h2 {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -0.015em;
  margin: 0.2rem 0 1.4rem;
}
.about-bio { font-size: 1.06rem; max-width: 40rem; }

/* projects */
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 40rem) { .project-grid { grid-template-columns: 1fr; } }
.project-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 0.6rem;
  padding: 1.2rem; display: flex; flex-direction: column; gap: 0.7rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--green-soft);
  box-shadow: 0 6px 18px rgba(5, 57, 43, 0.08);
}
.project-card.featured { grid-column: 1 / -1; border-top: 3px solid var(--red); }
.project-card.featured h3 { font-size: 1.25rem; }
.project-card.featured > p { max-width: 38rem; }
.project-head { display: flex; justify-content: space-between; align-items: start; gap: 0.5rem; }
.project-card h3 { font-size: 1.08rem; font-weight: 700; }
.project-card > p { font-size: 0.92rem; color: var(--muted); flex: 1; }
.label {
  font-size: 0.64rem; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  padding: 0.18rem 0.55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.label-client-work { border-color: var(--green-soft); color: var(--green-soft); }
.label-personal-project { border-color: var(--red); color: var(--red); }
.project-links { display: flex; gap: 1rem; font-size: 0.88rem; font-weight: 600; }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; }
.chip {
  background: var(--chip); border-radius: 4px; padding: 0.16rem 0.6rem;
  font-size: 0.78rem; color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

/* experience */
.job { position: relative; margin-bottom: 2.25rem; padding-left: 1.4rem; border-left: 2px solid var(--line); }
.job:last-of-type { margin-bottom: 0; }
.job::before {
  content: "";
  position: absolute; left: -6px; top: 0.5rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red);
}
/* a timeline needs two points: with a single role, drop the rail and marker */
.job:only-of-type { border-left: none; padding-left: 0; }
.job:only-of-type::before { display: none; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.job h3 { font-size: 1.12rem; font-weight: 700; }
.job-period { color: var(--muted); font-size: 0.8rem; }
.job-bullets { margin: 0.6rem 0 0.8rem; padding-left: 1.1rem; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.job-bullets li::marker { color: var(--red); }

/* skills: each group rendered as a directory tree */
.skill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
@media (max-width: 40rem) { .skill-grid { grid-template-columns: 1fr; } }
.tree-dir {
  font-family: var(--mono); font-size: 0.9rem; font-weight: 700;
  color: var(--green); margin-bottom: 0.35rem;
}
.skill-tree {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.9;
}
.tree-branch { color: color-mix(in srgb, var(--muted) 55%, var(--line)); white-space: pre; margin-right: 0.4rem; }

/* ---- contact: closing green band, mirrors the hero ---- */
.footer {
  background: var(--field);
  color: var(--band-ink);
  border-top: none;
  margin-top: 0.5rem;
}
.footer .wrap { padding-top: 3.4rem; padding-bottom: 3.4rem; }
.footer .route, .footer .status-code { color: var(--band-link); }
.footer .status { color: var(--band-muted); }
.footer-lede { color: var(--band-muted); margin-bottom: 1.1rem; }
.contact-list { list-style: none; padding: 0; display: grid; gap: 0.5rem; font-size: 1rem; }
.contact-list a { color: var(--band-ink); text-decoration-color: var(--band-link); }
.contact-list a:hover { color: var(--band-link); }
.site-meta {
  margin-top: 2.5rem; font-size: 0.72rem; letter-spacing: 0.03em;
  color: var(--band-muted);
}

/* ---- contact prompt modal ---- */
.contact-modal {
  margin: auto;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 0.8rem;
  padding: 1.8rem; max-width: 24rem; width: calc(100% - 2.5rem);
  box-shadow: 0 18px 50px rgba(5, 25, 18, 0.35);
}
.contact-modal::backdrop { background: rgba(5, 25, 18, 0.55); }
.contact-modal h3 { font-size: 1.35rem; font-weight: 800; margin: 0.2rem 0 0.5rem; }
.modal-text { color: var(--muted); }
.modal-actions { display: flex; gap: 0.6rem; margin-top: 1.3rem; flex-wrap: wrap; }
.modal-actions .btn-primary { background: var(--green); color: #fff; }
.modal-actions .btn:not(.btn-primary) { border-color: var(--green); color: var(--green); }
.modal-actions .btn:not(.btn-primary):hover { background: var(--green); color: #fff; }
.modal-close {
  position: absolute; top: 0.7rem; right: 0.9rem;
  background: none; border: 0; padding: 0.2rem;
  font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer;
}
.modal-close:hover { color: var(--ink); }
.modal-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .contact-modal[open] { animation: modal-rise 0.3s cubic-bezier(0.2, 0.7, 0.3, 1); }
  @keyframes modal-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}
