/* Al-Amin — portfolio styles */

:root {
    color-scheme: light;
    --bg: #f6f5f1;
    --raise: #ffffff;
    --raise-2: #eeece6;
    --line: #e2dfd7;
    --line-strong: #cdc9bf;
    --text: #14161a;
    --muted: #575b62;
    --accent: #16694f;
    --accent-ink: #ffffff;
    --accent-hover: #0f5440;
    --header-bg: rgba(246, 245, 241, 0.88);
    --field-hover: #a7a398;
    --danger: #b42318;
    --phone-side: 0.7;

    --font-display: "Bricolage Grotesque", "Noto Sans Bengali", "Inter", system-ui, sans-serif;
    --font-body: "Inter", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;

    --s1: 0.5rem;
    --s2: 1rem;
    --s3: 1.5rem;
    --s4: 2rem;
    --s5: 2.5rem;
    --s6: 3.5rem;
    --s7: clamp(3.5rem, 6vw, 5rem);

    --gutter: clamp(1rem, 4vw, 3rem);
    --max: 1200px;
    --radius: 8px;
    --radius-lg: 20px;
    --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0e0f11;
        --raise: #15171a;
        --raise-2: #1c1f23;
        --line: #2a2d32;
        --line-strong: #3a3e44;
        --text: #eeece7;
        --muted: #a2a5ab;
        --accent: #9be0bf;
        --accent-ink: #0b2a1f;
        --accent-hover: #b9ecd3;
        --header-bg: rgba(14, 15, 17, 0.88);
        --field-hover: #50555c;
        --danger: #f4a597;
        --phone-side: 0.55;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0e0f11;
    --raise: #15171a;
    --raise-2: #1c1f23;
    --line: #2a2d32;
    --line-strong: #3a3e44;
    --text: #eeece7;
    --muted: #a2a5ab;
    --accent: #9be0bf;
    --accent-ink: #0b2a1f;
    --accent-hover: #b9ecd3;
    --header-bg: rgba(14, 15, 17, 0.88);
    --field-hover: #50555c;
    --danger: #f4a597;
    --phone-side: 0.55;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
    text-wrap: balance;
}

h2 { font-size: clamp(2rem, 4.4vw, 3.5rem); }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }

[lang="bn"] { font-family: "Noto Sans Bengali", var(--font-body); letter-spacing: 0; }

p { margin: 0; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: var(--s2);
    top: -100px;
    background: var(--text);
    color: var(--bg);
    padding: var(--s1) var(--s2);
    z-index: 100;
}
.skip-link:focus { top: var(--s1); }

.muted { color: var(--muted); }

.eyebrow {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: var(--s2);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 var(--s3);
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s;
}

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }

.btn[disabled] { opacity: .6; cursor: progress; }

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}
.wordmark span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 0.25rem; }

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--muted);
    border-radius: 999px;
}
.nav a:hover,
.nav a[aria-current="true"] { color: var(--text); }
.nav a[aria-current="true"]:not(.nav__cta) { background: var(--raise-2); }

.nav .nav__cta {
    margin-left: var(--s1);
    color: var(--text);
    border: 1px solid var(--line-strong);
}
.nav .nav__cta:hover { border-color: var(--text); }

/* Theme & language toggles */

.site-nav { margin-left: auto; }

.toggles { display: flex; gap: 0.375rem; margin-left: var(--s1); }

.toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.625rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.toggle:hover { border-color: var(--text); }
.toggle--lang { min-width: 64px; }
.toggle--lang:lang(bn) { font-family: "Noto Sans Bengali", var(--font-body); }

.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: block; }
    :root:not([data-theme="light"]) .icon-moon { display: none; }
}

/* Bangla text needs looser tracking and taller lines */
html[lang="bn"] body { line-height: 1.5; }
html[lang="bn"] h1,
html[lang="bn"] h2,
html[lang="bn"] h3,
html[lang="bn"] .facts dt { letter-spacing: 0; line-height: 1.3; }
html[lang="bn"] .hero h1 { font-size: clamp(2.25rem, 4.6vw, 4rem); }

