/* ===========================================================================
   Ahmad Shamsul Anwar - Civil Engineering Portfolio
   Public stylesheet

   Structure:
     1.  Design tokens
     2.  Reset and base
     3.  Layout helpers
     4.  Typography
     5.  Buttons
     6.  Header and navigation
     7.  Hero
     8.  Hero statistics
     9.  Quick navigation panel
     10. Section headings
     11. Cards
     12. Academics
     13. Gallery and lightbox
     14. Contact
     15. States (empty / error / flash)
     16. Footer
     17. Animation
     18. Print
   =========================================================================== */


/* ---------------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------------- */
:root {
    /* Navy ground */
    --navy-950: #020d1a;
    --navy-900: #061525;
    --navy-850: #08172a;
    --navy-800: #0a1b2d;
    --navy-700: #10263d;
    --navy-600: #16324f;

    /* Gold accent */
    --gold-300: #ffd980;
    --gold-400: #ffc04d;
    --gold-500: #f5aa18;
    --gold-600: #d18f0c;

    /* Neutrals */
    --white:      #ffffff;
    --mist-100:   #f8f9fb;
    --mist-200:   #f4f5f7;
    --mist-300:   #e6e9ee;
    --grey-muted: #a8b0ba;
    --grey-body:  #5b6675;
    --ink:        #0b1220;

    /* Feedback */
    --success: #2f9e6b;
    --warning: #e0a11a;
    --danger:  #d4483b;

    /* Elevation */
    --shadow-card:       0 2px 12px -4px rgba(2, 13, 26, .12);
    --shadow-card-hover: 0 18px 40px -16px rgba(2, 13, 26, .28);
    --shadow-panel:      0 30px 70px -28px rgba(2, 13, 26, .45);
    --shadow-gold:       0 12px 30px -12px rgba(245, 170, 24, .45);

    /* Shape */
    --radius-sm:    6px;
    --radius-card:  14px;
    --radius-panel: 24px;

    /* Rhythm */
    --header-height: 88px;
    --gutter:        clamp(1.25rem, 4vw, 3rem);
    --container:     1280px;

    /* Motion */
    --ease: cubic-bezier(.22, 1, .36, 1);
}


/* ---------------------------------------------------------------------------
   2. Reset and base
   --------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    min-height: 100dvh;
    background: var(--navy-950);
    color: var(--white);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
}

img { height: auto; }

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol { list-style: none; padding: 0; }

/* Focus is always visible, and never communicated by colour alone */
:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 3px;
    border-radius: 3px;
}

::selection {
    background: var(--gold-500);
    color: var(--navy-950);
}

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    padding: .7rem 1.3rem;
    background: var(--gold-500);
    color: var(--navy-950);
    font-weight: 700;
    font-size: .875rem;
    border-radius: var(--radius-sm);
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }


/* ---------------------------------------------------------------------------
   3. Layout helpers
   --------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container--narrow { max-width: 820px; }
.container--wide   { max-width: 1440px; }

.section       { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight{ padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--light{ background: var(--mist-200); color: var(--ink); }
.section--white{ background: var(--white); color: var(--ink); }

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }


/* ---------------------------------------------------------------------------
   4. Typography
   --------------------------------------------------------------------------- */
h1, h2, h3, h4 {
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    text-wrap: balance;
}

p { text-wrap: pretty; }

.eyebrow {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold-500);
}

.gold-rule {
    display: block;
    width: 64px;
    height: 2px;
    background: var(--gold-500);
    border: 0;
}

.dot-gold { color: var(--gold-500); }

.lead {
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    color: var(--grey-muted);
    line-height: 1.75;
}
.section--light .lead,
.section--white .lead { color: var(--grey-body); }

/* Rich text coming from the admin editor */
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose ul { list-style: disc; padding-left: 1.35rem; }
.prose ol { list-style: decimal; padding-left: 1.35rem; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--gold-600); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 700; }

.icon { flex: none; }


