/* ============================
   Apple Vision Pro / visionOS 
   Glassmorphism Design System
   (Based on Open-Source UI Kits)
   ============================ */

:root {
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent: #0071e3;
    --accent-hover: #0077ed;

    /* Exact visionOS Glass Parameters from Open Source Clones */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(30px) saturate(1.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.4);
    --glass-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   WALLPAPER BACKGROUND 
   Glassmorphism requires a complex, textured
   background to look like glass. A solid or
   muted background makes glass invisible.
   ========================================= */
.wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    /* Using the abstract liquid background from Unsplash, 
       but with a moderate white overlay to balance colors */
    background: 
        linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)),
        url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=2564&auto=format&fit=crop') center/cover no-repeat;
    /* Extra filter to gently reduce saturation */
    filter: saturate(0.85);
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.05); }
    66% { transform: translate(-30px, 50px) scale(0.95); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, 30px) scale(1.08); }
    66% { transform: translate(40px, -60px) scale(0.92); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, -30px) scale(1.1); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-60px, 40px); }
}

@keyframes float5 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, 50px) scale(1.05); }
    66% { transform: translate(-40px, -20px) scale(0.97); }
}

/* =========================================
   GLASS PANEL - Core visionOS Material
   ========================================= */
.glass-panel {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow), var(--glass-inner-glow);
    overflow: hidden;
}

/* Specular highlight — the "light reflection" at the top edge */
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.08) 40%,
        transparent 100%
    );
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    pointer-events: none;
    z-index: 1;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg, var(--accent), #34c759);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   NAVIGATION - Frosted Glass Bar
   ========================================= */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.04);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: var(--transition);
}

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

.nav-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 1rem;
    border-radius: 99px;
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.15);
    transition: var(--transition);
}

.nav-action:hover {
    background: rgba(0, 113, 227, 0.15);
}

.nav-action svg {
    width: 16px;
    height: 16px;
}

/* =========================================
   MAIN LAYOUT
   ========================================= */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 2rem;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.hero-content {
    text-align: center;
    padding: 4rem 3rem;
    max-width: 800px;
    width: 100%;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    /* Small glass circle */
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 0.5px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    overflow: hidden;
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.hero-desc {
    font-size: 1.15rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.primary-btn {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.45);
}

.glass-btn {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 0.5px solid rgba(255, 255, 255, 0.5);
    color: var(--text-primary);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* =========================================
   SECTIONS 
   ========================================= */
.section-container {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.projects-grid, .analysis-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

/* =========================================
   ITEM CARDS — visionOS Window Material
   ========================================= */
.item-card {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(50px) saturate(180%);
    -webkit-backdrop-filter: blur(50px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 
        0 2px 16px rgba(0, 0, 0, 0.05),
        0 8px 40px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Card specular highlight */
.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        transparent 100%
    );
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
    z-index: 1;
}

.item-card:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.3);
}

.card-icon {
    margin-bottom: 1rem;
    color: var(--accent);
    position: relative;
    z-index: 2;
    /* Small glass icon background */
    background: rgba(255, 255, 255, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 0.7rem;
    border-radius: 14px;
    display: inline-flex;
    width: max-content;
}

.item-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 2;
}

.item-card p {
    font-size: 0.93rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0.5px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.read-more {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* =========================================
   FOOTER
   ========================================= */
.glass-footer {
    position: relative;
    margin-top: 4rem;
    border-bottom: none;
    border-top: 0.5px solid rgba(255, 255, 255, 0.4);
    padding: 2rem 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
}

.footer-socials a svg {
    width: 20px;
    height: 20px;
}

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

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

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-content {
        padding: 3rem 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    h2 {
        font-size: 2rem;
    }

    .posts-grid,
    .projects-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

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

.glass-modal {
    background: rgba(255, 255, 255, 0.75); /* White + semi-transparent */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 3rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .glass-modal {
    transform: translateY(0);
}

.glass-modal h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #111111; /* Dark text for bright background */
}

.glass-modal p {
    color: #333333; /* Dark text for bright background */
    font-size: 1.1rem;
    line-height: 1.5;
}
