@font-face {
    font-family: "Space Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/space-mono-v17-latin-regular.woff2") format("woff2");
}

@font-face {
    font-family: "Space Mono";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/space-mono-v17-latin-700.woff2") format("woff2");
}

/* === Systems Tinkerer / robnet.dev style === */

:root {
    --bg: #091411;
    --panel: #101d18;
    --panel-raised: #13231c;
    --text: #edf5ef;
    --muted: #a7b8ac;
    --green: #67f59c;
    --green-soft: rgba(103, 245, 156, 0.10);
    --border: rgba(103, 245, 156, 0.25);
    --border-soft: rgba(239, 246, 240, 0.10);
    --curtain: #050a08;
    --sans: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 50% -20%, rgba(103, 245, 156, 0.055), transparent 34rem),
        var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.68;
}

body.has-intro {
    overflow: hidden;
}

html.intro-skip body.has-intro {
    overflow: auto;
}

html.intro-skip body.has-intro main {
    opacity: 1;
}

html.intro-skip #boot-intro {
    display: none;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Header navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    background: rgba(9, 20, 17, 0.92);
    border-bottom: 1px solid rgba(103, 245, 156, 0.10);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.top-nav {
    width: min(1240px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    padding: 10px 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.site-header:not(.has-section-menu) .top-nav {
    grid-template-columns: minmax(0, 1fr) auto;
}

.site-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: var(--text);
    font-family: var(--mono);
    text-decoration: none;
}

.site-wordmark-mark {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    overflow: hidden;
    padding: 3px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 18% 18%, rgba(103, 245, 156, 0.12), transparent 52%),
        radial-gradient(circle at 84% 20%, rgba(34, 170, 255, 0.16), transparent 48%),
        linear-gradient(145deg, rgba(17, 31, 26, 0.96), rgba(10, 18, 15, 0.92));
    border: 1px solid rgba(103, 245, 156, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.site-wordmark-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: saturate(0.94) contrast(1.02);
}

.site-wordmark:hover,
.site-wordmark:focus-visible {
    color: var(--text);
}

.site-wordmark-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.site-wordmark-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-wordmark-tagline {
    display: block;
    color: var(--muted);
    font-size: 0.53rem;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-wordmark-separator,
.site-wordmark-domain {
    color: var(--green);
}

.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-family: var(--mono);
    font-size: 0.70rem;
    letter-spacing: 0.05em;
}

.section-nav a,
.section-nav .section-nav-replay {
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}

.section-nav a:hover,
.section-nav a:focus-visible,
.section-nav .section-nav-replay:hover,
.section-nav .section-nav-replay:focus-visible {
    color: var(--green);
    background: var(--green-soft);
}

.section-nav .section-nav-top {
    color: var(--green);
}

.section-nav .section-nav-replay {
    appearance: none;
    border: 0;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    color: var(--green);
}

.language-switch {
    display: inline-flex;
    font-family: var(--mono);
    align-items: center;
    gap: 0;
    padding: 3px;
    color: var(--muted);
    background: rgba(13, 23, 19, 0.78);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(103, 245, 156, 0.03), 0 0 18px rgba(103, 245, 156, 0.055);
    font-size: 0.9rem;
    line-height: 1;
    letter-spacing: 0.08em;
}

.language-switch a {
    min-width: 52px;
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--muted);
    text-align: center;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.language-switch a:hover {
    color: var(--green);
    background: var(--green-soft);
}

.language-switch a.is-active {
    color: var(--bg);
    background: var(--green);
    box-shadow: 0 0 14px rgba(103, 245, 156, 0.16);
    font-weight: 800;
}

.language-switch span {
    color: var(--border);
    padding: 0 2px;
}

/* Main page layout */
main {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
}

body.has-intro main {
    opacity: 0;
    transition: opacity 0.45s ease;
}

/* Systems emblem */
.systems-emblem {
    display: flex;
    justify-content: center;
    margin: 18px auto 22px;
}

.systems-emblem img {
    width: min(220px, 48vw);
    height: auto;
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 0 18px rgba(0, 255, 127, 0.22));
}

.portrait-emblem img {
    filter: drop-shadow(0 0 18px rgba(0, 255, 127, 0.18));
}

/* Typography */
.hero-identity {
    margin: 0 auto 10px;
    font-family: var(--mono);
    color: var(--muted);
    font-size: clamp(0.72rem, 1.8vw, 0.88rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
}

.hero-identity span {
    color: var(--green);
}

h1 {
    margin: 0 0 24px;
    color: var(--green);
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.1;
    text-align: center;
    letter-spacing: -0.04em;
}

h1 span {
    display: block;
    color: var(--muted);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: normal;
    letter-spacing: 0;
    margin-top: 12px;
}

h2 {
    color: var(--green);
    font-size: 1.35rem;
    text-align: center;
    margin: 0 0 8px;
}

p {
    margin: 0 0 1.2rem;
}

ul {
    margin: 0 0 1.2rem 1.2rem;
    padding: 0;
}

li {
    margin: 0.35rem 0;
}

/* Intro */
.intro {
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
    font-size: 1.05rem;
}

.intro strong {
    color: var(--green);
}

/* Sections */
.project-section,
.archive-section,
.ability-section,
.contact-section {
    margin: 42px 0;
}

.section-intro {
    max-width: 760px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
}

/* Cards */
.ability-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 36px 0;
}

.ability-box {
    display: block;
    min-height: 160px;
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    color: var(--text);
}

.ability-box strong {
    display: block;
    color: var(--green);
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.ability-box p {
    margin: 0;
    color: var(--text);
}

/* Archive callout */
.archive-note {
    max-width: 820px;
    margin: 28px auto 0;
    padding: 22px;
    background: var(--green-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-align: center;
    color: var(--text);
}

.archive-link {
    text-align: center;
    margin: 28px auto 0;
}

.archive-link a,
.robnet-button {
    display: inline-block;
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 12px 18px;
    color: var(--green);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.archive-link a:hover,
.robnet-button:hover {
    background: var(--green);
    color: #041008;
    transform: translateY(-1px);
}

.archive-language-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

/* Interactive terminal launcher */
.terminal-launch {
    max-width: 820px;
    font-family: var(--mono);
    margin: 34px auto 0;
    padding: 0 24px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 90% 0%, rgba(0, 255, 127, 0.09), transparent 34%),
        #080d10;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.terminal-launch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0 -24px 22px;
    padding: 11px 18px;
    background: rgba(255, 255, 255, 0.035);
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
    font-size: 0.82rem;
}

.terminal-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--green);
    white-space: nowrap;
}

.terminal-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.7);
}

.terminal-launch > p {
    max-width: 660px;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--muted);
}

.terminal-launch .terminal-instruction {
    margin-bottom: 14px;
    color: var(--text);
    font-size: 0.92rem;
}

.terminal-instruction code,
.terminal-feedback code {
    color: var(--green);
    font: inherit;
}

.terminal-command-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    max-width: 690px;
    margin: 0 auto;
}

.terminal-command {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 15px 17px;
    overflow-x: auto;
    background: #030607;
    border: 1px solid rgba(0, 255, 127, 0.18);
    border-radius: 9px;
    color: var(--text);
    scrollbar-width: thin;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.terminal-command:focus-within {
    border-color: rgba(0, 255, 127, 0.62);
    box-shadow: 0 0 0 3px rgba(0, 255, 127, 0.08);
}

.terminal-prompt {
    flex: 0 0 auto;
    color: var(--muted);
    white-space: nowrap;
}

.terminal-command-input {
    flex: 1 0 110px;
    min-width: 110px;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--green);
    font: inherit;
    caret-color: var(--green);
}

.terminal-command-input::placeholder {
    color: rgba(0, 255, 127, 0.35);
    opacity: 1;
}