/* ---------------------------------------------------------------------------
   5. Buttons
   --------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: .95rem 1.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s var(--ease),
                border-color .2s var(--ease),
                color .2s var(--ease),
                transform .2s var(--ease),
                box-shadow .2s var(--ease);
}

.btn--primary {
    background: var(--gold-500);
    color: var(--navy-950);
    box-shadow: var(--shadow-gold);
}
.btn--primary:hover { background: var(--gold-400); transform: translateY(-2px); }

.btn--secondary {
    border-color: rgba(245, 170, 24, .7);
    color: var(--gold-500);
    background: transparent;
}
.btn--secondary:hover {
    border-color: var(--gold-400);
    background: rgba(245, 170, 24, .1);
    color: var(--gold-400);
}

.btn--light {
    background: var(--white);
    color: var(--navy-900);
    border-color: rgba(2, 13, 26, .12);
    box-shadow: var(--shadow-card);
}
.btn--light:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

.btn--ghost { color: var(--white); }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }

.btn--sm  { padding: .7rem 1.1rem; font-size: .6875rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }


/* ---------------------------------------------------------------------------
   6. Header and navigation
   --------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(2, 13, 26, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

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

/* --- Brand --- */
.brand {
    display: flex;
    align-items: center;
    gap: .9rem;
    flex: none;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--gold-500);
    border-radius: 10px;
    color: var(--gold-500);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: .06em;
    flex: none;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

.brand__name {
    display: block;
    font-size: .9375rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.25;
}
.brand__role {
    display: block;
    font-size: .625rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-500);
    line-height: 1.4;
}

/* --- Desktop navigation --- */
.nav { display: none; }

.nav__list {
    display: flex;
    align-items: center;
    gap: clamp(.6rem, 1.4vw, 1.5rem);
}

.nav__link {
    position: relative;
    display: block;
    padding: .45rem .1rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
    transition: color .2s var(--ease);
}
.nav__link:hover { color: var(--white); }

/* Gold indicator on the active page */
.nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--gold-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease);
}
.nav__link:hover::after { transform: scaleX(1); }

.nav__link[aria-current="page"] {
    color: var(--gold-500);
}
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: .75rem; flex: none; }
.header__cv { display: none; }

/* --- Mobile toggle --- */
.nav-toggle {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--gold-500); color: var(--gold-500); }

/* --- Mobile drawer --- */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: grid;
    grid-template-rows: auto 1fr;
    background: var(--navy-950);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .32s var(--ease), visibility .32s;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.mobile-nav[data-open="true"] { transform: none; visibility: visible; }

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-height);
    padding-inline: var(--gutter);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.mobile-nav__body {
    padding: 1.75rem var(--gutter) 2.5rem;
    display: flex;
    flex-direction: column;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1rem .25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    font-size: .9375rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .85);
}
.mobile-nav__link svg { color: var(--gold-500); }
.mobile-nav__link[aria-current="page"] { color: var(--gold-500); }

.mobile-nav__cv { margin-top: 1.75rem; }

body[data-scroll-locked="true"] { overflow: hidden; }

@media (min-width: 1080px) {
    .nav          { display: block; }
    .header__cv   { display: inline-flex; }
    .nav-toggle   { display: none; }
    .mobile-nav   { display: none; }
}


/* ---------------------------------------------------------------------------
   7. Hero
   --------------------------------------------------------------------------- */
.hero {
    position: relative;
    background: var(--navy-950);
    overflow: hidden;
}

/* Faint engineering grid on the dark side */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 68px 68px;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    gap: clamp(2rem, 5vw, 3.5rem);
    padding-block: clamp(3rem, 7vw, 5.5rem);
    align-items: center;
}

.hero__eyebrow { margin-bottom: 1.25rem; }

