* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --coffee-dark: #2c1810;
    --coffee-medium: #6f4e37;
    --coffee-light: #a67c52;
    --cream: #f5e6d3;
    --foam: #ffffff;
    --accent: #d2691e;
}

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--coffee-dark);
    background: linear-gradient(180deg, var(--cream) 0%, #fff 100%);
    min-height: 100vh;
}

/* Header Animation */

/*
@keyframes float {
    0%, 100% { transform: rotate(-15deg) translateY(0); }
    50% { transform: rotate(-15deg) translateY(-20px); }
}

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

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

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

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

@keyframes bounce {
    0%, 100% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.2); }
}
*/

header {
    background: linear-gradient(135deg, var(--coffee-dark) 0%, var(--coffee-medium) 100%);
    color: var(--foam);
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '☕';
    position: absolute;
    font-size: 200px;
    opacity: 0.1;
    right: -50px;
    top: -50px;
    transform: rotate(-15deg);
    animation: float 6s ease-in-out infinite;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInDown 1s ease-out;
}

.tagline {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

nav {
    background: var(--coffee-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    background: rgba(166, 124, 82, 0.95);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav a {
    color: var(--foam);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%23f5e6d3" width="1200" height="400"/><path fill="%236f4e37" d="M0,200 Q300,100 600,200 T1200,200 L1200,400 L0,400 Z" opacity="0.3"/><circle cx="200" cy="100" r="50" fill="%23a67c52" opacity="0.2"/><circle cx="1000" cy="150" r="70" fill="%23d2691e" opacity="0.2"/></svg>');
    background-size: cover;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--foam);
    border-radius: 15px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    animation: slideIn 1s ease-out;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-post {
    background: var(--foam);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeIn 0.8s ease-out;
}

.blog-post:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.blog-post img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-post:hover img {
    transform: scale(1.1);
}

.blog-content {
    padding: 2rem;
}

.blog-post h3 {
    color: var(--coffee-dark);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

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

.meta {
    color: var(--coffee-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meta span::before {
    content: '•';
    color: var(--accent);
}

.meta span:first-child::before {
    content: '';
}

.excerpt {
    color: var(--coffee-medium);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: ' →';
    transition: transform 0.3s ease;
    display: inline-block;
}

.read-more:hover::after {
    transform: translateX(5px);
}

.coffee-bean {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--coffee-medium);
    border-radius: 50% 0;
    transform: rotate(45deg);
    margin: 0 10px;
    animation: bounce 2s infinite;
}

/* Article Specific Styles */
.article-header {
    background: linear-gradient(135deg, var(--coffee-medium) 0%, var(--coffee-light) 100%);
    color: var(--foam);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 15px;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--cream);
    font-size: 1rem;
    margin-top: 1rem;
}

.article-content {
    background: var(--foam);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.article-content h2 {
    color: var(--coffee-dark);
    margin: 2rem 0 1rem 0;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    color: var(--coffee-medium);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.article-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--foam);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.back-button:hover {
    background: var(--coffee-medium);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-button::before {
    content: '←';
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-button:hover::before {
    transform: translateX(-3px);
}

.ingredient-list {
    background: var(--cream);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border-left: 4px solid var(--accent);
}

.tip-box {
    background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 2px solid var(--coffee-light);
    position: relative;
}

.tip-box::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--foam);
    padding: 5px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.step-by-step {
    counter-reset: step-counter;
}

.step {
    counter-increment: step-counter;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--foam);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    position: relative;
}

.step::before {
    content: counter(step-counter);
    position: absolute;
    left: -15px;
    top: 1.5rem;
    background: var(--accent);
    color: var(--foam);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

footer {
    background: var(--coffee-dark);
    color: var(--foam);
    text-align: center;
    padding: 3rem 0;
    margin-top: 5rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 50"><path fill="%232c1810" d="M0,25 Q300,0 600,25 T1200,25 L1200,50 L0,50 Z"/></svg>');
    background-size: cover;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: var(--foam);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-5px) rotate(15deg);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 2rem;
    }
    
    main {
        padding: 0 1rem;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 3rem;
    font-style: italic;
    color: var(--coffee-light);
}

.loading::after {
    content: '☕';
    display: inline-block;
    animation: steam 2s infinite;
    margin-left: 10px;
}