/* ==========================================================================
   MAIN.CSS - Consolidated stylesheet for sarthakchat.github.io
   Architecture: ITCSS-inspired (Settings → Base → Layout → Components → Pages → Utilities → Responsive)
   ========================================================================== */

/* ==========================================================================
   1. SETTINGS - CSS Custom Properties
   ========================================================================== */

:root {
    --navy: #0a2240;
    --gold: #b8860b;
    --gold-light: #d4a84b;
    --text: #1a1a1a;
    --text-secondary: #4a5568;
    --border: #e2e8f0;
}

/* ==========================================================================
   2. BASE - Reset, Typography, Body Defaults
   ========================================================================== */

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

/* Page load animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   3. LAYOUT - Header, Footer, Main Container
   ========================================================================== */

/* Header */
header {
    background: var(--navy);
    padding: 16px 0;
    border-bottom: 3px solid var(--gold);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

/* Navigation */
nav {
    display: flex;
    gap: 32px;
}

nav a {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
    color: var(--gold-light);
}

/* Main Container */
main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 72px 32px;
}

/* Footer */
footer {
    background: var(--navy);
    padding: 48px 0;
    border-top: 3px solid var(--gold);
}

.footer-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info {
    color: var(--gold-light);
    font-size: 14px;
}

.footer-info strong {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--gold-light);
    font-size: 18px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--gold-light);
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

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

/* ==========================================================================
   4. COMPONENTS - Reusable UI Patterns
   ========================================================================== */

/* Page Title (used on inner pages) */
.page-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 48px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeIn 0.6s ease-out both;
}

.page-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold), transparent);
}

/* Page Title - Short line variant (activity, blog) */
.page-title--short::after {
    width: 120px;
    flex: none;
}

/* Page Header (title + action button) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* Section Title (used on homepage) */
.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold), transparent);
}

/* Buttons */
.btn-primary,
.book-meeting-btn,
.subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-primary:hover,
.book-meeting-btn:hover,
.subscribe-btn:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

.btn-primary--large {
    padding: 14px 28px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--navy);
    font-size: 14px;
    font-weight: 500;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid var(--navy);
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--navy);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Label (uppercase gold text) */
.label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.label--large {
    font-size: 12px;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
}

/* Card (hover effect with border-left) */
.card {
    padding: 24px;
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.card:hover {
    border-left-color: var(--gold);
    transform: translateX(4px);
}

/* View All Link */
.view-all {
    font-size: 14px;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all:hover {
    color: var(--navy);
}

/* ==========================================================================
   5. PAGE-SPECIFIC - Homepage
   ========================================================================== */

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 72px 32px;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 56px;
    align-items: center;
}

.hero-photo {
    position: relative;
    animation: fadeIn 0.6s ease-out both;
}

.hero-photo::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid var(--gold);
    z-index: 0;
}

.hero-photo img {
    position: relative;
    width: 220px;
    height: 275px;
    object-fit: cover;
    z-index: 1;
}

.hero-info {
    padding-left: 16px;
    border-left: 3px solid var(--gold);
    animation: fadeIn 0.6s ease-out 0.15s both;
}