.terminal-cursor {
    flex: 0 0 auto;
    width: 8px;
    height: 1.05em;
    background: var(--green);
    animation: terminal-blink 1s steps(1, end) infinite;
}

.terminal-command:focus-within .terminal-cursor {
    display: none;
}

.terminal-launch-button {
    flex: 0 0 auto;
    padding: 11px 18px;
    background: transparent;
    border: 1px solid var(--green);
    border-radius: 8px;
    color: var(--green);
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.terminal-launch-button:hover,
.terminal-launch-button:focus-visible {
    background: var(--green);
    color: #041008;
    transform: translateY(-1px);
}

.terminal-feedback {
    min-height: 1.4em;
    margin: 11px auto 0 !important;
    color: var(--muted) !important;
    font-size: 0.82rem;
}

.terminal-feedback.is-success {
    color: var(--green) !important;
}

.terminal-feedback.is-error {
    color: #ff8e8e !important;
}

.terminal-command.is-error {
    border-color: rgba(255, 99, 99, 0.75);
    animation: terminal-shake 0.24s ease-in-out;
}

.terminal-launch .terminal-language-note {
    margin: 7px auto 0;
    color: var(--muted);
    font-size: 0.82rem;
}

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

@keyframes terminal-blink {
    0%, 48% { opacity: 1; }
    49%, 100% { opacity: 0; }
}

@keyframes terminal-shake {
    0%, 100% { transform: translateX(0); }
    35% { transform: translateX(-4px); }
    70% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
    .terminal-cursor,
    .terminal-command.is-error {
        animation: none;
    }
}

/* Highlight section */
.highlight-box {
    background: var(--green-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin: 38px 0 30px;
    text-align: center;
}

.highlight-box strong {
    color: var(--green);
}

.closing {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

/* Contact section */
.contact-section {
    margin-top: 48px;
    margin-bottom: 42px;
}

.email-contact,
.legal-panel {
    max-width: 820px;
    margin: 30px auto;
    padding: 28px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}

.legal-panel h2 {
    text-align: left;
    margin-top: 2rem;
}

.legal-panel h2:first-child {
    margin-top: 0;
}

.email-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.email-contact span {
    color: var(--muted);
    font-size: 0.95rem;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    max-width: 920px;
    margin: 30px auto;
}

.contact-methods .email-contact {
    max-width: none;
    margin: 0;
    height: 100%;
}

.email-contact small {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.whatsapp-contact {
    border-color: rgba(103, 245, 156, 0.22);
}

.whatsapp-btn {
    border-color: rgba(103, 245, 156, 0.65);
}

/* Footer hint */
.hint {
    max-width: 760px;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Shared button style */
.startBtn {
    appearance: none;
    font-family: var(--mono);
    border: 1px solid var(--green);
    background: transparent;
    color: var(--green);
    border-radius: 8px;
    padding: 12px 20px;
    font: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.startBtn:hover {
    background: var(--green);
    color: #041008;
    transform: translateY(-1px);
}

/* Footer menu */
.footer-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 26px auto 14px;
    text-align: center;
}

.footer-menu a,
.footer-menu .footer-link {
    font-family: var(--mono);
    color: var(--green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.15s ease;
}

.footer-menu a:hover,
.footer-menu .footer-link:hover {
    color: var(--green);
    text-decoration: none;
    opacity: 0.78;
}

.footer-link-external span {
    display: inline-block;
    margin-left: 2px;
    font-size: 0.8em;
    transition: transform 0.15s ease;
}

.footer-link-external:hover span,
.footer-link-external:focus-visible span {
    transform: translate(1px, -1px);
}

.footer-location {
    margin: 8px auto 0;
    text-align: center;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.76rem;
    letter-spacing: 0.06em;
}

.copyright {
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    margin-top: 8px;
}

/* Back to top */
.back-to-top {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    margin: 28px auto 14px;
    border: 1px solid var(--green);
    border-radius: 50%;
    color: var(--green);
    text-decoration: none;
    font-size: 1.4rem;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.back-to-top:hover {
    background: var(--green);
    color: #041008;
    transform: translateY(-2px);
}

/* Simulated console-login intro */
#boot-intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 26px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 14%, rgba(103, 245, 156, 0.08), transparent 38rem),
        linear-gradient(180deg, rgba(11, 21, 18, 0.96), rgba(5, 11, 9, 0.985));
    transition: opacity 1.15s ease 0.42s;
}

#boot-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 4px);
    opacity: 0.24;
    pointer-events: none;
}

#boot-intro.open {
    opacity: 0;
    pointer-events: none;
}

#boot-intro.is-blackout {
    background: #020403;
}

.boot-frame {
    position: relative;
    width: min(760px, calc(100% - 24px));
    border: 1px solid rgba(103, 245, 156, 0.18);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(8, 15, 12, 0.92), rgba(6, 12, 10, 0.95));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition: opacity 0.34s ease, transform 0.46s ease;
}

#boot-intro.open .boot-frame {
    opacity: 0;
    transform: translateY(-8px) scale(0.992);
}

.boot-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(circle at 85% 10%, rgba(103, 245, 156, 0.07), transparent 24rem);
}

.boot-message {
    position: relative;
    z-index: 1;
    padding: 28px 32px 14px;
    border-bottom: 1px solid rgba(103, 245, 156, 0.12);
    background: linear-gradient(180deg, rgba(9, 18, 14, 0.92), rgba(6, 12, 10, 0.76));
}

