/* =========================================================
   TONTO CREATIVES
   GLOBAL DESIGN SYSTEM
   Design · Technology · Education

   Visual direction:
   Fraunces (a warm, opinionated serif) carries headlines;
   Inter carries body copy and UI; Space Mono marks anything
   that reads like a system label. Centered, generous
   mobile layout; quiet dark surface; one restrained accent.

   Fonts are self-imported here so this file works as a
   drop-in replacement with no <head> changes required.
========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,380;9..144,500;9..144,600&family=Inter:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&family=Great+Vibes&display=swap");


/* =========================================================
   01. RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

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

button {
    cursor: pointer;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-line);
}


/* =========================================================
   02. DESIGN TOKENS
========================================================= */

:root {

    --bg: #0a0b0e;
    --bg-soft: #101217;
    --card: #121419;
    --card-hover: #171a21;

    --text: #f2f1ed;
    --text-soft: #c4c6cc;
    --text-muted: #858993;

    --accent: #5b8cff;
    --accent-bright: #78a2ff;
    --accent-soft: rgba(91, 140, 255, 0.10);
    --accent-line: rgba(91, 140, 255, 0.32);

    --gold: #d7a36a;
    --gold-soft: rgba(215, 163, 106, 0.12);
    --gold-line: rgba(215, 163, 106, 0.35);

    --border: rgba(255, 255, 255, 0.10);
    --border-soft: rgba(255, 255, 255, 0.065);

    --font-display: "Fraunces", serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "Space Mono", monospace;

    --max-width: 1180px;
    --page-width: min(var(--max-width), 90%);

    --radius: 12px;
    --radius-small: 8px;

    --transition: 0.3s ease;
}


/* =========================================================
   03. TYPOGRAPHY
========================================================= */

h1,
h2,
h3,
h4 {
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 560;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}


/* =========================================================
   04. SITE HEADER
========================================================= */

.site-header {
    width: var(--page-width);
    margin: 0 auto;
    padding: 26px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    border-bottom: 1px solid var(--border);

    position: relative;
    z-index: 20;
}

.logo {
    display: inline-flex;
    align-items: baseline;

    white-space: nowrap;

    color: var(--text);

    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 700;

    letter-spacing: 0.1em;
}

.logo span {
    margin-left: 6px;

    color: var(--gold);

    font-family: "Great Vibes", cursive;

    font-size: 1.55rem;
    font-weight: 400;

    letter-spacing: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    position: relative;

    padding: 6px 0;

    color: var(--text-muted);

    font-size: .78rem;
    font-weight: 550;

    letter-spacing: .01em;

    transition: color var(--transition);
}

.main-nav a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 0;
    height: 1px;

    background: var(--accent);

    transition: width var(--transition);
}

.main-nav a:hover {
    color: var(--text);
}

.main-nav a:hover::after {
    width: 100%;
}


/* =========================================================
   05. HERO
========================================================= */

.hero {
    position: relative;

    width: var(--page-width);

    min-height: 700px;

    margin: 0 auto;

    padding: 100px 0;

    display: grid;

    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(260px, .7fr);

    gap: 70px;

    align-items: center;

    isolation: isolate;
}

/*
   Quiet dot-grid + glow standing in for the
   "systems" side of the practice — pure CSS,
   generated on the section itself so it needs
   no extra markup.
*/

.hero::before {
    content: "";

    position: absolute;

    inset: -40px -6vw auto auto;

    width: 46vw;
    height: 560px;

    z-index: -1;

    pointer-events: none;

    background-image:
        radial-gradient(
            circle at 32px 32px,
            rgba(255, 255, 255, 0.08) 1.4px,
            transparent 1.4px
        );

    background-size: 32px 32px;

    -webkit-mask-image:
        radial-gradient(
            ellipse 60% 60% at 70% 35%,
            #000 0%,
            transparent 72%
        );

    mask-image:
        radial-gradient(
            ellipse 60% 60% at 70% 35%,
            #000 0%,
            transparent 72%
        );
}

.hero::after {
    content: "";

    position: absolute;

    top: 6%;
    right: 12%;

    width: 340px;
    height: 340px;

    z-index: -1;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            var(--accent-soft) 0%,
            transparent 70%
        );

    filter: blur(10px);

    pointer-events: none;
}

.hero-content {
    max-width: 760px;
}

.eyebrow,
.section-label {
    display: inline-block;

    margin-bottom: 18px;

    padding: 4px 10px;

    color: var(--accent-bright);

    background: var(--accent-soft);

    border: 1px solid var(--accent-line);

    border-radius: var(--radius-small);

    font-family: var(--font-mono);
    font-size: .66rem;
    font-weight: 400;

    letter-spacing: .04em;
    line-height: 1.4;
}

.hero h1 {
    margin-bottom: 28px;

    font-size: clamp(3.3rem, 7vw, 6.4rem);

    line-height: .95;

    letter-spacing: -.02em;

    font-weight: 480;
}

.hero h2 {
    max-width: 650px;

    margin-bottom: 25px;

    color: var(--text-soft);

    font-family: var(--font-body);

    font-size: clamp(1.1rem, 2vw, 1.4rem);

    font-weight: 500;

    line-height: 1.45;

    letter-spacing: -.01em;
}

.hero-description {
    max-width: 620px;

    margin-bottom: 35px;

    padding-left: 18px;

    border-left: 2px solid var(--border);

    color: var(--text-muted);

    font-size: .95rem;

    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.hero-image {
    display: flex;
    flex-direction: column;
    align-items: center;

    position: relative;
}

.hero-image::after {
    content: "Antony Mutahi";

    margin-top: 16px;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 400;

    letter-spacing: .06em;
}

.hero-image img {
    width: 300px;
    height: 300px;

    object-fit: cover;

    border-radius: 6px;

    padding: 7px;

    background:
        linear-gradient(
            160deg,
            var(--card),
            var(--bg-soft)
        );

    border: 1px solid var(--border);

    box-shadow:
        0 35px 90px rgba(0, 0, 0, .4),
        0 0 0 1px rgba(255, 255, 255, .02) inset;
}


/* =========================================================
   06. BUTTONS
========================================================= */

.btn {
    min-height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 20px;

    border-radius: var(--radius-small);

    border: 1px solid transparent;

    font-size: .78rem;
    font-weight: 650;

    letter-spacing: .01em;

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

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

.btn-secondary {
    background: transparent;

    border-color: var(--border);

    color: var(--text-soft);
}

.btn-secondary:hover {
    border-color: var(--accent-line);

    color: var(--text);

    background: var(--accent-soft);
}


/* =========================================================
   07. INTRO STATEMENT
========================================================= */

.intro-section {
    position: relative;

    width: min(850px, 90%);

    margin: 80px auto 140px;

    padding-top: 46px;

    text-align: center;
}

.intro-section::before {
    content: "\201C";

    position: absolute;

    top: -34px;
    left: 50%;

    transform: translateX(-50%);

    color: var(--gold);

    font-family: var(--font-display);
    font-size: 4.5rem;

    line-height: 1;

    opacity: .55;
}

.intro-section h2 {
    margin-bottom: 28px;

    font-size: clamp(2rem, 4.6vw, 3.6rem);

    line-height: 1.15;

    letter-spacing: -.01em;

    font-weight: 460;
}

.intro-section p:last-child {
    max-width: 680px;

    margin: 0 auto;

    color: var(--text-soft);

    font-size: .98rem;

    line-height: 1.9;
}


/* =========================================================
   08. GENERAL SECTION
========================================================= */

.section {
    width: var(--page-width);

    margin: 0 auto;

    padding: 110px 0;
}

.section-heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 50px;

    margin-bottom: 48px;

    padding-bottom: 18px;

    border-bottom: 1px solid var(--border);
}

.section-heading h2 {
    margin: 0;

    font-size: clamp(2rem, 4.2vw, 3.4rem);

    line-height: 1.03;

    letter-spacing: -.01em;

    font-weight: 460;
}

.section-heading > p {
    max-width: 380px;

    margin: 0;

    color: var(--text-muted);

    font-size: .84rem;

    line-height: 1.75;
}


/* =========================================================
   09. PORTFOLIO FILTERS
========================================================= */

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 30px;
}

