/*
Theme Name: AI English Hack
Theme URI: https://example.com/ai-english-hack
Author: AI English Hack Team
Author URI: https://example.com
Description: AIを活用して英語学習を効率化する社会人のためのブログテーマ。モダンでミニマルなデザイン。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
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: ai-english-hack
Tags: blog, one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
    /* Palette */
    --bg-color: #F9F8F6;
    --surface-color: #FFFFFF;
    --text-main: #2D2D2D;
    --text-sub: #5F5F5F;
    --accent-color: #D97757;
    --accent-hover: #C45D43;
    --border-color: #E6E1D8;
    --highlight-bg: #F4EBE8;

    /* Typography */
    --font-serif: "Libre Baskerville", "Noto Serif JP", serif;
    --font-sans: "Inter", "Noto Sans JP", sans-serif;

    /* Animation */
    --ease-out-quart: cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================================================
   Global & Reset
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: var(--accent-color);
    color: white;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease-out-quart);
    cursor: pointer;
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(249, 248, 246, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid rgba(230, 225, 216, 0.6);
    transition: transform 0.3s;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 102;
}

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

.ai-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(217, 119, 87, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0); }
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.desktop-nav ul {
    display: flex;
    gap: 32px;
}

.desktop-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sub);
    position: relative;
}

.desktop-nav a:hover,
.desktop-nav a.active-link,
.desktop-nav .current-menu-item a,
.desktop-nav .current_page_item a {
    color: var(--accent-color);
}

.search-trigger {
    cursor: pointer;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    padding: 8px;
    background: none;
    border: none;
}

.search-trigger:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   Mobile Menu
   ========================================================================== */
.mobile-menu-trigger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 103;
    padding: 8px;
    background: none;
    border: none;
}

.mobile-menu-trigger span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-trigger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-trigger.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-trigger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 102;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 40px;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-overlay ul {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.mobile-menu-overlay a {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 600;
}

.mobile-menu-overlay a:hover {
    color: var(--accent-color);
}

/* ==========================================================================
   Search Modal
   ========================================================================== */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(249, 248, 246, 0.95);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.search-container {
    width: 100%;
    max-width: 600px;
    padding: 0 24px;
    position: relative;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-main);
    padding: 16px 0;
    outline: none;
}

.search-input::placeholder {
    color: #D1CDC7;
}

.search-input:focus {
    border-color: var(--accent-color);
}

.close-search {
    position: absolute;
    top: -60px;
    right: 24px;
    font-size: 3rem;
    cursor: pointer;
    color: var(--text-sub);
    font-weight: 300;
    background: none;
    border: none;
}

/* ==========================================================================
   Page Layout
   ========================================================================== */
.page-wrapper {
    padding-top: 160px;
    min-height: 80vh;
    animation: pageFadeIn 0.5s var(--ease-out-quart);
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    margin-bottom: 100px;
    min-height: 200px;
}

.hero-label {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 24px;
}

.typewriter-text {
    border-right: 3px solid var(--accent-color);
    padding-right: 4px;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-sub);
    max-width: 640px;
}

/* ==========================================================================
   Section Components
   ========================================================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
}

.section-subtitle {
    color: var(--text-sub);
    font-size: 0.9rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

/* ==========================================================================
   Card Design
   ========================================================================== */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s var(--ease-out-quart);
    position: relative;
    top: 0;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.card:hover::before {
    opacity: 1;
}

.card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(217, 119, 87, 0.08);
    padding: 4px 12px;
    border-radius: 100px;
    align-self: flex-start;
}

.card h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.card:hover h3 {
    color: var(--accent-color);
}

