:root {
    --carbon: #0F1115;
    --graphite: #161A22;
    --graphite-soft: #1D2330;
    --ice: #F5F7FA;
    --steel: #9AA4B2;
    --blue: #0051FF;
    --sky: #4DA3FF;
    --red: #FF2A2A;
    --line: rgba(245, 247, 250, 0.12);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    --radius: 8px;
    --max: 1360px;
    --page-gutter: clamp(26px, 4vw, 72px);
    --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    --font-heading: "Space Grotesk", "Manrope", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Manrope", Inter, ui-sans-serif, system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    align-items: center;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ice);
    background:
        radial-gradient(circle at 18% 12%, rgba(0, 81, 255, 0.18), transparent 28rem),
        linear-gradient(180deg, rgba(0, 81, 255, 0.10), transparent 340px),
        var(--carbon);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    width: min(var(--max), calc(100% - 32px));
    margin: 14px auto 0;
    padding: 10px 12px;
    border: 1px solid rgba(245, 247, 250, 0.10);
    border-radius: 999px;
    background: rgba(15, 17, 21, 0.78);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 214px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: var(--graphite);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    line-height: 1.1;
}

.brand small,
.meta,
.form-help {
    color: var(--steel);
    font-size: 0.88rem;
}

.site-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border: 1px solid rgba(245, 247, 250, 0.08);
    border-radius: 999px;
    background: rgba(22, 26, 34, 0.82);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    color: var(--steel);
    border-radius: 999px;
    transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--ice);
    background: rgba(0, 81, 255, 0.20);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.mode-toggle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-width: 178px;
    min-height: 38px;
    padding: 4px;
    color: var(--steel);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--graphite);
    cursor: pointer;
}

.mode-toggle::before {
    content: "";
    position: absolute;
    inset: 4px auto 4px 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: var(--blue);
    transition: transform 220ms ease;
}

body[data-mode="academic"] .mode-toggle::before {
    transform: translateX(100%);
    background: var(--red);
}

.mode-toggle span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ice);
}

.icon-link,
.btn,
.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ice);
    background: var(--graphite);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.icon-link:hover,
.btn:hover,
.mini-btn:hover {
    transform: translateY(-2px);
    
}

.btn-primary {
    border-color: transparent;
    background: var(--red);
}

.btn-primary:hover {
    background: var(--graphite);
    color: var(--ice);
}

.btn-secondary {
    border-color: rgba(255, 42, 42, 0.55);
    background: var(--red);
}

.btn-ghost {
    background: transparent;
}

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 44px;
    align-items: center;
    min-height: calc(100vh - 112px);
    padding: 42px 0 70px;
}

.hero-home {
    position: relative;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.62fr);
    min-height: calc(100vh - 92px);
    margin-top: 14px;
    padding: clamp(56px, 8vw, 118px) clamp(18px, 5vw, 74px);
    border: 1px solid rgba(77, 163, 255, 0.20);
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0, 81, 255, 0.96), rgba(0, 81, 255, 0.84) 54%, rgba(15, 17, 21, 0.86)),
        var(--blue);
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 81, 255, 0.96), rgba(0, 81, 255, 0.70) 48%, rgba(15, 17, 21, 0.42)),
        url("../img/eg-hero.jpg") right center / cover no-repeat;
    opacity: 0.92;
}

.hero-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0, rgba(15, 17, 21, 0.24) 72%, rgba(15, 17, 21, 0.84) 100%),
        repeating-linear-gradient(90deg, rgba(245, 247, 250, 0.055) 0 1px, transparent 1px 170px);
}

.hero-home .hero-content,
.hero-panel {
    position: relative;
    z-index: 1;
}

.hero-home h1 {
    max-width: 920px;
    font-size: clamp(4.4rem, 8.6vw, 9.8rem);
    line-height: 0.92;
    text-wrap: balance;
}

