/* Ngo Hoang Nguyen theme — About page (0.9.0).
 *
 * The page reads as one day: a daylight half (sans, web work), a dusk band
 * holding the motto, a night half (serif, the reading corner). The colour
 * change is the structure, so it is drawn with backgrounds, not motion.
 * Light scheme is default; the dark scheme keeps the day/night order but
 * starts the day at twilight so the page never flashes white.
 */

.nhn-about,
.nhn-contact {
    --ab-day: #eef3f9;
    --ab-day-ink: #17212e;
    --ab-day-soft: #4a5868;
    --ab-day-link: #0b5aa8;
    --ab-tile: #ffffff;
    --ab-tile-line: #dbe4ee;
    --ab-dusk-1: #c9d5e6;
    --ab-dusk-2: #e8c3a0;
    --ab-dusk-3: #6f6f93;
    --ab-night: #13213a;
    --ab-night-ink: #e4e9f1;
    --ab-night-soft: #aab6c9;
    --ab-lamp: #f2bd6b;
    --ab-rule: rgba(228, 233, 241, 0.16);
    --ab-serif: var(--nhn-font-reading, "Noto Serif", Cambria, Georgia, serif);
    --ab-sans: var(--nhn-font-body);
    --ab-gutter: clamp(1rem, 0.4rem + 3vw, 3.5rem);

    display: block;
    color: var(--ab-day-ink);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) :is(.nhn-about, .nhn-contact) {
        --ab-day: #1b2738;
        --ab-day-ink: #e8edf4;
        --ab-day-soft: #b3bfcf;
        --ab-day-link: #8cc4ff;
        --ab-tile: #223147;
        --ab-tile-line: #2f415b;
        --ab-dusk-1: #1d2a3d;
        --ab-dusk-2: #4a3a3c;
        --ab-dusk-3: #182540;
        --ab-night: #0f1a2e;
    }
}

[data-theme="dark"] :is(.nhn-about, .nhn-contact) {
    --ab-day: #1b2738;
    --ab-day-ink: #e8edf4;
    --ab-day-soft: #b3bfcf;
    --ab-day-link: #8cc4ff;
    --ab-tile: #223147;
    --ab-tile-line: #2f415b;
    --ab-dusk-1: #1d2a3d;
    --ab-dusk-2: #4a3a3c;
    --ab-dusk-3: #182540;
    --ab-night: #0f1a2e;
}

/* Full-bleed like the CV hero: release the prose framing on <main>. */
body:not(:has(.site-header)) main:has(> :is(.nhn-about, .nhn-contact)),
main:has(> :is(.nhn-about, .nhn-contact)) {
    max-inline-size: none;
    margin-inline: 0;
    padding: 0;
}

/* The night runs straight into the footer. */
main:has(> :is(.nhn-about, .nhn-contact)) ~ footer {
    margin-block-start: 0;
}

.nhn-about__wrap {
    max-inline-size: 68rem;
    margin-inline: auto;
    padding-inline: var(--ab-gutter);
}

/* The one loud element: the two halves of the motto, set huge. */
.nhn-about__line {
    margin: 0 0 clamp(1.5rem, 1rem + 2vw, 2.75rem);
    font-size: clamp(2.6rem, 1.2rem + 5.4vw, 5.6rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-wrap: balance;
    max-inline-size: 15ch;
}

.nhn-about__line--day {
    font-family: var(--ab-sans);
    font-weight: 800;
    color: var(--ab-day-ink);
}

.nhn-about__line--night {
    font-family: var(--ab-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--ab-night-ink);
    max-inline-size: 14ch;
}

.nhn-about__text {
    margin: 0 0 1.1em;
    max-inline-size: 36rem;
    font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
}

.nhn-about__link {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.22em;
    transition: text-decoration-color 160ms ease;
}

.nhn-about__link:focus-visible,
.nhn-about__shelf a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---- Day ---------------------------------------------------------------- */

.nhn-about__day {
    background: var(--ab-day);
    padding-block: clamp(3.5rem, 2rem + 6vw, 7.5rem) clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

.nhn-about__day-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: end;
}

.nhn-about__day-copy {
    font-family: var(--ab-sans);
    line-height: 1.6;
}

.nhn-about__day .nhn-about__text {
    color: var(--ab-day-soft);
}

.nhn-about__day .nhn-about__text:first-of-type {
    color: var(--ab-day-ink);
    font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
    line-height: 1.45;
}

.nhn-about__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.1rem;
    margin: 1.75rem 0 0;
    padding-block-start: 1rem;
    border-block-start: 1px solid color-mix(in srgb, var(--ab-day-ink) 18%, transparent);
    max-inline-size: 36rem;
    font-size: 0.98rem;
}