.card p {
    font-size: 0.95rem;
    color: var(--text-sub);
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.7;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.card-meta {
    font-size: 0.8rem;
    color: #BBB;
    display: flex;
    gap: 12px;
    font-weight: 500;
}

.card-arrow {
    color: var(--accent-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Featured Card
   ========================================================================== */
.featured-section {
    margin-bottom: 100px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-quart);
    position: relative;
    cursor: pointer;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-image {
    background-color: #EEECE7;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

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

.featured-image-placeholder {
    background-color: #EEECE7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    color: #CDCAC2;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.featured-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#CDCAC2 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

.featured-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(217, 119, 87, 0.08);
    padding: 6px 16px;
    border-radius: 100px;
    align-self: flex-start;
}

.featured-content h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 16px;
    transition: color 0.3s;
}

.featured-card:hover h2 {
    color: var(--accent-color);
}

.featured-content p {
    color: var(--text-sub);
    margin-bottom: 32px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.featured-card:hover .arrow-icon {
    transform: translateX(6px);
}

/* ==========================================================================
   Log List
   ========================================================================== */
.log-section {
    margin-top: 100px;
}

.log-list {
    border-top: none;
}

.log-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: baseline;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    cursor: pointer;
}

.log-item:hover .log-title {
    color: var(--accent-color);
}

.log-date {
    font-family: var(--font-sans);
    color: #999;
    font-size: 0.9rem;
}

.log-title {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s;
}

.log-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
    color: var(--accent-color);
}

.log-item:hover .log-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ==========================================================================
   Article Styles
   ========================================================================== */
.article-container {
    max-width: 740px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 60px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 40px;
}

.article-tag {
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 16px;
}

.article-title,
.entry-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 24px;
    color: var(--text-main);
}

.article-meta,
.entry-meta {
    color: #999;
    font-size: 0.9rem;
}

.article-body,
.entry-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-main);
}

.article-body p,
.entry-content p {
    margin-bottom: 32px;
}

.article-body h2,
.entry-content h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-top: 60px;
    margin-bottom: 24px;
}

.article-body h3,
.entry-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
}

.article-body strong,
.entry-content strong {
    font-weight: 600;
    color: var(--accent-color);
}

.article-body blockquote,
.entry-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 24px;
    margin: 40px 0;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--text-sub);
    font-size: 1.2rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 32px;
    padding-left: 24px;
}

.entry-content li {
    margin-bottom: 8px;
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

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

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

/* ==========================================================================
   About Page
   ========================================================================== */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 80px;
    align-items: start;
}

.profile-card {
    position: sticky;
    top: 120px;
    text-align: center;
    background: var(--surface-color);
    padding: 48px 32px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.03);
}

.profile-img {
    width: 100px;
    height: 100px;
    background: #EEECE7;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #CDCAC2;
    font-size: 0.9rem;
    border: 4px solid #fff;
    box-shadow: 0 0 0 1px var(--border-color);
    overflow: hidden;
}

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

.profile-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.profile-role-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(217, 119, 87, 0.08);
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 24px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 32px;
}

.profile-social-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.profile-social-label {
    font-size: 0.75rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.profile-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-icon {
    color: #BBB;
    transition: all 0.2s;
    cursor: pointer;
}

.social-icon:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.about-content h2 {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.about-content p {
    margin-bottom: 24px;
    color: var(--text-main);
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-content h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-top: 48px;
    margin-bottom: 24px;
}

/* ==========================================================================
   Newsletter Section
   ========================================================================== */
.newsletter-section {
    margin-top: 100px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 24px;
    text-align: center;
    opacity: 0.8;
}

.newsletter-container {
    max-width: 500px;
    margin: 0 auto;
}

.badge-coming-soon {
    display: inline-block;
    background: rgba(217, 119, 87, 0.1);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.newsletter-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-sub);
}

.newsletter-text {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    margin-top: 80px;
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-sub);
    font-size: 0.85rem;
}

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

.footer-social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: color 0.2s;
}

.footer-social-link:hover {
    color: var(--accent-color);
}

.footer-nav {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--text-sub);
    transition: color 0.2s;
}

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

/* ==========================================================================
   Scroll to Top
   ========================================================================== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 90;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ==========================================================================
   Reveal Animation
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-quart);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Search Results
   ========================================================================== */
