/* ========================================
   PAGE LAYOUTS
   Specific page sections and layouts
   ======================================== */

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-2xl) 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(196, 70, 42, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(42, 124, 158, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeInDown 0.8s ease-out 0.2s forwards;
}

.hero-title {
    font-size: clamp(48px, 7vw, 84px);
    line-height: 1.1;
    margin-bottom: var(--space-md);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
}

.hero-title .highlight {
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    max-width: 700px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
}

/* Stats bar */
.hero-stats {
    display: flex;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 2px solid var(--color-border);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.hero-stat-value {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero-stat-label {
    font-size: 14px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: var(--space-md);
}

.section-description {
    font-size: 19px;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

/* ========================================
   EXPERIENCE SECTION
   ======================================== */

.experience-section {
    background: var(--color-bg-alt);
    position: relative;
}

.experience-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, var(--color-bg), var(--color-bg-alt));
}

/* ========================================
   WRITING PREVIEW SECTION
   ======================================== */

.writing-preview {
    background: linear-gradient(135deg, #2a7c9e 0%, #5fa8c8 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.writing-preview::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.writing-preview .section-label {
    color: rgba(255, 255, 255, 0.8);
}

.writing-preview .section-title {
    color: white;
}

.writing-preview .section-description {
    color: rgba(255, 255, 255, 0.9);
}

.writing-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.writing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.3);
}

.writing-badge {
    display: inline-block;
    background: rgba(196, 70, 42, 0.1);
    color: var(--color-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.writing-card-title {
    font-size: 24px;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.writing-card-excerpt {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.writing-card-link {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    transition: gap var(--transition-fast);
}

.writing-card-link:hover {
    gap: 12px;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
    background: var(--color-text);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(196, 70, 42, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(36px, 5vw, 52px);
    margin-bottom: var(--space-md);
    color: white;
}

.cta-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white {
    background: white;
    color: var(--color-text);
}

.btn-white:hover {
    background: var(--color-bg);
    color: var(--color-text);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline-white:hover {
    background: white;
    color: var(--color-text);
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    background: var(--color-bg-alt);
    padding: var(--space-xl) 0;
    border-top: 2px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-text {
    color: var(--color-text-muted);
    font-size: 15px;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 15px;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-primary);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-card-bg);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero-stat-value {
        font-size: 36px;
    }

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

    .cta-buttons {
        flex-direction: column;
    }

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

    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}

@media (max-width: 480px) {
    .hero::before,
    .hero::after {
        display: none;
    }
}