.filter-btn {
    min-height: 36px;

    padding: 7px 14px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: transparent;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 400;

    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--text);

    color: var(--bg);

    border-color: var(--text);
}


/* =========================================================
   10. PORTFOLIO GRID
   (markup rendered by script.js: .portfolio-image wraps
   the img; .portfolio-info holds .portfolio-category,
   h3, .portfolio-description and .project-link)
========================================================= */

.portfolio-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.portfolio-card {
    position: relative;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 4px;

    transition:
        transform var(--transition),
        border-color var(--transition);
}

.portfolio-card:hover {
    transform: translateY(-5px);

    border-color: var(--accent-line);
}

.portfolio-image {
    overflow: hidden;
}

.portfolio-card img {
    width: 100%;

    aspect-ratio: 4 / 5;

    object-fit: cover;

    transition: transform .55s ease;
}

.portfolio-card:hover img {
    transform: scale(1.035);
}

.portfolio-info {
    padding: 18px 19px 20px;

    border-top: 1px solid var(--border-soft);
}

.portfolio-category {
    display: inline-block;

    margin-bottom: 10px;

    color: var(--accent-bright);

    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 400;

    letter-spacing: .03em;
}

.portfolio-info h3 {
    margin-bottom: 8px;

    font-size: 1.05rem;

    line-height: 1.3;

    font-weight: 500;
}

.portfolio-description {
    margin-bottom: 16px;

    color: var(--text-muted);

    font-family: var(--font-body);
    font-size: .82rem;

    line-height: 1.7;
}

.project-link {
    display: inline-flex;

    align-items: center;

    gap: .4rem;

    color: var(--text-soft);

    font-size: .72rem;
    font-weight: 700;

    transition:
        color var(--transition),
        gap var(--transition);
}

.project-link:hover {
    color: var(--accent-bright);

    gap: .6rem;
}

.project-link.disabled {
    color: var(--text-muted);

    font-weight: 500;

    pointer-events: none;
}

.portfolio-error,
.portfolio-empty {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    color: var(--text-muted);

    font-size: .88rem;

    line-height: 1.8;
}

.portfolio-error p:first-child,
.portfolio-empty p:first-child {
    color: var(--text-soft);

    font-weight: 600;

    margin-bottom: 6px;
}


/* =========================================================
   11. SERVICES
========================================================= */

.services-section {
    border-top: 1px solid var(--border);
}

.services-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 1px;

    background: var(--border);

    border: 1px solid var(--border);
}

.service-card {
    min-height: 330px;

    padding: 30px;

    display: flex;
    flex-direction: column;

    background: var(--bg);

    transition: background var(--transition);
}

.service-card:hover {
    background: var(--card);
}

.service-number {
    margin-bottom: auto;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border: 1px solid var(--gold-line);

    border-radius: 50%;

    color: var(--gold);

    background: var(--gold-soft);

    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 700;

    letter-spacing: .01em;
}

.service-card h3 {
    margin-bottom: 14px;

    font-size: 1.35rem;

    line-height: 1.2;

    font-weight: 500;
}

.service-card p {
    margin-bottom: 24px;

    color: var(--text-muted);

    font-size: .82rem;

    line-height: 1.8;
}

.service-card a {
    margin-top: auto;

    color: var(--text-soft);

    font-size: .72rem;
    font-weight: 700;

    transition: color var(--transition);
}

.service-card a:hover {
    color: var(--accent-bright);
}


/* =========================================================
   12. FEATURED PROJECT
========================================================= */

.featured-project {
    width: var(--page-width);

    margin: 80px auto 130px;

    display: grid;

    grid-template-columns:
        minmax(0, 1.25fr)
        minmax(320px, .75fr);

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 4px;
}

.featured-image {
    position: relative;

    overflow: hidden;
}

.featured-image::before {
    content: "featured";

    position: absolute;

    top: 16px;
    left: 16px;

    z-index: 2;

    padding: 4px 10px;

    background: rgba(10, 11, 14, .7);

    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    color: var(--text-soft);

    font-family: var(--font-mono);
    font-size: .64rem;
}

.featured-image img {
    width: 100%;

    height: 100%;

    min-height: 560px;

    object-fit: cover;

    transition: transform .6s ease;
}

.featured-project:hover .featured-image img {
    transform: scale(1.02);
}

.featured-content {
    padding: 55px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    margin-bottom: 12px;

    font-size: clamp(1.9rem, 3.6vw, 3.2rem);

    line-height: 1.05;

    letter-spacing: -.01em;

    font-weight: 460;
}

.featured-category {
    margin-bottom: 25px;

    color: var(--accent-bright);

    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 400;

    letter-spacing: .02em;
}

.featured-content > p:not(.section-label):not(.featured-category) {
    margin-bottom: 30px;

    color: var(--text-muted);

    font-size: .88rem;

    line-height: 1.9;
}

.text-link {
    display: inline-flex;

    align-items: center;

    gap: .45rem;

    width: fit-content;

    color: var(--text);

    font-size: .75rem;
    font-weight: 750;

    transition:
        color var(--transition),
        gap var(--transition);
}

.text-link:hover {
    color: var(--accent-bright);

    gap: .7rem;
}


/* =========================================================
   13. TEACHING
   (markup rendered by script.js: .teaching-card-image
   wraps the img; .teaching-card-content holds the
   category span, h3, p, .teaching-level, .teaching-link)
========================================================= */

.teaching-section {
    border-top: 1px solid var(--border);
}

.teaching-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.teaching-card {
    overflow: hidden;

    display: flex;
    flex-direction: column;

    background: var(--bg-soft);

    border: 1px solid var(--border);

    border-left: 2px solid var(--gold-line);

    border-radius: 0 4px 4px 0;

    transition:
        background var(--transition),
        border-color var(--transition);
}

.teaching-card:hover {
    background: var(--card);

    border-color: rgba(255, 255, 255, .15);

    border-left-color: var(--gold);
}

.teaching-card-image img {
    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;
}

.teaching-card-content {
    padding: 26px 28px 28px;
}