.hero-home .hero-copy {
    max-width: 600px;
    margin-left: auto;
    color: rgba(245, 247, 250, 0.90);
    font-size: clamp(1.25rem, 2.2vw, 2.25rem);
    line-height: 1.17;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 32px;
    padding: 8px 12px;
    border: 1px solid rgba(245, 247, 250, 0.24);
    border-radius: 999px;
    background: rgba(15, 17, 21, 0.22);
    color: rgba(245, 247, 250, 0.92);
    font-weight: 700;
    font-size: 0.88rem;
}

.availability span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 5px rgba(255, 42, 42, 0.18);
}

.hero-home .hero-actions {
    margin-top: 34px;
}

.hero-home .btn {
    min-height: 50px;
    padding-inline: 22px;
    background: rgba(15, 17, 21, 0.24);
    border-color: rgba(245, 247, 250, 0.22);
}

.hero-home .btn-primary {
    background: var(--ice);
    color: var(--blue);
}

.hero-home .btn-primary:hover {
    background: var(--graphite);
    color: var(--ice);
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    max-width: 640px;
    margin-top: 54px;
}

.hero-metrics div {
    padding: 14px;
    border: 1px solid rgba(245, 247, 250, 0.18);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.18);
}

.hero-metrics strong,
.hero-metrics span {
    display: block;
}

.hero-metrics strong {
    font-size: 1.7rem;
    line-height: 1;
}

.hero-metrics span {
    margin-top: 6px;
    color: rgba(245, 247, 250, 0.74);
    font-size: 0.84rem;
}

.hero-panel {
    align-self: stretch;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
    min-height: 520px;
    padding: 18px;
    border: 1px solid rgba(245, 247, 250, 0.20);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.38);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.panel-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.panel-topline span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--ice);
    color: var(--blue);
    font-weight: 950;
}

.panel-topline small {
    color: rgba(245, 247, 250, 0.72);
}

.hero-portrait {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 260px;
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(77, 163, 255, 0.30), rgba(0, 81, 255, 0.10)),
        rgba(15, 17, 21, 0.36);
}

.hero-portrait::after {
    content: "";
    position: absolute;
    inset: auto 20px 20px 20px;
    height: 3px;
    border-radius: 999px;
    background: var(--red);
}

.hero-portrait img {
    width: min(82%, 440px);
    max-height: 340px;
    object-fit: contain;
    filter: drop-shadow(0 26px 48px rgba(0, 0, 0, 0.36));
}

.flow-tags {
    display: grid;
    gap: 8px;
}

.flow-tags span {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(245, 247, 250, 0.14);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.28);
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.readable h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(3rem, 6.8vw, 6.9rem);
    line-height: 0.94;
    letter-spacing: 0;
}

.page-hero h1,
.readable h1 {
    font-size: clamp(2.4rem, 4.6vw, 5.4rem);
}

.hero-copy,
.page-hero p,
.lead {
    max-width: 720px;
    color: var(--steel);
    font-size: 1.12rem;
}

.eyebrow {
    color: var(--red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-visual {
    position: relative;
    display: grid;
    gap: 14px;
    min-height: 520px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(0, 81, 255, 0.28), rgba(255, 42, 42, 0.10)),
        var(--graphite);
    box-shadow: var(--shadow);
}

.hero-visual img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.hero-visual span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 17, 21, 0.64);
    font-weight: 800;
}

.signal-line {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), var(--sky), var(--red));
    animation: flow 2.8s ease-in-out infinite alternate;
}

@keyframes flow {
    from {
        transform: scaleX(0.68);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.section-grid,
.skills-band,
.quote-panel,
.page-hero,
.filter-bar,
.search-panel,
.auth-layout,
.contact-layout,
.admin-layout,
.identity-strip,
.intro-section,
.process-section,
.academic-preview,
.journal-preview {
    margin: 72px 0;
}

.identity-strip {
    display: flex;
    gap: 10px;
    overflow: hidden;
    padding-block: 18px;
    border-block: 1px solid var(--line);
}

.identity-strip span {
    flex: 1 0 auto;
    min-width: max-content;
    color: rgba(245, 247, 250, 0.42);
    font-weight: 850;
    text-transform: uppercase;
    font-size: clamp(1rem, 2.2vw, 2.3rem);
}

.intro-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 32px;
    align-items: end;
}

.intro-copy h2,
.process-section h2,
.academic-copy h2 {
    margin: 0;
    font-size: 70px;
    line-height: 0.98;
    text-wrap: balance;
}

.intro-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--graphite);
}


