/*
Theme Name: S. Coburnicus
Theme URI: https://sdotcoburnicus.com
Author: Adam Coburn
Author URI: https://sdotcoburnicus.com
Description: Personal site for S. Coburnicus - blog, books, news, and links.
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sdotcoburnicus-theme
*/

/* ========================================
   THEME VARIABLES — Light default
   ======================================== */

:root {
    --bg: #fafafa;
    --bg-header: rgba(250, 250, 250, 0.95);
    --bg-mobile-nav: #fafafa;
    --text: #2a2a2a;
    --text-secondary: #666;
    --text-muted: #999;
    --text-faint: #bbb;
    --border: rgba(0, 0, 0, 0.08);
    --divider: rgba(0, 0, 0, 0.06);
    --link-hover: #111;
    --toggle-icon: #666;
}

[data-theme="dark"] {
    --bg: #111;
    --bg-header: rgba(17, 17, 17, 0.95);
    --bg-mobile-nav: #111;
    --text: #d4d4d4;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --text-faint: rgba(255, 255, 255, 0.2);
    --border: rgba(255, 255, 255, 0.08);
    --divider: rgba(255, 255, 255, 0.06);
    --link-hover: #fff;
    --toggle-icon: rgba(255, 255, 255, 0.6);
}

/* ========================================
   BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    font-size: 18px;
}

body {
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
    line-height: 1.75;
    color: var(--text);
    background: var(--bg);
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

a {
    color: var(--text-secondary);
    text-decoration-color: var(--divider);
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

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

#app-background {
    display: none;
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 2rem;
    background: var(--bg-header);
    border-bottom: 1px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.site-branding {
    flex-shrink: 0;
}

.site-title-link {
    text-decoration: none;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}

.site-title-s,
.site-title-dot,
.site-title-name {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: unset;
    transition: color 0.3s ease;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-navigation {
    display: flex;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.main-navigation a::after {
    display: none;
}

.main-navigation a:hover {
    color: var(--text);
}

.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    color: var(--text);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--toggle-icon);
    transition: color 0.2s ease;
}

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

.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.menu-toggle-icon {
    width: 20px;
    height: 1px;
    background: var(--text-secondary);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active .menu-toggle-icon:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    .menu-toggle.active .menu-toggle-icon:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .menu-toggle-icon:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: var(--bg-mobile-nav);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1001;
    }

    .main-navigation.active {
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .main-navigation a {
        font-size: 0.85rem;
        letter-spacing: 0.2em;
    }

    body.menu-open {
        overflow: hidden;
    }
}

/* ========================================
   HOMEPAGE
   ======================================== */

.homepage {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0 2rem;
    text-align: center;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--text);
}

.title-line {
    display: block;
    color: var(--text);
    background: none;
    -webkit-text-fill-color: unset;
    animation: none;
}

.title-line.accent {
    color: var(--text);
    background: none;
    -webkit-text-fill-color: unset;
    animation: none;
    filter: none;
}

.hero-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin: 0.5rem 0 0;
}

.hero-actions {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
}

.cta-button {
    display: inline-block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 1px solid var(--divider);
    border-radius: 0;
    padding: 0.4rem 0;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cta-button:hover {
    color: var(--text);
    border-color: var(--border);
    transform: none;
    box-shadow: none;
}

.cta-button.secondary {
    background: none;
    border: none;
    border-bottom: 1px solid var(--divider);
    color: var(--text-faint);
}

.cta-button.secondary:hover {
    color: var(--text-secondary);
    border-color: var(--border);
    box-shadow: none;
}

/* Divider */
.homepage .content-section::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--divider);
    margin: 0 auto 3rem;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

.content-section {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 4rem;
    padding: 2rem 0;
}

.section-title {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-faint);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.card-grid {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.card {
    padding: 1.5rem 0;
    background: none;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--divider);
}

.card:hover {
    transform: none;
}

.card h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.card a:hover {
    color: var(--link-hover);
}

/* ========================================
   BOOKS PAGE
   ======================================== */