.teaching-card span {
    color: var(--gold);

    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 400;

    letter-spacing: .04em;
}

.teaching-card h3 {
    margin: 12px 0;

    font-size: 1.35rem;

    line-height: 1.25;

    font-weight: 500;
}

.teaching-card-content > p {
    color: var(--text-muted);

    font-size: .82rem;

    line-height: 1.8;
}

.teaching-level {
    display: inline-block;

    margin-top: 14px;

    padding: 3px 9px;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .62rem;
}

.teaching-link {
    display: flex;

    align-items: center;

    gap: .4rem;

    margin-top: 18px;

    color: var(--text-soft);

    font-size: .72rem;
    font-weight: 700;

    transition:
        color var(--transition),
        gap var(--transition);
}

.teaching-link:hover {
    color: var(--gold);

    gap: .6rem;
}

.teaching-empty {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    color: var(--text-muted);

    font-size: .88rem;
}


/* =========================================================
   14. ARTICLES
========================================================= */

.articles-section {
    border-top: 1px solid var(--border);
}

.articles-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.article-card {
    padding: 32px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 4px;

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.article-card:hover {
    transform: translateY(-4px);

    background: var(--card-hover);

    border-color: var(--accent-line);
}

.article-category {
    color: var(--accent-bright);

    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 400;

    letter-spacing: .02em;
}

.article-card h3 {
    margin: 15px 0;

    font-size: 1.4rem;

    line-height: 1.3;

    letter-spacing: -.005em;

    font-weight: 500;
}

.article-card > p {
    margin-bottom: 25px;

    color: var(--text-muted);

    font-size: .82rem;

    line-height: 1.8;
}

.article-meta {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding-top: 15px;

    margin-bottom: 18px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .62rem;
}

.article-card a {
    color: var(--text);

    font-size: .72rem;
    font-weight: 700;

    transition: color var(--transition);
}

.article-card a:hover {
    color: var(--accent-bright);
}

.article-card > span:not(.article-category) {
    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .68rem;
}

.articles-empty {
    grid-column: 1 / -1;

    padding: 60px 20px;

    text-align: center;

    color: var(--text-muted);

    font-size: .88rem;
}


/* =========================================================
   15. ABOUT PREVIEW
========================================================= */

.about-preview {
    width: var(--page-width);

    margin: 60px auto 130px;

    display: grid;

    grid-template-columns:
        minmax(260px, .65fr)
        minmax(0, 1.35fr);

    gap: 80px;

    align-items: center;
}

.about-preview-image img {
    width: 100%;

    max-width: 380px;

    aspect-ratio: 1;

    object-fit: cover;

    border: 1px solid var(--border);

    border-radius: 4px;
}

.about-preview-content h2 {
    margin-bottom: 25px;

    font-size: clamp(2rem, 4.2vw, 3.4rem);

    line-height: 1.03;

    letter-spacing: -.01em;

    font-weight: 460;
}

.about-preview-content p:not(.section-label) {
    max-width: 650px;

    margin-bottom: 18px;

    color: var(--text-muted);

    font-size: .88rem;

    line-height: 1.9;
}


/* =========================================================
   16. CONTACT
========================================================= */

.contact-section {
    width: var(--page-width);

    margin: 0 auto;

    padding: 110px 0 130px;

    display: grid;

    grid-template-columns:
        minmax(0, .8fr)
        minmax(0, 1.2fr);

    gap: 100px;

    border-top: 1px solid var(--border);
}

.contact-intro h2 {
    margin-bottom: 25px;

    font-size: clamp(2.4rem, 4.6vw, 4.2rem);

    line-height: 1;

    letter-spacing: -.01em;

    font-weight: 460;
}

.contact-intro p:last-child {
    max-width: 450px;

    color: var(--text-muted);

    font-size: .88rem;

    line-height: 1.8;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin: 18px 0 7px;

    color: var(--text-soft);

    font-family: var(--font-mono);
    font-size: .64rem;
    font-weight: 400;

    letter-spacing: .02em;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;

    padding: 14px;

    outline: none;

    border: 1px solid var(--border);

    border-radius: var(--radius-small);

    background: var(--card);

    color: var(--text);

    font-size: .85rem;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.contact-form textarea {
    min-height: 150px;

    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: var(--accent);

    background: var(--card-hover);
}

.contact-form .btn {
    align-self: flex-start;

    margin-top: 25px;
}


/* =========================================================
   17. FOOTER
========================================================= */

.site-footer {
    width: var(--page-width);

    margin: 0 auto;

    padding: 50px 0 25px;

    display: grid;

    grid-template-columns: 1fr auto;

    gap: 40px;

    border-top: 1px solid var(--border);
}

.site-footer > div:first-child p {
    margin-top: 8px;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .64rem;
}

.footer-links {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 22px;
}

.footer-links a {
    color: var(--text-muted);

    font-size: .68rem;

    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    grid-column: 1 / -1;

    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding-top: 22px;

    margin-top: 12px;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .6rem;
}


/* =========================================================
   18. WHATSAPP
========================================================= */

.whatsapp-button {
    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 50;

    min-height: 44px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 10px 16px;

    background: #25d366;

    color: #ffffff;

    border-radius: 999px;

    font-size: .7rem;
    font-weight: 750;

    box-shadow: 0 10px 35px rgba(0, 0, 0, .3);

    transition: transform var(--transition);
}

.whatsapp-button:hover {
    transform: translateY(-3px);
}


/* =========================================================
   19. LIGHTBOX
========================================================= */

.lightbox {
    position: fixed;

    inset: 0;

    z-index: 100;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 25px;

    background: rgba(5, 7, 10, .96);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    width: 100%;

    max-width: 1050px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 18px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);
}

.lightbox-content img {
    width: 100%;

    max-height: 75vh;

    object-fit: contain;
}

.lightbox-close {
    position: fixed;

    top: 20px;
    right: 25px;

    color: var(--text);

    font-size: 30px;

    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   20. PROJECT PAGE GLOBAL SUPPORT
========================================================= */

.project-page,
.project-page * {
    --project-bg: var(--bg);
    --project-surface: var(--card);
    --project-text: var(--text);
    --project-text-soft: var(--text-soft);
    --project-text-muted: var(--text-muted);
    --project-blue: var(--accent);
    --project-blue-bright: var(--accent-bright);
    --project-line: var(--border);
    --project-line-soft: var(--border-soft);
}


/* =========================================================
   21. PROJECT GALLERY
========================================================= */

.project-gallery-section {
    width: var(--page-width);

    margin: 0 auto;

    padding: 90px 0 110px;

    border-top: 1px solid var(--border);
}

.project-gallery {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 24px;

    align-items: start;
}

.project-gallery-item {
    margin: 0;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 4px;

    transition:
        border-color var(--transition),
        transform var(--transition);
}

.project-gallery-item:hover {
    border-color: var(--accent-line);

    transform: translateY(-2px);
}

.project-gallery-image {
    display: block;

    width: 100%;

    height: auto;

    max-width: 100%;

    object-fit: contain;

    transition: transform .55s ease;
}

.project-gallery-item:hover .project-gallery-image {
    transform: scale(1.015);
}

.project-gallery-caption {
    padding: 13px 16px 15px;

    border-top: 1px solid var(--border-soft);

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .66rem;

    line-height: 1.6;
}

.project-gallery-empty {
    color: var(--text-muted);

    font-size: .82rem;

    line-height: 1.7;
}


/* =========================================================
   22. PROJECT RELATED WORK
========================================================= */

.project-related {
    width: var(--page-width);

    margin: 0 auto;

    padding: 90px 0 120px;

    border-top: 1px solid var(--border);
}

.project-related-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}


/* =========================================================
   23. GLOBAL FOCUS STATES
========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);

    outline-offset: 3px;
}


/* =========================================================
   24. TABLET
========================================================= */

@media (max-width: 1050px) {

    .hero {
        grid-template-columns: 1fr;

        text-align: center;

        gap: 55px;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;

        border-left: none;
        padding-left: 0;

        border-top: 2px solid var(--border);

        padding-top: 18px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .hero-image img {
        width: 230px;
        height: 230px;
    }

    .hero::before,
    .hero::after {
        display: none;
    }


    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .featured-project {
        grid-template-columns: 1fr;
    }

    .featured-image img {
        min-height: 450px;
    }


    .about-preview {
        grid-template-columns: 1fr;

        gap: 45px;

        text-align: center;
    }

    .about-preview-image {
        display: flex;

        justify-content: center;
    }

    .about-preview-image img {
        max-width: 320px;
    }

    .about-preview-content .text-link {
        margin: 0 auto;
    }


    .contact-section {
        grid-template-columns: 1fr;

        gap: 55px;

        text-align: center;
    }

    .contact-intro p:last-child {
        margin: 0 auto;
    }

    .contact-form {
        text-align: left;
    }


    .project-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   25. MOBILE
   Centered, generous, one column throughout.
========================================================= */

@media (max-width: 700px) {

    .site-header {
        width: calc(100% - 28px);

        padding: 20px 0;

        flex-direction: column;

        align-items: center;

        gap: 17px;

        text-align: center;
    }

    .main-nav {
        width: 100%;

        display: flex;

        justify-content: center;

        gap: 13px 18px;

        flex-wrap: wrap;
    }

    .main-nav a {
        font-size: .68rem;
    }


    .hero {
        width: calc(100% - 28px);

        min-height: auto;

        padding: 60px 0 75px;
    }

    .hero h1 {
        font-size: clamp(2.7rem, 13vw, 4.2rem);

        line-height: .98;
    }

    .hero h2 {
        font-size: 1.05rem;

        margin-left: auto;
        margin-right: auto;
    }

    .hero-description {
        font-size: .88rem;

        line-height: 1.8;

        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        width: 100%;

        justify-content: center;
    }

    .hero-image img {
        width: 180px;
        height: 180px;
    }


    .intro-section {
        width: calc(100% - 28px);

        margin: 50px auto 80px;
    }

    .intro-section h2 {
        font-size: 1.9rem;
    }


    .section {
        width: calc(100% - 28px);

        padding: 70px 0;
    }

    .section-heading {
        display: block;

        text-align: center;

        margin-bottom: 32px;
    }

    .section-heading h2 {
        font-size: 2.1rem;
    }

    .section-heading > p {
        margin: 18px auto 0;
    }


    .portfolio-filters {
        justify-content: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .portfolio-info {
        padding: 18px;

        text-align: left;
    }


    .services-grid {
        grid-template-columns: 1fr;

        gap: 1px;
    }

    .service-card {
        min-height: auto;

        padding: 28px;

        align-items: center;

        text-align: center;
    }

    .service-card p,
    .service-card a {
        margin-left: auto;
        margin-right: auto;
    }


    .featured-project {
        width: calc(100% - 28px);

        margin: 45px auto 80px;
    }

    .featured-image img {
        min-height: 280px;
    }

    .featured-content {
        padding: 30px 24px;

        text-align: center;
        align-items: center;
    }

    .text-link {
        margin: 0 auto;
    }


    .teaching-grid {
        grid-template-columns: 1fr;
    }

    .teaching-card-content {
        text-align: left;
    }


    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-card {
        text-align: left;
    }


    .about-preview {
        width: calc(100% - 28px);

        margin: 35px auto 80px;

        gap: 30px;
    }

    .about-preview-content h2 {
        font-size: 2.1rem;
    }


    .contact-section {
        width: calc(100% - 28px);

        padding: 70px 0 80px;
    }

    .contact-intro h2 {
        font-size: 2.4rem;
    }


    .site-footer {
        width: calc(100% - 28px);

        grid-template-columns: 1fr;

        gap: 26px;

        text-align: center;
    }

    .footer-links {
        justify-content: center;

        gap: 15px 20px;
    }

    .footer-bottom {
        display: flex;

        flex-direction: column;

        align-items: center;

        gap: 8px;
    }


    .whatsapp-button {
        right: 14px;

        bottom: 14px;
    }


    .project-gallery-section {
        width: calc(100% - 28px);

        padding: 65px 0 80px;
    }

    .project-gallery {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .project-gallery-item {
        border-radius: var(--radius-small);
    }

    .project-gallery-image {
        width: 100%;

        height: auto;
    }


    .project-related {
        width: calc(100% - 28px);

        padding: 65px 0 80px;

        text-align: center;
    }

    .project-related-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }
}


/* =========================================================
   26. SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .hero h1 {
        font-size: 2.4rem;
    }

    .hero h2 {
        font-size: 1rem;
    }

    .section-heading h2 {
        font-size: 1.8rem;
    }

    .contact-intro h2 {
        font-size: 2.1rem;
    }

    .btn {
        width: 100%;
    }

    .hero-actions {
        width: 100%;
    }
}


/* =========================================================
   27. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

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


/* =========================================================
   99. LEGACY PAGE SUPPORT
   about.html, article pages and review pages were built with
   an older set of class names and color variables. These rules
   map them onto the current design system so every page looks
   consistent. Safe to delete once those pages are migrated to
   .site-header / .main-nav / .site-footer.
========================================================= */

:root {
    --text-primary: var(--text);
    --text-secondary: var(--text-soft);
    --card-bg: var(--card);
    --border-color: var(--border);
    --accent-hover: var(--accent-bright);
}


/* ---------- Old navigation: <nav> > .nav-logo + .nav-links ---------- */

nav:has(> .nav-logo) {
    width: var(--page-width);
    margin: 0 auto;
    padding: 26px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    border-bottom: 1px solid var(--border);

    position: relative;
    z-index: 20;
}

.navbar {
    position: relative;
    z-index: 20;
}

.nav-logo {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;

    color: var(--text);

    font-family: var(--font-mono);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.logo-script {
    margin-left: 6px;

    color: var(--gold);

    font-family: "Great Vibes", cursive;
    font-size: 1.55rem;
    font-weight: 400;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    position: relative;
    padding: 6px 0;

    color: var(--text-muted);

    font-size: .78rem;
    font-weight: 550;
    letter-spacing: .01em;

    transition: color var(--transition);
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a.nav-cta {
    padding: 8px 16px;

    color: var(--text);

    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
}

.nav-links a.nav-cta:hover {
    border-color: var(--accent);
}


/* ---------- Old footer: <footer> > .footer-container ---------- */

footer:has(> .footer-container) {
    width: var(--page-width);
    margin: 0 auto;
    padding: 40px 0 25px;

    border-top: 1px solid var(--border);
}

.footer-container {
    text-align: center;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .68rem;
}

.footer-subtext {
    margin-top: 6px;
    opacity: .7;
}


/* ---------- Article / review pages ---------- */

.read-more {
    color: var(--accent);
    font-size: .9rem;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.blog-tag {
    color: var(--accent);

    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.blog-date {
    color: var(--text-muted);
    font-size: .8rem;
}

.hero-quote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;

    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
    background: var(--card);

    color: var(--text);
    font-style: italic;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.blog-card {
    padding: 1.5rem;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    background: var(--card);
}

.blog-post-content {
    padding: 0 1.5rem;
}


/* ---------- Author box ---------- */

:is(aside, div).author-box {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;

    margin-top: 3rem;
    padding: 1.5rem;

    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

:is(aside, div).author-box .author-avatar {
    flex-shrink: 0;

    width: 80px;
    height: 80px;

    border: 2px solid var(--accent);
    border-radius: 50%;

    object-fit: cover;
}

:is(aside, div).author-box .author-label {
    display: block;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .65rem;
    letter-spacing: .1em;
}

:is(aside, div).author-box .author-name {
    margin: 4px 0 6px;
    font-size: 1.2rem;
}

:is(aside, div).author-box .author-bio {
    color: var(--text-soft);
    font-size: .92rem;
    line-height: 1.65;
}

:is(aside, div).author-box .author-links {
    margin-top: 10px;

    color: var(--text-muted);
    font-size: .85rem;
}

:is(aside, div).author-box .author-links a {
    color: var(--accent);
    font-weight: 600;
}

:is(aside, div).author-box .author-links a:hover {
    text-decoration: underline;
}


/* ---------- WhatsApp floating button ---------- */

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #25d366;
    color: #ffffff;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);

    transition: transform var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.08);
}


/* ---------- Legacy pages on small screens ---------- */

@media (max-width: 700px) {

    nav:has(> .nav-logo) {
        width: calc(100% - 28px);
        padding: 20px 0;

        flex-direction: column;
        gap: 17px;

        text-align: center;
    }

    .nav-links {
        width: 100%;

        justify-content: center;
        flex-wrap: wrap;

        gap: 13px 18px;
    }

    .nav-links a {
        font-size: .68rem;
    }

    :is(aside, div).author-box {
        flex-direction: column;
        align-items: center;

        text-align: center;
    }
}


/* =========================================================
   100. MODERN POLISH
   Floating glass navigation, solid call-to-action button,
   gentle hover motion on cards and buttons, visible keyboard
   focus. Applies to every page (new and legacy headers).
========================================================= */

/* ---------- Floating glass navigation ---------- */

.site-header,
nav:has(> .nav-logo) {
    position: sticky;
    top: 12px;
    z-index: 40;

    margin-top: 12px;
    padding: 12px 14px 12px 24px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(16, 18, 23, 0.62);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

/* About page wraps its nav in <header class="navbar">:
   the wrapper sticks, the nav inside stays put. */
.navbar {
    position: sticky;
    top: 0;
    z-index: 40;

    padding-top: 12px;
    pointer-events: none;
}

.navbar > nav:has(> .nav-logo) {
    position: static;
    margin-top: 0;
    pointer-events: auto;
}

.site-header .logo {
    letter-spacing: 0.12em;
}

.main-nav a,
.nav-links a:not(.nav-cta) {
    padding: 8px 14px;

    border-radius: 999px;

    transition:
        color var(--transition),
        background var(--transition);
}

.main-nav a::after {
    display: none;
}

.main-nav a:hover,
.nav-links a:not(.nav-cta):hover {
    background: rgba(255, 255, 255, 0.06);
}

.main-nav a.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}

.main-nav,
.nav-links {
    gap: 4px;
}


/* ---------- Call-to-action button ---------- */

.nav-links a.nav-cta {
    padding: 10px 20px;

    border: 0;
    border-radius: 999px;

    background: var(--accent);
    color: #ffffff;

    font-weight: 650;

    box-shadow: 0 6px 18px rgba(91, 140, 255, 0.35);

    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.nav-links a.nav-cta:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(91, 140, 255, 0.45);
}


/* ---------- Cards: soft lift on hover ---------- */

.skill-card,
.principle-card,
.blog-card,
:is(aside, div).author-box {
    border-radius: 16px;

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.skill-card:hover,
.principle-card:hover,
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.hero-quote,
.insight-callout {
    border-radius: 0 16px 16px 0;
}


/* ---------- Article pages: reading comfort ---------- */

.article-banner-img {
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.article-header h1,
.about-intro h1 {
    letter-spacing: -0.025em;
}


/* ---------- Keyboard focus ---------- */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-bright);
    outline-offset: 3px;
    border-radius: 999px;
}


/* ---------- Phones ---------- */

@media (max-width: 700px) {

    .site-header,
    nav:has(> .nav-logo) {
        position: relative;
        top: auto;

        margin-top: 10px;
        padding: 16px 14px;

        border-radius: 24px;
    }

    .navbar {
        position: relative;
        padding-top: 0;
    }

    .navbar > nav:has(> .nav-logo) {
        margin-top: 10px;
    }

    .main-nav a,
    .nav-links a:not(.nav-cta) {
        padding: 6px 10px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .skill-card:hover,
    .principle-card:hover,
    .blog-card:hover,
    .nav-links a.nav-cta:hover {
        transform: none;
    }
}


/* =========================================================
   101. HERO — PORTRAIT STUDIO
   Gradient ring portrait, floating discipline labels,
   orbit line and availability badge.
========================================================= */

.h1-script {
    color: var(--gold);

    font-family: "Great Vibes", cursive;
    font-size: 1.18em;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;

    white-space: nowrap;
}

/* Staggered entrance */
.hero-content > * {
    animation: heroRise .8s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-content > :nth-child(1) { animation-delay: .05s; }
.hero-content > :nth-child(2) { animation-delay: .15s; }
.hero-content > :nth-child(3) { animation-delay: .25s; }
.hero-content > :nth-child(4) { animation-delay: .35s; }
.hero-content > :nth-child(5) { animation-delay: .45s; }

.hero-image {
    animation: heroRise 1s cubic-bezier(.2, .7, .2, 1) .2s both;
}

@keyframes heroRise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ---------- Portrait ---------- */

.hero-image::after {
    content: none;
}

.hero-portrait {
    --size: 300px;

    position: relative;

    width: var(--size);
    height: var(--size);

    margin: 30px;
}

/* soft colored glow behind everything */
.hero-portrait::before {
    content: "";

    position: absolute;
    inset: -18%;

    z-index: -1;

    border-radius: 50%;

    background:
        radial-gradient(circle at 30% 30%, rgba(91, 140, 255, .28), transparent 60%),
        radial-gradient(circle at 75% 78%, rgba(215, 163, 106, .22), transparent 58%);

    filter: blur(28px);
}

/* dashed orbit that slowly turns, with a small planet */
.hero-orbit {
    position: absolute;
    inset: -26px;

    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 50%;

    animation: heroSpin 46s linear infinite;
}

.hero-orbit::after {
    content: "";

    position: absolute;
    top: 14%;
    right: 6%;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: var(--gold);
    box-shadow: 0 0 14px 2px var(--gold-line);
}

/* gradient ring */
.portrait-ring {
    position: relative;

    width: 100%;
    height: 100%;

    padding: 4px;

    border-radius: 50%;
}

.portrait-ring::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;

    background: conic-gradient(
        from 0deg,
        var(--accent),
        var(--gold),
        rgba(255, 255, 255, .04) 38%,
        var(--accent-bright) 62%,
        rgba(255, 255, 255, .04) 82%,
        var(--accent)
    );

    animation: heroSpin 9s linear infinite;
}

.portrait-photo {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border: 7px solid var(--bg);
    border-radius: 50%;

    background: var(--bg-soft);
}

/* neutralise the old boxed-card image styling */
.hero-image .portrait-photo img {
    width: 100%;
    height: 100%;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: none;
    box-shadow: none;

    object-fit: cover;

    /* slight zoom trims any white edge from the artwork */
    transform: scale(1.1);
}

@keyframes heroSpin {
    to { transform: rotate(360deg); }
}


/* ---------- Floating glass labels ---------- */

.hero-chip {
    position: absolute;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(16, 18, 23, .72);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);

    box-shadow: 0 10px 28px rgba(0, 0, 0, .4);

    color: var(--text);

    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;

    animation: heroFloat 6s ease-in-out infinite;
}

.hero-chip i {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.chip-design {
    top: 6%;
    left: -34px;
}

.chip-ict {
    top: 48%;
    right: -52px;

    animation-delay: -2s;
}

.chip-ict i {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

.chip-teach {
    bottom: 4%;
    left: -22px;

    animation-delay: -4s;
}

.chip-teach i {
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}


/* ---------- Status + name ---------- */

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-top: 6px;
    padding: 9px 16px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(255, 255, 255, .03);

    color: var(--text-soft);

    font-size: .74rem;
    font-weight: 550;
}

.status-dot {
    position: relative;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #34d399;
}

.status-dot::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;

    background: #34d399;

    animation: heroPulse 2s ease-out infinite;
}

@keyframes heroPulse {
    from { transform: scale(1);   opacity: .7; }
    to   { transform: scale(3.2); opacity: 0;  }
}

.hero-name {
    margin-top: 14px;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}


/* ---------- Buttons in the hero ---------- */

.hero-actions .btn {
    min-height: 48px;
    padding: 12px 24px;

    border-radius: 999px;
}

.hero-actions .btn-primary::after {
    content: "→";

    margin-left: 10px;

    transition: transform var(--transition);
}

.hero-actions .btn-primary:hover::after {
    transform: translateX(4px);
}

.hero-actions .btn-secondary {
    background: rgba(255, 255, 255, .03);

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}


/* ---------- Hero responsive ---------- */

@media (max-width: 1050px) {

    .hero-portrait {
        --size: 250px;
    }

    /* the glow and dot grid come back, centred behind the portrait */
    .hero-image {
        position: relative;
    }
}

@media (max-width: 700px) {

    .hero-portrait {
        --size: 205px;

        margin: 26px 56px;
    }

    .hero-orbit {
        inset: -20px;
    }

    .hero-chip {
        padding: 6px 11px;

        font-size: .64rem;
    }

    .chip-design { left: -50px; }
    .chip-ict    { right: -58px; }
    .chip-teach  { left: -44px; }

    .hero-status {
        font-size: .68rem;
    }

    /* keep the six menu links on one row */
    .site-header {
        padding: 14px 10px;
    }

    .main-nav {
        gap: 0;
    }

    .main-nav a {
        padding: 6px 7px;
    }
}

@media (max-width: 380px) {

    .hero-portrait {
        --size: 180px;

        margin: 24px 50px;
    }

    .chip-design { left: -44px; }
    .chip-ict    { right: -48px; }
    .chip-teach  { left: -38px; }

    .site-header {
        padding: 14px 6px;
    }

    .main-nav a {
        padding: 6px 5px;

        font-size: .62rem;
    }
}


/* =========================================================
   102. SOFT SURFACES
   Rounded, borderless cards. Depth comes from soft light
   and shadow instead of thin outlines.
========================================================= */

:root {
    --r-xl: 28px;
    --r-lg: 22px;
    --r-md: 16px;

    --surface:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, .052),
            rgba(255, 255, 255, .014)
        ),
        #121419;

    --edge: inset 0 1px 0 rgba(255, 255, 255, .07);
    --lift: 0 26px 50px -30px rgba(0, 0, 0, .9);
}


/* ---------- Labels: soft pills, no outline ---------- */

.eyebrow,
.section-label {
    padding: 7px 15px;

    border: 0;
    border-radius: 999px;

    letter-spacing: .1em;
    text-transform: uppercase;
}


/* ---------- Remove hairline dividers ---------- */

.services-section,
.teaching-section,
.articles-section,
.contact-section {
    border-top: 0;
}

.section-heading {
    padding-bottom: 0;

    border-bottom: 0;
}


/* ---------- Buttons ---------- */

.btn {
    border-radius: 999px;
}

.btn-secondary {
    border-color: transparent;

    background: rgba(255, 255, 255, .06);
}

.btn-secondary:hover {
    border-color: transparent;

    background: rgba(255, 255, 255, .11);
}

.filter-btn {
    min-height: 40px;
    padding: 8px 18px;

    border: 0;
    border-radius: 999px;

    background: rgba(255, 255, 255, .05);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, .1);

    color: var(--text);
}

.filter-btn.active {
    background: var(--text);

    color: var(--bg);
}


/* ---------- Four areas: separate cards, each with its own glow ---------- */

.services-grid {
    gap: 16px;

    border: 0;

    background: none;
}

.service-card {
    --tint: var(--accent);

    position: relative;

    overflow: hidden;

    padding: 32px;

    border-radius: var(--r-xl);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.service-card:nth-child(2) { --tint: #d7a36a; }
.service-card:nth-child(3) { --tint: #34d399; }
.service-card:nth-child(4) { --tint: #a78bfa; }

.service-card::before {
    content: "";

    position: absolute;
    top: -90px;
    right: -90px;

    width: 260px;
    height: 260px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            color-mix(in srgb, var(--tint) 30%, transparent),
            transparent 68%
        );

    pointer-events: none;

    transition: transform .6s ease;
}

.service-card > * {
    position: relative;
}

.service-card:hover {
    transform: translateY(-6px);

    background: var(--surface);

    box-shadow:
        var(--edge),
        0 34px 60px -28px color-mix(in srgb, var(--tint) 45%, transparent);
}

.service-card:hover::before {
    transform: scale(1.3);
}

.service-number {
    margin-bottom: 30px;

    width: 46px;
    height: 46px;

    border: 0;
    border-radius: 15px;

    background: color-mix(in srgb, var(--tint) 18%, transparent);

    color: var(--tint);
}

.service-card a {
    color: var(--text);
}

.service-card a:hover {
    color: var(--tint);
}


/* ---------- Portfolio cards: image inset inside a soft card ---------- */

.portfolio-grid {
    gap: 22px;
}

.portfolio-card {
    padding: 10px;

    border: 0;
    border-radius: var(--r-xl);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.portfolio-card:hover {
    border-color: transparent;

    box-shadow:
        var(--edge),
        0 34px 64px -28px rgba(91, 140, 255, .38);
}

.portfolio-image {
    border-radius: var(--r-lg);

    background: var(--bg-soft);
}

.portfolio-info {
    padding: 20px 12px 12px;

    border-top: 0;
}


/* ---------- Featured project ---------- */

.featured-project {
    padding: 12px;

    border: 0;
    border-radius: 34px;

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);
}

.featured-image {
    border-radius: 24px;

    background:
        linear-gradient(
            135deg,
            rgba(91, 140, 255, .2),
            rgba(215, 163, 106, .16)
        );
}

.featured-image::before {
    padding: 7px 14px;

    border: 0;
    border-radius: 999px;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.featured-content {
    padding: 46px 44px;
}

.featured-content .section-label {
    align-self: flex-start;
}

.featured-image img {
    aspect-ratio: 5 / 4;

    height: 100%;
    min-height: 480px;
    max-height: 680px;
}

/* shimmer while the project loads */
.featured-project.is-loading .featured-image {
    background-size: 220% 100%;

    background-image:
        linear-gradient(
            100deg,
            rgba(255, 255, 255, .03) 30%,
            rgba(255, 255, 255, .1) 50%,
            rgba(255, 255, 255, .03) 70%
        );

    animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
    from { background-position: 120% 0; }
    to   { background-position: -120% 0; }
}


/* ---------- Teaching + article cards ---------- */

.teaching-grid,
.articles-grid {
    gap: 18px;
}

.teaching-card {
    padding: 10px;

    border: 0;
    border-radius: var(--r-xl);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);

    transition:
        transform var(--transition),
        box-shadow var(--transition);
}

.teaching-card:hover {
    transform: translateY(-5px);

    background: var(--surface);

    box-shadow:
        var(--edge),
        0 34px 60px -28px rgba(215, 163, 106, .35);
}

.teaching-card-image {
    overflow: hidden;

    border-radius: var(--r-lg);
}

.teaching-card-content {
    padding: 22px 14px 14px;
}

.article-card {
    padding: 34px;

    border: 0;
    border-radius: var(--r-xl);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);
}

.article-card:hover {
    background: var(--surface);

    box-shadow:
        var(--edge),
        0 34px 60px -28px rgba(91, 140, 255, .35);
}


/* ---------- About preview portrait ---------- */

.about-preview-image {
    display: flex;
    justify-content: center;
}

.about-preview-image .portrait-ring {
    position: relative;

    width: min(100%, 340px);
    aspect-ratio: 1;

    padding: 4px;

    border-radius: 50%;

    box-shadow: 0 0 90px rgba(91, 140, 255, .18);
}

.about-preview-image .portrait-ring::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;

    background: conic-gradient(
        from 0deg,
        var(--accent),
        var(--gold),
        rgba(255, 255, 255, .04) 38%,
        var(--accent-bright) 62%,
        rgba(255, 255, 255, .04) 82%,
        var(--accent)
    );

    animation: heroSpin 12s linear infinite;
}

.about-preview-image .portrait-photo {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border: 8px solid var(--bg);
    border-radius: 50%;
}

.about-preview-image .portrait-photo img {
    width: 100%;
    max-width: none;
    height: 100%;

    aspect-ratio: auto;

    border: 0;
    border-radius: 0;

    object-fit: cover;

    transform: scale(1.1);
}


/* ---------- Contact form ---------- */

.contact-form input,
.contact-form textarea,
.contact-form select {
    padding: 15px 18px;

    border: 0;
    border-radius: var(--r-md);

    background: rgba(255, 255, 255, .05);

    transition:
        box-shadow var(--transition),
        background var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    background: rgba(255, 255, 255, .08);

    box-shadow: 0 0 0 3px rgba(91, 140, 255, .35);
}


/* ---------- Error / retry ---------- */

.portfolio-error .btn {
    margin-top: 16px;
}

img.img-failed {
    object-fit: cover;
}


/* ---------- Legacy pages (About, articles): soft cards ---------- */

body .skill-card,
body .principle-card,
body .blog-card {
    border: 0;
    border-radius: var(--r-lg);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);
}

body .skill-card h3 {
    border-bottom: 0;
    padding-bottom: 0;
}

body .insight-callout,
body .hero-quote {
    border-left: 0;
    border-radius: var(--r-lg);

    background: var(--surface);

    box-shadow: var(--edge);
}

body :is(aside, div).author-box {
    border: 0;
    border-radius: var(--r-xl);

    background: var(--surface);

    box-shadow: var(--edge), var(--lift);
}

body .about-hero-card {
    border-bottom: 0;
}

body .about-avatar {
    flex-shrink: 0;
}

body .about-avatar .portrait-ring {
    position: relative;

    width: 170px;
    height: 170px;

    padding: 4px;

    border-radius: 50%;
}

body .about-avatar .portrait-ring::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;

    background: conic-gradient(
        from 0deg,
        var(--accent),
        var(--gold),
        rgba(255, 255, 255, .04) 40%,
        var(--accent-bright) 65%,
        var(--accent)
    );

    animation: heroSpin 12s linear infinite;
}

body .about-avatar .portrait-photo {
    position: relative;
    z-index: 1;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border: 6px solid var(--bg);
    border-radius: 50%;
}

body .about-avatar .portrait-photo img {
    width: 100%;
    max-width: none;
    height: 100%;

    border: 0;
    border-radius: 0;

    object-fit: cover;

    transform: scale(1.1);
}


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

@media (max-width: 700px) {

    .service-card {
        padding: 26px;
    }

    .featured-project {
        padding: 10px;

        border-radius: 26px;
    }

    .featured-image {
        border-radius: 18px;
    }

    .featured-content {
        padding: 30px 20px 24px;
    }

    .portfolio-card,
    .teaching-card {
        border-radius: 24px;
    }

    .article-card {
        padding: 26px;
    }
}


/* =========================================================
   103. EDITORIAL WORK INDEX
   The work is the hero: posters hang like an exhibition
   wall on a staggered three-column rhythm. No card chrome;
   hierarchy comes from scale, numbering and whitespace.
========================================================= */

/* smooth fade when moving between pages (Chrome / Edge / Safari) */
@view-transition {
    navigation: auto;
}

#work .section-heading {
    align-items: flex-end;

    margin-bottom: 56px;
}

#work .section-heading h2 {
    font-size: clamp(2.8rem, 7.4vw, 6.2rem);

    line-height: .92;

    letter-spacing: -.035em;
}

#work .section-heading > p {
    max-width: 300px;

    padding-left: 18px;

    border-left: 2px solid var(--gold-line);
}