.boot-message-status {
    margin-bottom: 12px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.boot-message-headline {
    margin: 0 0 10px;
    color: var(--text);
    font-size: clamp(1.55rem, 3.5vw, 2.4rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.boot-message-subline {
    margin: 0;
    max-width: 36rem;
    color: var(--muted);
    font-family: var(--mono);
    font-size: clamp(0.92rem, 1.55vw, 1.02rem);
    line-height: 1.55;
}

.boot-message-byline {
    margin-top: 12px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.boot-login {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 236px;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px 28px;
    background: rgba(4, 9, 7, 0.86);
    opacity: 0;
    visibility: hidden;
    transform: scale(1.012);
    transition: opacity 0.42s ease, transform 0.42s ease, visibility 0s linear 0.42s;
}

.boot-login.is-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0s;
}

.boot-login-title {
    margin-bottom: 26px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.boot-login-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-height: 1.8em;
    color: var(--text);
    font-family: var(--mono);
    font-size: clamp(0.9rem, 2vw, 1.05rem);
}

.boot-login-prompt {
    color: var(--muted);
}

.boot-login-user {
    color: var(--text);
    font-weight: 700;
}

.boot-cursor {
    display: inline-block;
    width: 0.65ch;
    height: 1.05em;
    margin-left: -5px;
    background: var(--green);
    vertical-align: -0.12em;
    animation: boot-cursor-blink 0.82s steps(1) infinite;
}

.boot-login-auth {
    margin-top: 8px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.boot-login-auth strong {
    color: var(--green);
    font-size: 0.82em;
    letter-spacing: 0.08em;
}

.boot-login-auth.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.boot-login-session {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(103, 245, 156, 0.12);
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.32s ease, transform 0.32s ease;
}

.boot-login-session.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.boot-login-hint {
    margin-top: 26px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#boot-intro.is-blackout .boot-frame {
    opacity: 0;
    transform: scale(0.995);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

@keyframes boot-cursor-blink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 760px) {
    .boot-frame {
        width: min(100%, 640px);
    }

    .boot-message {
        padding: 22px 20px 12px;
    }

    .boot-message-status {
        font-size: 0.67rem;
        letter-spacing: 0.14em;
    }

    .boot-message-headline {
        font-size: clamp(1.35rem, 6vw, 1.9rem);
    }

    .boot-message-subline {
        font-size: 0.88rem;
    }

    .boot-message-byline {
        font-size: 0.64rem;
        letter-spacing: 0.1em;
    }

    .boot-login {
        min-height: 250px;
        padding: 28px 20px 24px;
    }

    .boot-login-line {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.86rem;
    }

    .boot-login-session {
        font-size: 0.7rem;
        letter-spacing: 0.09em;
    }

    .boot-login-hint {
        font-size: 0.64rem;
        letter-spacing: 0.09em;
    }
}

/* Mobile optimisation */
@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    .top-nav {
        padding-top: 14px;
        padding-bottom: 8px;
        gap: 8px;
    }

    .site-wordmark-tagline {
        font-size: 0.5rem;
        letter-spacing: 0.14em;
    }

    main {
        width: min(100% - 24px, 920px);
        padding-top: 16px;
    }

    .systems-emblem {
        margin-top: 10px;
        margin-bottom: 18px;
    }

    .systems-emblem img {
        width: min(170px, 52vw);
    }

    .matrix-copy {
        width: min(100% - 28px, 640px);
        padding: 20px 18px;
    }

    .matrix-status {
        font-size: 0.7rem;
        letter-spacing: 0.2em;
    }

    .matrix-copy strong {
        font-size: clamp(1.35rem, 7vw, 2rem);
    }

    .ability-list {
        grid-template-columns: 1fr;
    }

    .ability-box {
        min-height: auto;
    }

    .email-contact,
    .legal-panel {
        padding: 20px;
    }

    .terminal-launch {
        padding: 0 16px 20px;
    }

    .terminal-launch-header {
        margin-right: -16px;
        margin-left: -16px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .terminal-command-form {
        flex-direction: column;
    }

    .terminal-command {
        gap: 7px;
        padding: 13px;
        font-size: 0.85rem;
    }

    .terminal-launch-button {
        width: 100%;
    }

    .startBtn {
        padding: 10px 13px;
    }


    .footer-menu {
        gap: 12px;
    }
}

/* === Homepage: compact technical portfolio === */
.home-page main {
    width: min(1180px, calc(100% - 48px));
    padding-top: 22px;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.9fr);
    gap: clamp(34px, 6vw, 76px);
    align-items: center;
    min-height: 520px;
    padding: 38px 30px 56px;
    border-bottom: 1px solid var(--border-soft);
}

.hero-emblem-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.home-hero .systems-emblem {
    margin: 0;
}

.home-hero .systems-emblem img {
    width: min(290px, 100%);
}

.hero-contact-button {
    min-width: 184px;
    text-align: center;
}

.home-hero .hero-copy {
    min-width: 0;
}

.home-hero .hero-identity {
    margin: 0 0 8px;
    text-align: left;
}

.home-hero h1 {
    max-width: 820px;
    margin: 0 0 26px;
    text-align: left;
    font-size: clamp(2.7rem, 5.6vw, 4.9rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.home-hero h1 span {
    max-width: 760px;
    margin-top: 18px;
    font-size: clamp(1rem, 1.8vw, 1.28rem);
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.hero-location {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -6px 0 24px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-location span:nth-child(even) {
    color: var(--green);
}

.home-hero .intro {
    max-width: 800px;
    margin: 0 0 24px;
    text-align: left;
    font-size: 1.05rem;
}

.home-hero .intro p:last-child {
    margin-bottom: 0;
}

.hero-history {
    color: var(--muted);
}

.capability-strip {
    display: grid;
    gap: 9px;
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.capability-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.capability-strip span {
    padding: 7px 10px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
}

.competence-section,
.proof-section,
.codeproof-section,
.terminal-section {
    margin: 148px 0;
    scroll-margin-top: 96px;
}

.section-heading-row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 70px);
    align-items: end;
    margin-bottom: 30px;
}

.section-heading-row h2 {
    max-width: 620px;
    margin: 4px 0 0;
    text-align: left;
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    line-height: 1.14;
    letter-spacing: -0.035em;
}

.section-heading-row > p {
    max-width: 660px;
    margin: 0;
    color: var(--muted);
}

.section-kicker {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.tech-card {
    min-height: 205px;
    padding: 22px;
    background: linear-gradient(145deg, var(--panel-raised), var(--panel));
    border: 1px solid var(--border-soft);
    border-radius: 14px;
}

.tech-card > span {
    display: block;
    margin-bottom: 28px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.72rem;
}

.tech-card strong {
    display: block;
    margin-bottom: 9px;
    color: var(--green);
    font-size: 1.04rem;
}

.tech-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.58;
}

.knowledge-note {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 30px;
    margin-top: 14px;
    padding: 22px 24px;
    background: var(--green-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.knowledge-note strong {
    color: var(--green);
}

.era-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.era-panel {
    min-width: 0;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
}

.era-panel-old {
    background:
        linear-gradient(rgba(103, 245, 156, 0.025), rgba(103, 245, 156, 0.025)),
        #0a130f;
}

.era-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 2px 2px 12px;
    border-bottom: 1px solid var(--border-soft);
}

.era-heading span {
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

.era-heading strong {
    font-size: 0.95rem;
    font-weight: 650;
}

.proof-images {
    display: grid;
    gap: 12px;
}

.proof-card {
    margin: 0;
    overflow: hidden;
    background: #050806;
    border: 1px solid var(--border-soft);
    border-radius: 11px;
}

.proof-card a {
    display: block;
    overflow: hidden;
    background: #050806;
    aspect-ratio: 16 / 9;
}

.proof-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.proof-card a:hover img {
    transform: scale(1.012);
    opacity: 0.94;
}

.proof-card figcaption {
    min-height: 66px;
    padding: 12px 14px 13px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.proof-card-contain a {
    background: #0b1110;
}

.proof-card-contain img {
    object-fit: contain;
    object-position: top center;
    padding: 8px;
}


.terminal-section .terminal-launch {
    max-width: 100%;
    margin-top: 0;
}

.terminal-heading-row {
    margin-bottom: 22px;
}

.home-highlight {
    max-width: 980px;
    margin: 96px auto 36px;
    padding: 26px 32px;
    font-size: 1.02rem;
}

.home-page .closing {
    max-width: 820px;
}

.home-page .contact-section {
    max-width: 900px;
    margin: 148px auto 72px;
    scroll-margin-top: 96px;
}

.home-page .email-contact {
    max-width: 680px;
}

@media (max-width: 760px) {
    .contact-methods {
        grid-template-columns: 1fr;
    }
}



.codeproof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.codeproof-card {
    min-width: 0;
    padding: 18px;
    background: linear-gradient(155deg, rgba(7, 14, 11, 0.96), rgba(12, 22, 17, 0.98));
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.codeproof-label {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
}

.codeproof-card pre {
    margin: 0;
    overflow-x: auto;
    color: var(--text);
    font-family: var(--mono);
    font-size: 0.84rem;
    line-height: 1.62;
    white-space: pre;
    scrollbar-width: thin;
}

.codeproof-card code {
    font: inherit;
}

.codeproof-card pre::-webkit-scrollbar {
    height: 8px;
}

.codeproof-card pre::-webkit-scrollbar-thumb {
    background: rgba(103, 245, 156, 0.22);
    border-radius: 999px;
}

@media (max-width: 1080px) {
    .top-nav {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 16px;
    }

    .site-header.has-section-menu .section-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }

    .language-switch {
        justify-self: end;
    }

    .competence-section,
    .proof-section,
    .codeproof-section,
    .terminal-section {
        margin: 116px 0;
    }

   .home-page .contact-section {
        margin-top: 116px;
    }
}

@media (max-width: 980px) {

    .home-page main {
        width: min(100% - 32px, 1180px);
    }

    .home-hero {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 30px;
        min-height: auto;
        padding: 30px 10px 44px;
    }

    .home-hero h1 {
        font-size: clamp(2.55rem, 6.4vw, 4.3rem);
    }

    .section-heading-row {
        grid-template-columns: 1fr;
        gap: 14px;
        align-items: start;
    }

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

@media (max-width: 720px) {
    .site-header {
        position: sticky;
    }

    .top-nav {
        width: min(100% - 20px, 1180px);
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 10px;
        padding: 8px 0 9px;
    }

    .site-wordmark {
        gap: 7px;
        font-size: 0.65rem;
        letter-spacing: 0.08em;
    }

    .site-wordmark-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 9px;
    }

    .language-switch {
        justify-self: end;
    }

    .site-header.has-section-menu .section-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 3px;
        overflow-x: auto;
        padding-bottom: 2px;
        font-size: 0.64rem;
        scrollbar-width: none;
    }

    .site-header.has-section-menu .section-nav::-webkit-scrollbar {
        display: none;
    }

    .section-nav a,
    .section-nav .section-nav-replay {
        padding: 6px 7px;
    }

    .home-page main {
        width: min(100% - 24px, 1180px);
    }

    .home-hero {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px 0 34px;
        text-align: center;
    }

    .home-hero .systems-emblem {
        justify-content: center;
    }

    .home-hero .systems-emblem img {
        width: min(170px, 48vw);
    }

    .hero-emblem-column {
        gap: 14px;
    }

    .hero-contact-button {
        min-width: 170px;
    }

    .home-hero h1,
    .home-hero .intro {
        text-align: center;
    }

    .hero-location {
        justify-content: center;
        margin-top: -2px;
    }

    .home-hero h1 {
        font-size: clamp(2.35rem, 12vw, 3.6rem);
    }

    .capability-strip {
        justify-items: center;
    }

    .capability-row {
        justify-content: center;
    }

    .competence-section,
    .proof-section,
    .codeproof-section,
    .terminal-section {
        margin: 88px 0;
        scroll-margin-top: 142px;
    }

   .home-page .contact-section {
        margin-top: 88px;
        scroll-margin-top: 142px;
    }

    .section-heading-row h2,
    .section-heading-row > p {
        text-align: center;
        margin-right: auto;
        margin-left: auto;
    }

    .section-kicker {
        display: block;
        text-align: center;
    }

    .tech-grid,
    .era-grid,
    .knowledge-note,
    .codeproof-grid {
        grid-template-columns: 1fr;
    }

    .tech-card {
        min-height: auto;
    }

    .tech-card > span {
        margin-bottom: 16px;
    }

    .knowledge-note {
        gap: 8px;
        text-align: center;
    }

    .era-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }


    .home-highlight {
        margin-top: 48px;
        padding: 22px;
    }
}


/* === Project lightbox === */
body.lightbox-open {
    overflow: hidden;
}

.proof-card a[data-lightbox-image] {
    position: relative;
    cursor: zoom-in;
}

.proof-card a[data-lightbox-image]::after {
    content: "+";
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(103, 245, 156, 0.46);
    border-radius: 50%;
    background: rgba(3, 8, 6, 0.82);
    color: var(--green);
    font-family: var(--mono);
    font-size: 1.15rem;
    line-height: 1;
    opacity: 0.82;
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.proof-card a[data-lightbox-image]:hover::after {
    opacity: 1;
    transform: scale(1.06);
    background: rgba(7, 16, 13, 0.96);
}

.project-lightbox {
    width: min(1180px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 48px 62px 22px;
    overflow: visible;
    background: #050a08;
    color: var(--text);
    border: 1px solid rgba(103, 245, 156, 0.30);
    border-radius: 16px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.project-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(6px);
}

.project-lightbox figure {
    margin: 0;
    display: grid;
    justify-items: center;
    gap: 14px;
}

.project-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 150px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    background: #0a0f0d;
}

.project-lightbox figcaption {
    max-width: 920px;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.project-lightbox-close,
.project-lightbox-nav {
    appearance: none;
    position: absolute;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    background: rgba(7, 16, 13, 0.94);
    color: var(--green);
    font-family: var(--mono);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.project-lightbox-close:hover,
.project-lightbox-nav:hover,
.project-lightbox-close:focus-visible,
.project-lightbox-nav:focus-visible {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

.project-lightbox-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.35rem;
}

.project-lightbox-nav {
    top: 50%;
    width: 42px;
    height: 52px;
    margin-top: -26px;
    border-radius: 9px;
    font-size: 1.25rem;
}

/* A single project image is an enlargement, not a gallery. */
.project-lightbox-nav[hidden],
.project-lightbox.single-image .project-lightbox-nav {
    display: none !important;
}

.project-lightbox-prev {
    left: 10px;
}

.project-lightbox-next {
    right: 10px;
}

/* === Code showcase: console chrome and machine-room atmosphere === */
.codeproof-card {
    position: relative;
    overflow: hidden;
    padding-top: 16px;
    background:
        linear-gradient(rgba(103, 245, 156, 0.018) 1px, transparent 1px),
        linear-gradient(155deg, rgba(7, 14, 11, 0.98), rgba(12, 22, 17, 0.99));
    background-size: 100% 4px, auto;
}

.codeproof-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(103, 245, 156, 0.62), transparent);
    opacity: 0.56;
}

.codeproof-chrome {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin: -2px 0 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.codeproof-chrome > span:last-child {
    color: var(--green);
}

.codeproof-dots {
    color: rgba(103, 245, 156, 0.55);
    letter-spacing: 0.18em;
    white-space: nowrap;
}

.codeproof-card pre {
    min-height: 330px;
    font-size: 0.79rem;
    line-height: 1.54;
}

.codeproof-terminal {
    border-color: rgba(103, 245, 156, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        inset 0 0 40px rgba(103, 245, 156, 0.025);
}

@media (max-width: 720px) {
    .project-lightbox {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 48px 12px 16px;
        border-radius: 12px;
    }

    .project-lightbox img {
        max-height: calc(100vh - 145px);
    }

    .project-lightbox-nav {
        top: auto;
        bottom: 12px;
        width: 40px;
        height: 40px;
        margin: 0;
        border-radius: 50%;
    }

    .project-lightbox-prev {
        left: 12px;
    }

    .project-lightbox-next {
        right: 12px;
    }

    .project-lightbox figcaption {
        padding: 0 52px;
        font-size: 0.78rem;
    }

    .codeproof-card pre {
        min-height: 0;
        font-size: 0.75rem;
    }

    .codeproof-chrome {
        gap: 8px;
        font-size: 0.62rem;
    }
}

.codeproof-terminal::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -18%;
    height: 44px;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent, rgba(103, 245, 156, 0.055), transparent);
    animation: codeproof-scan 7s linear infinite;
}

.codeproof-terminal .codeproof-chrome > span:last-child {
    animation: codeproof-status 2.4s ease-in-out infinite;
}

@keyframes codeproof-scan {
    from { transform: translateY(0); }
    to { transform: translateY(520px); }
}

@keyframes codeproof-status {
    0%, 100% { opacity: 0.58; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .codeproof-terminal::after,
    .codeproof-terminal .codeproof-chrome > span:last-child {
        animation: none;
    }
}

/* === Rotating code cube / technical ornament === */
.code-cube-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    min-height: 190px;
    margin: -2px 0 28px;
    padding: 12px 20px;
    overflow: hidden;
    border-top: 1px solid rgba(103, 245, 156, 0.08);
    border-bottom: 1px solid rgba(103, 245, 156, 0.08);
    background:
        linear-gradient(90deg, transparent, rgba(103, 245, 156, 0.025), transparent),
        repeating-linear-gradient(0deg, transparent 0 23px, rgba(103, 245, 156, 0.018) 23px 24px);
}

.code-cube-stage {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    perspective: 720px;
}

.code-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: code-cube-spin 14s linear infinite;
}

.code-cube-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(103, 245, 156, 0.58);
    background:
        linear-gradient(135deg, rgba(103, 245, 156, 0.13), rgba(5, 12, 9, 0.92)),
        repeating-linear-gradient(90deg, transparent 0 15px, rgba(103, 245, 156, 0.035) 15px 16px);
    color: var(--green);
    box-shadow: inset 0 0 24px rgba(103, 245, 156, 0.05);
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-shadow: 0 0 10px rgba(103, 245, 156, 0.32);
    backface-visibility: visible;
}

.cube-front  { transform: rotateY(0deg) translateZ(60px); }
.cube-back   { transform: rotateY(180deg) translateZ(60px); }
.cube-right  { transform: rotateY(90deg) translateZ(60px); }
.cube-left   { transform: rotateY(-90deg) translateZ(60px); }
.cube-top    { transform: rotateX(90deg) translateZ(60px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(60px); }

.code-cube-orbit {
    min-width: 0;
    overflow: hidden;
    color: rgba(159, 179, 165, 0.58);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.code-cube-orbit-a {
    text-align: right;
}

.code-cube-orbit-b {
    text-align: left;
}

.code-cube-orbit::before,
.code-cube-orbit::after {
    content: "";
    display: inline-block;
    width: 42px;
    height: 1px;
    margin: 0 12px 0 0;
    vertical-align: middle;
    background: linear-gradient(90deg, transparent, rgba(103, 245, 156, 0.45));
}

.code-cube-orbit-b::before {
    margin-right: 12px;
}

.code-cube-orbit-b::after {
    display: none;
}

@keyframes code-cube-spin {
    0%   { transform: rotateX(-18deg) rotateY(0deg) rotateZ(0deg); }
    25%  { transform: rotateX(18deg) rotateY(90deg) rotateZ(2deg); }
    50%  { transform: rotateX(-12deg) rotateY(180deg) rotateZ(0deg); }
    75%  { transform: rotateX(16deg) rotateY(270deg) rotateZ(-2deg); }
    100% { transform: rotateX(-18deg) rotateY(360deg) rotateZ(0deg); }
}

.codeproof-excel {
    grid-column: 1 / -1;
    background:
        radial-gradient(circle at 88% 8%, rgba(103, 245, 156, 0.08), transparent 28%),
        linear-gradient(155deg, rgba(7, 14, 11, 0.98), rgba(12, 22, 17, 0.98));
}

.codeproof-excel .codeproof-label {
    margin-bottom: 16px;
}

@media (max-width: 720px) {
    .code-cube-wrap {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height: 220px;
        padding: 18px 10px;
    }

    .code-cube-stage {
        grid-row: 1;
        width: 104px;
        height: 104px;
    }

    .cube-front  { transform: rotateY(0deg) translateZ(52px); }
    .cube-back   { transform: rotateY(180deg) translateZ(52px); }
    .cube-right  { transform: rotateY(90deg) translateZ(52px); }
    .cube-left   { transform: rotateY(-90deg) translateZ(52px); }
    .cube-top    { transform: rotateX(90deg) translateZ(52px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(52px); }

    .code-cube-orbit {
        text-align: center;
        white-space: normal;
        line-height: 1.5;
    }

    .code-cube-orbit::before,
    .code-cube-orbit::after {
        display: none;
    }

    .codeproof-excel {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .code-cube {
        animation: none;
        transform: rotateX(-16deg) rotateY(34deg);
    }
}

/* === Lean-web positioning & contextual explanations === */
.hero-about-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(103, 245, 156, 0.28);
    padding-bottom: 2px;
}

.hero-about-link:hover,
.hero-about-link:focus-visible {
    border-bottom-color: var(--green);
}

.lean-web-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: clamp(24px, 4vw, 46px);
    margin-top: 30px;
    padding: clamp(24px, 4vw, 38px);
    background:
        linear-gradient(135deg, rgba(103, 245, 156, 0.055), transparent 42%),
        var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.lean-web-copy h3 {
    margin: 7px 0 16px;
    color: var(--green);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.2;
}

.lean-web-copy p {
    color: var(--muted);
}

.inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(103, 245, 156, 0.28);
    font-family: var(--mono);
    font-size: 0.88rem;
}

.inline-cta:hover,
.inline-cta:focus-visible {
    border-bottom-color: var(--green);
}

.lean-benefits {
    display: grid;
    gap: 10px;
    align-content: start;
}

.lean-benefits > div {
    padding: 14px 15px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
}

.lean-benefits strong,
.lean-benefits span {
    display: block;
}

.lean-benefits strong {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.9rem;
}

.lean-benefits span {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.codeproof-explainer {
    min-height: 4.8em;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.proof-section .proof-card {
    height: 100%;
}

@media (max-width: 980px) {
    .lean-web-panel {
        grid-template-columns: 1fr;
    }

    .codeproof-explainer {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .hero-about-link {
        justify-content: center;
    }

    .lean-web-panel {
        padding: 22px 18px;
        text-align: center;
    }

    .lean-benefits {
        text-align: left;
    }
}


/* About / privacy / legal on-page dialog */
.info-lightbox {
    width: min(1040px, calc(100% - 36px));
    max-width: none;
    height: min(88vh, 900px);
    max-height: none;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    background: rgba(8, 17, 14, 0.98);
    border: 1px solid rgba(103, 245, 156, 0.28);
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), 0 0 45px rgba(103, 245, 156, 0.07);
}

.info-lightbox::backdrop {
    background: rgba(1, 5, 3, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.info-lightbox-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
}

.info-lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(11, 23, 18, 0.96);
}

.info-lightbox-bar > div {
    min-width: 0;
}

.info-lightbox-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
}

.info-lightbox-bar strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.info-lightbox-close {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--green);
    font: 400 1.7rem/1 var(--mono);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.info-lightbox-close:hover,
.info-lightbox-close:focus-visible {
    background: var(--green);
    color: var(--bg);
    transform: rotate(4deg);
}

.info-lightbox-body {
    overflow: auto;
    overscroll-behavior: contain;
    padding: 26px clamp(18px, 4vw, 46px) 40px;
    scrollbar-color: var(--green) rgba(255, 255, 255, 0.05);
}

.info-lightbox-body .info-dialog-content {
    width: min(860px, 100%);
    margin: 0 auto;
}

.info-lightbox-body .info-dialog-content > h1:first-child {
    margin-top: 4px;
}

.info-lightbox-body .systems-emblem img {
    width: min(190px, 42vw);
}

.info-lightbox-body .legal-panel,
.info-lightbox-body .email-contact {
    max-width: none;
}

.info-lightbox-loading {
    margin: 4rem auto;
    color: var(--muted);
    text-align: center;
}

.info-lightbox-foot {
    padding: 10px 20px;
    border-top: 1px solid var(--border-soft);
    color: var(--muted);
    background: rgba(11, 23, 18, 0.96);
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-align: right;
}

.info-lightbox-foot span {
    color: var(--green);
}

@media (max-width: 760px) {
    .info-lightbox {
        width: calc(100% - 18px);
        height: calc(100dvh - 18px);
        border-radius: 14px;
    }

    .info-lightbox-bar {
        padding: 13px 14px;
    }

    .info-lightbox-body {
        padding: 20px 14px 30px;
    }

    .info-lightbox-foot {
        padding: 8px 14px;
    }
}

/* === LIGHT / DARK THEME SYSTEM =============================================
   The original dark design remains the base stylesheet. JavaScript sets
   data-theme="light" before this file is parsed, making the brighter design
   the public default without duplicating the whole stylesheet.
   ========================================================================== */

html[data-theme="light"] {
    --bg: #f4f7f4;
    --panel: #ffffff;
    --panel-raised: #edf3ef;
    --text: #1b2620;
    --muted: #526158;
    --green: #08783f;
    --green-soft: rgba(8, 120, 63, 0.075);
    --border: rgba(8, 120, 63, 0.25);
    --border-soft: rgba(27, 38, 32, 0.12);
    --curtain: #050a08;
    color-scheme: light;
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 50% -20%, rgba(8, 120, 63, 0.085), transparent 36rem),
        linear-gradient(180deg, #f8faf8 0%, var(--bg) 34rem, var(--bg) 100%);
}

html[data-theme="light"] .site-header {
    background: rgba(248, 250, 248, 0.93);
    border-bottom-color: rgba(8, 120, 63, 0.13);
    box-shadow: 0 8px 30px rgba(21, 43, 30, 0.045);
}

html[data-theme="light"] .site-wordmark-mark {
    background:
        radial-gradient(circle at 18% 18%, rgba(103, 245, 156, 0.10), transparent 52%),
        radial-gradient(circle at 84% 20%, rgba(34, 170, 255, 0.12), transparent 48%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 246, 0.96));
    border-color: rgba(12, 117, 78, 0.12);
    box-shadow: 0 5px 14px rgba(21, 43, 30, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* Header utilities shared by both themes. */
.header-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    min-width: max-content;
}

.theme-switch {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(13, 23, 19, 0.78);
    color: var(--green);
    box-shadow: 0 0 0 1px rgba(103, 245, 156, 0.03), 0 0 18px rgba(103, 245, 156, 0.055);
    font: 700 0.68rem/1 var(--mono);
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.theme-switch:hover,
.theme-switch:focus-visible {
    background: var(--green-soft);
    transform: translateY(-1px);
}

.theme-switch-icon {
    font-size: 0.95rem;
    line-height: 1;
}

html[data-theme="light"] .theme-switch,
html[data-theme="light"] .language-switch {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 18px rgba(21, 43, 30, 0.055);
}

html[data-theme="light"] .language-switch a.is-active {
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(8, 120, 63, 0.16);
}

/* In light mode the same emblem is optically inverted: black becomes cream,
   while the green circuitry remains green after the 180-degree hue rotation. */
html[data-theme="light"] .systems-emblem {
    border-radius: 50%;
}

html[data-theme="light"] .systems-emblem img {
    border-radius: 50%;
    filter: invert(1) hue-rotate(180deg) saturate(0.92) contrast(1.04) brightness(0.98);
    box-shadow:
        0 18px 48px rgba(17, 35, 24, 0.10),
        0 0 0 1px rgba(8, 120, 63, 0.16);
}

html[data-theme="light"] .portrait-emblem img {
    filter: brightness(1.08) contrast(1.03) saturate(0.92);
    box-shadow:
        0 18px 48px rgba(17, 35, 24, 0.09),
        0 0 0 1px rgba(8, 120, 63, 0.14);
}

html[data-theme="light"] .capability-strip span {
    background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .ability-box,
html[data-theme="light"] .tech-card,
html[data-theme="light"] .era-panel,
html[data-theme="light"] .email-contact,
html[data-theme="light"] .legal-panel {
    box-shadow: 0 12px 34px rgba(18, 42, 27, 0.045);
}

html[data-theme="light"] .tech-card {
    background: linear-gradient(145deg, #ffffff, var(--panel-raised));
}

html[data-theme="light"] .era-panel-old {
    background:
        linear-gradient(rgba(8, 120, 63, 0.035), rgba(8, 120, 63, 0.035)),
        #f8fbf9;
}

html[data-theme="light"] .proof-card {
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(18, 42, 27, 0.055);
}

html[data-theme="light"] .proof-card figcaption {
    background: #ffffff;
}

html[data-theme="light"] .proof-card a,
html[data-theme="light"] .proof-card-contain a {
    background: #eef2ef;
}

html[data-theme="light"] .lean-web-panel {
    background:
        linear-gradient(135deg, rgba(8, 120, 63, 0.065), transparent 42%),
        #ffffff;
    box-shadow: 0 14px 38px rgba(18, 42, 27, 0.05);
}

html[data-theme="light"] .lean-benefits > div {
    background: #f6f9f7;
}

html[data-theme="light"] .archive-link a:hover,
html[data-theme="light"] .robnet-button:hover,
html[data-theme="light"] .startBtn:hover,
html[data-theme="light"] .back-to-top:hover,
html[data-theme="light"] .info-lightbox-close:hover,
html[data-theme="light"] .info-lightbox-close:focus-visible {
    color: #ffffff;
}

/* Console-like elements intentionally remain dark in both themes. */
#boot-intro,
.terminal-launch,
.codeproof-card,
.project-lightbox {
    --bg: #091411;
    --panel: #101d18;
    --panel-raised: #13231c;
    --text: #edf5ef;
    --muted: #a7b8ac;
    --green: #67f59c;
    --green-soft: rgba(103, 245, 156, 0.10);
    --border: rgba(103, 245, 156, 0.25);
    --border-soft: rgba(239, 246, 240, 0.10);
}

html[data-theme="light"] .terminal-launch {
    box-shadow: 0 20px 55px rgba(20, 34, 25, 0.16);
}

html[data-theme="light"] .codeproof-card {
    box-shadow:
        0 16px 42px rgba(20, 34, 25, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html[data-theme="light"] .code-cube-wrap {
    border-top-color: rgba(8, 120, 63, 0.10);
    border-bottom-color: rgba(8, 120, 63, 0.10);
    background:
        linear-gradient(90deg, transparent, rgba(8, 120, 63, 0.035), transparent),
        repeating-linear-gradient(0deg, transparent 0 23px, rgba(8, 120, 63, 0.025) 23px 24px);
}

html[data-theme="light"] .code-cube-face {
    border-color: rgba(103, 245, 156, 0.52);
    background:
        linear-gradient(135deg, rgba(103, 245, 156, 0.12), rgba(5, 12, 9, 0.94)),
        repeating-linear-gradient(90deg, transparent 0 15px, rgba(103, 245, 156, 0.035) 15px 16px);
    color: #67f59c;
}

html[data-theme="light"] .code-cube-orbit {
    color: rgba(68, 91, 76, 0.76);
}

/* Information dialogs follow the selected page theme. */
html[data-theme="light"] .info-lightbox {
    color: var(--text);
    background: rgba(250, 252, 250, 0.99);
    border-color: rgba(8, 120, 63, 0.24);
    box-shadow: 0 28px 90px rgba(22, 44, 30, 0.18), 0 0 40px rgba(8, 120, 63, 0.05);
}

html[data-theme="light"] .info-lightbox::backdrop {
    background: rgba(18, 29, 22, 0.48);
}

html[data-theme="light"] .info-lightbox-bar,
html[data-theme="light"] .info-lightbox-foot {
    background: rgba(242, 247, 244, 0.98);
}

html[data-theme="light"] .info-lightbox-bar strong {
    color: var(--text);
}

html[data-theme="light"] .info-lightbox-body {
    scrollbar-color: var(--green) rgba(24, 35, 28, 0.08);
}

html[data-theme="light"] .footer-menu {
    padding-top: 8px;
}

@media (max-width: 1080px) {
    .header-tools {
        justify-self: end;
    }
}

@media (max-width: 720px) {
    .header-tools {
        gap: 5px;
    }

    .theme-switch {
        min-width: 38px;
        padding: 7px 9px;
    }

    .theme-switch-text {
        display: none;
    }
}

/* === EARLY CMS / STACK FIT CHECK ===========================================
   Promoted directly below the hero so the practical service model is visible
   before the detailed competence section. The existing lean-web component is
   reused to avoid a second visual language for the same idea.
   ========================================================================== */
.cms-fit-section {
    margin: 42px 0 0;
    scroll-margin-top: 96px;
}

.cms-fit-section .lean-web-panel {
    margin-top: 0;
}


.cms-fit-section .section-kicker {
    color: var(--green);
}

@media (max-width: 720px) {
    .cms-fit-section {
        margin-top: 28px;
    }
}

/* The promoted panel is a top-level section, so its title is an h2. */
.cms-fit-section .lean-web-copy h2 {
    max-width: 760px;
    margin: 7px 0 16px;
    color: var(--green);
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* === Cinematic intro treatment ===========================================
   Keeps the existing timing and login logic untouched. The opening message
   is simply given more visual weight so the first visit feels like a short
   title sequence before the simulated console takes over. */
#boot-intro .boot-frame {
    width: min(920px, calc(100% - 32px));
    border-radius: 22px;
    border-color: rgba(103, 245, 156, 0.24);
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.48),
        0 0 70px rgba(103, 245, 156, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#boot-intro .boot-frame::before {
    background:
        radial-gradient(circle at 50% 0%, rgba(103, 245, 156, 0.13), transparent 34rem),
        radial-gradient(circle at 88% 12%, rgba(103, 245, 156, 0.07), transparent 22rem);
}

#boot-intro .boot-message {
    padding: clamp(42px, 6vw, 66px) clamp(28px, 6vw, 58px) clamp(34px, 5vw, 50px);
    text-align: center;
    background:
        linear-gradient(180deg, rgba(10, 21, 16, 0.96), rgba(6, 12, 10, 0.84));
}

#boot-intro .boot-message::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: min(240px, 44%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(103, 245, 156, 0.75), transparent);
    box-shadow: 0 0 18px rgba(103, 245, 156, 0.28);
}

#boot-intro .boot-message-status {
    margin-bottom: 18px;
    font-size: clamp(0.72rem, 1.3vw, 0.86rem);
    letter-spacing: 0.28em;
    opacity: 0.92;
}

#boot-intro .boot-message-headline {
    max-width: 820px;
    margin: 0 auto 20px;
    font-size: clamp(2.35rem, 6.6vw, 4.85rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
    text-wrap: balance;
    text-shadow: 0 0 28px rgba(103, 245, 156, 0.08);
}

#boot-intro .boot-message-subline {
    max-width: 680px;
    margin: 0 auto;
    font-size: clamp(0.98rem, 1.8vw, 1.18rem);
    line-height: 1.6;
    letter-spacing: 0.015em;
}

#boot-intro .boot-message-byline {
    margin-top: 20px;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    opacity: 0.78;
}

#boot-intro .boot-login {
    min-height: 255px;
    padding: 34px clamp(28px, 6vw, 58px) 34px;
}

#boot-intro .boot-login-title {
    margin-bottom: 30px;
    font-size: 0.82rem;
    letter-spacing: 0.25em;
}

@media (prefers-reduced-motion: no-preference) {
    #boot-intro .boot-frame::before {
        animation: robnet-intro-ambient 7s ease-in-out infinite alternate;
    }

    #boot-intro .boot-message-status,
    #boot-intro .boot-message-headline,
    #boot-intro .boot-message-subline,
    #boot-intro .boot-message-byline {
        animation: robnet-title-reveal 0.8s ease both;
    }

    #boot-intro .boot-message-headline {
        animation-delay: 0.08s;
    }

    #boot-intro .boot-message-subline {
        animation-delay: 0.16s;
    }

    #boot-intro .boot-message-byline {
        animation-delay: 0.24s;
    }
}

@keyframes robnet-title-reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
        filter: blur(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes robnet-intro-ambient {
    from {
        opacity: 0.72;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(1.025);
    }
}

@media (max-width: 760px) {
    #boot-intro {
        padding: 16px;
    }

    #boot-intro .boot-frame {
        width: min(100%, 660px);
        border-radius: 18px;
    }

    #boot-intro .boot-message {
        padding: 34px 20px 28px;
    }

    #boot-intro .boot-message-status {
        margin-bottom: 14px;
        font-size: 0.65rem;
        letter-spacing: 0.2em;
    }

    #boot-intro .boot-message-headline {
        margin-bottom: 16px;
        font-size: clamp(2rem, 10.5vw, 3rem);
        line-height: 1.02;
    }

    #boot-intro .boot-message-subline {
        font-size: 0.88rem;
        line-height: 1.55;
    }

    #boot-intro .boot-message-byline {
        margin-top: 16px;
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    #boot-intro .boot-login {
        min-height: 238px;
        padding: 28px 20px 26px;
    }
}

