/* ============================================================
   MICHAEL OBENG BOATENG — PORTFOLIO STYLES
   Premium recruiter-first design
   ============================================================ */

/* --- Google Fonts are loaded in index.php --- */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --color-primary: #f4f0e7;
    --color-secondary: #fbf8f3;
    --color-text-default: #1c1915;
    --color-text-muted: #5e584e;
    --color-accent: #9a3412;
    --color-accent-dark: #7c2d12;
    --color-accent-warm: #c2410c;
    --color-border: #e3dacb;
    --shadow-accent-color: rgba(154, 52, 18, 0.16);
    --color-gold: #b45309;
    --radius-sm: 0.6rem;
    --radius-md: 1rem;
    --radius-lg: 1.4rem;
    --radius-xl: 1.8rem;
    --transition-fast: 0.18s ease;
    --transition-base: 0.28s ease;
    --transition-slow: 0.45s ease;
}

.light {
    --color-primary: #f7f9fc;
    --color-secondary: #ffffff;
    --color-text-default: #172033;
    --color-text-muted: #64748b;
    --color-border: #dbe4ee;
    --shadow-accent-color: rgba(2, 132, 199, 0.18);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
    background-color: var(--color-primary);
    color: var(--color-text-default);
    font-family: 'Outfit', 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--color-secondary); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-accent), var(--color-accent-warm));
    border-radius: 4px;
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #9a3412, #ea580c, #f97316);
    z-index: 1000;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.6);
}

/* ============================================================
   PORTFOLIO BODY THEME
   ============================================================ */
body.portfolio {
    --color-primary: #f4f0e7;
    --color-secondary: #fbf8f3;
    --color-text-default: #1c1915;
    --color-text-muted: #5e584e;
    --color-accent: #9a3412;
    --color-accent-dark: #7c2d12;
    --color-border: #e3dacb;
    --shadow-accent-color: rgba(154, 52, 18, 0.16);
    background:
        radial-gradient(1100px 500px at 100% -6%, rgba(194, 65, 12, 0.10), transparent 60%),
        radial-gradient(700px 400px at -10% 60%, rgba(180, 83, 9, 0.06), transparent 55%),
        var(--color-primary);
    color: var(--color-text-default);
    font-family: "Outfit", sans-serif;
}

body.portfolio h1,
body.portfolio h2,
body.portfolio .brand {
    font-family: "Fraunces", Georgia, serif;
    font-optical-sizing: auto;
}

body.portfolio main {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* ============================================================
   NAVIGATION — GLASSMORPHISM
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 240, 231, 0.75);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid rgba(227, 218, 203, 0.6);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
    background: rgba(244, 240, 231, 0.92);
    box-shadow: 0 4px 24px rgba(28, 25, 21, 0.08);
}

.site-header-inner {
    width: min(1240px, calc(100% - 2.5rem));
    margin: 0 auto;
    min-height: 4.25rem;
    display: flex;
    align-items: center;
    gap: clamp(.9rem, 2vw, 1.5rem);
    min-width: 0;
}

.brand {
    color: var(--color-text-default);
    font-size: 1.35rem;
    font-weight: 560;
    letter-spacing: -0.03em;
    text-decoration: none;
    transition: color var(--transition-fast);
    white-space: nowrap;
}
.brand:hover { color: var(--color-accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 1.4vw, 1.15rem);
    margin-left: auto;
    min-width: 0;
    white-space: nowrap;
}

.site-nav a,
.mobile-menu a {
    color: var(--color-text-muted);
    font-size: .95rem;
    font-weight: 560;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color var(--transition-fast);
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--color-accent);
    border-radius: 999px;
    transition: width var(--transition-base);
}
.site-nav a:hover::after { width: 100%; }
.site-nav a:hover,
.mobile-menu a:hover { color: var(--color-accent); }

