/* Self-hosted IBM Plex Fonts */
@font-face {
    font-family: 'IBM Plex Sans';
    src: url('/fonts/IBMPlexSans-Regular.woff2?v=24828974') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'IBM Plex Sans';
    src: url('/fonts/IBMPlexSans-Italic.woff2?v=7a4e432a') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: optional;
}

@font-face {
    font-family: 'IBM Plex Sans';
    src: url('/fonts/IBMPlexSans-SemiBold.woff2?v=90d9c226') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/fonts/IBMPlexMono-Regular.woff2?v=bb87500e') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/fonts/IBMPlexMono-Bold.woff2?v=223677cf') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

:root {
    /* Tasteful, monochrome-focused colors with a beautiful blue accent */
    --bg: #f9f9f9;
    --fg: #222222;
    --muted: #737373;
    --link: #2563eb; /* Blue */
    --link-hover: #ea580c; /* Orange */
    --border: #d0d0d0;
    --code-bg: rgba(37, 99, 235, 0.08);
    --selection-bg: rgba(37, 99, 235, 0.2);
    
    /* IBM Plex font stack with system fallbacks */
    --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121212;
        --fg: #e0e0e0;
        --muted: #888888;
        --link: #60a5fa; /* Light Blue */
        --link-hover: #fb923c; /* Light Orange */
        --border: #333333;
        --code-bg: rgba(96, 165, 250, 0.12);
        --selection-bg: rgba(96, 165, 250, 0.25);
    }
}

/* CSS layout debugging trick */
/* * {
  outline: 1px solid red !important;
} */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    margin: 0;
    padding: 2.5rem 1.5rem;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

::selection {
    background-color: var(--selection-bg);
}

.container {
    max-width: 680px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 1.5rem;
    margin-top: 0;
}

h2 {
    font-size: 1.1rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

hr {
    border: 0;
    border-bottom: 1px dashed var(--border);
    margin: 2.5rem 0;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

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

a:hover {
    color: var(--link-hover);
    border-bottom: 1px solid var(--link-hover);
}

a.external-link {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    margin-left: 0.4em;
    border-bottom: none;
    background-color: var(--link);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: background-color 0.2s ease;
}

a.external-link:hover {
    border-bottom: none;
    background-color: var(--link-hover);
}

a.subtle-link {
    color: inherit;
    border-bottom: 1px dotted var(--muted);
    transition: border-bottom-color 0.2s ease, border-bottom-style 0.2s ease;
}

a.subtle-link:hover {
    color: inherit;
    border-bottom: 1px solid var(--fg);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

li {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: baseline;
}

li::before {
    content: "✦";
    font-size: 0.85rem;
    color: var(--muted);
    margin-right: 0.8rem;
    position: relative;
    top: -0.05em;
}


li span {
    min-width: 0;
    overflow-wrap: break-word;
}

/* List specific hover interactions if needed */

/* Monospace Elements */
code, kbd, samp, .mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
}

code, kbd, samp {
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--fg);
    overflow-wrap: break-word;
}

.mono code, .mono kbd, .mono samp {
    font-size: 1em;
}

.unselectable {
    user-select: none;
    -webkit-user-select: none;
    margin-right: 0.5em;
}

.select-all {
    user-select: all;
    -webkit-user-select: all;
    display: inline-block;
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

pre code, pre kbd, pre samp {
    background-color: transparent;
    padding: 0;
}

.site-header {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-identity {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.name-heading {
    margin: 0;
    font-size: 1.6rem;
}

.name-heading a {
    color: var(--fg);
    border-bottom: none;
}

.name-heading a:hover {
    color: var(--muted);
    border-bottom: none;
}

.site-header .muted {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.logo {
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--fg);
}

.logo a {
    color: inherit;
    border-bottom: none;
}

.logo a:hover {
    border-bottom: none;
    color: var(--muted);
}

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

address {
    font-style: normal;
}

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
}

footer span,
footer .mono {
    font-size: 0.8em;
}

.privacy-note {
    font-size: 0.7em;
}

a:focus-visible {
    outline: 2px dashed var(--link);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Status Card */
.status-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    background-color: var(--bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .status-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        background-color: rgba(255, 255, 255, 0.03);
    }
}

.status-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.status-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--code-bg);
    color: var(--link);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    border: 1px solid var(--border);
}

.status-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.status-author {
    font-weight: 600;
}

.status-time {
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.status-content {
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    body {
        padding: 1.5rem 1rem;
    }
}

/* Status Log (updates.html) */
.status-log {
    list-style: none;
    padding: 0;
    margin: 0;
}

.status-log-entry {
    display: block;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed var(--border);
}

.status-log-entry::before {
    content: none;
    display: none;
}

.status-log-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.status-log-entry time {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-log-entry p {
    margin: 0;
}