/* Compact opener for the additional modern-web portfolio. The screenshots
   themselves remain out of the page flow and are loaded only by the lightbox. */
.mini-portfolio-link {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 16px 2px 2px;
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: var(--green);
    font: 700 0.78rem/1.35 var(--mono);
    letter-spacing: 0.045em;
    cursor: pointer;
    text-align: left;
    transition: color 0.15s ease, transform 0.15s ease;
}

.mini-portfolio-link span {
    transition: transform 0.15s ease;
}

.mini-portfolio-link:hover,
.mini-portfolio-link:focus-visible {
    color: var(--text);
    transform: translateY(-1px);
}

.mini-portfolio-link:hover span,
.mini-portfolio-link:focus-visible span {
    transform: translateX(3px);
}

.mini-portfolio-link:focus-visible {
    outline: 1px solid var(--green);
    outline-offset: 5px;
    border-radius: 2px;
}

/* === MOBILE HEADER: STABLE THEME CONTROL ================================
   On small screens the Unicode sun/moon glyph can be rendered differently
   by mobile font/emoji engines. Draw the icon as a CSS mask instead and give
   both header controls fixed, non-overlapping geometry.
   ======================================================================== */
@media (max-width: 720px) {
    .header-tools {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        min-width: max-content;
        flex-shrink: 0;
    }

    .theme-switch {
        width: 38px;
        min-width: 38px;
        height: 38px;
        min-height: 38px;
        flex: 0 0 38px;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
    }

    .theme-switch-icon {
        position: relative;
        display: block;
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        font-size: 0;
        line-height: 0;
    }

    .theme-switch-icon::before {
        content: "";
        position: absolute;
        inset: 0;
        display: block;
        background: currentColor;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
        -webkit-mask-size: contain;
        mask-size: contain;
    }

    /* Light page -> offer dark mode with a moon. */
    html[data-theme="light"] .theme-switch-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 15.3A8.5 8.5 0 0 1 8.7 3.7a8.5 8.5 0 1 0 11.6 11.6Z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20.3 15.3A8.5 8.5 0 0 1 8.7 3.7a8.5 8.5 0 1 0 11.6 11.6Z'/%3E%3C/svg%3E");
    }

    /* Dark page -> offer light mode with a sun. */
    html[data-theme="dark"] .theme-switch-icon::before {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0-5h1v3h-2V2h1Zm0 17h1v3h-2v-3h1ZM2 11h3v2H2v-2Zm17 0h3v2h-3v-2ZM4.22 5.64l1.42-1.42 2.12 2.12-1.42 1.42-2.12-2.12Zm12.02 12.02 1.42-1.42 2.12 2.12-1.42 1.42-2.12-2.12Zm0-11.32 2.12-2.12 1.42 1.42-2.12 2.12-1.42-1.42ZM4.22 18.36l2.12-2.12 1.42 1.42-2.12 2.12-1.42-1.42Z'/%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 7a5 5 0 1 0 0 10 5 5 0 0 0 0-10Zm0-5h1v3h-2V2h1Zm0 17h1v3h-2v-3h1ZM2 11h3v2H2v-2Zm17 0h3v2h-3v-2ZM4.22 5.64l1.42-1.42 2.12 2.12-1.42 1.42-2.12-2.12Zm12.02 12.02 1.42-1.42 2.12 2.12-1.42 1.42-2.12-2.12Zm0-11.32 2.12-2.12 1.42 1.42-2.12 2.12-1.42-1.42ZM4.22 18.36l2.12-2.12 1.42 1.42-2.12 2.12-1.42-1.42Z'/%3E%3C/svg%3E");
    }

    .theme-switch-text {
        display: none;
    }

    .language-switch {
        flex-shrink: 0;
        padding: 2px;
        font-size: 0.76rem;
    }

    .language-switch a {
        min-width: 36px;
        padding: 8px 8px;
    }

    .language-switch span {
        padding: 0;
    }
}


