/* Arctic Studio Theme Styles */

/* === Base Settings ============================================= */
:root {
    /* Arctic Color Palette */
    --arctic-white: #f8f9fa;
    --arctic-light: #e9ecef;
    --arctic-medium: #dee2e6;
    --arctic-dark: #adb5bd;
    --text-primary: #2c3e50;
    --text-secondary: #5a6c7d;
    --accent-gradient: linear-gradient(135deg, var(--arctic-medium), var(--arctic-white));
    --hero-gradient: linear-gradient(135deg, var(--arctic-white) 0%, var(--arctic-light) 50%, var(--arctic-medium) 100%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--arctic-white);
    overflow-x: hidden;
}

/* Display Typography for Headings */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* === Navigation ================================================= */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.burger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.burger:hover {
    background: var(--arctic-light);
    transform: translateY(-2px);
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, var(--arctic-white), var(--arctic-light));
    padding: 80px 2rem 2rem;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 999;
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
}

/* Backdrop for mobile */
.nav-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 320px;
    width: calc(100vw - 320px);
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.nav-menu.active::before {
    opacity: 1;
    visibility: visible;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin: 1.5rem 0;
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInNav 0.5s ease forwards;
}

.nav-menu li:nth-child(1) { animation-delay: 0.1s; }
.nav-menu li:nth-child(2) { animation-delay: 0.2s; }
.nav-menu li:nth-child(3) { animation-delay: 0.3s; }
.nav-menu li:nth-child(4) { animation-delay: 0.4s; }
.nav-menu li:nth-child(5) { animation-delay: 0.5s; }

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--text-secondary);
    transform: translateX(10px);
}

/* === Hero Section =============================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
    padding-top: 60px; /* Add space for fixed header */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23dee2e6" stroke-width="0.5" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* === Mosaic Layout ============================================== */
.mosaic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    grid-auto-flow: dense;
}

.mosaic-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(233,236,239,0.6));
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(222,226,230,0.5);
    transition: all 0.4s ease;
    transform: translateY(20px);
    opacity: 0;
}

.mosaic-item.visible {
    transform: translateY(0);
    opacity: 1;
}

.mosaic-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.mosaic-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-item.wide {
    grid-column: span 2;
}

.mosaic-item.tall {
    grid-row: span 2;
}

/* === UI Elements ================================================ */
.btn {
    background: var(--accent-gradient);
    color: var(--text-primary);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(173,181,189,0.3);
}

.card {
    background: rgba(255,255,255,0.9);
    border-radius: 4px;
    padding: 1.5rem;
    border: 1px solid var(--arctic-medium);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* === Section Styles ============================================= */
.section {
    padding: 4rem 0;
}

.section:nth-child(even) {
    background: linear-gradient(135deg, var(--arctic-light), var(--arctic-white));
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Post List ================================================== */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.post-item {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-item h3 {
    font-size: 1.125rem;
    margin: 1rem;
    line-height: 1.4;
}

.post-item h3 a {
    color: #111;
    text-decoration: none;
}

.post-item h3 a:hover {
    color: var(--text-secondary);
}

.post-item p {
    margin: 0 1rem 1.25rem;
    color: #555;
    flex: 1 0 auto;
}

.post-item > a:last-of-type {
    align-self: flex-start;
    margin: 0 1rem 1.25rem;
    background: var(--text-primary);
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: background 0.2s ease-in-out;
}

.post-item > a:last-of-type:hover {
    background: var(--text-secondary);
}

/* === Pagination ================================================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--arctic-medium);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.next.page-numbers,
.prev.page-numbers {
    border-color: transparent;
    color: var(--text-primary);
}

.next.page-numbers:hover,
.prev.page-numbers:hover {
    color: var(--text-secondary);
    background: transparent;
}

/* === Breadcrumbs ================================================ */
.breadcrumbs {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
    font-size: 0.875rem;
    color: #777;
}

.breadcrumbs a {
    color: var(--text-primary);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

.breadcrumbs span {
    color: #555;
}

/* === Single Post/Page Content ================================== */
.page-content {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 0 1rem 2rem;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.page-content .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-content h1 {
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    color: #111;
    text-align: center;
}

.page-content .content {
    margin: 1.5rem 0;
}

.page-content .content p {
    margin-bottom: 1rem;
    color: #444;
}

/* === Footer ==================================================== */
.footer {
    background: linear-gradient(135deg, var(--arctic-medium), var(--arctic-dark));
    color: var(--text-primary);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-section p, 
.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(222,226,230,0.3);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* === Animations ================================================ */
@keyframes slideInNav {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Parallax Effect =========================================== */
.parallax-element {
    transform: translateZ(0);
    will-change: transform;
}

/* === Responsive Design ========================================= */
@media (max-width: 768px) {
    .mosaic-item.large,
    .mosaic-item.wide {
        grid-column: span 1;
    }

    .mosaic-item.large,
    .mosaic-item.tall {
        grid-row: span 1;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .page-content h1 {
        font-size: 1.35rem;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* === Homepage Styles =========================================== */
.homepage {
    padding-top: 80px;
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: var(--hero-gradient);
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-text h1 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--text-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Random Posts Section */
.random-posts {
    padding: 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-placeholder .placeholder-content {
    height: 200px;
    background: var(--arctic-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    margin: 0;
    font-size: 1.25rem;
}

.post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h3 a:hover {
    color: var(--text-secondary);
}

/* Blog Link Section */
.blog-link-section {
    text-align: center;
    padding: 2rem 0;
}

.blog-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-gradient);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.blog-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Homepage */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-image img {
        height: 250px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .homepage {
        padding-top: 60px;
    }
    
    .hero-section {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
}