.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sky);
    font-weight: 850;
}

.text-link::after {
    content: "";
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease;
}

.text-link:hover::after {
    transform: translateX(8px);
}

.section-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: start;
    padding: 46px 0;
    border-block: 1px solid var(--line);
    align-items: center;
}

h2,
h3 {
    margin: 0 0 12px;
    line-height: 1.08;
    letter-spacing: 0;
}

.section-grid h2,
.section-heading h2 {
    font-size: clamp(2rem, 3.4vw, 3.8rem);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: end;
    margin-bottom: 28px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.featured-grid {
    align-items: stretch;
}

.project-grid.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 80px;
}

.project-card,
.article-row,
.trace-row,
.dashboard-tile,
.comment,
.timeline article,
.notice,
.contact-aside {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--graphite);
}

.project-card {
    overflow: hidden;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(77, 163, 255, 0.46);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

.media-block {
    position: relative;
    display: flex;
    align-items: end;
    min-height: 290px;
    padding: 20px;
    background: var(--graphite-soft);
}

.media-block::before,
.media-block::after {
    content: "";
    position: absolute;
    inset: auto 18px 54px 18px;
    height: 2px;
    background: var(--sky);
}

.media-block::after {
    inset: auto 18px 34px 90px;
    background: var(--red);
}

.tone-1 { background: linear-gradient(145deg, #101827, #0051FF); }
.tone-2 { background: linear-gradient(145deg, #101827, #073C90); }
.tone-3 { background: linear-gradient(145deg, #101827, #1D2330); }
.tone-4 { background: linear-gradient(145deg, #101827, #0D4A72); }

.media-block span {
    position: relative;
    z-index: 1;
    font-weight: 900;
}

.media-block strong {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 1;
    color: rgba(245, 247, 250, 0.66);
    font-size: 3.2rem;
    line-height: 1;
}

.card-body {
    padding: 22px;
}

.project-card-premium .card-body h3 {
    font-size: 1.45rem;
}

.card-body p,
.article-row p,
.trace-row p,
.dashboard-tile p,
.timeline p,
.case-content p,
.readable p,
.contact-aside a {
    color: var(--steel);
}

.skills-band {
    padding: 44px 0;
    border-block: 1px solid var(--line);
}

.premium-band {
    padding: 58px 0;
}

.process-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 42px;
    align-items: start;
    padding: 54px 0;
    border-block: 1px solid var(--line);
}

.process-list {
    display: grid;
    gap: 12px;
}

.process-list article {
    display: grid;
    grid-template-columns: 52px minmax(0, 170px) 1fr;
    gap: 18px;
    align-items: baseline;
    padding: 18px 0;
    align-items: center;
}

.process-list span {
    color: var(--sky);
    font-weight: 950;
}

.process-list p {
    margin: 0;
    color: var(--steel);
}

.skill-list {
    display: grid;
    gap: 10px;
}

.skill-list-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.skill-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    align-items: center;
    min-height: 58px;
}

.skill-list-premium .skill-row {
    grid-template-columns: 1fr;
    min-height: 146px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(0, 81, 255, 0.12), transparent),
        var(--graphite);
}

.skill-list-premium .skill-row strong {
    font-size: 1.55rem;
}

.quote-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(0, 81, 255, 0.20), rgba(77, 163, 255, 0.08)),
        var(--graphite);
}

blockquote {
    max-width: 780px;
    margin: 0;
    font-size: clamp(1.8rem, 3.2vw, 3.4rem);
    line-height: 1.05;
}

.page-hero.compact {
    max-width: 900px;
    margin-top: 70px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-bar a {
    padding: 9px 14px;
    color: var(--steel);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.filter-bar a.is-selected,
.filter-bar a:hover {
    color: var(--ice);
    border-color: var(--sky);
    background: rgba(0, 81, 255, 0.18);
}

.case-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    margin-bottom: 90px;
}

.case-aside {
    position: sticky;
    top: 100px;
    align-self: start;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px;
    border-left: 3px solid var(--red);
    background: rgba(22, 26, 34, 0.66);
}

.academic-preview {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: center;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(0, 81, 255, 0.20), rgba(77, 163, 255, 0.04)),
        var(--graphite);
}

.trace-preview-list {
    display: grid;
    gap: 12px;
}

.trace-preview-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.44);
    transition: transform 180ms ease, border-color 180ms ease;
}

.trace-preview-card:hover {
    transform: translateX(6px);
    border-color: rgba(77, 163, 255, 0.48);
}

.trace-preview-card small,
.trace-preview-card span {
    color: var(--steel);
}

.trace-preview-card strong {
    font-size: 1.25rem;
}

.compact-list {
    margin-bottom: 0;
}

.case-aside .meta {
    width: 100%;
}

.pill {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ice);
}

.case-content {
    display: grid;
    gap: 20px;
}

.case-content section,
.readable {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
}

.article-list,
.trace-list,
.dashboard-grid,
.timeline,
.comment-admin-list {
    display: grid;
    gap: 16px;
    margin-bottom: 80px;
}

.article-row,
.trace-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 0.8fr;
    gap: 28px;
    padding: 24px;
}

