/* 
 * Mitesh Metha Portfolio
 * Clean single-column reading experience
 */

:root {
    /* Warm, paper-like palette */
    --bg-primary: #FAFAF8;
    --bg-secondary: #F5F5F3;
    --bg-tertiary: #EFEFED;
    --bg-card: #FFFFFF;
    
    /* Soft, warm text colors */
    --text-primary: #1C1917;
    --text-secondary: #57534E;
    --text-muted: #A8A29E;
    
    /* Muted slate */
    --accent: #475569;
    --accent-light: #64748B;
    --accent-dark: #334155;
    --accent-subtle: #F1F5F9;
    
    /* Warm highlight */
    --highlight: #B45309;
    --highlight-subtle: #FEF3C7;
    
    --border: #E7E5E4;
    --border-light: #D6D3D1;
    
    /* Typography */
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --content-max: 1200px;
    --reading-width: 680px;
    
    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

.grain { display: none; }

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--border-light);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-dark);
    text-decoration-color: var(--accent);
}

::selection {
    background: var(--highlight);
    color: white;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-resume {
    padding: 0.5rem 1rem;
    background: var(--accent);
    border-radius: 6px;
    color: white !important;
}

.nav-resume:hover {
    background: var(--accent-dark);
}

/* Hero */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    text-align: center;
}

.hero-content {
    max-width: 640px;
}

.hero-badge {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent-subtle);
    border-radius: 100px;
    letter-spacing: 0.02em;
    animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
}

.hero-wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
    transform-origin: 70% 70%;
}

.hero-name {
    color: var(--highlight);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
}

.hero-subtitle a {
    font-weight: 600;
    color: var(--text-primary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--accent-dark);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.hero-scroll {
    display: none;
}

/* Story Section - Clean single column */
.story-section {
    padding: 4rem 2rem;
    max-width: var(--reading-width);
    margin: 0 auto;
}

.story-sidebar {
    display: none;
}

.story-main {
    width: 100%;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--highlight);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-secondary);
}

.story-intro {
    padding: 1.5rem;
    background: var(--highlight-subtle);
    border-left: 4px solid var(--highlight);
    border-radius: 0 8px 8px 0;
    margin-bottom: 3rem;
}

.story-intro .story-lead {
    font-size: 1.0625rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.story-intro p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.story-intro em {
    color: var(--highlight);
    font-style: normal;
    font-weight: 600;
}

/* Story Chapters */
.story-chapter {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.story-chapter:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.story-chapter h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.story-chapter p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.story-chapter p:last-child {
    margin-bottom: 0;
}

.story-chapter strong {
    color: var(--text-primary);
    font-weight: 600;
}

.story-chapter.highlight {
    padding: 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-bottom: 1px solid var(--border);
}

.story-chapter.highlight h3 {
    color: var(--accent-dark);
}

.story-chapter .belief {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--highlight);
    text-align: center;
    padding: 1.5rem 0;
    font-style: italic;
}

.story-chapter .roadmap {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.story-chapter .roadmap ul {
    list-style: none;
    margin-top: 0.75rem;
}

.story-chapter .roadmap li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.story-chapter .roadmap li:last-child {
    border-bottom: none;
}

.story-chapter .roadmap li strong {
    color: var(--highlight);
}

.story-chapter .closing {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Chapters Section - Blog Posts Grid */
.chapters-section {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}

.chapters-section .section-header {
    max-width: var(--content-max);
    margin: 0 auto 2rem;
    text-align: left;
}

.chapters-grid {
    max-width: var(--content-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.chapter-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.chapter-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.chapter-card.featured {
    border-color: var(--highlight);
    background: linear-gradient(to bottom right, white, var(--highlight-subtle));
}

.chapter-number {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    display: block;
}

.chapter-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.chapter-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.chapter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.chapter-tags span {
    font-size: 0.6875rem;
    color: var(--accent);
    padding: 0.25rem 0.5rem;
    background: var(--accent-subtle);
    border-radius: 4px;
    font-weight: 500;
}

.chapter-arrow {
    display: none;
}

/* CTA */
.cta-section {
    padding: 4rem 2rem;
    text-align: center;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    padding: 1.5rem 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-name {
    font-weight: 600;
    font-size: 0.9375rem;
}

.footer-tagline {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-10deg); }
}

/* Scroll animations */
.story-chapter,
.chapter-card {
    opacity: 0;
    transform: translateY(16px);
}

.story-chapter.visible,
.chapter-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s var(--ease-out);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links a:not(.nav-resume) {
        display: none;
    }
    
    .hero {
        padding-top: 6rem;
        min-height: auto;
    }
    
    .story-chapter.highlight {
        margin-left: 0;
        margin-right: 0;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
}
