/* === CSS VARIABLES === */
:root {
    /* Colors */
    --md-sys-color-background: #0d0d12;
    --md-sys-color-surface: #14141a;
    --md-sys-color-surface-dim: #0a0a0f;
    --md-sys-color-surface-bright: #1e1e28;
    --md-sys-color-on-surface: #e6e6f0;
    --md-sys-color-on-surface-variant: #a6a6b5;
    --md-sys-color-on-surface-muted: #7c7c8a;
    --md-sys-color-primary: #c4b5fd;
    --md-sys-color-on-primary: #382c60;
    --md-sys-color-outline: #565561;
    --md-sys-color-outline-variant: #3e3d48;
    
    /* Larry's Accent Colors */
    --larry-accent: #00f5a8;
    --larry-accent-dark: #00c78a;
    --larry-accent-light: #70ffd6;
    --larry-glow: rgba(0, 245, 168, 0.4);
    --larry-glow-strong: rgba(0, 245, 168, 0.7);
    
    /* Shadows */
    --md-sys-elevation-1: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(255,255,255,0.03);
    --md-sys-elevation-2: 0 2px 6px rgba(0,0,0,0.5), 0 2px 4px rgba(255,255,255,0.04);
    --md-sys-elevation-3: 0 4px 12px rgba(0,0,0,0.6), 0 4px 8px rgba(255,255,255,0.05);
    --md-sys-elevation-4: 0 8px 20px rgba(0,0,0,0.7), 0 6px 12px rgba(255,255,255,0.06);
    
    /* Border Radius */
    --md-sys-radius-full: 28px;
    --md-sys-radius-large: 20px;
    --md-sys-radius-medium: 16px;
    
    /* Animation */
    --md-sys-motion-easing-emphasized: cubic-bezier(0.2, 0, 0, 1);
}
/* Featured Image */
.article-featured-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--md-sys-radius-large);
    margin-bottom: 32px;
    display: block;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid var(--md-sys-color-outline-variant);
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

.article-featured-image:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 0 2px var(--larry-accent),
        0 0 24px var(--larry-glow);
}

/* === BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Readex Pro', 'Segoe UI', sans-serif;
    background: var(--md-sys-color-background);
    color: var(--md-sys-color-on-surface);
    line-height: 1.65;
    font-size: 17px;
    padding: 24px 16px;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(196, 181, 253, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(0, 245, 168, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
}

/* === HEADER === */
.header-glass {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 48px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(20, 20, 26, 0.75);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-sys-radius-large);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: var(--md-sys-radius-full);
    transition: all 0.3s var(--md-sys-motion-easing-emphasized);
}

.logo-link:hover {
    background: rgba(196, 181, 253, 0.1);
    box-shadow: 0 0 20px rgba(196, 181, 253, 0.2);
}

.logo-img {
    width: 64px;
    height: 64px;
    border-radius: 24%;
    object-fit: cover;
    border: 2px solid var(--md-sys-color-outline);
    box-shadow: 
        0 0 0 4px rgba(0, 0, 0, 0.7),
        0 4px 12px rgba(0,0,0,0.5);
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

.logo-link:hover .logo-img {
    transform: scale(1.12) rotate(6deg);
    border-color: var(--larry-accent);
    box-shadow:
        0 0 0 4px rgba(0, 0, 0, 0.8),
        0 0 0 8px var(--larry-glow),
        0 8px 24px var(--larry-glow-strong);
}

.logo-text {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(95deg, var(--md-sys-color-primary), var(--larry-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.8px;
}

/* === NAVIGATION === */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

nav {
    display: flex;
    gap: 12px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--md-sys-radius-full);
    transition: all 0.25s var(--md-sys-motion-easing-emphasized);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 168, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.nav-link:hover::before {
    transform: translateX(100%);
}

.nav-link:hover,
.nav-link:focus {
    color: white;
    background: rgba(0, 245, 168, 0.15);
    transform: translateY(-3px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.6),
        0 0 16px var(--larry-glow);
}

/* === HERO === */
.hero {
    text-align: center;
    padding: 48px 24px;
    margin-bottom: 64px;
    background: linear-gradient(145deg, #0f0f16, #1a1a24);
    border-radius: var(--md-sys-radius-large);
    position: relative;
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-4);
    border: 1px solid var(--md-sys-color-outline-variant);
    animation: float 8s ease-in-out infinite;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--larry-accent) 0%, transparent 70%);
    opacity: 0.08;
    z-index: 0;
}

.hero::after {
    content: '🛰️ SYSTEM ONLINE';
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 245, 168, 0.15);
    color: var(--larry-accent);
    padding: 6px 16px;
    border-radius: var(--md-sys-radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'IBM Plex Mono', monospace;
    border: 1px solid rgba(0, 245, 168, 0.3);
    box-shadow: 0 0 16px var(--larry-glow);
    animation: pulseBadge 2s infinite;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.terminal-line {
    margin-bottom: 16px;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--md-sys-color-on-surface-muted);
    opacity: 0.8;
    animation: fadeIn 1.2s ease forwards;
}

.prompt {
    color: var(--larry-accent);
    font-weight: 500;
}

.typing-text {
    display: inline-block;
    border-right: 2px solid var(--larry-accent);
    white-space: nowrap;
    overflow: hidden;
    animation: 
        typing 3.5s steps(44, end) 0.5s forwards,
        blink 0.75s step-end infinite;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(95deg, #ffffff, var(--larry-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.highlight {
    background: linear-gradient(90deg, #c4b5fd, var(--larry-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
    font-family: 'IBM Plex Mono', monospace;
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    justify-content: center;
    animation: fadeIn 1s ease 1.2s forwards;
    opacity: 0;
}

.tag {
    padding: 6px 16px;
    border-radius: var(--md-sys-radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Readex Pro', sans-serif;
    transition: all 0.25s ease;
}

.tag-magento { 
    background: rgba(155, 89, 182, 0.2); 
    color: #d290ff; 
}

.tag-pwa { 
    background: rgba(0, 245, 168, 0.15); 
    color: var(--larry-accent); 
}

.tag-graphql { 
    background: rgba(32, 201, 151, 0.2); 
    color: #4fd6b9; 
}

.tag-react { 
    background: rgba(97, 218, 251, 0.2); 
    color: #6cdcff; 
}

.tag-quality { 
    background: rgba(255, 193, 7, 0.2); 
    color: #ffd166; 
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 12px var(--larry-glow);
}

/* === BLOG SECTION === */
.blog-title {
    font-size: 2.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(95deg, #e6e6f0, var(--larry-accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-title::before {
    content: '📡';
    margin-right: 12px;
}

.blog-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 3px;
    background: var(--larry-accent);
    margin: 12px auto 0;
    border-radius: 2px;
    box-shadow: 0 0 16px var(--larry-glow);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 32px;
    margin-top: 24px;
}

/* === BLOG POST CARD === */
.blog-post {
    background: var(--md-sys-color-surface);
    border-radius: var(--md-sys-radius-large);
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-1);
    transition: all 0.4s var(--md-sys-motion-easing-emphasized);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--md-sys-color-outline-variant);
}

.blog-post:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: var(--md-sys-elevation-4);
    z-index: 10;
    border-color: var(--larry-accent);
}

.blog-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--md-sys-radius-large);
    box-shadow: 
        0 0 0 2px var(--larry-accent),
        0 0 24px var(--larry-glow-strong);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1;
}

