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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #333;
}

.nav-links a.active {
    color: #667eea;
    font-weight: 600;
}

/* Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    padding: 140px 24px 80px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea20, #764ba220);
}

.blog-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-date {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.blog-card-excerpt {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.blog-card-reading-time {
    font-size: 14px;
    color: #999;
}

.blog-card-arrow {
    color: #667eea;
    font-weight: bold;
    font-size: 20px;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 24px;
    text-align: center;
    margin-top: 120px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.modal-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #000;
}

.modal-content p {
    color: #666;
    margin-bottom: 24px;
}

.email-input {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border: 2px solid #e5e5e7;
    border-radius: 12px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.email-input:focus {
    border-color: #007AFF;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.submit-btn:hover {
    transform: scale(1.02);
}

.privacy-note {
    font-size: 12px;
    color: #999;
    margin-top: 16px;
}

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

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        padding: 12px 16px;
    }
    
    .nav-content {
        padding: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: start;
        align-items: start;
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        width: 100%;
        padding: 15px 0;
        font-size: 18px;
        border-bottom: 1px solid #eee;
    }
    
    .nav-links span {
        padding: 15px 0;
        font-size: 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    /* Hero Section */
    .hero {
        padding: 40px 20px;
        margin-top: 60px;
    }
    
    .hero h1 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .hero p {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Blog Container */
    .blog-container {
        padding: 20px 16px 40px;
    }
    
    /* Blog Grid - Single Column on Mobile */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    /* Blog Cards */
    .blog-card {
        border-radius: 16px;
        overflow: hidden;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-date {
        font-size: 12px;
    }
    
    .blog-card-title {
        font-size: 20px;
        line-height: 1.3;
        margin: 12px 0;
    }
    
    .blog-card-excerpt {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 16px;
    }
    
    .blog-card-reading-time {
        font-size: 13px;
    }
    
    /* Footer */
    .footer {
        padding: 24px 16px;
    }
    
    .footer-links {
        gap: 16px;
        margin-bottom: 20px;
        font-size: 14px;
    }
    
    .footer p {
        font-size: 12px !important;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        padding: 30px 20px;
        margin: 20px;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .modal-content p {
        font-size: 14px;
    }
    
    .email-input {
        padding: 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .blog-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 20px;
        margin-top: 50px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .blog-card-image {
        height: 150px;
    }
    
    .blog-card-content {
        padding: 16px;
    }
    
    .blog-card-title {
        font-size: 16px;
    }
    
    .blog-card-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    .blog-card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    .blog-card:active {
        transform: scale(0.98);
    }
    
    .submit-btn:active {
        transform: scale(0.98);
    }
    
    /* Larger touch targets */
    .footer-links a {
        padding: 8px;
        margin: -8px;
    }
    
    .close {
        padding: 10px;
        margin: -10px;
    }
}

/* Safe area adjustments for modern phones */
@supports (padding: max(0px)) {
    .blog-container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(24px, env(safe-area-inset-bottom));
    }
}