/*
Theme Name: Leosplain Aero Glass
Theme URI: https://leosplain.com
Author: Leo Fung
Description: A premium, spatial WordPress theme featuring Light Glassmorphism and sophisticated editorial UI.
Version: 1.0.0
Text Domain: leosplain-aero
*/

:root {
    --bg-color: #FBFBFD;
    --text-primary: #1D1D1F;
    --text-secondary: #515154;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
    --accent-color: #5D5FEF;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    line-height: 1.8;
    font-size: 1.15rem;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

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

/* Ambient Light Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, rgba(200, 210, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(255, 200, 220, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), var(--glass-shadow);
    border-radius: 32px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 1);
    transform: translateY(-4px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography Details */
.entry-content p {
    margin-bottom: 2rem;
}

blockquote {
    border-left: 4px solid #E5E5E7;
    padding: 1.5rem 2rem;
    margin: 3rem 0;
    font-style: italic;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 16px 16px 0;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

th {
    font-weight: 600;
    background: rgba(0,0,0,0.02);
}

/* Navigation */
.site-header {
    position: fixed;
    top: 2rem;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
    pointer-events: none;
}

.nav-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    pointer-events: auto;
}

.nav-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.5rem 0.5rem 0.5rem 2rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 40px rgba(0,0,0,0.04), inset 0 1px 1px rgba(255,255,255,0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: auto;
    min-width: 400px;
}

.site-logo {
    flex: 1;
    display: flex;
    align-items: center;
}

.site-logo a {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.menu-toggle {
    background: var(--text-primary);
    color: #fff;
    padding: 0.7rem 1.8rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.menu-toggle:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(93, 95, 239, 0.3);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.search-icon:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

article, .post, .type-post, .entry-content-wrapper, .post-row {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Post List */
.post-row {
    margin-bottom: 1.5rem;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    gap: 2rem;
    align-items: center;
}

.post-row:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.post-thumbnail {
    width: 240px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
}

/* Widgets */
.meta-widget {
    padding: 2rem;
    position: sticky;
    top: 8rem;
}

/* Buttons */
.btn-glass {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: #fff;
    transform: scale(1.02);
}

.tag-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #1D1D1F;
    color: #fff;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag-link:hover {
    opacity: 0.8;
    color: #fff;
}

/* Morphing Menu Styles */
.morphing-menu-container {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(251, 251, 253, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.morphing-menu-container.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.morphing-menu-content {
    width: 100%;
    max-width: 1100px;
    padding: 6rem 4rem;
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 40px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.1);
    transform: scale(0.8) translateY(-20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.is-active .morphing-menu-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--text-primary);
    border: none;
    cursor: pointer;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.menu-close:hover {
    background: var(--accent-color);
    transform: rotate(90deg) scale(1.1);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    width: 100%;
}

.menu-label {
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.morphing-nav, 
.morphing-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.morphing-nav li a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: color 0.3s ease;
    text-decoration: none;
}

.morphing-nav li a:hover {
    color: var(--accent-color);
    opacity: 1;
}

/* Handle WordPress sub-menus */
.morphing-nav .sub-menu {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.9em;
}

.menu-section.contact-section {
    background: rgba(0,0,0,0.02);
    padding: 2.5rem;
    border-radius: 32px;
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-description {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.7;
    line-height: 1.6;
}

.contact-section .btn-glass {
    background: var(--text-primary);
    color: #fff;
    border: none;
    width: 100%;
    padding: 1rem;
    border-radius: 100px;
    font-weight: 700;
}

.contact-section .btn-glass:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* Content Image Fix */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* WordPress Tags Styling */
.entry-tags a {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: #1D1D1F;
    color: #fff;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.entry-tags a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    opacity: 1;
}

/* WordPress Comments Styling */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 2.5rem;
}

.comment-body {
    position: relative;
    padding-left: 4rem;
}

.comment-meta {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.comment-author .avatar {
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.comment-author cite {
    font-style: normal;
    font-weight: 800;
    font-size: 1.1rem;
}

.comment-metadata {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
}

/* Comment Form */
.comment-respond {
    margin-top: 4rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 1.5rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--accent-color);
}

.form-submit input[type="submit"] {
    background: var(--text-primary);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit input[type="submit"]:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.search-icon:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

@media (max-width: 768px) {
    .site-header {
        top: 1rem;
    }
    .nav-container {
        padding: 0 0.5rem;
    }
    .nav-pill {
        width: 100%;
        min-width: 0;
        gap: 0.5rem;
        padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    }
    .site-logo a {
        font-size: 0.95rem;
    }
    .menu-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }
    .search-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 768px) {
    .morphing-menu-container {
        padding: 0;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        transition: transform 0.4s ease, opacity 0.3s ease;
        transform: translateY(-100%);
        z-index: 9999;
        visibility: hidden;
        opacity: 0;
    }
    .morphing-menu-container.is-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .morphing-menu-content {
        padding: 4rem 2rem;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        overflow-y: auto;
        transform: none;
    }
    .is-active .morphing-menu-content {
        transform: none;
    }
    .menu-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    .menu-label {
        margin-bottom: 1rem;
    }
    .morphing-nav li a {
        font-size: 1.25rem;
    }
}
