/*
Theme Name: Biochem Folio
Theme URI: https://example.com/biochem-folio
Author: Custom Theme
Author URI: https://example.com
Description: A clean, minimalist personal portfolio and blog theme designed for academic and creative writing. Features a full-screen hero, transparent dropdown navigation, and dedicated sections for computer projects, poetry, professional writing, blog posts, and legal commentary. Fully customizable via the WordPress Customizer.
Version: 1.0.4
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: biochem-folio
Tags: blog, portfolio, one-column, custom-colors, custom-menu, featured-images, full-width-template, theme-options, threaded-comments, translation-ready
*/

/* ============================================
   CSS VARIABLES (Customizer-controlled)
   ============================================ */
:root {
    --color-bg: #fafaf7;
    --color-text: #1a1a1a;
    --color-muted: #6b6b6b;
    --color-accent: #2d3748;
    --color-line: rgba(26, 26, 26, 0.08);
    --color-overlay: rgba(0, 0, 0, 0.25);
    --color-glass: rgba(255, 255, 255, 0.12);
    --color-glass-border: rgba(255, 255, 255, 0.2);

    --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    --max-width: 1280px;
    --content-width: 720px;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

a:hover {
    opacity: 0.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

p {
    margin-bottom: 1.25rem;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.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;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 1rem 1.5rem;
    z-index: 9999;
    font-size: 0.875rem;
}

.skip-link:focus {
    top: 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: background-color 0.3s ease;
}

.site-branding {
    color: #fff;
    transition: color 0.3s ease;
}

.site-header.scrolled .site-branding {
    color: var(--color-text);
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 0;
}

.site-title a {
    color: inherit;
}

.site-description {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Main Navigation - Glass Blocks */
.main-navigation {
    display: flex;
    gap: 0.5rem;
}

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

.main-navigation li {
    position: relative;
}

.main-navigation > div > ul > li > a {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.3s ease;
}

.site-header.scrolled .main-navigation > div > ul > li > a {
    background: rgba(26, 26, 26, 0.05);
    border-color: rgba(26, 26, 26, 0.1);
    color: var(--color-text);
}

.main-navigation > div > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.site-header.scrolled .main-navigation > div > ul > li > a:hover {
    background: rgba(26, 26, 26, 0.1);
}

/* Submenu (Dropdown) */
.main-navigation .sub-menu {
    list-style: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--color-text);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: none;
    font-family: var(--font-body);
    border: none;
    background: transparent;
}

.main-navigation .sub-menu li a:hover {
    background: rgba(0, 0, 0, 0.04);
    opacity: 1;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    color: #fff;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #fff;
    padding: 0 2.5rem 6rem;
    max-width: 800px;
}

.hero-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeUp 1s ease 0.2s both;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    animation: fadeUp 1s ease 0.4s both;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    max-width: 500px;
    opacity: 0.9;
    animation: fadeUp 1s ease 0.6s both;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator::after {
    content: '';
    display: block;
    width: 1px;
    height: 30px;
    background: #fff;
    margin: 0.75rem auto 0;
    opacity: 0.6;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ============================================
   MAIN CONTENT / BLOG
   ============================================ */
.site-main {
    background: var(--color-bg);
    position: relative;
    z-index: 4;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-xl) 2.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.section-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--color-muted);
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* Blog Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-card {
    border-bottom: 1px solid var(--color-line);
    padding-bottom: var(--space-lg);
}

.post-card:last-child {
    border-bottom: none;
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.post-category {
    color: var(--color-accent);
    font-weight: 500;
}

.post-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.post-title a:hover {
    color: var(--color-accent);
    opacity: 1;
}

.post-excerpt {
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.read-more {
    display: inline-block;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    opacity: 1;
}

/* Single Post */
.single-post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: var(--space-xl) 2.5rem;
}

.single-post-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    padding-top: 4rem;
}

.single-post-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    margin: 1.5rem 0;
}

.single-post-meta {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.single-post-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text);
}

/* Hyperlinks inside post and page content — subtle underline, no color change */
.single-post-body a,
.post-excerpt a,
.about-text-body a,
.comment-content a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: rgba(26, 26, 26, 0.35);
    transition: text-decoration-color 0.2s ease, text-decoration-thickness 0.2s ease;
}

.single-post-body a:hover,
.post-excerpt a:hover,
.about-text-body a:hover,
.comment-content a:hover {
    opacity: 1;
    text-decoration-color: var(--color-text);
    text-decoration-thickness: 2px;
}

.single-post-body h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1rem;
}

.single-post-body h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.single-post-body blockquote {
    border-left: 2px solid var(--color-accent);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-muted);
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.single-post-body code {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
}

.single-post-body pre {
    background: #1a1a1a;
    color: #f0f0f0;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

.single-post-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    background: #fff;
    border-top: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-lg);
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--color-line);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

.about-text-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.about-text-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-muted);
}

.about-text-body p {
    margin-bottom: 1.25rem;
}

/* ============================================
   PAGE TEMPLATES (Poetry, Projects, etc.)
   ============================================ */
.page-template-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 8rem 2.5rem var(--space-xl);
}

.page-template-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.page-template-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.page-template-description {
    color: var(--color-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   FOOTER & SOCIALS
   ============================================ */
.site-footer {
    background: var(--color-text);
    color: var(--color-bg);
    padding: var(--space-lg) 2.5rem var(--space-md);
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer-branding,
.footer-socials {
    text-align: left;
    align-self: flex-start;
}

.footer-branding-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.footer-branding-tagline {
    font-size: 0.85rem;
    opacity: 0.7;
    max-width: 350px;
}

.footer-socials-title {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-bg);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    opacity: 1;
}

.social-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--space-lg);
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--color-line);
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
    opacity: 1;
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-area {
    max-width: var(--content-width);
    margin: var(--space-lg) auto 0;
    padding: var(--space-md) 2.5rem;
    border-top: 1px solid var(--color-line);
}

.comments-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-line);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--color-line);
    background: transparent;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.comment-form input[type="submit"] {
    width: auto;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    padding: 0.85rem 2rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.85;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-container {
        padding: var(--space-lg) 1.5rem;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .main-navigation > div {
        display: none;
        position: absolute;
        top: 100%;
        right: 1.5rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(0, 0, 0, 0.06);
        padding: 1rem;
        min-width: 220px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    }

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

    .main-navigation > div > ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation > div > ul > li > a {
        background: transparent;
        border: none;
        color: var(--color-text);
        padding: 0.75rem 1rem;
        display: block;
    }

    .main-navigation .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }

    .hero-content {
        padding: 0 1.5rem 4rem;
    }

    .single-post-content,
    .page-template-content {
        padding: 6rem 1.5rem var(--space-lg);
    }
}

/* ============================================
   WORDPRESS CORE
   ============================================ */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption-text {
    font-size: 0.85rem;
    color: var(--color-muted);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

.sticky { position: relative; }
.gallery { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.gallery-item { flex: 1 1 200px; }

.bypostauthor { display: block; }
