@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Outfit:wght@400;700;900&display=swap');

:root {
    --bg-main: #FFFFFF;
    --bg-card: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --accent-gradient: linear-gradient(135deg, #0284c7, #4f46e5);
    --accent-color: #0284c7;
    --border-color: #E2E8F0;
}


body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .site-title, .posttitle, .widgettitle {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

a:hover {
    color: #0369a1;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Global Wrappers / Structural fallbacks */
.container, .wrapper, div[align="center"] {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Base styles for simple HTML fallbacks */
div>ul {
    padding-left: 20px;
}

div>h3 {
    margin-top: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Header & Nav */
#masthead {
    padding: 40px 20px;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 60%),
                radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.05), transparent 50%),
                var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

#masthead .row {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
}

#branding {
    text-align: left;
    flex: 1;
}

#masthead .searchform {
    margin-top: 0;
    flex-shrink: 0;
}

.site-title a {
    font-size: 2.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.site-description {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 300;
    margin-top: 10px;
}

.searchform {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

button.searchsubmit {
    background: var(--accent-gradient);
    border: none;
    border-radius: 20px;
    padding: 10px 16px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}

button.searchsubmit:hover {
    box-shadow: 0 0 15px var(--accent-glow);
    transform: scale(1.05);
}

.searchfield {
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: 0.3s;
}

.searchfield:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

#nav-primary {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

#nav-primary ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#nav-primary ul li a {
    display: block;
    padding: 15px 20px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-secondary);
}

#nav-primary ul li:hover > a {
    color: var(--accent-color);
    background: #F8FAFC;
    box-shadow: inset 0 -3px 0 var(--accent-color);
}

/* Submenu / Taxonomy */
#nav-primary ul li {
    position: relative;
}

#nav-primary ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    min-width: 200px;
}

#nav-primary ul li:hover > ul {
    display: block;
}

/* Content Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.eightcol {
    flex: 1 1 65%;
}

.fourcol.last {
    flex: 1 1 30%;
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
}

/* Articles and Posts */
article, .post, .entry {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

article:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #CBD5E1;
}

.posttitle {
    font-size: 2.2rem;
    line-height: 1.2;
}

.postmetadata, .breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Sidebar Widgets */
aside .widget {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

aside h3.widgettitle, aside h4.widgettitle {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

aside h3.widgettitle::after, aside h4.widgettitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
}

aside ul {
    list-style: none;
    padding: 0;
}

aside ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

aside ul li:last-child {
    border-bottom: none;
}

/* Footer */
footer {
    background: #F8FAFC;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

footer .row {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Image & Input fixes */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

input[type="text"], input[type="email"], select, textarea {
    width: 100%;
    padding: 12px;
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-family: inherit;
}

button[type="submit"], .wp-block-button__link {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button[type="submit"]:hover {
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Comments section */
#respond, .comment-respond {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* Code blocks */
pre, code {
    background: #F1F5F9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
    color: #0369a1;
}

pre {
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    line-height: 1.6;
}

code {
    padding: 2px 8px;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    border-radius: 0;
}

/* Blockquote */
blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 20px 0;
    padding: 15px 20px;
    background: rgba(56, 189, 248, 0.05);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-style: italic;
}

/* Post navigation */
.postnav {
    margin: 20px 0;
}

.postnav a {
    display: inline-block;
    padding: 10px 20px;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: 0.3s;
}

.postnav a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    text-shadow: none;
}

/* Category / Tags */
.post-taxonomies {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-taxonomies a {
    display: inline-block;
    background: rgba(56,189,248,0.1);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    margin: 3px;
    border: 1px solid rgba(56,189,248,0.2);
    transition: 0.3s;
}

.post-taxonomies a:hover {
    background: rgba(56,189,248,0.2);
    text-shadow: none;
}

/* Footer improvements */
#footer-wrap {
    border-top: 1px solid rgba(255,255,255,0.03);
    padding-top: 20px;
    margin-top: 20px;
}

footer a {
    color: var(--accent-color);
}

/* Pagination */
#pagination {
    list-style: none;
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 20px 0;
}

#pagination li a {
    display: block;
    padding: 10px 20px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}

#pagination li a:hover {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    text-shadow: none;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th {
    background: rgba(56, 189, 248, 0.1);
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid var(--accent-color);
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

tr:hover td {
    background: rgba(0,0,0,0.02);
}

/* Responsive */
@media (max-width: 600px) {
    .site-title a { font-size: 1.8rem; }
    #nav-primary ul { flex-direction: column; }
    #nav-primary ul li a { padding: 10px 15px; border-bottom: 1px solid var(--border-color); }
    .eightcol, .fourcol { flex: 1 1 100%; }
    article, .post, .entry { padding: 20px; }
    #masthead .row { flex-wrap: wrap; }
}
