/* Monirul Islam portfolio. Devomio palette: navy ink, coral for actions, teal for approved states.
   Schibsted Grotesk for headings and interface, Newsreader for reading text. */
:root {
  --navy: #213343;
  --navy-deep: #17242f;
  --paper: #f3f6f8;
  --white: #ffffff;
  --coral: #ff7a59;
  --coral-dark: #c84a2c;
  --teal: #0a7d91;
  --teal-soft: #e3f3f6;
  --muted: #566677;
  --rule: #d9e1e8;
  --display: "Schibsted Grotesk", "Segoe UI", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;
  --wrap: 70rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--navy); font-family: var(--text); font-size: 1.1875rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--coral-dark); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: var(--navy); line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.1em; }
li { margin-bottom: 0.5em; }
dl, dd { margin: 0; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: 0.6rem 1rem; z-index: 30; }
.skip:focus { left: 0; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; gap: 1.75rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; margin-right: auto; font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 1.5rem; letter-spacing: -0.045em; line-height: 1; color: #213343; text-decoration: none; }
.brand i { font-style: normal; color: #ff7a59; }
.brand:hover { color: #213343; }
.brand-mark { width: 2.15rem; height: 2.15rem; flex: none; }
.top nav { display: flex; gap: 1.6rem; }
.top nav a { font-family: var(--display); font-size: 0.95rem; font-weight: 500; color: var(--muted); text-decoration: none; padding: 0.35rem 0; }
.top nav a:hover { color: var(--navy); box-shadow: 0 2px 0 var(--coral); }

/* Buttons */
.btn { display: inline-block; font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2; padding: 0.85rem 1.4rem; border-radius: 8px; border: 2px solid var(--coral); background: var(--coral); color: var(--navy); text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.btn:hover { background: #ff9276; border-color: #ff9276; color: var(--navy); }
.btn-ghost { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-small { font-size: 0.88rem; padding: 0.55rem 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 2rem 0 0; }

/* Hero */
.hero { padding: 4.5rem 0 5.5rem; background: var(--paper); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; align-items: center; }
.who { font-family: var(--display); font-weight: 600; font-size: 1rem; color: var(--teal); margin: 0 0 1.1rem; }
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; max-width: 15ch; }
.lede { font-size: 1.3rem; line-height: 1.55; max-width: 31em; margin: 1.6rem 0 0; color: #34485a; }
.status { display: flex; gap: 0.7rem; align-items: baseline; margin: 2.25rem 0 0; font-family: var(--display); font-size: 0.95rem; color: var(--muted); line-height: 1.5; max-width: 34rem; }
.dot { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--teal); transform: translateY(-0.05em); }

/* The approval card: the one memorable element */
.gate-card { background: var(--white); border: 2px solid var(--navy); border-radius: 14px; padding: 1.6rem 1.7rem 1.5rem; box-shadow: 8px 8px 0 var(--navy); font-family: var(--display); transition: border-color 0.2s, box-shadow 0.2s; }
.gate-from { margin: 0 0 1rem; font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.gate-action { margin: 0; font-size: 1.7rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.gate-why { margin: 0.5rem 0 1.2rem; color: var(--muted); font-size: 0.98rem; }
.gate-checks { list-style: none; padding: 0; margin: 0 0 1.4rem; border-top: 1px solid var(--rule); }
.gate-checks li { position: relative; margin: 0; padding: 0.55rem 0 0.55rem 1.8rem; border-bottom: 1px solid var(--rule); font-size: 0.97rem; }
.gate-checks li::before { content: ""; position: absolute; left: 0.15rem; top: 0.95rem; width: 0.7rem; height: 0.38rem; border-left: 2.5px solid var(--teal); border-bottom: 2.5px solid var(--teal); transform: rotate(-45deg); }
.gate-buttons { display: flex; gap: 0.75rem; }
.gate-result { margin: 0; padding: 0.85rem 1rem; border-radius: 8px; font-size: 0.98rem; font-weight: 600; line-height: 1.45; }
.gate-card[data-state="approved"] { border-color: var(--teal); box-shadow: 8px 8px 0 var(--teal); }
.gate-card[data-state="approved"] .gate-result { background: var(--teal-soft); color: #06596a; }
.gate-card[data-state="rejected"] .gate-result { background: #fdeeea; color: #8f2f18; }
.gate-reset { margin: 0.9rem 0 0; padding: 0; background: none; border: 0; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--teal); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.gate-reset:hover { color: var(--coral-dark); }
.gate-note { margin: 1.5rem 0 0; font-size: 1rem; color: var(--muted); max-width: 30rem; }

/* Sections */
.section { padding: 5rem 0; }
.tint { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1rem; max-width: 20ch; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.section-note { max-width: 40em; color: #34485a; margin: 0 0 2.5rem; }

.about-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.portrait { width: 100%; border-radius: 14px; border: 1px solid var(--rule); }
.prose { max-width: 38em; }
.prose h2 { max-width: none; margin-bottom: 1.4rem; }

/* Demo rows */
.rows { list-style: none; margin: 0 0 4rem; padding: 0; border-top: 1px solid var(--navy); }
.row { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 2.5rem; padding: 2rem 0; margin: 0; border-bottom: 1px solid var(--rule); align-items: start; }
.row-shot { display: block; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--white); transition: border-color 0.15s; }
.row-shot:hover { border-color: var(--navy); }
.row-shot img { width: 100%; height: auto; }
.row h3 { font-size: 1.6rem; letter-spacing: -0.02em; }
.kind { font-family: var(--display); font-size: 0.98rem; font-weight: 600; color: var(--teal); margin: 0.3rem 0 0.8rem; }
.row p { max-width: 38em; }
.links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 0.4rem 0 0; font-family: var(--display); font-weight: 600; font-size: 0.98rem; }
.sub { font-size: 1.5rem; margin-bottom: 1.2rem; }
.plainlist > div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.plainlist > div:last-child { border-bottom: 1px solid var(--rule); }
.plainlist dt { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.plainlist dd { max-width: 44em; }

/* Experience: expandable roles */
.job { border-top: 1px solid var(--rule); }
.job:last-of-type { border-bottom: 1px solid var(--rule); }
.job summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1.5rem; padding: 1.4rem 2.5rem 1.4rem 0; cursor: pointer; position: relative; }
.job summary::-webkit-details-marker { display: none; }
.job summary::after { content: ""; position: absolute; right: 0.4rem; top: 1.9rem; width: 0.6rem; height: 0.6rem; border-right: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy); transform: rotate(45deg); transition: transform 0.2s; }
.job[open] summary::after { transform: rotate(-135deg); top: 2.2rem; }
.job summary:hover .job-title { color: var(--teal); }
.job-title { font-family: var(--display); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.job-when { grid-column: 2; grid-row: 1; font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--muted); white-space: nowrap; align-self: center; }
.job-org { grid-column: 1; color: var(--muted); font-size: 1.05rem; }
.job-body { padding: 0 2.5rem 2.2rem 0; max-width: 50em; }
.where { color: var(--muted); font-style: italic; }
.stack { font-family: var(--display); font-size: 0.9rem; font-weight: 500; color: #06596a; background: var(--teal-soft); display: inline-block; padding: 0.4rem 0.75rem; border-radius: 6px; margin: 0.6rem 0 0; line-height: 1.45; }

/* Skills */
.skill-list > div { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.skill-list > div:last-child { border-bottom: 1px solid var(--rule); }
.skill-list dt { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.skill-list dd { max-width: 44em; }

/* Background */
.cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; margin-top: 2rem; }
.cols h3 { margin-bottom: 0.7rem; }
.cols h3:not(:first-child) { margin-top: 2rem; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 0.5rem 0; margin: 0; border-bottom: 1px solid var(--rule); }

/* Contact */
.section.contact { background: var(--navy); color: #fff; padding: 5.5rem 0; }
.contact h2 { color: #fff; }
.contact .lede { color: #cbd6e2; margin: 0; }
.mail { margin: 1.75rem 0 2.25rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 4.4vw, 3rem); letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.contact a { color: #fff; text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.contact a:hover { color: var(--coral); }
.contact-list { max-width: 40rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.contact-list > div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
.contact-list dt { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: #9fb2c4; }
.contact-list dd { overflow-wrap: anywhere; }
.contact .btn { color: var(--navy); text-decoration: none; }
.contact .btn:hover { color: var(--navy); }
.btn-ghost-dark { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.contact .btn-ghost-dark { color: #fff; }
.contact .btn-ghost-dark:hover { background: #fff; border-color: #fff; color: var(--navy); }
.aside { margin: 2rem 0 0; color: #cbd6e2; }

.foot { background: var(--navy-deep); padding: 1.5rem 0 2.25rem; font-family: var(--display); font-size: 0.9rem; color: #9fb2c4; }
.foot-row { display: flex; justify-content: space-between; gap: 1rem; }
.foot p { margin: 0; }
.foot a { color: #cbd6e2; }

.notfound { padding: 6rem 0; }

@media (max-width: 62rem) {
  .top nav { display: none; }
  .hero { padding: 3rem 0 3.5rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .row { grid-template-columns: 15rem minmax(0, 1fr); gap: 1.75rem; }
  .cols { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 44rem) {
  body { font-size: 1.0625rem; }
  .section { padding: 3.25rem 0; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .portrait { width: 9rem; }
  .row { grid-template-columns: 1fr; gap: 1rem; padding: 1.6rem 0; }
  .plainlist > div, .skill-list > div, .contact-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .job summary { grid-template-columns: 1fr; padding-right: 2rem; }
  .job-when { grid-column: 1; grid-row: auto; white-space: normal; }
  .job-body { padding-right: 0; }
  .gate-card { padding: 1.3rem 1.2rem; box-shadow: 5px 5px 0 var(--navy); }
  .gate-card[data-state="approved"] { box-shadow: 5px 5px 0 var(--teal); }
  .gate-action { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gate-card, .job summary::after, .row-shot { transition: none; }
}
@media print {
  .top, .actions, .foot, .gate-wrap { display: none; }
  .job:not([open]) .job-body { display: block; }
  body { background: #fff; }
}