/* ---------- Filters as typography, not buttons ---------- */

.portfolio-filters {
    gap: 8px 30px;

    margin-bottom: 64px;
}

.filter-btn {
    min-height: 0;

    padding: 0;

    border-radius: 0;

    background: none;

    color: var(--text-muted);

    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;

    transition: color var(--transition);
}

.filter-btn:hover {
    background: none;

    color: var(--text);
}

.filter-btn.active {
    background: none;

    color: var(--gold);

    font-style: italic;
}


/* ---------- The wall ---------- */

.portfolio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 76px 38px;

    align-items: start;
}

.portfolio-grid .portfolio-card:nth-child(3n + 2) {
    margin-top: 90px;
}

.portfolio-card {
    padding: 0;

    overflow: visible;

    border-radius: 0;

    background: none;

    box-shadow: none;
}

.portfolio-card:hover {
    transform: none;

    box-shadow: none;
}

.portfolio-link {
    display: block;

    color: inherit;
}

.portfolio-link.is-disabled {
    opacity: .55;

    cursor: default;
}

.portfolio-image {
    position: relative;

    aspect-ratio: 4 / 5;

    overflow: hidden;

    border-radius: 20px;

    background: var(--bg-soft);

    box-shadow: 0 34px 60px -34px rgba(0, 0, 0, .95);

    transition: transform .55s cubic-bezier(.2, .7, .2, 1);
}