.hero__title {
    font-size: clamp(2.4rem, 7.2vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -.03em;
}

.hero__rule { margin-block: clamp(1.5rem, 3vw, 2rem); }

.hero__text {
    max-width: 46ch;
    font-size: clamp(.9375rem, 1.5vw, 1.0625rem);
    color: var(--grey-muted);
    line-height: 1.8;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .9rem;
    margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

/* Image side */
.hero__media {
    position: relative;
    border-radius: var(--radius-panel);
    overflow: hidden;
    box-shadow: var(--shadow-panel);
    aspect-ratio: 4 / 3;
    background: var(--navy-800);
}
.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Placeholder shown until a hero image is uploaded */
.hero__media--empty {
    display: grid;
    place-items: center;
    background:
        radial-gradient(120% 80% at 70% 20%, rgba(245, 170, 24, .14), transparent 60%),
        linear-gradient(160deg, var(--navy-800), var(--navy-950));
    border: 1px solid rgba(255, 255, 255, .08);
}
.hero__media-note {
    text-align: center;
    color: var(--grey-muted);
    font-size: .8125rem;
    padding: 2rem;
    max-width: 32ch;
}
.hero__media-note svg { margin: 0 auto .75rem; color: var(--gold-500); }

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.05fr .95fr;
        gap: clamp(2.5rem, 5vw, 4.5rem);
    }
}


/* ---------------------------------------------------------------------------
   8. Hero statistics
   --------------------------------------------------------------------------- */
.stats {
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: var(--navy-900);
}

.stats__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.stat {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: clamp(1.4rem, 3vw, 2.1rem) clamp(1rem, 2.5vw, 1.75rem);
    border-right: 1px solid rgba(255, 255, 255, .07);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.stat:nth-child(2n) { border-right: 0; }

.stat__icon {
    display: grid;
    place-items: center;
    width: 42px; height: 42px;
    border: 1px solid rgba(245, 170, 24, .38);
    border-radius: 10px;
    color: var(--gold-500);
    flex: none;
}

.stat__value {
    display: block;
    font-size: clamp(1.25rem, 2.6vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.stat__label {
    display: block;
    font-size: .75rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--grey-muted);
    margin-top: .2rem;
}
.stat__desc {
    display: block;
    font-size: .8125rem;
    color: var(--grey-muted);
    margin-top: .35rem;
}

@media (min-width: 760px) {
    .stats__list { grid-template-columns: repeat(4, 1fr); }
    .stat { border-bottom: 0; }
    .stat:nth-child(2n) { border-right: 1px solid rgba(255, 255, 255, .07); }
    .stat:last-child    { border-right: 0; }
}


/* ---------------------------------------------------------------------------
   9. Quick navigation panel (the white rounded card)
   --------------------------------------------------------------------------- */
.quicknav { background: var(--navy-950); padding-block: clamp(2.5rem, 6vw, 4.5rem); }

.quicknav__panel {
    background: var(--white);
    color: var(--ink);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow-panel);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.quicknav__grid {
    display: grid;
    gap: clamp(.75rem, 2vw, 1.25rem);
    grid-template-columns: 1fr;
}

.quickcard {
    display: block;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
    border: 1px solid var(--mist-300);
    border-radius: var(--radius-card);
    background: var(--white);
    transition: transform .25s var(--ease),
                box-shadow .25s var(--ease),
                border-color .25s var(--ease);
}
.quickcard:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(245, 170, 24, .55);
}

.quickcard__icon {
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--mist-200);
    color: var(--navy-800);
    margin-bottom: 1.1rem;
    transition: background-color .25s var(--ease), color .25s var(--ease);
}
.quickcard:hover .quickcard__icon {
    background: var(--gold-500);
    color: var(--navy-950);
}

.quickcard__title {
    font-size: .875rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--navy-900);
}

.quickcard__rule {
    width: 34px;
    height: 2px;
    background: var(--gold-500);
    margin-block: .8rem;
    transition: width .25s var(--ease);
}
.quickcard:hover .quickcard__rule { width: 56px; }

