/* ==========================================
   VARIABLES
   ========================================== */

:root {
    color-scheme: dark;

    --bg: #0b1115;
    --fg: #ecf0ee;
    --muted: #91a0a7;
    --line: #2b363d;
    --green: #8ed5aa;
}


/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font: 13px 'IBM Plex Mono', monospace;
}

button,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

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


/* ==========================================
   LAYOUT
   ========================================== */

.shell {
    max-width: 1440px;
    margin: auto;
    padding: 0 clamp(22px, 5vw, 80px);
}


/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

header {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.wordmark {
    font: 800 38px 'Barlow Condensed', sans-serif;
    letter-spacing: -1px;
}

.dot {
    color: var(--green);
}

nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

nav a,
nav button {
    font-size: 11px;
    letter-spacing: 0.08em;
    color: #b9c5c9;
}

nav button,
footer button {
    border: 0;
    background: none;
    color: inherit;
}

.statusdot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    margin: 0 8px 1px 0;
    box-shadow: 0 0 9px #8ed5aa50;
}


/* ==========================================
   HERO
   ========================================== */

.hero {
    min-height: 670px;
    padding-top: 105px;
}

.eyebrow,
.sectionnum {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
}

.slash {
    padding: 0 15px;
    color: #586971;
}

h1 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(110px, 16vw, 255px);
    line-height: 0.85;
    letter-spacing: -0.015em;
    margin: 28px 0 44px;
    text-transform: uppercase;
}

h2 {
    font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    font-weight: 600;
    line-height: 0.85;
    letter-spacing: -0.015em;
    margin: 0;
}


h1 span {
    color: #77878f;
}

.herofoot {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.herofoot p {
    font-size: clamp(13px, 1.5vw, 19px);
    line-height: 1.8;
    letter-spacing: 0.06em;
}

.herofoot p span {
    color: var(--muted);
}


/* ==========================================
   BUTTONS
   ========================================== */

.outline {
    background: none;
    border: 1px solid #61717a;
    color: var(--fg);
    padding: 19px 22px;
    font-size: 11px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.outline span {
    margin-left: 22px;
    color: var(--green);
}

.outline:hover {
    border-color: var(--green);
}


/* ==========================================
   DETAILS & CONTACT
   ========================================== */

.details,
.contact {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    padding: 90px 0 130px;
}

.details h2,
.contact h2 {
    font-size: clamp(60px, 8vw, 115px);
}

.details p,
.contact p {
    max-width: 590px;
    line-height: 2;
    color: #acbac0;
    font-size: 14px;
    margin-top: 35px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 32px;
}

.tags span {
    padding: 9px 12px;
    border: 1px solid #39464e;
    font-size: 10px;
    color: #a8b7be;
}

.contact a {
    border-bottom: 1px solid var(--green);
}


/* ==========================================
   FOOTER
   ========================================== */

footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 30px 0 45px;
    color: #73858d;
    font-size: 10px;
}

footer button:hover,
#build:hover {
    color: var(--green);
}


/* ==========================================
   DIAGNOSTICS MODAL
   ========================================== */

#diagnostics {
    max-height: 90dvh;
    overflow-y: auto;
}

dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(900px, calc(100vw - 30px));
    max-height: calc(100dvh - 30px);
    overflow: auto;
    background: #10191e;
    border: 1px solid #405059;
    color: var(--fg);
    padding: clamp(20px, 4vw, 46px);
    box-shadow: 0 30px 100px #000b;
}

dialog::backdrop {
    background: #000c;
    backdrop-filter: blur(5px);
}

.modalhead,
.modalfoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8799a2;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.modalhead button {
    border: 0;
    background: none;
    color: #9babb2;
    font-size: 30px;
}

.modaltitle {
    padding: 38px 0 25px;
}

.modaltitle h2 {
    font-size: clamp(55px, 8vw, 95px);
}

.modaltitle p {
    color: #8d9da5;
    font-size: 10px;
    letter-spacing: 0.08em;
    margin-top: 22px;
}

#updated {
    float: right;
}

#build {
    margin-left: auto;
    white-space: nowrap;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================
   DIAGNOSTIC METRICS
   ========================================== */