.trace-meta {
    display: grid;
    gap: 8px;
    align-content: start;
}

.trace-meta span,
.trace-meta strong,
.trace-meta small {
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.search-panel,
.stack-form {
    display: grid;
    gap: 14px;
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) 260px auto;
    align-items: end;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--graphite);
}

label {
    display: grid;
    gap: 7px;
    color: var(--steel);
    font-size: 0.92rem;
}

input,
textarea,
select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ice);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    background: #0B0D11;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.16);
}

.auth-layout,
.contact-layout,
.admin-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 44px;
    align-items: start;
}

.auth-form,
.contact-layout .stack-form,
.admin-layout .stack-form {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--graphite);
}

.contact-aside {
    display: grid;
    gap: 12px;
    padding: 24px;
}

.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-tile {
    min-height: 210px;
    padding: 24px;
}

.dashboard-tile span {
    color: var(--sky);
    font-weight: 900;
}

.dashboard-tile.admin {
    border-color: rgba(255, 42, 42, 0.45);
}

.timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 50px;
}

.timeline article {
    padding: 24px;
}

.timeline span {
    color: var(--red);
    font-weight: 900;
}

.comments-zone {
    display: grid;
    gap: 14px;
}

.comment {
    padding: 18px;
}

.comment time {
    display: block;
    color: var(--steel);
    font-size: 0.84rem;
}

.notice {
    padding: 22px;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--graphite);
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-table small {
    display: block;
    color: var(--steel);
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mini-btn {
    min-height: 34px;
    padding: 0 10px;
    margin-right: 6px;
}

.mini-btn.danger {
    border-color: rgba(255, 42, 42, 0.55);
    color: #FFD8D8;
}

.flash {
    width: min(var(--max), calc(100% - 32px));
    margin: 18px auto 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--graphite);
}

.flash-success {
    border-color: rgba(77, 163, 255, 0.45);
}

.flash-error {
    border-color: rgba(255, 42, 42, 0.55);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    width: min(var(--max), calc(100% - 32px));
    margin: 80px auto 0;
    padding: 34px 0;
    border-top: 1px solid var(--line);
    color: var(--steel);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links a:hover,
.contact-aside a:hover,
.article-row a:hover,
.project-card a:hover,
.trace-row a:hover {
    color: var(--sky);
}

.reveal-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 420ms ease, transform 420ms ease;
}

.reveal-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body[data-mode="professional"] .academic-only {
    display: none;
}

body[data-mode="academic"] .eyebrow {
    color: var(--red);
}

/* Direction artistique 02: portfolio immersif, pleine largeur, typographie forte */
body {
    background:
        linear-gradient(180deg, rgba(0, 81, 255, 0.15) 0, rgba(15, 17, 21, 0) 34rem),
        linear-gradient(90deg, rgba(245, 247, 250, 0.028) 1px, transparent 1px),
        var(--carbon);
    background-size: auto, 96px 96px, auto;
}