.quickcard__text {
    font-size: .875rem;
    line-height: 1.65;
    color: var(--grey-body);
}

.quickcard__more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-600);
}

@media (min-width: 640px)  { .quicknav__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .quicknav__grid { grid-template-columns: repeat(3, 1fr); } }


/* ---------------------------------------------------------------------------
   10. Section headings
   --------------------------------------------------------------------------- */
.heading { margin-bottom: clamp(2rem, 4vw, 3rem); }
.heading--center { text-align: center; }
.heading--center .gold-rule { margin-inline: auto; }

.heading__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    margin-top: .75rem;
}
.section--light .heading__title,
.section--white .heading__title { color: var(--navy-900); }

.heading .gold-rule { margin-top: 1.25rem; }
.heading__text { margin-top: 1.25rem; max-width: 62ch; }
.heading--center .heading__text { margin-inline: auto; }


/* ---------------------------------------------------------------------------
   11. Cards
   --------------------------------------------------------------------------- */
.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--mist-300);
    border-radius: var(--radius-card);
    overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.card--dark {
    background: var(--navy-900);
    color: var(--white);
    border-color: rgba(255, 255, 255, .09);
}

.card__media {
    aspect-ratio: 16 / 10;
    background: var(--mist-200);
    overflow: hidden;
}
.card--dark .card__media { background: var(--navy-800); }
.card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.card:hover .card__media img { transform: scale(1.05); }

.card__media--empty {
    display: grid;
    place-items: center;
    color: var(--grey-muted);
}

.card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: clamp(1.1rem, 2.2vw, 1.6rem);
}

.card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-bottom: .75rem;
}

.card__title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.35;
}
.card--dark .card__title { color: var(--white); }

.card__text {
    margin-top: .65rem;
    font-size: .9375rem;
    line-height: 1.65;
    color: var(--grey-body);
}
.card--dark .card__text { color: var(--grey-muted); }

.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.1rem;
}

.card__more {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold-600);
}
.card--dark .card__more { color: var(--gold-500); }

/* Small labels */
.tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .7rem;
    border-radius: 999px;
    background: var(--mist-200);
    color: var(--grey-body);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.card--dark .tag { background: rgba(255, 255, 255, .08); color: var(--grey-muted); }

.tag--gold  { background: rgba(245, 170, 24, .16); color: var(--gold-600); }
.tag--sample{ background: rgba(224, 161, 26, .16); color: #8a6203; }
.card--dark .tag--gold { background: rgba(245, 170, 24, .18); color: var(--gold-400); }

/* Timeline used by Activities */
.timeline { position: relative; display: grid; gap: 1.25rem; }
.timeline::before {
    content: "";
    position: absolute;
    left: 19px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--gold-500), rgba(245, 170, 24, .12));
}
.timeline__item { position: relative; padding-left: 3.25rem; }
.timeline__dot {
    position: absolute;
    left: 8px; top: 6px;
    display: grid; place-items: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--navy-950);
    border: 2px solid var(--gold-500);
    color: var(--gold-500);
}
.section--light .timeline__dot { background: var(--mist-200); }

@media (min-width: 700px) {
    .timeline__item { padding-left: 3.75rem; }
}


/* ---------------------------------------------------------------------------
   12. Academics
   --------------------------------------------------------------------------- */
.subject {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    background: var(--white);
    border: 1px solid var(--mist-300);
    border-left: 3px solid var(--gold-500);
    border-radius: var(--radius-card);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.subject:hover { transform: translateX(3px); box-shadow: var(--shadow-card); }

.subject__name {
    font-weight: 700;
    color: var(--navy-900);
    font-size: 1rem;
}
.subject__desc {
    font-size: .8125rem;
    color: var(--grey-body);
    margin-top: .2rem;
}
.subject__grade {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding-inline: .6rem;
    border-radius: 10px;
    background: var(--navy-900);
    color: var(--gold-500);
    font-weight: 800;
    font-size: 1rem;
    flex: none;
}
.subject__grade--empty {
    background: var(--mist-200);
    color: var(--grey-muted);
    font-size: .75rem;
    font-weight: 600;
}

/* Skill bars on the About page */
.skill + .skill { margin-top: 1rem; }
.skill__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .875rem;
    margin-bottom: .45rem;
}
.skill__name { font-weight: 600; }
.skill__cat  { color: var(--grey-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.skill__track {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
}
.section--light .skill__track { background: var(--mist-300); }
.skill__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold-600), var(--gold-400));
}