.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metrics > div {
    background: #1b282f;
    padding: 23px;
    min-height: 118px;
}

.metrics small {
    display: block;
    color: #93a5ae;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.metrics strong {
    display: block;
    color: var(--green);
    font-size: clamp(18px, 3vw, 29px);
    margin-top: 20px;
    font-weight: 500;
}


/* ==========================================
   EXPANDABLE TERMINAL
   ========================================== */

.terminal {
    border: 1px solid #364750;
    margin-top: 22px;
}

.terminal > button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    background: #17242a;
    border: 0;
    color: #d3e0e5;
    padding: 20px;
    text-align: left;
    font-size: 12px;
    cursor: pointer;
}

.terminal b {
    color: var(--green);
    margin-right: 10px;
    font-size: 17px;
}


/* ==========================================
   TERMINAL BODY
   ========================================== */

#term-body {
    background: #050809;
    padding: 20px;

    /* Enable responsive layout based on terminal width */
    container-type: inline-size;
}

#terminal-output {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.9;
    color: #a9c6b7;
    max-height: 400px;
    overflow-y: auto;
    font-size: 12px;
}

/* Individual command output */
.terminal-entry {
    white-space: pre-wrap;
    margin-bottom: 12px;
    color: #a9c6b7;
    transition: opacity 0.2s ease;
}

.terminal-entry:not(.terminal-current) {
    opacity: 0.45;
}


/* ==========================================
   TERMINAL PROFILE / FASTFETCH
   ========================================== */

.terminal-profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    margin: 8px 0 16px;
}

/* Rainbow ASCII artwork */
.terminal-art {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    line-height: 1.3;
    white-space: pre;
    overflow-wrap: normal;
    margin: 0;
}

/* Fastfetch information */
.terminal-info {
    min-width: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}


/* ==========================================
   RESPONSIVE TERMINAL PROFILE
   ========================================== */

/*
   Stack artwork above information when the
   terminal itself is narrower than 520px.

   This responds to the modal width rather
   than the browser viewport.
*/

@container (max-width: 520px) {

    .terminal-profile {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .terminal-art {
        font-size: 12px;
        overflow-x: auto;
    }

    .terminal-info {
        font-size: 11px;
    }
}


/* ==========================================
   TERMINAL COMMAND INPUT
   ========================================== */

#command-form {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 15px;
    color: var(--green);
}

#command {
    flex: 1;
    min-width: 0;
    background: transparent;
    color: #e0ebe5;
    border: 0;
    outline: none;
    font: inherit;
}

#command-form button {
    background: none;
    border: 0;
    color: var(--green);
    cursor: pointer;
}


/* ==========================================
   TERMINAL COLOURS
   ========================================== */

.terminal-green {
    color: var(--green);
}

.terminal-muted {
    color: var(--muted);
}

.terminal-white {
    color: var(--fg);
}

.terminal-blue {
    color: #88b9d5;
}

/* ==========================================
   MODAL FOOTER & BUILD NUMBER
   ========================================== */

.modalfoot {
    padding-top: 22px;
    gap: 12px;
}

.modalfoot button {
    background: none;
    border: 0;
    color: #8b9ca5;
    font-size: 10px;
}

#dev-indicator {
    color: var(--green);
    font-size: 10px;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

#dev-indicator[hidden] {
    display: none;
}


/* ==========================================
   RESPONSIVE / MOBILE
   ========================================== */

@media (max-width: 680px) {

    header {
        height: 74px;
    }

    nav {
        gap: 15px;
    }

    nav a {
        display: none;
    }

    .hero {
        padding-top: 100px;
        min-height: 580px;
    }

    h1 {
        font-size: clamp(90px, 19vw, 150px);
    }

    .herofoot {
        align-items: start;
        flex-direction: column;
    }

    .details,
    .contact {
        grid-template-columns: 1fr;
        padding: 60px 0 90px;
    }

    footer {
        flex-wrap: wrap;
    }

    footer > span:nth-child(2) {
        display: none;
    }

    .metrics > div {
        padding: 15px;
        min-height: 105px;
    }

    .metrics strong {
        font-size: 17px;
    }

    .modaltitle {
        padding-top: 25px;
    }
}