/*
Theme Name: The Technology Blind Spot
Theme URI: https://thetechnologyblindspot.com
Author: J.D. Morris
Author URI: https://morrisjd.com
Description: A minimal, clean WordPress theme for The Technology Blind Spot — a legal, cyber, and professional ethics tech blog. Features excellent typography, syntax highlighting, dark navy + green branding, responsive design, and a distraction-free reading experience.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ttbs
Tags: blog, one-column, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Colors — The Technology Blind Spot */
    --dp-bg: #f5f7f5;
    --dp-surface: #ffffff;
    --dp-text: #1a2332;
    --dp-text-secondary: #4a5568;
    --dp-text-muted: #7a8599;
    --dp-accent: #00843D;
    --dp-accent-hover: #006b31;
    --dp-accent-light: #00a34b;
    --dp-border: #dde3dd;
    --dp-border-light: #eef2ee;
    --dp-code-bg: #1a2332;
    --dp-code-text: #cdd6e0;
    --dp-tag-bg: #e8f5ee;
    --dp-tag-text: #00843D;
    --dp-gold: #D4A843;
    --dp-navy: #1a2332;

    /* Typography */
    --dp-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dp-font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --dp-font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Sizing */
    --dp-content-width: 720px;
    --dp-wide-width: 1080px;
    --dp-site-width: 1200px;

    /* Spacing */
    --dp-space-xs: 0.25rem;
    --dp-space-sm: 0.5rem;
    --dp-space-md: 1rem;
    --dp-space-lg: 1.5rem;
    --dp-space-xl: 2rem;
    --dp-space-2xl: 3rem;
    --dp-space-3xl: 4rem;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --dp-bg: #0f1520;
        --dp-surface: #1a2332;
        --dp-text: #e0e6ed;
        --dp-text-secondary: #9aa8b8;
        --dp-text-muted: #607080;
        --dp-accent: #2ea85e;
        --dp-accent-hover: #00843D;
        --dp-border: #263040;
        --dp-border-light: #1e2a38;
        --dp-code-bg: #111922;
        --dp-tag-bg: #0f2a1f;
        --dp-tag-text: #4eca7a;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--dp-font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dp-text);
    background-color: var(--dp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--dp-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* ============================================
   LAYOUT
   ============================================ */
.dp-container {
    max-width: var(--dp-site-width);
    margin: 0 auto;
    padding: 0 var(--dp-space-lg);
}

.dp-content-area {
    max-width: var(--dp-content-width);
    margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    border-bottom: none;
    background: var(--dp-navy);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .dp-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--dp-space-md);
}

.site-branding .custom-logo {
    height: 36px;
    width: auto;
}

.site-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-title a {
    color: #ffffff;
}

.site-title a:hover {
    color: var(--dp-accent-light);
}

.site-title .title-accent {
    color: var(--dp-accent);
}

.site-description {
    display: none;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--dp-space-lg);
}

.main-navigation a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    padding: var(--dp-space-xs) 0;
    position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: #ffffff;
}

.main-navigation .current-menu-item a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--dp-accent);
    border-radius: 1px;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: var(--dp-space-sm);
    cursor: pointer;
    color: #ffffff;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--dp-navy);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: var(--dp-space-md) var(--dp-space-lg);
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: var(--dp-space-md);
    }
}

/* ============================================
   HERO / PAGE HEADER
   ============================================ */
.page-header {
    padding: var(--dp-space-3xl) 0 var(--dp-space-2xl);
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: var(--dp-space-sm);
}

.page-header p {
    color: var(--dp-text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   POST CARDS (Index/Archive)
   ============================================ */
.posts-grid {
    display: grid;
    gap: var(--dp-space-xl);
    padding: var(--dp-space-2xl) 0;
    max-width: var(--dp-wide-width);
    margin: 0 auto;
}

.post-card {
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 8px;
    padding: var(--dp-space-xl);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    border-color: var(--dp-accent);
    box-shadow: 0 4px 12px rgba(0, 132, 61, 0.08);
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: var(--dp-space-md);
    font-size: 0.85rem;
    color: var(--dp-text-muted);
    margin-bottom: var(--dp-space-md);
}

.post-card__date {
    font-variant-numeric: tabular-nums;
}

.post-card__reading-time::before {
    content: '·';
    margin-right: var(--dp-space-md);
}

.post-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: var(--dp-space-sm);
}

.post-card__title a {
    color: var(--dp-text);
}

.post-card__title a:hover {
    color: var(--dp-accent);
}

.post-card__excerpt {
    color: var(--dp-text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: var(--dp-space-md);
}

.post-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--dp-space-sm);
}