.nhn-about__tools-lead {
    flex-basis: 100%;
    color: var(--ab-day-soft);
}

.nhn-about__tool {
    font-weight: 700;
    color: var(--ab-day-ink);
}

.nhn-about__ask {
    margin: 1.5rem 0 0;
    font-size: 1.05rem;
    color: var(--ab-day-soft);
}

.nhn-about__day .nhn-about__link {
    color: var(--ab-day-link);
    text-decoration-color: color-mix(in srgb, var(--ab-day-link) 40%, transparent);
}

.nhn-about__day .nhn-about__link:hover {
    text-decoration-color: var(--ab-day-link);
}

/* Portrait: a plain print, offset so it sits on the horizon line below. */
.nhn-about__portrait {
    margin: 0;
    justify-self: end;
    inline-size: min(100%, 24rem);
}

.nhn-about__portrait img {
    display: block;
    inline-size: 100%;
    block-size: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(23, 33, 46, 0.08), 0 24px 48px -24px rgba(23, 33, 46, 0.45);
}

/* Services: four plain tiles, icon over title over one line of text. */
.nhn-about__services {
    margin-block-start: clamp(3.5rem, 2rem + 4vw, 6rem);
    font-family: var(--ab-sans);
}

.nhn-about__services-title {
    margin: 0 0 1.5rem;
    font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem);
    font-weight: 700;
    color: var(--ab-day-ink);
}

.nhn-about__service-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.9rem, 0.6rem + 1vw, 1.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.nhn-about__service {
    padding: 1.75rem 1.5rem 1.6rem;
    background: var(--ab-tile);
    border: 1px solid var(--ab-tile-line);
    border-radius: 8px;
    transition: border-color 180ms ease, transform 180ms ease;
}

.nhn-about__service:hover {
    border-color: color-mix(in srgb, var(--ab-day-link) 45%, transparent);
    transform: translateY(-2px);
}

.nhn-about__service-icon {
    display: block;
    inline-size: 2.25rem;
    block-size: 2.25rem;
    margin-block-end: 1.1rem;
    color: var(--ab-day-link);
}

.nhn-about__service-name {
    margin: 0 0 0.5rem;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ab-day-ink);
}

.nhn-about__service-text {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.6;
    color: var(--ab-day-soft);
}

/* ---- Dusk --------------------------------------------------------------- */

.nhn-about__dusk {
    background: linear-gradient(
        180deg,
        var(--ab-day) 0%,
        var(--ab-dusk-1) 22%,
        var(--ab-dusk-2) 46%,
        var(--ab-dusk-3) 72%,
        var(--ab-night) 100%
    );
    padding-block: clamp(6rem, 4rem + 8vw, 11rem) clamp(3rem, 2rem + 4vw, 5.5rem);
    margin-block-end: -1px; /* no hairline seam at fractional heights */
}

.nhn-about__motto {
    margin-block: 0;
    border: 0;
}

.nhn-about__motto p {
    margin: 0;
    max-inline-size: 18ch;
    font-family: var(--ab-serif);
    font-style: italic;
    font-size: clamp(1.6rem, 1rem + 2.4vw, 2.75rem);
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 18px rgba(19, 33, 58, 0.35);
}

/* ---- Night -------------------------------------------------------------- */

.nhn-about__night {
    background: var(--ab-night);
    color: var(--ab-night-ink);
    padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(4rem, 2.5rem + 6vw, 8rem);
    font-family: var(--ab-serif);
    line-height: 1.75;
}

.nhn-about__night-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: start;
}

.nhn-about__night .nhn-about__text {
    color: var(--ab-night-soft);
}

.nhn-about__night .nhn-about__text:first-child {
    color: var(--ab-night-ink);
}

.nhn-about__night .nhn-about__link {
    color: var(--ab-lamp);
    text-decoration-color: color-mix(in srgb, var(--ab-lamp) 45%, transparent);
}

.nhn-about__night .nhn-about__link:hover {
    text-decoration-color: var(--ab-lamp);
}

/* Topics as a short shelf of titles, not a card grid. */
.nhn-about__shelf-lead {
    margin: 0.35rem 0 0.75rem;
    font-family: var(--ab-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ab-night-soft);
}

.nhn-about__shelf ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border-block-start: 1px solid var(--ab-rule);
}

.nhn-about__shelf li {
    border-block-end: 1px solid var(--ab-rule);
}

.nhn-about__shelf a {
    display: block;
    padding: 0.7rem 0;
    font-size: 1.2rem;
    color: var(--ab-night-ink);
    text-decoration: none;
    transition: color 160ms ease, padding-inline-start 160ms ease;
}

.nhn-about__shelf a:hover {
    color: var(--ab-lamp);
    padding-inline-start: 0.4rem;
}