.site-header {
    width: min(1840px, calc(100% - (var(--page-gutter) * 2)));
    max-width: 1840px;
    min-height: 76px;
    margin-top: clamp(10px, 1.4vw, 20px);
    padding: 10px;
}

.brand strong,
.nav-link,
.icon-link,
.btn,
.mode-toggle {
    font-family: var(--font-heading);
}

.brand strong {
    font-size: 1rem;
}

.brand small {
    font-family: var(--font-body);
}

.site-nav {
    min-height: 54px;
    padding: 7px;
}

.nav-link {
    min-height: 40px;
    padding: 0 clamp(13px, 1.5vw, 24px);
    font-weight: 700;
    color: rgba(245, 247, 250, 0.78);
}

.nav-link.is-active {
    background: rgba(0, 81, 255, 0.34);
}

.icon-link {
    min-height: 54px;
    padding-inline: 24px;
    border-color: transparent;
    border-radius: 999px;
    background: var(--red);
    color: var(--ice);
    font-weight: 800;
}

.mode-toggle {
    min-height: 54px;
    min-width: 196px;
    background: rgba(22, 26, 34, 0.72);
}

main {
    width: 100%;
    margin: 0;
}

main > section:not(.hero-home):not(.identity-strip),
main > article {
    width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
    margin-left: auto;
    margin-right: auto;
}

.hero-home {
    width: min(1880px, calc(100% - (var(--page-gutter) * 2)));
    max-width: 1880px;
    min-height: calc(100svh - 104px);
    margin: clamp(10px, 1.5vw, 18px) auto 0;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.56fr);
    gap: clamp(24px, 4vw, 72px);
    padding: clamp(52px, 6.6vw, 112px) clamp(24px, 5vw, 92px) clamp(76px, 7vw, 126px);
    border-color: rgba(245, 247, 250, 0.14);
    background: var(--blue);
    isolation: isolate;
}

.hero-background {
    background:
        linear-gradient(90deg, rgba(0, 81, 255, 0.98) 0%, rgba(0, 81, 255, 0.88) 38%, rgba(15, 17, 21, 0.34) 78%),
        url("../img/eg-hero.jpg") right center / cover no-repeat;
}

.hero-background::after {
    background:
        linear-gradient(180deg, rgba(0, 81, 255, 0) 0, rgba(15, 17, 21, 0.28) 76%, rgba(15, 17, 21, 0.92) 100%),
        linear-gradient(90deg, rgba(245, 247, 250, 0.09) 1px, transparent 1px),
        linear-gradient(180deg, rgba(245, 247, 250, 0.07) 1px, transparent 1px);
    background-size: auto, 150px 150px, 150px 150px;
    mix-blend-mode: soft-light;
}

.liquid-map {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.68;
}

.liquid-map span {
    position: absolute;
    width: min(52vw, 780px);
    height: min(52vw, 780px);
    border: 1px solid rgba(245, 247, 250, 0.22);
    border-radius: 42% 58% 54% 46%;
    transform: rotate(-12deg);
}

.liquid-map span:nth-child(1) {
    top: -18%;
    left: 42%;
}

.liquid-map span:nth-child(2) {
    width: min(34vw, 520px);
    height: min(34vw, 520px);
    right: -6%;
    bottom: 8%;
    border-color: rgba(77, 163, 255, 0.32);
}

.liquid-map span:nth-child(3) {
    width: min(26vw, 420px);
    height: min(26vw, 420px);
    left: -8%;
    bottom: -10%;
    border-color: rgba(255, 42, 42, 0.40);
}

.hero-home h1 {
    max-width: min(61vw, 1040px);
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 7.35vw, 9.3rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 0.89;
    text-transform: uppercase;
}

.hero-home .hero-copy {
    max-width: 720px;
    margin: clamp(26px, 4vw, 52px) 0 0 auto;
    font-family: var(--font-heading);
    font-size: clamp(1.22rem, 2.05vw, 2.35rem);
    font-weight: 500;
    line-height: 1.12;
}