.search-no-results {
    text-align: center;
    padding: 60px 0;
    color: var(--text-sub);
}

.search-highlight {
    background-color: rgba(217, 119, 87, 0.2);
    padding: 0 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 60px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.pagination .current {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-trigger {
        display: flex;
    }

    .hero h1,
    .article-title,
    .entry-title {
        font-size: 2.2rem;
    }

    .featured-card,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .featured-image,
    .featured-image-placeholder {
        height: 200px;
    }

    .log-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-card {
        position: static;
        margin-bottom: 40px;
    }

    .about-layout {
        gap: 40px;
    }

    .container {
        padding: 0 20px;
    }
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.wp-block-image {
    margin-bottom: 32px;
}

.wp-block-image img {
    border-radius: 8px;
}

.aligncenter {
    text-align: center;
}

.alignleft {
    float: left;
    margin-right: 24px;
    margin-bottom: 16px;
}

.alignright {
    float: right;
    margin-left: 24px;
    margin-bottom: 16px;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

/* ==========================================================================
   Page Transition Animations
   ========================================================================== */

/* Initial page load animation */
.page-wrapper {
    opacity: 0;
    transform: translateY(10px);
    animation: pageEnter 0.5s var(--ease-out-quart) forwards;
}

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

/* Page exit animation */
body.page-transitioning .page-wrapper {
    animation: pageExit 0.3s var(--ease-out-quart) forwards;
}

@keyframes pageExit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Prevent scroll during transition */
body.page-transitioning {
    overflow: hidden;
}

/* Header scroll state */
.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Body states for modals */
body.menu-open,
body.search-open {
    overflow: hidden;
}

/* Active navigation link */
.desktop-nav a.active-link,
.mobile-menu-overlay a.active-link {
    color: var(--accent-color);
}

/* Card animations enhanced */
.card,
.featured-card,
.log-item {
    cursor: pointer;
}

/* Staggered animation for grid items */
.grid .card:nth-child(1) { animation-delay: 0.1s; }
.grid .card:nth-child(2) { animation-delay: 0.2s; }
.grid .card:nth-child(3) { animation-delay: 0.3s; }
.grid .card:nth-child(4) { animation-delay: 0.4s; }
.grid .card:nth-child(5) { animation-delay: 0.5s; }
.grid .card:nth-child(6) { animation-delay: 0.6s; }

.grid .card {
    opacity: 0;
    animation: cardFadeIn 0.5s var(--ease-out-quart) forwards;
}

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

/* Log list staggered animation */
.log-list .log-item:nth-child(1) { animation-delay: 0.1s; }
.log-list .log-item:nth-child(2) { animation-delay: 0.15s; }
.log-list .log-item:nth-child(3) { animation-delay: 0.2s; }
.log-list .log-item:nth-child(4) { animation-delay: 0.25s; }
.log-list .log-item:nth-child(5) { animation-delay: 0.3s; }

.log-list .log-item {
    opacity: 0;
    animation: logFadeIn 0.4s var(--ease-out-quart) forwards;
}

@keyframes logFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Featured card animation */
.featured-section {
    opacity: 0;
    animation: featuredFadeIn 0.6s var(--ease-out-quart) 0.2s forwards;
}

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

/* Hero animation */
.hero {
    opacity: 0;
    animation: heroFadeIn 0.6s var(--ease-out-quart) forwards;
}

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

/* Article content animation */
.article-header {
    opacity: 0;
    animation: articleHeaderFadeIn 0.5s var(--ease-out-quart) forwards;
}

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

.entry-content,
.article-body {
    opacity: 0;
    animation: contentFadeIn 0.5s var(--ease-out-quart) 0.2s forwards;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* About page animations */
.profile-card {
    opacity: 0;
    animation: profileFadeIn 0.5s var(--ease-out-quart) 0.1s forwards;
}

@keyframes profileFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.about-content {
    opacity: 0;
    animation: aboutContentFadeIn 0.5s var(--ease-out-quart) 0.2s forwards;
}

@keyframes aboutContentFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