.post-card__tag {
    display: inline-block;
    background: var(--dp-tag-bg);
    color: var(--dp-tag-text);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.2em 0.7em;
    border-radius: 4px;
}

/* Featured image on cards */
.post-card__thumbnail {
    margin: calc(-1 * var(--dp-space-xl));
    margin-bottom: var(--dp-space-lg);
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.post-card__thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-post-header {
    padding: var(--dp-space-3xl) 0 var(--dp-space-xl);
    text-align: center;
}

.single-post-header .post-card__meta {
    justify-content: center;
    margin-bottom: var(--dp-space-lg);
}

.single-post-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    max-width: 800px;
    margin: 0 auto var(--dp-space-md);
}

.single-post-header .post-card__tags {
    justify-content: center;
}

.post-featured-image {
    max-width: var(--dp-wide-width);
    margin: 0 auto var(--dp-space-2xl);
    border-radius: 8px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

/* ============================================
   POST CONTENT (Article body)
   ============================================ */
.entry-content {
    max-width: var(--dp-content-width);
    margin: 0 auto;
    padding-bottom: var(--dp-space-3xl);
}

.entry-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: var(--dp-space-2xl) 0 var(--dp-space-md);
    padding-top: var(--dp-space-md);
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: var(--dp-space-xl) 0 var(--dp-space-sm);
}

.entry-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: var(--dp-space-lg) 0 var(--dp-space-sm);
}

.entry-content p {
    margin-bottom: var(--dp-space-lg);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--dp-space-lg);
    padding-left: var(--dp-space-xl);
}

.entry-content li {
    margin-bottom: var(--dp-space-sm);
}

.entry-content blockquote {
    border-left: 3px solid var(--dp-accent);
    margin: var(--dp-space-xl) 0;
    padding: var(--dp-space-md) var(--dp-space-xl);
    color: var(--dp-text-secondary);
    font-style: italic;
    background: var(--dp-border-light);
    border-radius: 0 6px 6px 0;
}

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

/* Inline code */
.entry-content code {
    font-family: var(--dp-font-mono);
    font-size: 0.88em;
    background: var(--dp-code-bg);
    color: var(--dp-code-text);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

/* Code blocks */
.entry-content pre {
    background: var(--dp-code-bg);
    color: var(--dp-code-text);
    padding: var(--dp-space-xl);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--dp-space-xl) 0;
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
}

.entry-content pre code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: inherit;
}

/* Code block language label */
.entry-content pre[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25em 0.75em;
    font-size: 0.75rem;
    font-family: var(--dp-font-mono);
    color: var(--dp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Images in content */
.entry-content img {
    border-radius: 8px;
    margin: var(--dp-space-xl) 0;
}

.entry-content figure {
    margin: var(--dp-space-xl) 0;
}

.entry-content figcaption {
    font-size: 0.85rem;
    color: var(--dp-text-muted);
    text-align: center;
    margin-top: var(--dp-space-sm);
}

/* Tables */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--dp-space-xl) 0;
    font-size: 0.92rem;
}

.entry-content th,
.entry-content td {
    text-align: left;
    padding: var(--dp-space-sm) var(--dp-space-md);
    border-bottom: 1px solid var(--dp-border);
}

.entry-content th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dp-text-muted);
}

/* Horizontal rule */
.entry-content hr {
    border: none;
    border-top: 1px solid var(--dp-border);
    margin: var(--dp-space-2xl) 0;
}

/* Links in content */
.entry-content a {
    text-decoration: underline;
    text-decoration-color: rgba(0, 132, 61, 0.3);
    text-underline-offset: 2px;
}

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

/* ============================================
   AUTHOR BOX
   ============================================ */
.author-box {
    display: flex;
    gap: var(--dp-space-lg);
    padding: var(--dp-space-xl);
    background: var(--dp-surface);
    border: 1px solid var(--dp-border);
    border-radius: 8px;
    margin: var(--dp-space-2xl) auto;
    max-width: var(--dp-content-width);
}

.author-box__avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.author-box__name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--dp-space-xs);
}

.author-box__bio {
    font-size: 0.9rem;
    color: var(--dp-text-secondary);
    line-height: 1.5;
}

/* ============================================
   POST NAVIGATION
   ============================================ */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--dp-space-lg);
    max-width: var(--dp-content-width);
    margin: 0 auto var(--dp-space-2xl);
    padding-top: var(--dp-space-xl);
    border-top: 1px solid var(--dp-border);
}

