/* ============================================================
   Terra Incognita — Linux pages
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&family=Ubuntu+Mono:wght@400;700&display=swap");

/* ============================================================
   Base
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Ubuntu", sans-serif;
    font-size: 14px;
    line-height: 1.6;

    color: #c9c3b8;

    background:
        radial-gradient(
            circle at top,
            #292929 0%,
            #1f1f1f 55%,
            #171717 100%
        );
}


/* ============================================================
   Header
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;

    background: rgba(22, 22, 22, 0.96);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);

    backdrop-filter: blur(10px);
}

.site-header-inner {
    max-width: 1200px;

    margin: 0 auto;

    padding: 12px 30px;

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

.site-title {
    color: #eee7da;

    font-size: 0.9rem;
    font-weight: 700;

    text-decoration: none;
}

.site-title:hover {
    color: #ffffff;
}

.site-section {
    color: #777168;

    font-size: 0.68rem;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}


/* ============================================================
   Layout
   ============================================================ */

.layout {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    display: grid;

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

    gap: 45px;

    padding: 45px 30px 65px;
}


/* ============================================================
   Sidebar
   ============================================================ */

.sidebar {
    position: sticky;
    top: 75px;

    align-self: start;

    min-width: 0;
}

.sidebar-title {
    margin-bottom: 14px;

    color: #ddd6ca;

    font-size: 0.95rem;
    font-weight: 700;

    line-height: 1.3;
}


/* Command navigation */

.sidebar nav {
    display: flex;
    flex-direction: column;

    gap: 1px;
}

.sidebar nav a {
    display: block;

    padding: 4px 0;

    color: #777168;

    font-family:
        "Ubuntu Mono",
        "Ubuntu",
        monospace;

    font-size: 0.85rem;

    line-height: 1.5;

    text-decoration: none;

    border-left: 1px solid transparent;

    transition:
        color 0.15s ease,
        border-color 0.15s ease,
        padding-left 0.15s ease;
}

.sidebar nav a:hover {
    padding-left: 7px;

    color: #ddd6ca;

    border-left-color: #8f897e;
}


/* Secondary navigation */

.secondary-navigation {
    margin-top: 24px;

    padding-top: 17px;

    border-top:
        1px solid rgba(255, 255, 255, 0.07);
}

.secondary-navigation a {
    font-family: "Ubuntu", sans-serif;
}

.secondary-navigation a + a {
    margin-top: 6px;
}


/* ============================================================
   Main content
   ============================================================ */

.content {
    min-width: 0;
    max-width: 820px;
}


/* ============================================================
   Page introduction
   ============================================================ */

.page-introduction {
    margin-bottom: 35px;
}

.eyebrow {
    margin-bottom: 10px;

    color: #827b70;

    font-size: 0.62rem;
    font-weight: 700;

    letter-spacing: 0.2em;

    text-transform: uppercase;
}

.page-introduction h1 {
    margin: 0;

    color: #eee7da;

    font-family: "Ubuntu", sans-serif;

    font-size: clamp(2.3rem, 5vw, 3.5rem);

    font-weight: 500;

    line-height: 1.05;
}

.intro {
    max-width: 620px;

    margin: 14px 0 0;

    color: #8f897e;

    font-size: 0.88rem;
    line-height: 1.65;
}


/* ============================================================
   COMMAND CARDS
   ============================================================ */

/*
 * Support both class names so this stylesheet works with the
 * earlier HTML as well as the newer command-card structure.
 */

.command,
.command-card {
    scroll-margin-top: 80px;

    margin-bottom: 22px;

    padding: 22px 24px 24px;

    background:
        rgba(255, 255, 255, 0.025);

    border:
        1px solid rgba(255, 255, 255, 0.10);

    border-radius: 5px;

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12);
}

.command:last-of-type,
.command-card:last-of-type {
    margin-bottom: 0;
}


/* ============================================================
   COMMAND HEADER
   ============================================================ */

.command-header {
    margin-bottom: 20px;

    padding-bottom: 16px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}


/*
 * Command name
 *
 * Deliberately NOT using the generic inline-code styling here.
 */

.command-name {
    display: block;

    padding: 0;

    background: none;

    color: #e0cfa8;

    font-family:
        "Ubuntu Mono",
        monospace;

    font-size: 1.55rem !important;
    font-weight: 700;

    line-height: 1.15;

    letter-spacing: 0;
}


/*
 * Shell prompt
 */


.command-name::before {
    content: "$ ";

    color: #777168;
}


/* Short description */

.command-purpose {
    margin: 7px 0 0;

    color: #989187;

    font-size: 0.86rem;

    line-height: 1.5;
}


/* ============================================================
   Command sections
   ============================================================ */

.command-section {
    margin-top: 18px;
}

.command-section h3 {
    margin: 0 0 7px;

    color: #777168;

    font-family: "Ubuntu", sans-serif;

    font-size: 0.62rem;

    font-weight: 700;

    letter-spacing: 0.14em;

    line-height: 1.3;

    text-transform: uppercase;
}

.command-section p {
    margin: 0;

    color: #aaa296;

    font-size: 0.84rem;

    line-height: 1.65;
}


/* ============================================================
   Useful flags
   ============================================================ */

.flags {
    display: flex;
    flex-direction: column;

    border-top:
        1px solid rgba(255, 255, 255, 0.045);
}