/* Personal LinkedIn link on the About page / About dialog only */
.about-profile-footer {
    display: flex;
    justify-content: center;
    margin: 28px auto 8px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.about-profile-footer a {
    font-family: var(--mono);
    color: var(--green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.15s ease;
}

.about-profile-footer a:hover,
.about-profile-footer a:focus-visible {
    color: var(--green);
    text-decoration: none;
    opacity: 0.78;
}

.about-profile-footer span {
    display: inline-block;
    margin-left: 2px;
    font-size: 0.8em;
    transition: transform 0.15s ease;
}

.about-profile-footer a:hover span,
.about-profile-footer a:focus-visible span {
    transform: translate(1px, -1px);
}


/* === Realised projects / case-study showcase === */
.case-study-section {
    margin: 148px 0;
    scroll-margin-top: 96px;
}

.project-catcher-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.project-catcher-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 330px;
    flex-direction: column;
    padding: clamp(22px, 3vw, 30px);
    overflow: hidden;
    background:
        linear-gradient(rgba(103, 245, 156, 0.018) 1px, transparent 1px),
        linear-gradient(145deg, var(--panel-raised), var(--panel));
    background-size: 100% 5px, auto;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-catcher-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(103, 245, 156, 0.7), transparent);
    opacity: 0.55;
}