/* Phone frame */

.phone {
    display: block;
    padding: 5px;
    background: #000;
    border: 1px solid var(--line-strong);
    border-radius: 30px;
}
.phone img { width: 100%; border-radius: 25px; }

/* Hero */

.hero { padding: clamp(3rem, 6vw, 5.5rem) 0 var(--s4); overflow: hidden; }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.75rem, 5.6vw, 5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.035em;
}

.hero__lead {
    max-width: 36rem;
    margin-top: var(--s3);
    font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
    line-height: 1.5;
    color: var(--muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: var(--s4);
}

.hero__phones {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero__phones .phone--main { position: relative; z-index: 2; width: 46%; max-width: 270px; }
.hero__phones .phone--side { width: 38%; max-width: 222px; opacity: var(--phone-side); }
.hero__phones .phone--side:first-child { margin-right: -12%; }
.hero__phones .phone--side:last-child { margin-left: -12%; }

.facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s3);
    margin: var(--s6) 0 0;
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
}
.facts dt {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.facts dd { margin: 0.125rem 0 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.4; }

/* Sections */

.section { padding: var(--s7) 0; }
.section--raise { background: var(--raise); }
#apps { padding-top: var(--s5); }

.section-head { max-width: 44rem; margin-bottom: var(--s5); }
.section-head__note { margin-top: var(--s2); color: var(--muted); }

.section-head--row {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--s2) var(--s5);
}
.section-head--row .section-head__note { max-width: 24rem; margin-top: 0; }

/* Latest apps */

.app__screen {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.app__kind { font-size: 0.875rem; font-weight: 500; color: var(--accent); margin-bottom: var(--s1); }
.app h3 span[lang="bn"] { color: var(--muted); font-weight: 500; font-size: 0.75em; margin-left: 0.25em; }
.app__desc { margin-top: 0.5rem; color: var(--muted); }

.app--lead {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--s4);
    background: var(--raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.app--lead .app__screen .phone { max-width: 320px; margin: 0 auto; }
.app--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.app--reverse .app__screen { order: 2; }
.app--lead h3 { font-size: clamp(2rem, 3.6vw, 3rem); }
.app--lead .app__desc { font-size: 1.1875rem; max-width: 34rem; }

.checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--s4);
    margin-top: var(--s4);
    border-top: 1px solid var(--line);
}
.checklist li {
    padding: 0.625rem 0 0.625rem 1.5rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.9375rem;
    position: relative;
}
.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--accent);
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s4);
}

.app-grid .app {
    display: flex;
    flex-direction: column;
    background: var(--raise);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.app-grid .app__screen {
    height: clamp(300px, 34vw, 400px);
    padding-top: var(--s5);
    overflow: hidden;
    background: var(--raise-2);
    border-bottom: 1px solid var(--line);
}
.app-grid .app__screen .phone {
    width: min(62%, 250px);
    margin: 0 auto;
    transition: transform .25s ease;
}
.app-grid .app__screen:hover .phone { transform: translateY(-6px); }

.app-grid .app__body { padding: var(--s4); }

.tags { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s3); }
.tags li {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
}

/* Experience */

.experience {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--s6);
    align-items: start;
}

.timeline { margin: 0; padding: 0; list-style: none; }

.role { position: relative; padding: 0 0 var(--s5) 2.25rem; }
.role:last-child { padding-bottom: 0; }
.role::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.25rem;
    bottom: 0;
    width: 2px;
    background: var(--line-strong);
}
.role:last-child::before { display: none; }
.role::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--raise);
    border: 2px solid var(--line-strong);
}
.role--current::after { background: var(--accent); border-color: var(--accent); }

.role__when { font-size: 0.875rem; color: var(--muted); }
.role h3 { margin-top: 0.375rem; font-size: clamp(1.375rem, 2.2vw, 1.75rem); }