.portfolio-card img {
    width: 100%;
    height: 100%;

    aspect-ratio: auto;

    object-fit: cover;

    transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}

.portfolio-link:hover .portfolio-image,
.portfolio-link:focus-visible .portfolio-image {
    transform: translateY(-8px);
}

.portfolio-link:hover img,
.portfolio-link:focus-visible img {
    transform: scale(1.05);
}

.portfolio-card:hover img {
    transform: none;
}

.portfolio-link:hover img {
    transform: scale(1.05);
}

.portfolio-view {
    position: absolute;
    right: 14px;
    bottom: 14px;

    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 11px 18px;

    border-radius: 999px;

    background: var(--text);

    color: var(--bg);

    font-size: .72rem;
    font-weight: 700;

    opacity: 0;

    transform: translateY(12px);

    transition:
        opacity .35s ease,
        transform .35s cubic-bezier(.2, .7, .2, 1);
}

.portfolio-view i {
    font-style: normal;
}

.portfolio-link:hover .portfolio-view,
.portfolio-link:focus-visible .portfolio-view {
    opacity: 1;

    transform: none;
}

/* touch screens have no hover, so always show the cue */
@media (hover: none) {

    .portfolio-view {
        opacity: 1;

        transform: none;
    }
}


/* ---------- Captions ---------- */