/* ---------------------------------------------------------------------------
   13. Gallery and lightbox
   --------------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    gap: clamp(.6rem, 1.6vw, 1rem);
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--navy-800);
    cursor: zoom-in;
    aspect-ratio: 1;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item__caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 2.5rem .9rem .9rem;
    background: linear-gradient(transparent, rgba(2, 13, 26, .88));
    color: var(--white);
    font-size: .8125rem;
    font-weight: 600;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.gallery-item:hover .gallery-item__caption,
.gallery-item:focus-visible .gallery-item__caption { opacity: 1; transform: none; }

/* Filter buttons */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.75rem;
}
.filter {
    padding: .55rem 1.1rem;
    border: 1px solid var(--mist-300);
    border-radius: 999px;
    background: var(--white);
    color: var(--grey-body);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s var(--ease);
}
.filter:hover { border-color: var(--gold-500); color: var(--navy-900); }
.filter[aria-pressed="true"] {
    background: var(--navy-900);
    border-color: var(--navy-900);
    color: var(--gold-500);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    place-items: center;
    padding: clamp(1rem, 4vw, 3rem);
    background: rgba(2, 13, 26, .96);
    backdrop-filter: blur(6px);
}
.lightbox[data-open="true"] { display: grid; }

.lightbox__figure {
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.lightbox__img {
    max-width: 100%;
    max-height: 72vh;
    margin-inline: auto;
    object-fit: contain;
    border-radius: var(--radius-card);
}
.lightbox__caption {
    text-align: center;
    color: var(--grey-muted);
    font-size: .875rem;
}
.lightbox__caption strong { display: block; color: var(--white); font-size: 1rem; margin-bottom: .2rem; }

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    background: rgba(2, 13, 26, .6);
    color: var(--white);
    cursor: pointer;
    transition: all .2s var(--ease);
}
.lightbox__btn:hover { border-color: var(--gold-500); color: var(--gold-500); }
.lightbox__btn--close { top: clamp(1rem, 3vw, 2rem); right: clamp(1rem, 3vw, 2rem); }
.lightbox__btn--prev  { left: clamp(.5rem, 2vw, 2rem);  top: 50%; transform: translateY(-50%); }
.lightbox__btn--next  { right: clamp(.5rem, 2vw, 2rem); top: 50%; transform: translateY(-50%); }

.lightbox__count {
    position: absolute;
    bottom: clamp(1rem, 3vw, 2rem);
    left: 50%;
    transform: translateX(-50%);
    font-size: .75rem;
    letter-spacing: .14em;
    color: var(--grey-muted);
}


/* ---------------------------------------------------------------------------
   14. Contact
   --------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 900px) {
    .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.field { margin-bottom: 1.25rem; }
.field__label {
    display: block;
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}
.field__req { color: var(--gold-500); }

.input,
.textarea {
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-sm);
    background: var(--navy-800);
    color: var(--white);
    transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.input::placeholder,
.textarea::placeholder { color: rgba(168, 176, 186, .65); }
.input:focus,
.textarea:focus { border-color: var(--gold-500); background: var(--navy-850); }

.textarea { min-height: 150px; resize: vertical; }

.section--light .input,
.section--light .textarea,
.section--white .input,
.section--white .textarea {
    background: var(--white);
    border-color: var(--mist-300);
    color: var(--ink);
}

.field__error {
    display: block;
    margin-top: .4rem;
    font-size: .8125rem;
    color: var(--danger);
}
.input[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--danger); }

/* Honeypot - hidden from people, visible to bots */
.hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0;
    height: 0;
    width: 0;
}