.menu-button {
    display: none;
    margin-left: auto;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: .55rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--color-text-default);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    gap: .2rem;
    width: min(1240px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: .5rem 0 1rem;
    border-top: 1px solid var(--color-border);
}
.mobile-menu a { padding: .7rem .2rem; }
.mobile-menu.hidden { display: none !important; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 3rem;
    align-items: end;
    padding: 5rem 0 3.5rem;
    position: relative;
}

/* Animated mesh/noise texture overlay */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(154, 52, 18, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(194, 65, 12, 0.06) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.hero-copy { position: relative; z-index: 1; }

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.2rem;
    color: #3f6212;
    font-size: .9rem;
    font-weight: 650;
    padding: .4rem .85rem;
    background: rgba(63, 98, 18, 0.08);
    border: 1px solid rgba(63, 98, 18, 0.18);
    border-radius: 999px;
    width: fit-content;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(101, 163, 13, 0.5); }
    70% { box-shadow: 0 0 0 7px rgba(101, 163, 13, 0); }
    100% { box-shadow: 0 0 0 0 rgba(101, 163, 13, 0); }
}

.status-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: #65a30d;
    animation: pulse-ring 2.2s ease infinite;
    flex-shrink: 0;
}

.hero h1 {
    max-width: 14ch;
    color: var(--color-text-default);
    font-size: clamp(3.3rem, 7vw, 5.5rem);
    font-weight: 560;
    line-height: .92;
    letter-spacing: -0.045em;
    margin: 0 0 0.3rem;
}

/* Gradient accent on name */
.hero-name-accent {
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 40%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-role {
    margin-top: 1.35rem;
    max-width: 32rem;
    color: var(--color-text-default);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 560;
    min-height: 2.6rem; /* reserve space for typing animation */
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--color-accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.9s step-end infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-lead {
    margin-top: .85rem;
    max-width: 38rem;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.75rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.85rem;
    padding: .65rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-size: .95rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast),
                color var(--transition-fast), transform var(--transition-fast),
                box-shadow var(--transition-fast);
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--color-accent);
    color: #fffaf5;
    box-shadow: 0 4px 14px rgba(154, 52, 18, 0.28);
}
.btn-primary:hover {
    background: var(--color-accent-dark);
    box-shadow: 0 6px 20px rgba(154, 52, 18, 0.38);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #fffdf8;
    color: var(--color-text-default);
    border-color: var(--color-border);
}
.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-quiet {
    background: transparent;
    color: var(--color-text-muted);
    border-color: transparent;
}
.btn-quiet:hover { color: var(--color-accent); }

.btn-cv {
    background: #1c1915;
    color: #f6f1e8;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(28, 25, 21, 0.2);
}
.btn-cv:hover {
    background: #2d2820;
    box-shadow: 0 6px 20px rgba(28, 25, 21, 0.3);
    transform: translateY(-1px);
}

/* ============================================================
   IDENTITY CARD (RIGHT SIDE OF HERO)
   ============================================================ */
.identity-card {
    padding: .8rem;
    border-radius: var(--radius-xl);
    background: #1c1915;
    color: #f6f1e8;
    box-shadow: 0 32px 64px -24px rgba(28, 25, 21, 0.65), 0 0 0 1px rgba(255,255,255,0.04);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Subtle shimmer line */
.identity-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.identity-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(194, 65, 12, .55), transparent 42%),
        #2a241e;
}
.identity-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.identity-mark {
    display: none;
    position: absolute;
    inset: 0;
    place-items: center;
    font-family: "Fraunces", Georgia, serif;
    font-size: 4.5rem;
    letter-spacing: -0.05em;
    color: rgba(246, 241, 232, 0.8);
}
.identity-photo.is-missing img { display: none; }
.identity-photo.is-missing .identity-mark { display: grid; }

.identity-facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem 1rem;
    margin: 1rem .35rem .4rem;
}
.identity-facts dt {
    color: #b7aa9a;
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 600;
}
.identity-facts dd { margin: .2rem 0 0; font-weight: 650; font-size: .93rem; }