.role__org {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    margin-top: 0.375rem;
    font-weight: 500;
}
.role__badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.625rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
}

.role__points { margin-top: 0.75rem; }
.role__points li {
    position: relative;
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    color: var(--muted);
}
.role__points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 0.5rem;
    height: 2px;
    background: var(--line-strong);
}

.award {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.award__media {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: zoom-in;
}
.award__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: opacity .15s; }
.award__media:hover img { opacity: .92; }
.award__body { padding: var(--s3) var(--s4) var(--s4); }
.award__kind { font-size: 0.875rem; font-weight: 500; color: var(--accent); margin-bottom: var(--s1); }
.award h3 { font-size: 1.625rem; }
.award__body p:not(.award__kind) { margin-top: 0.625rem; color: var(--muted); }

/* Earlier work */

.earlier {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s3);
}

.tile {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: zoom-in;
}
.tile img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #fff;
    border-radius: var(--radius);
}
.tile__title { display: block; margin-top: 0.875rem; font-weight: 600; line-height: 1.3; }
.tile__meta { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); }
.tile:hover .tile__title { text-decoration: underline; text-underline-offset: 4px; }

.archive { margin-top: var(--s6); }

.archive__head {
    font-size: 1.25rem;
    padding-bottom: var(--s2);
    border-bottom: 1px solid var(--line-strong);
}
.archive__count { color: var(--muted); font-weight: 500; margin-left: 0.25rem; }

.archive__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s5);
}

.archive__item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s2);
    width: 100%;
    padding: 0.75rem 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    text-align: left;
    cursor: zoom-in;
}
.archive__item img {
    width: 88px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    background: #fff;
}
.archive__title { font-weight: 500; }
.archive__stack { font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.archive__item:hover .archive__title { text-decoration: underline; text-underline-offset: 4px; }

.archive__more { margin-top: var(--s4); }

.freelance {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--s5);
    margin-top: var(--s6);
    padding-top: var(--s5);
    border-top: 1px solid var(--line);
}
.freelance__intro h3 { font-size: 1.25rem; }
.freelance__intro p { margin-top: 0.75rem; color: var(--muted); }

.freelance__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s2);
}

.shot {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}
.shot img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    background: #fff;
    transition: opacity .15s;
}
.shot:hover img { opacity: .85; }

/* About */

.about {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.about__portrait {
    margin: 0;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--raise-2);
}
.about__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.about__text p:not(.eyebrow) { max-width: 38rem; margin-top: var(--s2); color: var(--muted); }

.skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 var(--s4);
    margin: var(--s5) 0 0;
}
.skills div { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.skills .skills__current { grid-column: 1 / -1; }
.skills dt { font-size: 0.875rem; color: var(--muted); }
.skills dd { margin: 0.25rem 0 0; font-weight: 500; }

/* Contact */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--s6);
}

.contact__sub { margin-top: var(--s2); color: var(--muted); font-size: 1.125rem; }

.contact__list { margin-top: var(--s5); }
.contact__list li {
    display: flex;
    flex-direction: column;
    padding: var(--s2) 0;
    border-top: 1px solid var(--line);
    font-size: 1.125rem;
}
.contact__list span { font-size: 0.875rem; color: var(--muted); }
.contact__list a { text-decoration: none; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--accent); }

.form { display: grid; gap: var(--s3); align-content: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.field { display: grid; gap: 0.5rem; }
.field label { font-size: 0.9375rem; font-weight: 500; }

.field input,
.field textarea {
    width: 100%;
    padding: 0.8125rem 0.875rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:hover,
.field textarea:hover { border-color: var(--field-hover); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--accent); }
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--danger); }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.form__status { font-size: 0.9375rem; }
.form__status.is-success,
.form__status.is-error {
    flex-basis: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid currentColor;
    border-radius: var(--radius);
}
.form__status.is-success { color: var(--accent); }
.form__status.is-error { color: var(--danger); }

/* Footer */

.site-footer { padding: var(--s4) 0; font-size: 0.9375rem; border-top: 1px solid var(--line); }

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s2);
}

