/* =======================================================
   Fonts
   - Body/content: Inter (modern, readable)
   - Console identity + code: Roboto Mono
======================================================= */

/* Inter via Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* Roboto Mono from local font files */
@font-face {
    font-family: "Roboto Mono";
    src: url("../font/RobotoMono-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    text-rendering: optimizeLegibility;
}
@font-face {
    font-family: "Roboto Mono";
    src: url("../font/RobotoMono-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    text-rendering: optimizeLegibility;
}
@font-face {
    font-family: "Roboto Mono";
    src: url("../font/RobotoMono-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    text-rendering: optimizeLegibility;
}
@font-face {
    font-family: "Roboto Mono";
    src: url("../font/RobotoMono-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    text-rendering: optimizeLegibility;
}

/* =======================================================
   Variables
======================================================= */

:root {
    --global-font-size: 16px;
    --global-line-height: 1.65em;

    --mono-font-stack: "Roboto Mono", Menlo, Monaco, Consolas,
        "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;

    --font-stack: "Inter", ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --page-width: 70em;
    --display-h1-decoration: 1;
}

/* =======================================================
   Color schemes
======================================================= */

/* @media (prefers-color-scheme: dark) {
    :root {
        --background-color: #222225;
        --page-width: 60em;
        --font-color: #e8e9ed;
        --invert-font-color: #222225;
        --secondary-color: #a3abba;
        --tertiary-color: #a3abba;
        --primary-color: #62c4ff;
        --error-color: #ff3c74;
        --progress-bar-background: #3f3f44;
        --progress-bar-fill: #62c4ff;
        --code-bg-color: #3f3f44;
    }
} */

@media (prefers-color-scheme: light) {
    :root {
        --background-color: #ffffff;
        --font-color: #151515;
        --invert-font-color: #ffffff;
        --primary-color: #1a95e0;
        --secondary-color: #727578;
        --error-color: #d20962;
        --progress-bar-background: #727578;
        --progress-bar-fill: #151515;
        --code-bg-color: #e8eff2;
    }
}

@media only screen and (max-width: 850px) {
    :root {
        --global-font-size: 15px;
        --global-line-height: 1.65em;
        --page-width: 70em;
    }
}

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

body {
    font-family: var(--font-stack);
    font-size: var(--global-font-size);
    line-height: var(--global-line-height);
    background-color: var(--background-color);
    color: var(--font-color);
    margin-bottom: 75px;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-stack);
    clear: both;
}

h1 {
    margin-bottom: 150px;
}

.content-column-content p,
.content-column-content li {
    color: #555;
}

/* =======================================================
   CONSOLE IDENTITY (logo + nav)
======================================================= */

.site-name,
.logo,
.logo a,
.terminal-nav,
.terminal-menu,
.terminal-menu a,
.sidebar-heading {
    font-family: var(--mono-font-stack) !important;
}

.label {
    font-family: var(--mono-font-stack);
}

/* =======================================================
   Code / command styling
======================================================= */

code,
pre,
kbd,
samp,
.content-column-content .command,
.terminal-prompt {
    font-family: var(--mono-font-stack);
}

.content-column-content .command {
    color: #888;
}

/* =======================================================
   Buttons / UI
======================================================= */

.sidebar-heading {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.btn-ghost {
    color: #666;
    background-color: transparent;
    border-color: #333;
    font-weight: 500;
    font-family: var(--mono-font-stack);
    padding: 6px 12px;
    font-size: 17px;
    line-height: 1.55;
    border-radius: 0;
    margin-left: 0;
    margin-top: 5px;
}

p.social a {
    margin: 0 0 10px 0;
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 22px;
    text-align: center;
    vertical-align: bottom;
    color: #999999;
    transition: all 0.2s ease-out;
}

.active a {
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

.logo {
    font-weight: normal;
}

.terminal-menu li {
    margin-right: 30px;
}

/* =======================================================
   Layout & components
======================================================= */

figure {
    margin: 15px 60px;
}

.footer {
    clear: both;
    margin-top: 100px;
    padding-top: 10px;
    border-top: 1px solid var(--secondary-color);
    color: var(--font-color);
}

.image-grid {
    display: grid;
    grid-gap: 1em;
    grid-template-columns: repeat(
        auto-fit,
        minmax(calc(var(--page-width) / 4), 1fr)
    );
}

.terminal-prompt::after {
    animation: cursor 1s infinite;
    width: 10px;
}

.terminal-prompt::before {
    content: none;
}

.gallery-image {
    margin: 10px 0;
}

/* =======================================================
   Posts list
======================================================= */

.posts-list {
    position: relative;
    padding-left: 130px;
}

.post h1,
.post h2 {
    margin: 0 0 5px 0;
}

.posts-list .date {
    position: absolute;
    left: 0;
    width: 130px;
}

/* =======================================================
   Responsive tweaks
======================================================= */

@media only screen and (max-width: 850px) {
    .site-name {
        width: 2ch;
        overflow: hidden;
        display: inline-block;
    }

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

    .terminal-menu ul {
        display: flex;
        flex-direction: row;
        justify-content: left;
    }

    .terminal-menu li {
        margin-right: 20px;
    }

    figure {
        margin: 5px 30px;
    }

    .posts-list {
        padding-left: 0;
    }

    .posts-list .date {
        display: none;
    }

    .footer {
        margin-top: 50px;
        padding-top: 5px;
    }
}

/* ===============================
   Fixed full-width navbar
================================ */

:root{
    --nav-height: 64px; /* adjust later if needed */
  }
  
  .terminal-nav{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-height);
  
    width: 100%;
    max-width: none;
    z-index: 1000;
  
    background: var(--background-color);
    /* border-bottom: 1px solid var(--secondary-color); */
  
    display: flex;
    align-items: center;
    justify-content: space-between;
  
    padding: 0 2.5rem;   /* no vertical padding -> predictable height */
    box-sizing: border-box;
  }

  /* Offset page content so it never sits under fixed nav */
body{
    padding-top: var(--nav-height);
  }

  @media only screen and (max-width: 850px){
    :root{ --nav-height: 56px; }
    .terminal-nav{ padding: 0 1rem; }
  }
  
  