.hero-info h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 42px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.hero-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.hero-affiliation {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hero-affiliation a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-affiliation a:hover {
    color: var(--gold);
}

.hero-tagline {
    font-size: 13px;
    color: var(--gold);
    margin-top: 12px;
    letter-spacing: 0.02em;
}

.hero-link {
    display: inline-block;
    margin-top: 16px;
    margin-left: 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s ease;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.hero-link:hover {
    color: var(--gold);
}

/* Bio Section */
.bio {
    columns: 1;
    max-width: 800px;
}

.bio p {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 24px;
    text-align: justify;
}

.bio p:first-child::first-letter {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 56px;
    font-weight: 600;
    float: left;
    line-height: 1;
    margin-right: 12px;
    margin-top: 4px;
    color: var(--navy);
}

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

/* Featured Section */
.featured {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.featured-item {
    padding: 24px;
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    border-left: 3px solid var(--gold);
    transition: transform 0.2s ease;
}

.featured-item:hover {
    transform: translateX(4px);
}

.featured-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.featured-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.featured-title a {
    color: inherit;
    text-decoration: none;
}

.featured-title a:hover {
    color: var(--gold);
}

.featured-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Upcoming/Recent Activity Section (homepage) */
.upcoming {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.upcoming-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.upcoming-header .section-title {
    margin-bottom: 0;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upcoming-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 16px 20px;
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.upcoming-item:hover {
    border-left-color: var(--gold);
    transform: translateX(4px);
}

.upcoming-date {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    min-width: 80px;
    text-transform: uppercase;
}

.upcoming-content {
    flex: 1;
}

.upcoming-type {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2px;
}

.upcoming-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}

.upcoming-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.upcoming-title a:hover {
    color: var(--gold);
}

/* ==========================================================================
   5. PAGE-SPECIFIC - Publications
   ========================================================================== */

.year-section {
    margin-bottom: 48px;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.year-section:last-child {
    margin-bottom: 0;
}

.year-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
}

.publication {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
    padding-left: 16px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.publication:hover {
    border-left-color: var(--gold);
    transform: translateX(4px);
}

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

.publication-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--navy);
    margin-bottom: 8px;
}

.publication-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.publication-title a:hover {
    color: var(--gold);
}

.publication-venue {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.publication-authors {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   5. PAGE-SPECIFIC - Activity
   ========================================================================== */

.timeline-section {
    margin-bottom: 64px;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.timeline-section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), var(--border));
}

.timeline-item {
    position: relative;
    padding-bottom: 32px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--gold);
}

.timeline-item.past .timeline-marker {
    background: var(--border);
    box-shadow: 0 0 0 2px var(--border);
}

.timeline-date {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 12px;
}

.timeline-content {
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    padding: 20px 24px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.timeline-item:hover .timeline-content {
    border-left-color: var(--gold);
    transform: translateX(4px);
}

.timeline-type {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 6px;
}

.timeline-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.timeline-title a:hover {
    color: var(--gold);
}

.timeline-venue {
    font-size: 14px;
    color: var(--text-secondary);
}

.timeline-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.timeline-link:hover {
    color: var(--navy);
}

/* ==========================================================================
   5. PAGE-SPECIFIC - Blog
   ========================================================================== */

.posts {
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.post {
    padding: 24px;
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.post:hover {
    border-left-color: var(--gold);
    transform: translateX(4px);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.post-date {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
}

.post-read-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.post-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--gold);
}

.post-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   5. PAGE-SPECIFIC - Contact
   ========================================================================== */

.contact-hero {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border);
    flex: 1;
    display: flex;
    align-items: center;
}

.contact-hero-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 72px 32px;
}

.contact-info {
    text-align: center;
    animation: fadeIn 0.6s ease-out both;
}

.contact-info h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 36px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 28px;
}

.contact-info h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, var(--gold), var(--gold-light));
    margin: 12px auto 0;
}

.contact-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
    text-align: left;
}

.contact-section {
    padding: 20px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    background: linear-gradient(to bottom right, transparent, transparent);
}

.contact-section:hover {
    border-left-color: var(--gold);
    background: linear-gradient(to bottom right, #f8f9fa, #ffffff);
    transform: translateX(4px);
}

.contact-section h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.contact-value {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.contact-value--primary {
    font-size: 16px;
    font-weight: 500;
    color: var(--navy);
}

.contact-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.personal-statement {
    font-size: 16px;
    font-style: italic;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.85;
}

/* ==========================================================================
   6. UTILITIES
   ========================================================================== */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--navy);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold);
    transform: translateY(-2px);
}

/* Full height flex layout (for blog, contact) */
.flex-full-height {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.flex-full-height main {
    flex: 1;
}

/* Footer margin variants */
.footer--margin-top {
    margin-top: 72px;
}

/* ==========================================================================
   7. RESPONSIVE - Mobile Breakpoint (768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Header */
    .header-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    nav {
        gap: 20px;
    }

    /* Main */
    main {
        padding: 48px 24px;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    /* Page Header */
    .page-header {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    /* Page Title */
    .page-title {
        font-size: 28px;
    }

    /* Hero (homepage) */
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 48px 24px;
        gap: 40px;
    }

    .hero-photo {
        margin: 0 auto;
    }

    .hero-photo::before {
        top: -6px;
        left: -6px;
        right: 6px;
        bottom: 6px;
    }

    .hero-photo img {
        width: 180px;
        height: 225px;
    }

    .hero-info {
        padding-left: 0;
        border-left: none;
        padding-top: 24px;
        border-top: 3px solid var(--gold);
    }

    .hero-info h1 {
        font-size: 32px;
    }

    .hero-link {
        margin-left: 0;
    }

    /* Bio */
    .bio p {
        text-align: left;
    }

    .bio p:first-child::first-letter {
        font-size: 48px;
    }

    /* Featured Grid */
    .featured-grid {
        grid-template-columns: 1fr;
    }

    /* Timeline */
    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -24px;
    }

    /* Contact */
    .contact-hero-inner {
        padding: 48px 24px;
    }

    .contact-info h1 {
        font-size: 28px;
    }

    .contact-sections {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
}