.identity-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-top: .85rem;
}
.identity-links a {
    padding: .75rem .4rem;
    border-radius: .85rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255,255,255,.07);
    color: #fffaf5;
    font-weight: 650;
    font-size: .9rem;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.identity-links a:hover {
    background: rgba(255, 255, 255, .13);
    border-color: rgba(255,255,255,.18);
}

/* ============================================================
   SECTION BANDS
   ============================================================ */
.band { padding: 2rem 0 3rem; }
.band-head { max-width: 42rem; margin-bottom: 2rem; }

.eyebrow {
    color: var(--color-accent);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.band-head h2,
.contact-band h2 {
    margin-top: .4rem;
    font-size: clamp(2.1rem, 4vw, 3.3rem);
    font-weight: 560;
    letter-spacing: -0.04em;
    line-height: 1.02;
}
.band-head p:last-child {
    margin-top: .75rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* ============================================================
   PROJECTS — RICH VISUAL CARDS
   ============================================================ */
.case-list { display: grid; gap: 1rem; }

.case {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: #fffdf8;
    overflow: hidden;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
    position: relative;
}

.case:hover {
    border-color: var(--color-accent-warm);
    box-shadow: 0 20px 50px -20px rgba(154, 52, 18, 0.2);
    transform: translateY(-3px);
}

/* Coloured left accent stripe */
.case-stripe {
    width: 4px;
    background: linear-gradient(180deg, var(--color-accent), var(--color-accent-warm));
    border-radius: 0;
    flex-shrink: 0;
}
.case-stripe-blue { background: linear-gradient(180deg, #1d4ed8, #2563eb); }
.case-stripe-teal { background: linear-gradient(180deg, #0f766e, #0d9488); }
.case-stripe-green { background: linear-gradient(180deg, #15803d, #16a34a); }

/* Inner body */
.case-body {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.6rem;
    gap: .2rem;
    min-width: 0;
}

.case-index {
    font-family: "Fraunces", Georgia, serif;
    font-size: 1rem;
    color: var(--color-text-muted);
    letter-spacing: .04em;
    margin-bottom: .3rem;
}

.case-kicker {
    color: var(--color-text-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.case h3 {
    margin: .25rem 0 .4rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-text-default);
}

.case p:last-of-type {
    color: var(--color-text-muted);
    line-height: 1.6;
    font-size: .98rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .9rem 0 0;
}
.project-tags span {
    padding: .3rem .7rem;
    border-radius: 999px;
    background: rgba(154, 52, 18, 0.08);
    color: var(--color-accent);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .02em;
}

/* CTA side */
.case-cta {
    display: flex;
    align-items: center;
    padding: 1.5rem 1.6rem;
    border-left: 1px solid var(--color-border);
    background: rgba(244, 240, 231, 0.5);
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
    color: var(--color-text-default);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    padding: .75rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.case-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(154, 52, 18, 0.05);
}
.case-link svg { width: .9em; height: .9em; flex-shrink: 0; }

/* CTA column with a project photo behind the button */
.case-cta-photo {
    position: relative;
    min-width: 300px;
    justify-content: center;
    background: #1c1917 var(--cta-photo) var(--cta-pos, center 45%) / var(--cta-size, cover) no-repeat;
    border-left: 0;
    overflow: hidden;
}
.case-cta-photo::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0) 40%, rgba(28, 25, 23, 0.55) 100%);
    transition: background var(--transition-base);
}
.case:hover .case-cta-photo::before {
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.1) 30%, rgba(28, 25, 23, 0.65) 100%);
}
.case-cta-photo .case-link {
    position: relative;
    align-self: flex-end;
    background: rgba(255, 253, 248, 0.94);
    border-color: transparent;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}
.case-cta-photo .case-link:hover { background: #fffdf8; }

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skill-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.skill-groups article {
    padding: 1.75rem 1.6rem;
    border-radius: var(--radius-lg);
    background: #1c1915;
    color: #f6f1e8;
    position: relative;
    overflow: hidden;
}

/* Subtle glow top-right */
.skill-groups article::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(194, 65, 12, 0.14), transparent 65%);
    pointer-events: none;
}

.skill-groups h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.2rem;
    color: #f6f1e8;
}

.skill-groups ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .75rem;
}

.skill-groups li {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.skill-groups li:last-child { border-bottom: none; padding-bottom: 0; }

.skill-groups strong { display: block; font-weight: 700; font-size: .95rem; }
.skill-groups span { margin-top: .1rem; color: #cbbfae; font-size: .85rem; display: block; }

/* ============================================================
   ACADEMIC SECTION
   ============================================================ */
.academic-showcase {
    padding: 6rem 1.25rem;
    background: #f3f6fa;
    border-top: 1px solid var(--color-border);
}
.academic-shell { width: min(1120px, 100%); margin: 0 auto; }
.academic-eyebrow { color: var(--color-accent); font-size: .74rem; font-weight: 800; letter-spacing: .16em; }
.academic-heading-row { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-top: .45rem; }
.academic-heading-row h2 { color: var(--color-text-default); font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; letter-spacing: -.045em; }
.academic-heading-row p { max-width: 42rem; margin-top: .65rem; color: var(--color-text-muted); line-height: 1.65; }

.year-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; margin: 2.2rem 0 4.5rem; }
.year-tab {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    padding: 1.25rem 1.4rem;
    text-align: left;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, background-color .22s ease, box-shadow .22s ease, opacity .22s ease;
}
.year-tab:hover { transform: translateY(-3px); border-color: var(--color-accent-warm); box-shadow: 0 14px 30px -14px rgba(154,52,18,.2); }
.year-tab strong { color: var(--color-text-default); font-size: 1.25rem; }
.year-tab span { color: var(--color-text-muted); font-size: 1rem; }
.year-tab.is-active { border-color: var(--color-accent); background: #eaf6fd; box-shadow: 0 12px 30px rgba(2,132,199,.13); }
.year-tab.is-active span { color: var(--color-accent); }

.academic-year-panel { animation: academic-panel-in .28s ease both; }
.academic-year-panel[hidden] { display: none !important; }
@keyframes academic-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.semester-block + .semester-block { margin-top: 4.75rem; }
.semester-heading { display: flex; align-items: baseline; gap: 1rem; padding-bottom: 1.1rem; margin-bottom: 1.45rem; border-bottom: 1px solid var(--color-border); }
.semester-heading span { color: var(--color-text-muted); font-size: .82rem; letter-spacing: .12em; }
.semester-heading h3 { color: var(--color-text-default); font-size: clamp(1.55rem, 3vw, 2rem); font-weight: 750; }

.academic-period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; align-items: stretch; }
.academic-period-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(1.45rem, 3vw, 2rem);
    border: 1px solid var(--color-border);
    border-radius: 1.25rem;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15,23,42,.07);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.academic-period-card:hover { transform: translateY(-5px); border-color: var(--color-accent-warm); box-shadow: 0 22px 46px -20px rgba(154,52,18,.2); }
.period-label { color: var(--color-accent); font-size: 1rem; font-weight: 700; }
.academic-period-card > h3 { margin-top: .7rem; color: var(--color-text-default); font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 750; letter-spacing: -.025em; }
.period-description { margin-top: .8rem; color: var(--color-text-muted); font-size: 1rem; line-height: 1.6; }
.period-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0 1.45rem; }
.period-tags span { padding: .38rem .8rem; border-radius: 999px; background: #e0f2fe; color: #0369a1; font-size: .78rem; font-weight: 700; }

/* Collapsible file groups */
.period-resources { display: grid; grid-template-columns: 1fr; gap: .7rem; margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--color-border); }
.period-resource-group { border: 1px solid var(--color-border); border-radius: .8rem; background: #f8fafc; }
.period-resource-group > summary { list-style: none; display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .8rem .95rem; font-size: .9rem; font-weight: 700; color: var(--color-accent); }
.period-resource-group > summary::-webkit-details-marker { display: none; }
.period-resource-group > summary::after { content: "+"; margin-left: auto; font-size: 1.1rem; line-height: 1; }
.period-resource-group[open] > summary::after { content: "\2212"; }
.period-resource-group[open] > summary { border-bottom: 1px solid var(--color-border); }
.rg-title { display: flex; align-items: center; gap: .45rem; }
.rg-count { margin-left: .25rem; padding: .1rem .55rem; border: 1px solid var(--color-border); border-radius: 999px; background: #ffffff; color: var(--color-text-muted); font-size: .7rem; font-weight: 600; }
.period-empty { margin: 0; padding: .8rem .95rem; color: var(--color-text-muted); font-size: .78rem; font-style: italic; }

/* Artifact List Rows */
.artifact-list { list-style: none; margin: 0; padding: .4rem .45rem .55rem; display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.artifact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border-radius: .5rem; background: transparent; transition: background-color .2s ease; text-decoration: none; }
.artifact-card:hover { background: color-mix(in srgb, var(--color-accent) 9%, transparent); }
.artifact-text { min-width: 0; }
.artifact-card strong {
    display: block;
    min-width: 0;
    color: var(--color-text-default);
    font-size: .85rem;
    line-height: 1.4;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
}
.artifact-card small { display: block; margin-top: .1rem; color: var(--color-text-muted); font-size: .72rem; white-space: normal; overflow-wrap: break-word; }
.artifact-open { color: var(--color-accent); font-size: .95rem; font-weight: 700; align-self: center; }

/* Academic overrides for portfolio theme */
body.portfolio .academic-showcase {
    padding: 1rem 0 3rem;
    background: transparent;
    border: 0;
}
body.portfolio .academic-shell { width: 100%; }
body.portfolio .academic-heading-row h2 { font-family: "Fraunces", Georgia, serif; font-weight: 560; }
body.portfolio .year-tabs { grid-template-columns: repeat(2, minmax(0, 16rem)); justify-content: start; margin-bottom: 2.5rem; }
body.portfolio .year-tab.is-active { background: #fff7ed; border-color: #c2410c; box-shadow: none; }
body.portfolio .year-tab.is-active span,
body.portfolio .period-label,
body.portfolio .academic-eyebrow { color: #9a3412; }
body.portfolio .academic-period-card,
body.portfolio .year-tab { background: #fffdf8; box-shadow: none; }
body.portfolio .period-tags span { background: #ffedd5; color: #9a3412; }
body.portfolio .period-resource-group > summary { color: #9a3412; }

.academic-note { margin: 1rem 0 0; color: var(--color-text-muted); }
.academic-note a { color: #9a3412; font-weight: 700; }
body.is-guest .period-resources { display: none; }

/* ============================================================
   CONTACT SECTION — CTA UPGRADE
   ============================================================ */
.contact-band {
    margin-top: .5rem;
    padding: 3rem 2.5rem;
    border-radius: var(--radius-xl);
    background: #1c1915;
    color: #f6f1e8;
    position: relative;
    overflow: hidden;
}

/* Animated gradient shimmer */
.contact-band::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(234, 88, 12, 0.18), transparent 65%);
    pointer-events: none;
}
.contact-band::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(154, 52, 18, 0.12), transparent 65%);
    pointer-events: none;
}

.contact-band .eyebrow { color: #fdba74; }
.contact-band h2 { max-width: 18ch; margin-top: .4rem; font-size: clamp(2.1rem, 4vw, 3.3rem); }
.contact-band p:not(.eyebrow) { max-width: 36rem; margin-top: .85rem; color: #d6cbbd; line-height: 1.6; font-size: 1.05rem; }

.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; position: relative; z-index: 1; }
.contact-band .btn-primary { background: #fff7ed; color: #1c1915; box-shadow: 0 4px 14px rgba(255, 237, 213, 0.2); }
.contact-band .btn-primary:hover { background: #ffedd5; }
.contact-band .btn-secondary { background: rgba(255,255,255,.07); color: #fffaf5; border-color: rgba(255,255,255,.18); }
.contact-band .btn-secondary:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.3); }

/* Availability badge in contact */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: .4rem .9rem;
    border-radius: 999px;
    background: rgba(101, 163, 13, 0.14);
    border: 1px solid rgba(101, 163, 13, 0.3);
    color: #a3e635;
    font-size: .82rem;
    font-weight: 650;
    width: fit-content;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.4rem 0 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--color-text-muted);
    font-size: .88rem;
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
}

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
/* Turned off: content is visible straight away { opacity: 1; transform: none; }

/* ============================================================
   FOCUS STYLES (ACCESSIBILITY)
   ============================================================ */
body.portfolio a:focus-visible,
body.portfolio button:focus-visible {
    outline: 2px solid #c2410c;
    outline-offset: 3px;
    border-radius: 3px;
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

/* Legacy accordion helpers (portfolio.php) */
.accordion-icon { transition: transform 0.3s ease; }
.rotated { transform: rotate(180deg); }
.year-content, .semester-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .header-mail { display: none; }
    .site-header-inner { gap: .85rem; }
    .brand { font-size: 1.2rem; }
    .site-nav { gap: .65rem; }
    .site-nav a { font-size: .88rem; }
}

@media (max-width: 960px) {
    .skill-groups article { padding-left: 1.4rem; padding-right: 1.4rem; }
    /* Laptops with display scaling land here: keep the photo beside the text,
just narrower */
    .case-cta-photo { min-width: 240px; }
    .case-body { padding: 1.25rem; }
    .site-footer { flex-direction: column; }
}

@media (max-width: 820px) {
    .site-nav { display: none; }
    .menu-button { display: inline-flex; }
    .mobile-menu:not(.hidden) { display: grid; }
    .hero { grid-template-columns: 1fr; padding-top: 2.6rem; gap: 2rem; }
    .identity-card { width: min(100%, 380px); }
}

@media (max-width: 800px) {
    .year-tabs { grid-template-columns: repeat(2, 1fr); margin-bottom: 3rem; }
    .academic-period-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .academic-showcase { padding: 4rem 1rem; }
    .year-tabs { grid-template-columns: 1fr; }
    .semester-heading { display: block; }
    .semester-heading h3 { margin-top: .35rem; }
    body.portfolio main,
.site-header-inner,
.mobile-menu,
.site-footer { width: min(1120px, calc(100% - 1.5rem)); }
    .hero h1 { font-size: 3rem; }
    body.portfolio .year-tabs { grid-template-columns: 1fr; }
    .contact-band { padding: 1.8rem 1.25rem; }
    .contact-band h2 { font-size: 2rem; }
}

/* Logo instead of a photo: no dark fade,
keep the logo crisp */
.case-cta-logo::before { display: none; }
.case-cta-logo { border-left: 1px solid var(--color-border); }

/* EN / NL language switch in the header */
.lang-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: #fffdf8;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}
.lang-toggle a {
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.lang-toggle a:hover { color: var(--color-accent); }
.lang-toggle a.is-active { background: var(--color-text-default); color: #fffdf8; }
@media (max-width: 820px) {
    .lang-toggle { margin-left: auto; }
    .lang-toggle + .menu-button { margin-left: .5rem; }
}

/* Phones and small windows: photo goes under the text,
tall enough to show people */
@media (max-width: 700px) {
    .skill-groups { grid-template-columns: 1fr; }
    .case { grid-template-columns: auto 1fr; }
    .case-cta {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid var(--color-border);
        padding: 1rem 1.25rem;
    }
    .case-cta.case-cta-photo {
        border-top: 0;
        display: flex;
        grid-column: 1 / -1;
        min-width: 0;
        min-height: 0;
        aspect-ratio: 16 / 10;
        padding: 1rem;
        background-position: var(--cta-pos-sm, var(--cta-pos, center 45%));
    }
}