.flag {
    display: grid;

    grid-template-columns:
        max-content
        minmax(0, 1fr);

    gap: 18px;

    padding: 7px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.035);
}

.flag code {
    display: inline-block;

    min-width: 20px;
    padding: 2px 8px;

    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;

    color: #d2c3a3;

    font-family: "Ubuntu Mono", monospace;

    font-size: 0.9rem !important;
    line-height: 1;

    text-align: center;
}

/* old
.flag code {
    display: inline-block;

    min-width: 20px;

    padding:
        2px
        8px;

    background:
        rgba(255, 255, 255, 0.06);

    border-radius: 2px;

    color: #d2c3a3;

    font-family:
        "Ubuntu Mono",
        monospace;

    font-size: 0.85rem;
	
	text-align: center;
}
*/

.flag span {
    color: #918b82;

    font-size: 0.85rem;

    line-height: 1.5;
}



/* ============================================================
   TERMINAL / CONSOLE
   ============================================================ */

pre {
    overflow-x: auto;

    margin: 0;

    padding:
        14px
        16px;

    background:
        #0d0d0d;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 4px;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 5px 14px rgba(0, 0, 0, 0.18);
}


/*
 * Actual terminal text.
 *
 * No fake window controls are added here.
 */

pre code {
    display: block;

    padding: 0;

    background: none;

    color: #d4cec3;

    font-family:
        "Ubuntu Mono",
        "Ubuntu",
        monospace;

    font-size: 0.85rem;

    line-height: 1.65;

    white-space: pre;
}

/* ============================================================
   Inline code
   ============================================================ */

/*
 * This is deliberately narrow and does NOT affect .command-name.
 */

.command-section :not(pre) > code,
.content p :not(pre) > code {
    padding:
        0.08em
        0.25em;

    background:
        rgba(255, 255, 255, 0.05);

    border-radius: 2px;

    color: #d2c3a3;

    font-family:
        "Ubuntu Mono",
        monospace;
		
    font-size: 0.82em;
}


/* ============================================================
   Links
   ============================================================ */

.content a {
    color: #b4a68d;

    text-decoration-thickness: 1px;

    text-underline-offset: 3px;
}

.content a:hover {
    color: #eee7da;
}


/* ============================================================
   Linux overview page
   ============================================================ */

.topic-list {
    display: grid;

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

    gap: 12px;
}

.topic-card {
    display: block;

    padding: 18px;

    background:
        rgba(255, 255, 255, 0.025);

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 4px;

    color: inherit;

    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.topic-card:hover {
    background:
        rgba(255, 255, 255, 0.05);

    border-color:
        rgba(255, 255, 255, 0.14);

    transform: translateY(-1px);
}

.topic-title {
    display: block;

    margin-bottom: 5px;

    color: #ddd6ca;

    font-size: 0.95rem;

    font-weight: 700;
}

.topic-description {
    display: block;

    color: #858077;

    font-size: 0.79rem;

    line-height: 1.5;
}


/* ============================================================
   Reference blocks
   ============================================================ */

.reference {
    margin: 18px 0;
}

.reference-row {
    display: grid;

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

    gap: 18px;

    padding: 8px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.04);
}

.reference-row code {
    padding: 0;

    background: none;

    color: #d2c3a3;

    font-family:
        "Ubuntu Mono",
        "Ubuntu",
        monospace;

    font-size: 0.8rem;
}

.reference-row span {
    color: #8d877e;

    font-size: 0.81rem;
}


/* ============================================================
   General Linux content
   ============================================================ */

.content h2 {
    color: #ddd6ca;

    font-size: 1.45rem;

    font-weight: 500;

    line-height: 1.25;
}

.content h3 {
    color: #777168;

    font-size: 0.62rem;

    font-weight: 700;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.content p {
    color: #aaa296;

    font-size: 0.84rem;
}


/* ============================================================
   Footer
   ============================================================ */

.page-footer {
    margin-top: 40px;

    padding-top: 18px;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);

    color: #706a62;

    font-size: 0.76rem;
}

.page-footer a {
    color: #858077;

    text-decoration: none;
}

.page-footer a:hover {
    color: #ddd6ca;
}


/* ============================================================
   Tablet
   ============================================================ */

@media (max-width: 800px) {

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

        gap: 28px;

        padding-top: 32px;
    }

    .sidebar {
        position: static;
    }

    .sidebar nav {
        display: grid;

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

        gap: 1px 18px;
    }

    .secondary-navigation {
        margin-top: 18px;
    }

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


/* ============================================================
   Phone
   ============================================================ */

@media (max-width: 500px) {

    .site-header-inner {
        padding-left: 18px;
        padding-right: 18px;
    }

    .layout {
        padding:
            30px
            12px
            50px;
    }

    .command,
    .command-card {
        padding:
            18px
            16px
            20px;
    }

    .command-name {
        font-size: 1.35rem !important;
    }

    .flag {
        grid-template-columns:
            55px
            minmax(0, 1fr);

        gap: 10px;
    }

    pre {
        padding:
            34px
            11px
            13px;
    }

    pre code {
        font-size: 0.74rem;
		
		font-family:
        "Ubuntu Mono",
        monospace;
    }

    .sidebar nav {
        grid-template-columns: 1fr;
    }

    .reference-row {
        grid-template-columns:
            75px
            minmax(0, 1fr);

        gap: 10px;
    }
}
