body {
    font-family: Georgia, serif;
    background: #f0ede8;
    color: #111;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
}

a { color: #a00; }
a:hover { color: #f00; }

header {
    background: #130000;
    color: #f0ede8;
    padding: 12px 24px;
    display: flex;
    align-items: baseline;
    gap: 32px;
    flex-wrap: wrap;
    border-bottom: 4px solid #7c0000;
}

.hdr-right {
    margin-left: auto;
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-family: monospace;
    font-size: 13px;
}

.hdr-right a {
    color: #aaa;
    text-decoration: none;
}

.hdr-right a:hover { color: #fff; }

.hdr-right span { color: #a00; }

header .logo {
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #f0ede8;
    text-decoration: none;
}

header .logo span { color: #e03; }

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    transform: translateY(-3px);
    align-items: baseline;
}

nav a {
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    font-family: monospace;
}

nav a:hover { color: #fff; }

.cols {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.main { min-width: 0; }

.sidebar {
    width: 280px;
    position: sticky;
    top: 16px;
}

article {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 14px;
}

article h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

article h2 a {
    color: #111;
    text-decoration: none;
}

article h2 a:hover { color: #a00; }

.post-date {
    font-family: monospace;
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}

.post-body { color: #222; }

.post-body p {
    margin: 0 0 8px;
}

.read-more {
    font-size: 13px;
    font-family: monospace;
}

.sidebar h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin: 12px 0 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #ccc;
    font-family: monospace;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.sidebar ul li {
    padding: 5px 0;
    border-bottom: 1px dotted #ddd;
    font-size: 13px;
}

.sidebar ul li a {
    color: #333;
    text-decoration: none;
}

.sidebar ul li a:hover { color: #a00; }

.skills-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.skills-table td {
    padding: 4px 0;
    border-bottom: 1px dotted #ddd;
}

.skills-table td:last-child {
    text-align: right;
    font-family: monospace;
    color: #888;
}

footer {
    background: #111;
    color: #666;
    text-align: center;
    padding: 14px;
    font-size: 12px;
    font-family: monospace;
    border-top: 4px solid #7c0000;
    margin-top: auto;
}

#authModal > div {
    background: #fff;
    max-width: 400px;
    width: 90%;
    padding: 24px;
    border-radius: 8px;
    color: #111;
    border: 1px solid #ddd;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    font-family: Georgia, serif;
}

#loginTab,
#registerTab {
    font-family: monospace;
    font-size: 13px;
    color: #777;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    background: none;
}

#loginTab.active,
#registerTab.active {
    background: #111;
    color: #a00;
}

#loginTab:hover,
#registerTab:hover {
    color: #a00;
}

#flashMessage {
    display: none;
    padding: 8px;
    margin-bottom: 16px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid #ddd;
}

#authModal input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    background: #fafafa;
    color: #111;
    transition: 0.15s ease;
}

#authModal input:focus {
    outline: none;
    border-color: #a00;
    background: #fff;
}

#authModal button[type="submit"] {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    color: #f0ede8;
    border: 1px solid #111;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    cursor: pointer;
    transition: 0.15s ease;
}

#authModal button[type="submit"]:hover {
    background: #a00;
    border-color: #a00;
}

#authModal button[type="submit"]:active {
    transform: scale(0.98);
}

#authModal button[onclick="closeModal()"] {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

#authModal button[onclick="closeModal()"]:hover {
    color: #a00;
}

@media (max-width: 800px) {
    .cols {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    nav {
        gap: 16px;
    }
}