.availability {
    margin-bottom: clamp(28px, 4vw, 58px);
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.78rem;
}

.hero-home .hero-actions {
    align-items: center;
}

.btn {
    min-height: 48px;
    padding-inline: 20px;
    border-radius: 999px;
    font-weight: 800;
}

.hero-home .btn {
    min-height: 58px;
    padding-inline: 26px;
}

.hero-metrics {
    max-width: 760px;
    gap: 10px;
}

.hero-metrics div {
    min-height: 112px;
    display: grid;
    align-content: end;
    background: rgba(15, 17, 21, 0.26);
    backdrop-filter: blur(12px);
}

.hero-metrics strong {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.2vw, 4rem);
}

.hero-metrics span {
    font-family: var(--font-heading);
    font-weight: 700;
}

.hero-panel {
    min-height: 560px;
    align-self: end;
    border-color: rgba(245, 247, 250, 0.18);
    background: rgba(15, 17, 21, 0.30);
}

.panel-topline span {
    font-family: var(--font-display);
}

.hero-portrait {
    min-height: 360px;
    background:
        linear-gradient(135deg, rgba(245, 247, 250, 0.16), rgba(77, 163, 255, 0.10)),
        rgba(15, 17, 21, 0.28);
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.visual-cover {
    place-items: stretch;
}

.visual-cover::after {
    inset: auto 18px 18px 18px;
    z-index: 2;
}

.visual-cover img {
    position: absolute;
    inset: 0;
    filter: saturate(1.1) contrast(1.08);
}

.visual-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(15, 17, 21, 0.08), rgba(15, 17, 21, 0.64)),
        linear-gradient(90deg, rgba(0, 81, 255, 0.28), transparent);
}

.visual-caption {
    position: relative;
    z-index: 3;
    align-self: end;
    display: grid;
    gap: 4px;
    padding: 22px;
}

.visual-caption strong {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 2.4rem);
    text-transform: uppercase;
}

.visual-caption small {
    color: rgba(245, 247, 250, 0.76);
    font-weight: 700;
}

.flow-tags span {
    font-family: var(--font-heading);
    justify-content: space-between;
}

.flow-tags span::after {
    content: "";
    width: 42px;
    height: 2px;
    background: var(--sky);
}

.flow-tags span:nth-child(2)::after {
    background: var(--red);
}

.hero-marquee {
    position: absolute;
    z-index: 2;
    right: clamp(22px, 4vw, 78px);
    bottom: clamp(18px, 2.6vw, 38px);
    left: clamp(22px, 4vw, 78px);
    display: flex;
    gap: clamp(18px, 3vw, 58px);
    overflow: hidden;
    color: rgba(245, 247, 250, 0.48);
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 1.2vw, 1.25rem);
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.identity-strip {
    width: 100%;
    margin: 0;
    padding: clamp(22px, 3vw, 44px) clamp(24px, 5vw, 92px);
    border-block: 1px solid rgba(245, 247, 250, 0.10);
    background: rgba(15, 17, 21, 0.88);
}

.identity-strip span {
    font-family: var(--font-display);
    color: rgba(245, 247, 250, 0.30);
    font-size: clamp(1.35rem, 3.1vw, 4.2rem);
    text-transform: uppercase;
}

h1,
h2,
h3,
blockquote {
    font-family: var(--font-display);
}

.intro-section,
.process-section,
.academic-preview {
    margin-top: clamp(80px, 10vw, 150px);
    margin-bottom: clamp(80px, 10vw, 150px);
    align-items: center;
}