.project-catcher-card:hover {
    transform: translateY(-2px);
    border-color: rgba(103, 245, 156, 0.34);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.project-catcher-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.project-catcher-top span:first-child {
    color: var(--green);
    font-size: 0.82rem;
}

.project-catcher-media {
    margin: 0 0 22px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.018);
}

.project-catcher-media a {
    position: relative;
    display: block;
    cursor: zoom-in;
}

.project-catcher-media a::after {
    content: "+";
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(103, 245, 156, 0.34);
    border-radius: 50%;
    background: rgba(7, 16, 13, 0.78);
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.9rem;
    line-height: 1;
}

.project-catcher-media img {
    display: block;
    width: 100%;
    height: 150px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.project-catcher-media a:hover img,
.project-catcher-media a:focus-visible img {
    transform: scale(1.015);
    filter: brightness(0.94);
}

.project-catcher-card h3 {
    margin: 0 0 13px;
    color: var(--text);
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    letter-spacing: -0.025em;
}

.project-catcher-card > p {
    max-width: 620px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.62;
}

.project-catcher-tags,
.case-lightbox-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.project-catcher-tags {
    margin-top: auto;
    margin-bottom: 22px;
}

.project-catcher-tags span,
.case-lightbox-stack span {
    padding: 6px 9px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: rgba(103, 245, 156, 0.035);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.66rem;
    line-height: 1;
}

.project-case-button,
.project-browser-button,
.case-nav-button {
    appearance: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.project-case-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 9px;
    padding: 0;
    background: transparent;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 700;
}

.project-case-button span,
.project-browser-button span {
    transition: transform 0.16s ease;
}

.project-case-button:hover span,
.project-case-button:focus-visible span,
.project-browser-button:hover span,
.project-browser-button:focus-visible span {
    transform: translateX(4px);
}

.project-browser-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 14px;
    padding: 18px 20px;
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: var(--green-soft);
}