.nhn-about__story {
    margin-block-start: clamp(2.5rem, 1.5rem + 3vw, 4rem);
    max-inline-size: 40rem;
    color: var(--ab-night-ink);
    font-size: 1.1rem;
}

.nhn-about__story :is(h2, h3) {
    color: var(--ab-night-ink);
    font-family: var(--ab-serif);
}

.nhn-about__story a {
    color: var(--ab-lamp);
}

/* Newsletter sits as a lit window on the night background. */
.nhn-about__letter {
    margin-block-start: clamp(3rem, 2rem + 3vw, 4.5rem);
}

.nhn-about__letter .home-newsletter,
.nhn-about__letter .home-newsletter--compact {
    margin: 0;
    max-inline-size: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: clamp(1.25rem, 1rem + 2vw, 3rem);
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(1.25rem, 1rem + 2.5vw, 3rem);
    border-radius: 8px;
    background: color-mix(in srgb, var(--ab-lamp) 10%, var(--ab-night));
    border: 1px solid color-mix(in srgb, var(--ab-lamp) 30%, transparent);
    color: var(--ab-night-ink);
    font-family: var(--ab-sans);
}

.nhn-about__letter .home-newsletter__title {
    color: var(--ab-night-ink);
    font-family: var(--ab-serif);
}

.nhn-about__letter .home-newsletter__title {
    margin-block-start: 0;
    font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.9rem);
}

.nhn-about__letter .home-newsletter__desc {
    margin-block-end: 0;
    color: var(--ab-night-soft);
}

.nhn-about__letter .home-newsletter__input {
    background: rgba(255, 255, 255, 0.06);
    border-color: color-mix(in srgb, var(--ab-night-ink) 22%, transparent);
    color: var(--ab-night-ink);
}

.nhn-about__letter .home-newsletter__input::placeholder {
    color: var(--ab-night-soft);
}

.nhn-about__letter .home-newsletter__btn {
    background: var(--ab-lamp);
    border-color: var(--ab-lamp);
    color: #1d1404;
}

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 991.98px) {
    .nhn-about__service-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .nhn-about__day-grid,
    .nhn-about__night-grid,
    .nhn-about__letter .home-newsletter,
    .nhn-about__letter .home-newsletter--compact {
        grid-template-columns: 1fr;
    }

    .nhn-about__portrait {
        justify-self: start;
        inline-size: min(78%, 18rem);
        order: -1;
        margin-block-end: 0.5rem;
    }

    .nhn-about__dusk {
        padding-block-start: clamp(4rem, 3rem + 6vw, 6rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .nhn-about__link,
    .nhn-about__shelf a,
    .nhn-about__service {
        transition: none;
    }

    .nhn-about__service:hover {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .nhn-about__service-list {
        grid-template-columns: 1fr;
    }
}

/* ======================================================================
 * Contact page (0.9.3): info columns, buttons, social row, then two notes
 * ====================================================================== */

.nhn-contact {
    display: block;
    background: var(--ab-day);
    color: var(--ab-day-ink);
    font-family: var(--ab-sans);
}

.nhn-contact__head {
    padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.nhn-contact__title {
    margin: 0 0 1rem;
    font-size: clamp(2.6rem, 1.2rem + 5vw, 5.2rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.035em;
    color: var(--ab-day-ink);
    text-wrap: balance;
}

.nhn-contact__lead {
    margin: 0;
    max-inline-size: 36rem;
    font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
    line-height: 1.55;
    color: var(--ab-day-soft);
}

/* Email, phone, place: three equal columns. */
.nhn-contact__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: clamp(0.9rem, 0.6rem + 1vw, 1.5rem);
    margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0;
    padding: 0;
    list-style: none;
}

.nhn-contact__info-item {
    padding: 1.6rem 1.5rem;
    background: var(--ab-tile);
    border: 1px solid var(--ab-tile-line);
    border-radius: 10px;
}

.nhn-contact__icon {
    display: block;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    margin-block-end: 1rem;
    padding: 0.68rem;
    border-radius: 50%;
    color: var(--ab-day-link);
    background: color-mix(in srgb, var(--ab-day-link) 10%, transparent);
}

.nhn-contact__info-name {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ab-day-soft);
}

.nhn-contact__info-value {
    display: inline-block;
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ab-day-ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.nhn-contact__info-value:hover {
    color: var(--ab-day-link);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

a.nhn-contact__info-value:focus-visible {
    outline: 2px solid var(--ab-day-link);
    outline-offset: 3px;
    border-radius: 2px;
}

.nhn-contact__info-note {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--ab-day-soft);
}

.nhn-contact__empty {
    margin: 2rem 0 0;
    padding: 1.4rem;
    border: 1px dashed var(--ab-tile-line);
    border-radius: 10px;
    color: var(--ab-day-soft);
}

/* Buttons on their own row. */
.nhn-contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.75rem 0 0;
}

.nhn-contact__btn--ghost {
    border: 1.5px solid color-mix(in srgb, var(--ab-day-ink) 25%, transparent);
    color: var(--ab-day-ink);
}

.nhn-contact__btn--ghost:hover {
    border-color: var(--ab-day-link);
    color: var(--ab-day-link);
}

/* Social profiles: one horizontal row of icon + name. */
.nhn-contact__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    margin-block-start: clamp(2rem, 1.5rem + 1.5vw, 2.75rem);
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--ab-tile-line);
}

.nhn-contact__social-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ab-day-soft);
}

