/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a202c;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2c5282;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn--secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn--secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Merriweather', serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav__menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-weight: 500;
    color: #4a5568;
    transition: color 0.3s ease;
    position: relative;
}

.nav__link:hover,
.nav__link.active {
    color: #667eea;
}

.nav__link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1px;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav__toggle span {
    width: 25px;
    height: 3px;
    background: #4a5568;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: #718096;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__image {
    position: relative;
}

.hero__image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Section Titles */
.section__title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Featured Section */
.featured {
    padding: 6rem 0;
    background: #ffffff;
}

.featured__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card__image {
    position: relative;
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card__image img {
    transform: scale(1.05);
}

.card__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #667eea;
}

.card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1a202c;
}

.card__excerpt {
    color: #718096;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #a0aec0;
}

.card__link {
    align-self: flex-start;
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.card__link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.card__link:hover::after {
    transform: translateX(4px);
}

/* Category specific card styling */
.card--story {
    border-top: 4px solid #48bb78;
}

.card--essay {
    border-top: 4px solid #ed8936;
}

.card--idea {
    border-top: 4px solid #9f7aea;
}

/* Recent Posts */
.recent {
    padding: 6rem 0;
    background: #f7fafc;
}

.recent__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.recent__item {
    display: flex;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.recent__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.recent__image {
    flex: 0 0 120px;
}

.recent__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent__content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recent__category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.recent__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.recent__excerpt {
    color: #718096;
    font-size: 0.875rem;
    flex-grow: 1;
    line-height: 1.5;
}

.recent__date {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 0.5rem;
}

/* Newsletter Section */
.newsletter {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.newsletter__content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter__subtitle {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.newsletter__form {
    margin-bottom: 1rem;
}

.newsletter__input-group {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    background: white;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.newsletter__input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    outline: none;
}

.newsletter__input::placeholder {
    color: #a0aec0;
}

.newsletter__button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.newsletter__disclaimer {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background: #1a202c;
    color: white;
    padding: 4rem 0 1rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.footer__description {
    color: #a0aec0;
    line-height: 1.6;
}

.footer__heading {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer__list {
    list-style: none;
}

.footer__list li {
    margin-bottom: 0.5rem;
}

.footer__link {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.footer__link:hover {
    color: #667eea;
}

.footer__bottom {
    border-top: 1px solid #2d3748;
    padding-top: 2rem;
    text-align: center;
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero__content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero__image {
        order: -1;
    }
    
    .featured__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .footer__content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav__menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-top: 1px solid rgba(226, 232, 240, 0.8);
    }
    
    .nav__menu.active {
        display: flex;
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .hero {
        padding: 6rem 0 2rem;
        min-height: auto;
    }
    
    .hero__title {
        font-size: 2.5rem;
    }
    
    .hero__cta {
        flex-direction: column;
        align-items: center;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .featured__grid {
        grid-template-columns: 1fr;
    }
    
    .recent__item {
        flex-direction: column;
    }
    
    .recent__image {
        flex: none;
        height: 200px;
    }
    
    .newsletter__input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter__input,
    .newsletter__button {
        border-radius: 0.5rem;
    }
    
    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav {
        padding: 0.75rem 1rem;
    }
    
    .hero__title {
        font-size: 2rem;
    }
    
    .hero__subtitle {
        font-size: 1.125rem;
    }
    
    .card__content {
        padding: 1rem;
    }
    
    .newsletter__title {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__title,
.hero__subtitle,
.hero__cta {
    animation: fadeInUp 0.8s ease-out;
}

.hero__subtitle {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.hero__cta {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Focus States for Accessibility */
.btn:focus,
.newsletter__input:focus,
.nav__link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .newsletter,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}