.project-browser-cta p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.project-browser-cta strong {
    color: var(--text);
}

.project-browser-button {
    flex: 0 0 auto;
}

.case-lightbox {
    width: min(1040px, calc(100vw - 48px));
    max-width: none;
    max-height: calc(100vh - 48px);
    padding: 0;
    overflow: auto;
    background: #07100d;
    color: var(--text);
    border: 1px solid rgba(103, 245, 156, 0.3);
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72);
}

.case-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.86);
    backdrop-filter: blur(7px);
}

.case-lightbox-shell {
    min-height: 100%;
}

.case-lightbox-bar {
    position: sticky;
    z-index: 2;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(7, 16, 13, 0.96);
    backdrop-filter: blur(12px);
}

.case-lightbox-bar > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.case-lightbox-category,
.case-lightbox-counter {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.case-lightbox-category {
    color: var(--green);
}

.case-lightbox-counter {
    color: var(--muted);
}

.case-lightbox-close {
    appearance: none;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(3, 8, 6, 0.84);
    color: var(--green);
    font-family: var(--mono);
    font-size: 1.3rem;
    cursor: pointer;
}

.case-lightbox-close:hover,
.case-lightbox-close:focus-visible,
.case-nav-button:hover,
.case-nav-button:focus-visible {
    background: var(--green);
    color: var(--bg);
    border-color: var(--green);
}

.case-lightbox-content {
    padding: clamp(26px, 5vw, 56px);
}

.case-lightbox-content h2 {
    max-width: 780px;
    margin: 0 0 14px;
    text-align: left;
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.case-lightbox-lead {
    max-width: 790px;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.16rem);
    line-height: 1.65;
}

.case-lightbox-figure {
    width: min(460px, 100%);
    margin: 0 0 30px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.case-lightbox-figure a {
    position: relative;
    display: block;
    cursor: zoom-in;
}

.case-lightbox-figure a::after {
    content: "+";
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(103, 245, 156, 0.42);
    border-radius: 50%;
    background: rgba(7, 16, 13, 0.82);
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.95rem;
    line-height: 1;
}

.case-lightbox-figure img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.case-lightbox-figure a:hover img,
.case-lightbox-figure a:focus-visible img {
    transform: scale(1.015);
    filter: brightness(0.94);
}

.case-lightbox-figure figcaption {
    padding: 11px 14px 13px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.case-lightbox-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.case-lightbox-detail-grid section {
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.018);
}

.case-lightbox-detail-grid section > span {
    display: block;
    margin-bottom: 13px;
    color: var(--green);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.case-lightbox-detail-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.62;
}

.case-lightbox-stack {
    margin-top: 22px;
}

.case-lightbox-actions {
    position: sticky;
    z-index: 2;
    bottom: 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border-top: 1px solid var(--border-soft);
    background: rgba(7, 16, 13, 0.96);
    backdrop-filter: blur(12px);
}

.case-nav-button,
.case-contact-link {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 700;
}

.case-nav-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: rgba(7, 16, 13, 0.94);
    color: var(--green);
}

.case-contact-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-self: center;
    gap: 8px;
    padding: 0 15px;
    background: var(--green-soft);
    color: var(--green);
    text-decoration: none;
}