.nhn-contact__social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nhn-contact__social-link {
    --net: var(--ab-day-link);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 0.6rem;
    background: var(--ab-tile);
    border: 1px solid var(--ab-tile-line);
    border-radius: 999px;
    color: var(--ab-day-ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease;
}

.nhn-contact__social-link svg {
    inline-size: 1.9rem;
    block-size: 1.9rem;
    padding: 0.42rem;
    border-radius: 50%;
    color: #fff;
    background: var(--net);
}

.nhn-contact__social-link:hover {
    border-color: var(--net);
    color: var(--net);
}

.nhn-contact__social-link:focus-visible {
    outline: 2px solid var(--net);
    outline-offset: 2px;
}

.nhn-contact__social-link--zalo { --net: #0068ff; }
.nhn-contact__social-link--messenger { --net: #8a3ffc; }
.nhn-contact__social-link--facebook { --net: #1877f2; }
.nhn-contact__social-link--instagram { --net: #d6246e; }
.nhn-contact__social-link--pinterest { --net: #e60023; }
.nhn-contact__social-link--x { --net: #14171a; }
.nhn-contact__social-link--youtube { --net: #ff0000; }
.nhn-contact__social-link--tiktok { --net: #111111; }

/* Notes: a day card for work, a night card for posts. */
.nhn-contact__notes {
    padding-block: clamp(1rem, 0.5rem + 2vw, 2rem) clamp(4rem, 2.5rem + 5vw, 7rem);
}

.nhn-contact__notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 0.6rem + 1.5vw, 1.75rem);
}

.nhn-contact__note {
    display: flex;
    flex-direction: column;
    padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem);
    border-radius: 10px;
}

.nhn-contact__note--day {
    background: var(--ab-tile);
    border: 1px solid var(--ab-tile-line);
}

.nhn-contact__note--night {
    background: var(--ab-night);
    color: var(--ab-night-ink);
    font-family: var(--ab-serif);
}

.nhn-contact__note-icon {
    inline-size: 2.25rem;
    block-size: 2.25rem;
    margin-block-end: 1.1rem;
    color: var(--ab-day-link);
}

.nhn-contact__note--night .nhn-contact__note-icon {
    color: var(--ab-lamp);
}

.nhn-contact__note-title {
    margin: 0 0 0.6rem;
    font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--ab-day-ink);
}

.nhn-contact__note--night .nhn-contact__note-title {
    font-family: var(--ab-serif);
    font-weight: 400;
    font-style: italic;
    color: var(--ab-night-ink);
}

.nhn-contact__note-lead {
    margin: 0 0 1rem;
    line-height: 1.6;
    color: var(--ab-day-soft);
}

.nhn-contact__note--night .nhn-contact__note-lead {
    color: var(--ab-night-soft);
}

.nhn-contact__points {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.nhn-contact__points li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.5rem;
    line-height: 1.5;
}

.nhn-contact__points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 1.15rem;
    inline-size: 0.7rem;
    block-size: 2px;
    background: var(--ab-day-link);
}

.nhn-contact__note--night .nhn-contact__points li::before {
    background: var(--ab-lamp);
}

.nhn-contact__btn {
    align-self: flex-start;
    margin-block-start: auto;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    font-family: var(--ab-sans);
    font-weight: 700;
    text-decoration: none;
    transition: filter 160ms ease, transform 160ms ease;
}

.nhn-contact__btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.nhn-contact__btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.nhn-contact__btn--day {
    background: var(--ab-day-link);
    color: #fff;
}

.nhn-contact__btn--night {
    background: var(--ab-lamp);
    color: #1d1404;
}

.nhn-contact__body {
    margin-block-start: clamp(2rem, 1.5rem + 2vw, 3rem);
    max-inline-size: 42rem;
}

@media (max-width: 991.98px) {
    .nhn-contact__notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nhn-contact__social-link,
    .nhn-contact__btn {
        transition: none;
    }

    .nhn-contact__btn:hover {
        transform: none;
    }
}