.intro-copy h2,
.process-section h2,
.academic-copy h2,
.section-heading h2 {
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.intro-section {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.intro-card {
    min-height: 320px;
    display: grid;
    align-content: end;
    padding: clamp(24px, 3vw, 44px);
    background:
        linear-gradient(135deg, rgba(0, 81, 255, 0.18), transparent 58%),
        var(--graphite);
}

.intro-card p {
    font-size: 1.12rem;
}

.featured {
    margin-top: clamp(80px, 10vw, 150px);
}

.project-grid {
    gap: clamp(14px, 1.5vw, 24px);
}

.media-block {
    min-height: clamp(260px, 28vw, 430px);
    isolation: isolate;
}

.media-block::before {
    inset: 20px;
    height: auto;
    border: 1px solid rgba(245, 247, 250, 0.16);
    background: transparent;
}

.media-block::after {
    inset: auto 22px 22px 22px;
    height: 4px;
    background: var(--red);
}

.media-block span {
    font-family: var(--font-heading);
    font-size: 1.08rem;
    text-transform: uppercase;
}

.media-block strong {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 6.8rem);
    color: rgba(245, 247, 250, 0.28);
}

.tone-1 {
    background:
        radial-gradient(circle at 28% 30%, rgba(77, 163, 255, 0.70), transparent 18%),
        linear-gradient(145deg, #061129, #0051FF);
}

.tone-2 {
    background:
        linear-gradient(135deg, transparent 0 26%, rgba(245, 247, 250, 0.12) 26% 27%, transparent 27%),
        linear-gradient(145deg, #0F1115, #0645C8);
}

.tone-3 {
    background:
        linear-gradient(90deg, rgba(255, 42, 42, 0.55) 0 5px, transparent 5px),
        linear-gradient(145deg, #111824, #22314D);
}

.project-card {
    background: rgba(22, 26, 34, 0.86);
}

.project-card-premium .card-body {
    min-height: 210px;
}

.project-card-premium .card-body h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 1.6vw, 2rem);
}

.process-section {
    padding: clamp(64px, 7vw, 110px) 0;
}

.process-list article {
    min-height: 118px;
}

.process-list span,
.timeline span {
    font-family: var(--font-display);
    color: var(--sky);
}

.process-list h3 {
    font-size: 1.4rem;
}

.skill-list-premium .skill-row {
    min-height: 190px;
    align-content: end;
}

.skill-list-premium .skill-row strong {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.2vw, 2.6rem);
    text-transform: uppercase;
}

.academic-preview {
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.82fr);
    align-items: stretch;
    overflow: hidden;
    padding: clamp(28px, 5vw, 72px);
    background:
        linear-gradient(135deg, rgba(255, 42, 42, 0.40), rgba(77, 163, 255, 0.05) 54%),
        var(--graphite);
}

.academic-copy {
    display: grid;
    align-content: end;
    min-width: 0;
}

.academic-copy h2 {
    line-height: 0.92;
}

.academic-copy p {
    max-width: 620px;
}

.trace-preview-card {
    min-height: 150px;
    align-content: end;
    position: relative;
    z-index: 1;
}

.trace-preview-card strong {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 1.7vw, 2rem);
}

.article-row {
    min-height: 170px;
}

.article-row h2 {
    font-family: var(--font-heading);
}

.quote-panel {
    margin-bottom: 0;
    padding: clamp(34px, 5vw, 72px);
}

