/* === Reset === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-surface-hover: #1a1a1a;
    --color-border: #1e1e1e;
    --color-heading-bg: #111111;
    --color-footer-bg: #181818;
    --color-footer-border: #252525;
    --color-text: #b0b0b0;
    --color-text-muted: #5a5a5a;
    --color-accent: #8a8a8a;
    --color-accent-hover: #c0c0c0;
    --color-sidebar-bg: #111111;
    --color-sidebar-border: #1e1e1e;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'Cascadia Code', 'JetBrains Mono', monospace;
    --sidebar-width: 220px;
    --page-width: 900px;
}

body {
    font-family: var(--font-sans);
    font-size: 13px;
    background-color: var(--color-bg);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    padding-top: 40px;
    padding-bottom: 80px;
}

body:not(.custom-background)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

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

ul {
    margin: 0;
    padding: 0 0 0 20px;
}

/* === Page Layout === */
.page-wrapper {
    width: var(--page-width);
    margin: 0 auto;
    position: relative;
}

/* === Fixed Sidebar === */
.sidebar {
    position: fixed;
    top: 40px;
    width: var(--sidebar-width);
}

.profile-image {
    width: 180px;
    height: 180px;
    background: #000;
    outline: 1px solid #222;
    overflow: hidden;
    margin-left: 20px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-image a {
    display: block;
}

/* Custom logo WordPress wrapper */
.profile-image .custom-logo-link {
    display: block;
}

.profile-image .custom-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-nav {
    width: 180px;
    margin-left: 20px;
    margin-top: 20px;
    background: var(--color-sidebar-bg);
    border: 1px solid var(--color-sidebar-border);
    padding: 16px 20px 30px;
    font-size: 11px;
    color: var(--color-text-muted);
}

.sidebar-nav .nav-group + .nav-group {
    margin-top: 14px;
}

.sidebar-nav h6 {
    color: var(--color-text);
    padding-left: 0;
    margin: 0 0 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 10px;
}

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

.sidebar-nav ul li {
    line-height: 1.8;
}

.sidebar-nav a {
    color: var(--color-accent);
    font-size: 12px;
}

/* WP menu output (when a real menu is assigned) */
.sidebar-nav .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav .menu li {
    line-height: 1.8;
}

.sidebar-nav .sub-menu {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 0;
}

.sidebar-nav .sub-menu a {
    font-size: 11px;
    color: var(--color-text-muted);
}

.sidebar-nav .sub-menu a:hover {
    color: var(--color-accent);
}

/* === Main Content === */
.site-content {
    padding-left: var(--sidebar-width);
    min-height: 400px;
}

/* === Heading Bars === */
.heading-bar {
    background: var(--color-heading-bg);
    border: 1px solid var(--color-border);
    height: 60px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.heading-bar--name {
    height: 100px;
}

.heading-bar h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    padding-left: 10px;
}

.heading-bar h2 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    padding-left: 10px;
}

/* === Content Area === */
.content-area {
    line-height: 20px;
    margin-bottom: 30px;
}

.front-page-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
}

/* === Project Cards === */
.projects-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.project-card:first-child {
    grid-column: 1 / -1;
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease;
}

.project-card:hover {
    border-color: var(--color-footer-border);
}

.project-body {
    padding: 20px;
    flex: 1;
}

.project-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    margin-bottom: 8px;
}

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

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

.project-description {
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 20px;
}

.project-description p {
    margin-bottom: 4px;
}

.project-description p:last-child {
    margin-bottom: 0;
}

.project-description ul {
    list-style: disc;
    padding-left: 20px;
    margin: 0;
}

.project-description ul li {
    margin-bottom: 2px;
}

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

.project-footer {
    margin: 0 -1px -1px;
    padding: 10px 20px;
    background: var(--color-footer-bg);
    border-top: 3px solid var(--color-footer-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.project-status {
    color: var(--color-text-muted);
    font-weight: 400;
    margin-left: 4px;
}

/* === Single Project === */
.single-project-header {
    margin-bottom: 2rem;
}

.single-project-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.single-project-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: 13px;
}

.single-project-content {
    line-height: 22px;
}

.single-project-content p {
    margin-bottom: 12px;
}

.project-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--color-accent);
    font-weight: 600;
}

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

/* === Status Badges === */
.status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge--active {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.status-badge--archived {
    background: rgba(110, 113, 145, 0.1);
    color: var(--color-text-muted);
}

.status-badge--inactive {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.status-badge--discontinued {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

/* === Blog Posts === */
.post-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-bottom: 16px;
}

.post-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.post-card h3 a {
    color: var(--color-text);
}

.post-card h3 a:hover {
    color: var(--color-accent-hover);
}

.post-meta {
    color: var(--color-text-muted);
    font-size: 12px;
    margin-bottom: 10px;
}

.post-content,
.entry-content {
    color: var(--color-text-muted);
    font-size: 13px;
    line-height: 20px;
}

.single-post .post-content {
    color: var(--color-text);
    line-height: 22px;
}

.single-post .post-content p {
    margin-bottom: 12px;
}

/* === Comments === */
#comments {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin: 30px 0 16px;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}

.commentlist .comment {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-bottom: 12px;
    list-style: none;
}

.comment-author.vcard {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-author .fn {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
}

.comment-author .fn a {
    color: var(--color-accent);
}

.comment-author .says {
    display: none;
}

.comment-metadata {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.comment-metadata a {
    color: var(--color-text-muted);
}

.comment-content {
    font-size: 13px;
    line-height: 20px;
    color: var(--color-text);
}

.comment-content p {
    margin-bottom: 8px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 10px;
}

.reply a {
    font-size: 11px;
    color: var(--color-text-muted);
}

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

/* Comment form */
.comment-respond {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px;
    margin-top: 20px;
}

.comment-reply-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.comment-reply-title small a {
    font-size: 11px;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 8px;
}

.comment-notes,
.comment-form-cookies-consent label {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.comment-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 4px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 8px 12px;
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 20px;
    outline: none;
    transition: border-color 0.15s ease;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    border-color: var(--color-accent);
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.comment-form p {
    margin-bottom: 12px;
}

.comment-form .form-submit {
    margin-bottom: 0;
}

.comment-form .submit {
    background: var(--color-footer-bg);
    border: 1px solid var(--color-footer-border);
    color: var(--color-text);
    padding: 8px 20px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.comment-form .submit:hover {
    border-color: var(--color-accent);
    background: var(--color-surface-hover);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    accent-color: var(--color-accent);
}

/* Navigation between comments */
.navigation {
    display: none;
}

/* === Footer === */
.site-footer {
    width: 100%;
    margin: 20px 0 0;
    text-align: center;
}

.site-footer p {
    font-size: 10px;
    font-weight: 100;
    color: #fff;
    opacity: 0.4;
}

/* === Responsive === */
@media (max-width: 960px) {
    .page-wrapper {
        width: 100%;
        padding: 0 16px;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        display: flex;
        gap: 16px;
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .profile-image {
        width: 80px;
        height: 80px;
        margin-left: 0;
        flex-shrink: 0;
    }

    .sidebar-nav {
        width: auto;
        margin-left: 0;
        margin-top: 0;
        padding: 12px 16px;
    }

    .site-content {
        padding-left: 0;
    }

}

@media (max-width: 640px) {
    .projects-list {
        grid-template-columns: 1fr;
    }

    body {
        padding-top: 16px;
    }
}