.portfolio-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;

    padding: 24px 4px 0;

    border: 0;
}

.portfolio-number {
    padding-top: 7px;

    color: var(--gold);

    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .06em;
}

.portfolio-info h3 {
    margin: 0;

    font-size: clamp(1.35rem, 2vw, 1.85rem);

    line-height: 1.08;

    letter-spacing: -.015em;

    font-weight: 460;
}

.portfolio-category {
    margin: 10px 0 0;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portfolio-description {
    display: -webkit-box;

    margin-top: 12px;

    overflow: hidden;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    color: var(--text-muted);

    font-size: .84rem;

    line-height: 1.7;
}

.portfolio-error-detail {
    margin-top: 14px;

    color: var(--text-muted);

    font-family: var(--font-mono);
    font-size: .64rem;
    word-break: break-all;
}


/* ---------- Responsive ---------- */

@media (max-width: 1050px) {

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 64px 28px;
    }

    .portfolio-grid .portfolio-card:nth-child(3n + 2) {
        margin-top: 0;
    }

    .portfolio-grid .portfolio-card:nth-child(2n) {
        margin-top: 70px;
    }
}

@media (max-width: 700px) {

    #work .section-heading > p {
        padding-left: 0;

        border-left: 0;
    }

    .portfolio-filters {
        justify-content: center;

        margin-bottom: 44px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;

        gap: 54px;
    }

    .portfolio-grid .portfolio-card:nth-child(n) {
        margin-top: 0;
    }

    .portfolio-image {
        border-radius: 22px;
    }
}