.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem var(--s3); }

.footer-copy {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.visitors {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0.875rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--muted);
}
.visitors__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }
.visitors__count {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.social { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.social a {
    display: inline-block;
    padding: 0.5rem 0;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    text-decoration: none;
    color: var(--muted);
    text-decoration-line: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
    transition: color .15s, text-decoration-color .15s;
}
.social a:hover { color: var(--text); text-decoration-color: var(--accent); }

/* Lightbox */

.lightbox {
    width: min(1200px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border: 0;
    background: transparent;
    color: #eeece7;
}
.lightbox::backdrop { background: rgba(5, 6, 7, 0.92); }
.lightbox figure { margin: 0; }
.lightbox img {
    width: 100%;
    max-height: calc(100vh - 8rem);
    object-fit: contain;
    border-radius: 6px;
}
.lightbox figcaption { margin-top: 0.75rem; font-size: 0.9375rem; text-align: center; }

.lightbox__controls {
    display: flex;
    justify-content: center;
    gap: var(--s1);
    margin-top: var(--s2);
}
.lightbox__controls button {
    min-width: 44px;
    min-height: 44px;
    padding: 0 var(--s2);
    background: #1c1f23;
    border: 1px solid #3a3e44;
    border-radius: 999px;
    color: #eeece7;
    cursor: pointer;
}
.lightbox__controls button:hover { border-color: #eeece7; }
.lightbox :focus-visible { outline-color: #9be0bf; }
.lightbox__controls button[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .app-grid .app__screen .phone { transition: none; }
    .app-grid .app__screen:hover .phone { transform: none; }
}

/* Responsive */

@media (max-width: 1024px) {
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .earlier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .hero__grid { grid-template-columns: 1fr; }
    .hero__phones { max-width: 520px; margin: 0 auto; width: 100%; }
    .app--lead { grid-template-columns: 1fr; }
    .app--reverse .app__screen { order: 0; }
    .app--lead .app__screen .phone { max-width: 280px; }
    .archive__list { grid-template-columns: 1fr; }
    .experience { grid-template-columns: 1fr; gap: var(--s5); }
    .award { max-width: 480px; }
    .freelance,
    .about,
    .contact { grid-template-columns: 1fr; gap: var(--s5); }
    .about__portrait { max-width: 420px; }
}

@media (max-width: 680px) {
    body { font-size: 1rem; }
    .nav__hide-sm { display: none; }
    .nav a { padding: 0 0.5rem; }
    .nav .nav__cta { margin-left: 0.25rem; }
    .wordmark { font-size: 1.125rem; }
    .toggle--lang { min-width: 0; }
    html[lang="bn"] .hero h1 { font-size: clamp(2rem, 9vw, 2.5rem); }
    .hero { padding-top: var(--s4); }
    .hero h1 { font-size: clamp(2.375rem, 11vw, 3rem); }
    .hero__actions .btn { flex: 1 1 100%; }
    .facts { margin-top: var(--s5); gap: var(--s3) var(--s2); }
    .facts dt { font-size: 1.25rem; }
    .app--lead { padding: var(--s4) var(--s3); }
    .app--lead .app__desc { font-size: 1.0625rem; }
    .checklist { grid-template-columns: 1fr; }
    .app-grid { grid-template-columns: 1fr; gap: var(--s3); }
    .app-grid .app__screen { height: 340px; padding-top: var(--s4); }
    .app-grid .app__body { padding: var(--s3); }
    .earlier { gap: var(--s4) var(--s2); }
    .archive__item { grid-template-columns: 80px minmax(0, 1fr); row-gap: 0; }
    .archive__item img { width: 80px; height: 45px; grid-row: span 2; }
    .archive__stack { grid-column: 2; }
    .archive__more { width: 100%; }
    .freelance__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills { grid-template-columns: 1fr; }
    .form__row { grid-template-columns: 1fr; }
    .form__foot .btn { width: 100%; }
    .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