blockquote {
    max-width: 750px;
    font-size: clamp(2rem, 4vw, 5.2rem);
    font-weight: 700;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }

    .site-nav,
    .header-actions {
        justify-self: start;
        overflow-x: auto;
        max-width: 100%;
    }

    .hero,
    .section-grid,
    .intro-section,
    .process-section,
    .academic-preview,
    .case-layout,
    .auth-layout,
    .contact-layout,
    .admin-layout,
    .article-row,
    .trace-row {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-home {
        padding: 44px 22px;
        grid-template-columns: 1fr;
    }

    .hero-home .hero-copy {
        margin-left: 0;
    }

    .hero-home h1 {
        max-width: 100%;
        font-size: clamp(3.6rem, 12vw, 7rem);
    }

    .hero-panel {
        width: min(100%, 720px);
        min-height: 0;
        align-self: start;
    }

    .hero-portrait {
        min-height: 360px;
    }

    .academic-copy h2 {
        font-size: clamp(3rem, 10vw, 6.5rem);
    }

    .hero-visual {
        min-height: 420px;
    }

    .project-grid,
    .project-grid.wide,
    .dashboard-grid,
    .timeline,
    .skill-list-premium {
        grid-template-columns: 1fr 1fr;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

    .case-aside {
        position: static;
    }
}

@media (max-width: 680px) {
    :root {
        --page-gutter: 12px;
    }

    main,
    .site-header,
    .site-footer,
    .flash {
        width: min(100% - 24px, var(--max));
    }

    .site-nav {
        justify-content: flex-start;
        border-radius: 8px;
    }

    .nav-link {
        min-height: 34px;
        padding: 0 10px;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-toggle,
    .icon-link {
        width: 100%;
    }

    .hero h1,
    .page-hero h1,
    .readable h1 {
        font-size: 2.65rem;
    }

    .hero-home h1 {
        max-width: 100%;
        font-size: clamp(2.6rem, 13.5vw, 4.9rem);
        line-height: 0.94;
    }

    .hero-home .hero-copy {
        font-size: 1.08rem;
        line-height: 1.35;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
        margin-top: 32px;
    }

    .hero-panel {
        min-height: 0;
    }

    .hero-portrait {
        min-height: 280px;
    }

    .visual-caption {
        padding: 18px;
    }

    .hero-visual {
        min-height: 0;
        padding: 14px;
    }

    .hero-visual img {
        height: 230px;
    }

    .project-grid,
    .project-grid.wide,
    .dashboard-grid,
    .timeline,
    .skill-list-premium {
        grid-template-columns: 1fr;
    }

    .process-list article {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .academic-preview {
        padding: 24px;
    }

    .academic-copy h2 {
        font-size: clamp(2.35rem, 12vw, 4.6rem);
        line-height: 0.96;
    }

    .section-heading,
    .quote-panel,
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-panel {
        padding: 26px;
    }

    .skill-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

/* Fonds hero par mode + CTA académique. */
.hero-background {
    background:
        linear-gradient(90deg, rgba(0, 81, 255, 0.88), rgba(15, 17, 21, 0.42)),
        url("../img/eg-hero-blue.jpg") center / cover no-repeat;
}

body[data-mode="academic"] .hero-home {
    border-color: rgba(255, 42, 42, 0.34);
    background:
        linear-gradient(120deg, rgba(255, 42, 42, 0.88), rgba(15, 17, 21, 0.86)),
        #7B0711;
}

body[data-mode="academic"] .hero-background {
    background:
        linear-gradient(90deg, rgba(255, 42, 42, 0.78), rgba(67, 10, 20, 0.72) 48%, rgba(15, 17, 21, 0.52)),
        url("../img/eg-hero-red.jpg") center / cover no-repeat;
    opacity: 0.86;
}

body[data-mode="academic"] .hero-background::after {
    background:
        linear-gradient(180deg, rgba(255, 42, 42, 0.02) 0, rgba(15, 17, 21, 0.38) 72%, rgba(15, 17, 21, 0.90) 100%),
        repeating-linear-gradient(90deg, rgba(245, 247, 250, 0.045) 0 1px, transparent 1px 150px);
}

body[data-mode="academic"] .hero-home .btn-primary {
    color: var(--ice);
    border-color: rgba(245, 247, 250, 0.14);
    background: var(--carbon);
}

body[data-mode="academic"] .hero-home .btn-primary:hover {
    color: var(--red);
    border-color: var(--ice);
    background: var(--ice);
}

body[data-mode="academic"] .hero-home .btn-secondary,
body[data-mode="academic"] .hero-home .btn-ghost {
    color: var(--ice);
    border-color: rgba(255, 42, 42, 0.42);
    background: rgba(42, 46, 54, 0.52);
}

body[data-mode="academic"] .hero-visual {
    border-color: rgba(255, 42, 42, 0.28);
    background: rgba(20, 13, 18, 0.48);
}

body[data-mode="academic"] .eyebrow,
body[data-mode="academic"] .text-link {
    color: #FF8A8A;
}

body[data-mode="academic"] .signal-line,
body[data-mode="academic"] .media-block::after {
    background: linear-gradient(90deg, #FF6B6B, var(--red));
}

body[data-mode="academic"] .nav-link:hover,
body[data-mode="academic"] .nav-link.is-active {
    color: var(--ice);
    background: rgba(255, 42, 42, 0.22);
}