.blog-post:hover::before {
    opacity: 1;
}

.blog-post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--md-sys-motion-easing-emphasized);
    filter: brightness(0.9) contrast(1.1);
}

.blog-post:hover .blog-post-image {
    transform: scale(1.1) rotate(1deg);
    filter: brightness(1.1) contrast(1.2) saturate(1.2);
}

.blog-post-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-post-title {
    font-size: 1.625rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.3;
    color: white;
}

.blog-post-title a {
    text-decoration: none;
    color: inherit;
    position: relative;
    padding-bottom: 4px;
    display: inline-block;
    font-family: 'Readex Pro', sans-serif;
}

.blog-post-title a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--larry-accent);
    border-radius: 1px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--md-sys-motion-easing-emphasized);
    box-shadow: 0 0 8px var(--larry-glow);
}

.blog-post-title a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.blog-post-excerpt {
    margin: 0;
    color: var(--md-sys-color-on-surface-muted);
    line-height: 1.65;
    font-size: 1.0625rem;
    flex-grow: 1;
    opacity: 0.95;
    font-family: 'Readex Pro', sans-serif;
}

/* === FOOTER === */
footer {
    margin-top: 80px;
    padding: 40px 0;
    text-align: center;
    color: var(--md-sys-color-on-surface-muted);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

footer::before {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--larry-accent);
    margin: 0 auto 24px;
    border-radius: 2px;
    box-shadow: 0 0 20px var(--larry-glow);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--md-sys-color-on-surface-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--larry-accent);
    color: var(--md-sys-color-on-primary);
    transform: translateY(-4px);
    box-shadow: 0 0 20px var(--larry-glow);
}

/* === ANIMATIONS === */
@keyframes pulseBadge {
    0%, 100% { 
        box-shadow: 0 0 12px var(--larry-glow);
        transform: translateX(-50%) scale(1);
    }
    50% { 
        box-shadow: 0 0 24px var(--larry-glow-strong), 0 0 36px rgba(0, 245, 168, 0.9);
        transform: translateX(-50%) scale(1.05);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .blog-grid { 
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); 
    }
    .hero h1 { 
        font-size: 3.25rem; 
    }
}

@media (max-width: 768px) {
    header { 
        flex-direction: column; 
        gap: 16px; 
    }
    .logo-text { 
        font-size: 1.875rem; 
    }
    .hero { 
        padding: 32px 16px; 
    }
    .hero h1 { 
        font-size: 2.75rem; 
    }
    .subtitle { 
        font-size: 1.25rem; 
    }
    .blog-title { 
        font-size: 2.25rem; 
    }
    .blog-grid { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) {
    .logo-img { 
        width: 56px; 
        height: 56px; 
    }
    .hero h1 { 
        font-size: 2.25rem; 
    }
    .blog-post-content { 
        padding: 20px; 
    }
    .blog-post-title { 
        font-size: 1.5rem; 
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .typing-text {
        animation: none !important;
        border-right: none !important;
    }
}