@import url("colors.f401a2caa6c3.css");

/* Served from this site and preloaded in each page's <head>, so text appears in this font straight away
   instead of flashing in a fallback font first. From onlinewebfonts.com (CC BY 4.0). */
@font-face {
    font-family: "TSTAR Mono Round W00 Regular";
    src: url("../fonts/tstar-mono-round.eb0d90c62d4a.woff2") format("woff2"),
         url("../fonts/tstar-mono-round.d10a2688dc99.woff") format("woff");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

/* Colors. Light by default; dark follows the system setting until the theme button is used
   (theme.js stores the choice and sets data-theme on <html>). */
:root {
    color-scheme: light;
    --bg: #f5f5f5;
    --text: #111;
    --text-soft: #444;
    --muted: #666;
    --faint: #888;
    --border: #ddd;
    --border-strong: #bbb;
    --row-line: #e3e3e3;
    --hover-bg: #ececec;
    --accent: #8e4909;
    --accent-name: #b95900;
    --accent-hover: #a9682b;
    --nav-active: #d77d38;
    --chart-line: #cf6d1d;
    --chart-grid: #e6e6e6;
    --loss: #5a5a5d;
    --input-bg: #fff;
    --input-border: #999;
    --button-bg: #111;
    --button-text: #fff;
    --bar-shadow: 0 -1px 0 rgba(0,0,0,0.15), 0 -3px 18px rgba(0,0,0,0.12), 0 -6px 40px rgba(0,0,0,0.10);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #16161a;
        --text: #e6e4e1;
        --text-soft: #c4c1bd;
        --muted: #9d9a97;
        --faint: #85827f;
        --border: #34343a;
        --border-strong: #4a4a50;
        --row-line: #2a2a30;
        --hover-bg: #222228;
        --accent: #e69d69;
        --accent-name: #df8d51;
        --accent-hover: #f2bd99;
    --nav-active: #e69d69;
        --nav-active: #e69d69;
        --chart-line: #df8d51;
        --chart-grid: #2c2c32;
        --loss: #6a6a6e;
        --input-bg: #222228;
        --input-border: #4a4a50;
        --button-bg: #e6e4e1;
        --button-text: #16161a;
        --bar-shadow: 0 -1px 0 rgba(0,0,0,0.6), 0 -3px 18px rgba(0,0,0,0.4);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #16161a;
    --text: #e6e4e1;
    --text-soft: #c4c1bd;
    --muted: #9d9a97;
    --faint: #85827f;
    --border: #34343a;
    --border-strong: #4a4a50;
    --row-line: #2a2a30;
    --hover-bg: #222228;
    --accent: #e69d69;
    --accent-name: #df8d51;
    --accent-hover: #f2bd99;
    --chart-line: #df8d51;
    --chart-grid: #2c2c32;
    --loss: #6a6a6e;
    --input-bg: #222228;
    --input-border: #4a4a50;
    --button-bg: #e6e4e1;
    --button-text: #16161a;
    --bar-shadow: 0 -1px 0 rgba(0,0,0,0.6), 0 -3px 18px rgba(0,0,0,0.4);
}

html, body {
    margin: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: "TSTAR Mono Round W00 Regular", sans-serif;
}

main {
    padding-bottom: 120px;
}


.link-container {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.header-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-container {
    flex: 1;
}

.center-block {
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.name {
    color: var(--accent-name);
}

a:link,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

a.name {
    color: var(--accent);
}

a.name:hover {
    color: var(--accent-hover);
}

.typewriter h1 {
    overflow: hidden;
    border-right: 0.10em solid var(--text);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.10em;
    animation:
        typing 3s steps(30, end),
        blink-caret 0.5s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--text); }
}

.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    padding: 28px 56px;
    border-top: 1px solid var(--border);
    background-color: var(--bg);

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

    box-sizing: border-box;

    box-shadow: var(--bar-shadow);

    z-index: 1000; /* keeps it above everything */
}

.bottom-left {
    display: flex;
    gap: 20px;
    font-size: 22px;
}

/* The page you're on, in light orange */
.bottom-left a.active,
.bottom-left a.active:hover {
    color: var(--nav-active);
}

.bottom-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bottom-right input {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
}

.bottom-right button {
    padding: 8px 14px;
    border: 1px solid var(--button-bg);
    background: var(--button-bg);
    color: var(--button-text);
    cursor: pointer;
    font: inherit;
}

.hero-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

.page-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-layout main {
    flex: 1;
}

.page-layout header {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
}

.title {
    margin-top: 7%;
    margin-left: 25%;
    text-align: left;
}
.paragraphs {
    font-size: 18px;
    width: 50%;
    margin-left: 25%;
}

.underline {
    text-decoration: none;
    border-bottom: 2px solid orange;
    padding-bottom: 2px;
}

.contact-item-top {
    margin-top: 14px;
    margin-bottom: 24px;
}
.contact-item {
    margin-bottom: 24px;
}

.contact-label {
    margin-bottom: 6px;
    font-weight: bold;
}

.paragraphs p { line-height: 1.6; }

/* Section labels on the about page */
.paragraphs > .contact-label {
    margin-top: 30px;
    margin-bottom: 0;
}

.projects-container {
    width: 50%;
    margin-left: 25%;
    margin-top: 40px;
}

.project-card {
    margin-bottom: 40px;
}

.project-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 8px;
}

.project-description {
    font-size: 16px;
    color: var(--text-soft);
    margin-bottom: 10px;
}

.project-link {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    text-decoration: none;
}

.project-link:hover {
    color: var(--accent-hover);
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    font-size: 14px;
    padding: 4px 10px;
    border: 1px solid var(--border);
}

@media (max-width: 600px) {
    .bottom-bar {
        padding: 16px 20px;   /* smaller padding */
    }

    .bottom-left {
        font-size: 16px;      /* smaller text */
        gap: 12px;            /* tighter spacing */
        flex-wrap: wrap;      /* prevents overflow */
    }

    /* Page titles: the 25% indent leaves too little room for long words on a phone */
    .title {
        margin-left: 16px;
        margin-right: 16px;
    }
    .title h1 {
        font-size: 26px;
        overflow-wrap: anywhere;
    }
}
/* Dark mode button, top right on every page. The label names the mode it switches to. */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 1001;
    padding: 6px 12px;
    border: 1px solid var(--border-strong);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle::after { content: "dark"; }
:root[data-theme="dark"] .theme-toggle::after { content: "light"; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle::after { content: "light"; }
}

/* Visual Transit Simulator page: the demo is 1200x660, scaled down to fit (see transit.html) */
.transit-page {
    width: min(1200px, 92vw);
    margin: 30px auto 0;
}
.transit-page .small { font-size: 14px; margin-top: 16px; }
.demo-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    margin: 18px 0;
}
.demo-frame iframe {
    position: absolute;  /* so its 1200px width never stretches the page */
    top: 0;
    left: 0;
    border: 0;
    transform-origin: 0 0;
}