.post-navigation a {
    color: var(--dp-text);
    font-weight: 500;
}

.post-navigation .nav-label {
    font-size: 0.8rem;
    color: var(--dp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--dp-space-xs);
}

.post-navigation .nav-next {
    text-align: right;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    max-width: var(--dp-content-width);
    margin: 0 auto;
    padding: var(--dp-space-2xl) 0;
}

.comments-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: var(--dp-space-xl);
}

.comment-list {
    list-style: none;
}

.comment {
    padding: var(--dp-space-lg) 0;
    border-bottom: 1px solid var(--dp-border-light);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: var(--dp-space-sm);
    margin-bottom: var(--dp-space-sm);
}

.comment-meta img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.comment-author {
    font-weight: 600;
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.82rem;
    color: var(--dp-text-muted);
}

.comment-body p {
    font-size: 0.95rem;
    color: var(--dp-text-secondary);
}

.children {
    list-style: none;
    padding-left: var(--dp-space-xl);
    border-left: 2px solid var(--dp-border-light);
    margin-top: var(--dp-space-md);
}

/* Comment form */
.comment-respond {
    margin-top: var(--dp-space-xl);
}

.comment-respond label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--dp-space-xs);
    color: var(--dp-text-secondary);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    padding: var(--dp-space-sm) var(--dp-space-md);
    border: 1px solid var(--dp-border);
    border-radius: 6px;
    font-family: var(--dp-font-body);
    font-size: 0.95rem;
    background: var(--dp-bg);
    color: var(--dp-text);
    margin-bottom: var(--dp-space-md);
    transition: border-color 0.2s;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
    outline: none;
    border-color: var(--dp-accent);
    box-shadow: 0 0 0 3px rgba(0, 132, 61, 0.15);
}

.comment-respond textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-respond .submit {
    background: var(--dp-accent);
    color: #fff;
    border: none;
    padding: var(--dp-space-sm) var(--dp-space-xl);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-respond .submit:hover {
    background: var(--dp-accent-hover);
}

/* ============================================
   SIDEBAR / WIDGETS
   ============================================ */
.widget {
    margin-bottom: var(--dp-space-xl);
}

.widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dp-text-muted);
    margin-bottom: var(--dp-space-md);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: var(--dp-space-sm) 0;
    border-bottom: 1px solid var(--dp-border-light);
}

.widget li a {
    color: var(--dp-text);
    font-size: 0.92rem;
}

.widget li a:hover {
    color: var(--dp-accent);
}

/* Search widget */
.search-form {
    display: flex;
}

.search-field {
    flex: 1;
    padding: var(--dp-space-sm) var(--dp-space-md);
    border: 1px solid var(--dp-border);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-family: var(--dp-font-body);
    font-size: 0.9rem;
    background: var(--dp-bg);
    color: var(--dp-text);
}

.search-field:focus {
    outline: none;
    border-color: var(--dp-accent);
}

.search-submit {
    background: var(--dp-accent);
    color: #fff;
    border: none;
    padding: var(--dp-space-sm) var(--dp-space-md);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--dp-space-sm);
    padding: var(--dp-space-xl) 0 var(--dp-space-3xl);
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dp-text-secondary);
    border: 1px solid var(--dp-border);
    transition: all 0.2s;
}

.pagination .page-numbers:hover {
    border-color: var(--dp-accent);
    color: var(--dp-accent);
}

.pagination .page-numbers.current {
    background: var(--dp-accent);
    color: #fff;
    border-color: var(--dp-accent);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    border-top: 1px solid var(--dp-border);
    padding: var(--dp-space-2xl) 0;
    margin-top: var(--dp-space-2xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--dp-text-muted);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    gap: var(--dp-space-lg);
}

.footer-nav a {
    color: var(--dp-text-muted);
    font-size: 0.85rem;
}

.footer-nav a:hover {
    color: var(--dp-text);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: var(--dp-space-md);
        text-align: center;
    }
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    text-align: center;
    padding: var(--dp-space-3xl) 0;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--dp-border);
    line-height: 1;
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--dp-text-secondary);
    margin: var(--dp-space-md) 0 var(--dp-space-xl);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.alignwide {
    max-width: var(--dp-wide-width);
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --dp-space-3xl: 2.5rem;
        --dp-space-2xl: 2rem;
    }

    .single-post-header h1 {
        font-size: 1.75rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .post-card {
        padding: var(--dp-space-lg);
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}