.case-contact-link:hover,
.case-contact-link:focus-visible {
    border-color: var(--green);
}

@media (max-width: 900px) {
    .case-lightbox-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .case-study-section {
        margin: 110px 0;
    }

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

    .project-catcher-card {
        min-height: 0;
    }

    .project-catcher-media img {
        height: 132px;
    }

    .project-browser-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .case-lightbox {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 13px;
    }

    .case-lightbox-content {
        padding: 28px 18px 24px;
    }

    .case-lightbox-actions {
        grid-template-columns: 1fr 1fr;
    }

    .case-contact-link {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        justify-content: center;
    }

    .case-nav-button {
        justify-content: center;
    }
}

/* Project viewer follows the console palette in both public themes. */
.case-lightbox {
    --bg: #091411;
    --panel: #101d18;
    --panel-raised: #13231c;
    --text: #edf5ef;
    --muted: #a7b8ac;
    --green: #67f59c;
    --green-soft: rgba(103, 245, 156, 0.10);
    --border: rgba(103, 245, 156, 0.25);
    --border-soft: rgba(239, 246, 240, 0.10);
}

.project-browser-button {
    background: transparent;
    color: var(--green);
}

@media (max-width: 1080px) {
    .case-study-section {
        margin: 116px 0;
    }
}

@media (max-width: 720px) {
    .case-study-section {
        margin: 88px 0;
        scroll-margin-top: 142px;
    }
}