/* =========================================================
   104. FEATURED STAGE
   The poster is shown whole, in its own proportions, like a
   print on a stage. A blurred copy of the poster tints the
   panel, so every featured project gets its own atmosphere.
========================================================= */

.featured-project {
    position: relative;

    isolation: isolate;

    grid-template-columns:
        minmax(240px, 400px)
        minmax(0, 1fr);

    gap: clamp(36px, 6vw, 90px);

    align-items: center;

    padding: clamp(30px, 5vw, 68px);

    border-radius: 38px;

    background: #0e1014;
}

/* blurred poster colour wash */
.featured-project::before {
    content: "";

    position: absolute;
    inset: -60px;

    z-index: -2;

    background-image: var(--poster, none);
    background-position: center;
    background-size: cover;

    filter: blur(70px) saturate(1.45);

    opacity: .6;

    transform: scale(1.15);
}

/* keeps the text readable over the colour */
.featured-project::after {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -1;

    background:
        linear-gradient(
            100deg,
            rgba(10, 11, 14, .25) 0%,
            rgba(10, 11, 14, .78) 52%,
            rgba(10, 11, 14, .92) 100%
        );
}

.featured-image {
    width: 100%;

    aspect-ratio: 4 / 5;

    max-height: none;

    overflow: hidden;

    border-radius: 24px;

    background: #111;

    box-shadow: 0 50px 80px -30px rgba(0, 0, 0, .9);

    transform: rotate(-2.2deg);

    transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.featured-project:hover .featured-image {
    transform: rotate(0deg) translateY(-6px);
}

/* the label sits in the text column instead of covering the poster */
.featured-image::before {
    display: none;
}

.featured-image img {
    width: 100%;
    height: 100%;

    min-height: 0;
    max-height: none;

    aspect-ratio: auto;

    object-fit: cover;
}

.featured-project:hover .featured-image img {
    transform: none;
}

.featured-content {
    padding: 0;
}

.featured-content h2 {
    font-size: clamp(2.3rem, 4.8vw, 4.4rem);

    line-height: .98;

    letter-spacing: -.03em;
}

.featured-category {
    margin-bottom: 22px;

    color: var(--gold);
}

.featured-content > p:not(.section-label):not(.featured-category) {
    max-width: 460px;

    color: var(--text-soft);
}

#featured-project-link {
    align-self: flex-start;

    padding: 14px 26px;

    border-radius: 999px;

    background: var(--text);

    color: var(--bg);

    font-weight: 700;

    transition:
        transform var(--transition),
        background var(--transition);
}

#featured-project-link:hover {
    background: #ffffff;

    transform: translateY(-2px);
}


@media (max-width: 900px) {

    .featured-project {
        grid-template-columns: 1fr;

        gap: 38px;

        padding: 34px 24px 40px;
    }

    .featured-image {
        max-width: 340px;

        margin: 0 auto;

        transform: rotate(-1.5deg);
    }

    .featured-content {
        text-align: center;

        align-items: center;
    }

    #featured-project-link {
        align-self: center;
    }
}