.contact-list { display: grid; gap: 1rem; }
.contact-row {
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: 1.05rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-card);
    background: var(--navy-900);
}
.contact-row__icon {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: rgba(245, 170, 24, .13);
    color: var(--gold-500);
    flex: none;
}
/* Icon + value only - the caption is screen-reader-only, see contact.php */
.contact-row__value {
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -.01em;
    word-break: break-word;
    transition: color .2s var(--ease);
}
a.contact-row__value:hover { color: var(--gold-500); }

.social-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.social-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: all .2s var(--ease);
}
.social-link:hover { border-color: var(--gold-500); color: var(--gold-500); }


/* ---------------------------------------------------------------------------
   15. States
   --------------------------------------------------------------------------- */
.state {
    display: grid;
    place-items: center;
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: var(--radius-panel);
    background: rgba(6, 21, 37, .5);
}
.section--light .state,
.section--white .state {
    border-color: var(--mist-300);
    background: var(--mist-100);
}

.state__icon {
    display: grid; place-items: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    color: var(--gold-500);
    margin-bottom: 1.1rem;
}
.section--light .state__icon,
.section--white .state__icon { background: var(--white); }

.state__title { font-size: 1.125rem; font-weight: 700; }
.section--light .state__title,
.section--white .state__title { color: var(--navy-900); }
.state__text {
    margin-top: .5rem;
    max-width: 40ch;
    font-size: .9375rem;
    color: var(--grey-muted);
}
.section--light .state__text,
.section--white .state__text { color: var(--grey-body); }

.state--error { border-style: solid; border-color: rgba(212, 72, 59, .4); background: rgba(212, 72, 59, .07); }
.state--error .state__icon { color: var(--danger); background: rgba(212, 72, 59, .12); }

/* Flash messages */
.flash { display: grid; gap: .75rem; margin-bottom: 1.75rem; }
.flash__item {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-card);
    border: 1px solid;
    font-size: .9375rem;
}
.flash__item--success { background: rgba(47, 158, 107, .1);  border-color: rgba(47, 158, 107, .45); }
.flash__item--error   { background: rgba(212, 72, 59, .1);   border-color: rgba(212, 72, 59, .45); }
.flash__item--info    { background: rgba(245, 170, 24, .1);  border-color: rgba(245, 170, 24, .45); }
.flash__item--success svg { color: var(--success); }
.flash__item--error svg   { color: var(--danger); }
.flash__item--info svg    { color: var(--gold-500); }


/* ---------------------------------------------------------------------------
   16. Footer
   --------------------------------------------------------------------------- */
.site-footer {
    background: var(--navy-900);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: clamp(2.5rem, 6vw, 4rem);
}

.footer__grid {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 800px) {
    .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 1.1rem;
}

.footer__text {
    margin-top: 1.1rem;
    max-width: 40ch;
    font-size: .875rem;
    color: var(--grey-muted);
    line-height: 1.75;
}

.footer__list { display: grid; gap: .7rem; }
.footer__link {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .875rem;
    color: var(--grey-muted);
    transition: color .2s var(--ease);
    word-break: break-word;
}
.footer__link:hover { color: var(--gold-500); }
.footer__link svg { color: var(--gold-500); flex: none; }

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-block: 1.5rem;
    text-align: center;
    font-size: .8125rem;
    color: var(--grey-muted);
}


/* ---------------------------------------------------------------------------
   17. Animation
   --------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Never let animation get in the way of using the site */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] { opacity: 1; transform: none; }
    .mobile-nav { transition: none; }
}


/* ---------------------------------------------------------------------------
   18. Print
   --------------------------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .mobile-nav, .lightbox, .filters, .btn { display: none !important; }
    body { background: #fff; color: #000; }
    .section { padding-block: 1rem; }
}