.books-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.book-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0;
    padding: 0;
    border: none;
}

.book-cover {
    width: 100%;
    max-width: 160px;
    margin-bottom: 1.25rem;
}

.book-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.book-info {
    flex: 1;
}

.book-info h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin: 0 0 0.25rem;
}

.book-info .book-subtitle {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.book-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.book-info .book-link {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 1px solid var(--divider);
    padding-bottom: 0.3rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.book-info .book-link:hover {
    color: var(--text);
    border-color: var(--border);
}

@media (max-width: 768px) {
    .books-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .books-row {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .book-cover {
        max-width: 140px;
    }
}

/* ========================================
   BLOG / POSTS
   ======================================== */

.site-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.site-main article {
    margin-bottom: 3rem;
    padding: 0 0 3rem;
    background: none;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--divider);
}

.site-main article:last-child {
    border-bottom: none;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    line-height: 1.3;
}

.entry-title a {
    color: inherit;
    text-decoration: none;
}

.entry-title a:hover {
    color: var(--link-hover);
}

.entry-meta {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.65rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.entry-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.entry-content a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--divider);
}

.entry-content a:hover {
    color: var(--link-hover);
    text-decoration-color: var(--border);
}

.entry-content h2, .entry-content h3, .entry-content h4 {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin: 2.5rem 0 1rem;
}

.entry-content h2 { font-size: 1.4rem; }
.entry-content h3 { font-size: 1.2rem; }

.entry-content p { margin-bottom: 1.25rem; }

.entry-content ul, .entry-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.entry-content li { margin-bottom: 0.5rem; }

.entry-content blockquote {
    padding: 0 0 0 1.5rem;
    margin: 2rem 0;
    background: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    font-style: italic;
    color: var(--text-muted);
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.entry-content strong {
    font-weight: 600;
    color: var(--text);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    position: relative;
    z-index: 100;
    padding: 3rem 2rem;
    text-align: center;
    background: none;
    border-top: 1px solid var(--divider);
    transition: border-color 0.3s ease;
}

.footer-content {
    max-width: 640px;
    margin: 0 auto;
}

.footer-content p {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-faint);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    margin: 0;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-link,
.social-link:link,
.social-link:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    transition: color 0.2s ease;
}

.social-link svg,
.social-link:link svg,
.social-link:visited svg {
    fill: var(--text-faint) !important;
    width: 18px;
    height: 18px;
    transition: fill 0.2s ease;
}

.social-link:hover svg {
    fill: var(--text-secondary) !important;
}

/* ========================================
   PAGE TEMPLATES
   ======================================== */

.page-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

.page-id-6 .page-content {
    max-width: 960px;
}

.page-content h1 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin-bottom: 2rem;
}

.page-content h2 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text);
    margin: 2.5rem 0 1rem;
}

.page-content h3 {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: var(--text-secondary);
    margin: 2rem 0 0.75rem;
}

.page-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.page-content ul {
    margin: 1rem 0 1.25rem 1.5rem;
    color: var(--text-secondary);
}

.page-content li { margin-bottom: 0.5rem; }

.page-content a {
    color: var(--text);
}

.page-content a:hover {
    color: var(--link-hover);
}

.page-content hr {
    border: none;
    border-top: 1px solid var(--divider);
    margin: 3rem 0;
}

.page-content strong {
    font-weight: 600;
    color: var(--text);
}

/* Links Page */
.links-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 400px;
    margin: 2rem auto;
}

.link-item {
    display: block;
    padding: 1rem 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--divider);
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    transition: color 0.2s ease;
}

.link-item:hover {
    color: var(--text);
    background: none;
    transform: none;
}

/* ========================================
   NAVIGATION (post/posts)
   ======================================== */

.post-navigation,
.posts-navigation {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--divider);
}

.post-navigation a,
.posts-navigation a {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
}

.post-navigation a:hover,
.posts-navigation a:hover {
    color: var(--text);
}

.entry-tags .tag {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-right: 1rem;
}
