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

:root {
    --primary-blue: #2d5a7b;
    --dark-blue: #1a3a4f;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #fff;
    --accent: #8b7355;
    --header-height: 60px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.site-header {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 0 1.5rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5625rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-light);
    font-size: 1.1875rem;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    opacity: 0.8;
}

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

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-light);
    margin: 3px 0;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    height: 48vh;
    min-height: 320px;
    background-image: url('images/dall-e/DALL·E 2024-01-04 22.08.28 - A refined image for the personal website landing page titled \'Sanskrit and Tech with Tyler\', excluding any human figures and mandalas. The image featu copy 3.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-light);
    padding: 0 1rem;
}

.hero-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
    margin: 0.25rem 0;
    background: rgba(0, 0, 0, 0.45);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    display: inline-block;
}

.hero-tagline.indent {
    margin-left: 4rem;
}

/* Intro Section */
.intro {
    padding: 4rem 1.5rem;
    text-align: center;
    background: var(--light-bg);
}

.intro h2 {
    font-size: 2.75rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.intro p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.3125rem;
    color: #555;
}

/* Feature Sections */
.feature-section {
    padding: 4rem 1.5rem;
}

.feature-section.alt {
    background: var(--light-bg);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-grid.reverse {
    direction: rtl;
}

.feature-grid.reverse > * {
    direction: ltr;
}

.feature-image img {
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-image a:hover img {
    transform: scale(1.02);
}

.feature-text {
    text-align: center;
}

.feature-text h3 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.feature-text p {
    font-size: 1.3125rem;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--primary-blue);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 1.1875rem;
    transition: background 0.2s;
}

.btn:hover {
    background: var(--dark-blue);
}

/* Showcase Section */
.showcase {
    padding: 4rem 1.5rem;
    background: var(--primary-blue);
    color: var(--text-light);
}

.showcase h2 {
    text-align: center;
    font-size: 2.75rem;
    margin-bottom: 2.5rem;
}

/* Carousel styles */
.carousel-container {
    max-width: 1200px;
    margin: 0 auto 1rem;
}

.carousel-track-container {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-track .showcase-item {
    flex: 0 0 42%;
    padding: 0 0.75rem;
    box-sizing: border-box;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--text-light);
    font-size: 2.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}


.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.showcase-item {
    text-align: center;
}

.showcase-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    transition: transform 0.3s;
}

.showcase-item a:hover img {
    transform: scale(1.05);
}

.showcase-item h4 {
    font-size: 1.375rem;
}

.showcase-cta {
    text-align: center;
    margin-top: 2rem;
}

.showcase .btn {
    background: var(--text-light);
    color: var(--primary-blue);
}

.showcase .btn:hover {
    background: #e0e0e0;
}

/* Contact Section */
.contact {
    padding: 4rem 1.5rem;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact p {
    font-size: 1.3125rem;
    color: #555;
}

.contact-form {
    max-width: 550px;
    margin: 2rem auto 0;
    padding: 2rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: left;
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form label {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.625rem 0.75rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    display: block;
    margin: 0 auto;
    background: #999;
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    cursor: pointer;
}

.contact-form .btn:hover {
    background: #777;
}

.form-thanks {
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-top: 2rem;
}

.subscribe .form-thanks {
    color: #fff;
}

/* Subscribe */
.subscribe {
    background: #333;
    color: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
}

.subscribe h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.subscribe p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.subscribe-form input {
    padding: 0.75rem 1rem;
    border: 1px solid #555;
    background: #fff;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.subscribe-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-subscribe {
    background: #999;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-subscribe:hover {
    background: #777;
}

/* Footer */
.site-footer {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 1.5rem;
    text-align: center;
}

.site-footer p {
    font-size: 1.0625rem;
    opacity: 0.8;
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 0.75rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.made-with {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.made-with a {
    color: var(--text-light);
}

/* Page-specific styles */
.page-header {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 10.1rem 1.5rem 5.1rem;
    text-align: center;
    margin-top: var(--header-height);
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-header h1 {
    font-size: 3.125rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.45);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    display: inline-block;
}

.page-header p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.45);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    display: inline-block;
}

.page-content {
    padding: 3rem 1.5rem;
}

.page-content .container {
    max-width: 900px;
}

.page-content p {
    margin-bottom: 1.5rem;
    font-size: 1.3125rem;
    line-height: 1.8;
}

.page-content h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1rem;
    color: var(--primary-blue);
}

.page-content h3 {
    font-size: 1.6875rem;
    margin: 1.5rem 0 1rem;
}

.page-content ul,
.page-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.page-content ul li,
.page-content ol li {
    margin-bottom: 0.5rem;
    font-size: 1.3125rem;
    line-height: 1.8;
}

.page-content a {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* Projects page */
.project-card {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 5px solid #999;
    align-items: center;
}

.project-card:last-child {
    border-bottom: none;
}

.project-card img {
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.project-info h3 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-size: 2.5rem;
}

.project-info p {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-links {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.project-links a {
    color: var(--primary-blue);
    text-decoration: underline;
    font-size: 1.1875rem;
}

/* Blog page */
.blog-list {
    list-style: none;
}

.blog-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.blog-item:last-child {
    border-bottom: none;
}

.blog-item-thumb {
    flex-shrink: 0;
    width: 384px;
    height: 288px;
    overflow: hidden;
    border-radius: 6px;
}

.blog-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.blog-item-content {
    flex: 1;
    min-width: 0;
}

.blog-item h3 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.blog-item h3 a {
    color: var(--primary-blue);
}

.blog-item h3 a:hover {
    text-decoration: underline;
}

.blog-date {
    font-size: 1.594rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.blog-excerpt {
    color: #555;
    font-size: 1.875rem;
}

/* Blog post page */
.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-content img {
    margin: 2rem 0;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-post-content figure {
    margin: 1.5rem 0 2.5rem;
}

.blog-post-content figcaption {
    text-align: center;
    font-size: 1.125rem;
    color: #666;
    margin-top: 0.5rem;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.post-nav a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1.125rem;
}

.post-nav a:hover {
    text-decoration: underline;
}

.post-nav .post-nav-next {
    margin-left: auto;
    text-align: right;
}

.post-nav .post-nav-date {
    display: block;
    font-size: 0.9rem;
    color: #999;
    margin-top: 0.25rem;
}

/* Two-column about layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Family photos gallery */
.family-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.family-photos img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Services page */
.tutoring-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.map-caption {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

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

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* Mobile Header */
    .site-header {
        padding: 0 1rem;
    }

    .site-title {
        font-size: 1.375rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--primary-blue);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .main-nav.active {
        max-height: 300px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav a {
        display: block;
        width: 100%;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    /* Mobile Hero */
    .hero {
        height: 40vh;
        min-height: 240px;
    }

    .hero-tagline {
        font-size: 1.75rem;
    }

    .hero-tagline.indent {
        margin-left: 2rem;
    }

    /* Mobile Sections */
    .intro {
        padding: 3rem 1rem;
    }

    .intro h2 {
        font-size: 2rem;
    }

    .intro p {
        font-size: 1.25rem;
    }

    .feature-section {
        padding: 3rem 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-grid.reverse {
        direction: ltr;
    }

    .feature-text h3 {
        font-size: 2rem;
    }

    .feature-text p {
        font-size: 1.25rem;
    }

    /* Mobile Showcase */
    .showcase {
        padding: 3rem 0.25rem;
    }

    .showcase h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 300px;
    }

    .showcase-item h4 {
        font-size: 1.25rem;
    }

    .carousel-track .showcase-item {
        flex: 0 0 85%;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
    }

    /* Mobile Contact */
    .contact {
        padding: 3rem 1rem;
    }

    .contact h2 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 1rem;
        margin: 1rem auto 0;
    }

    .subscribe {
        padding: 3rem 1rem;
    }



    /* Mobile Page Header */
    .page-header {
        padding: 8.5rem 1rem 4.2rem;
    }

    .page-header h1 {
        font-size: 2.25rem;
    }

    .page-header p {
        font-size: 1.25rem;
    }

    /* Mobile Page Content */
    .page-content {
        padding: 2rem 1rem;
    }

    .page-content h2 {
        font-size: 1.75rem;
    }

    .page-content h3 {
        font-size: 1.5rem;
    }

    .page-content p {
        font-size: 1.25rem;
    }

    .page-content ul li,
    .page-content ol li {
        font-size: 1.25rem;
    }

    /* Mobile Projects */
    .project-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card img {
        max-width: 100%;
    }

    .project-info h3 {
        font-size: 1.625rem;
    }

    .project-info p {
        font-size: 1.1875rem;
    }

    /* Mobile Blog */
    .blog-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .blog-item-thumb {
        flex-shrink: 1;
        width: 100%;
        max-width: 100%;
        height: 200px;
    }

    .blog-item-content {
        width: 100%;
    }

    .blog-item h3 {
        font-size: 1.625rem;
    }

    .blog-date {
        font-size: 1.25rem;
    }

    .blog-excerpt {
        font-size: 1.25rem;
    }

    /* Mobile About Grid */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Mobile Family Photos */
    .family-photos {
        grid-template-columns: repeat(2, 1fr);
    }

    .family-photos img {
        height: 180px;
    }

    /* Mobile Tutoring */
    .tutoring-contact {
        grid-template-columns: 1fr;
    }

    /* Mobile Footer */
    .site-footer {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.25rem;
    }

    .hero {
        height: 36vh;
        min-height: 200px;
    }

    .hero-tagline {
        font-size: 1.5rem;
    }

    .hero-tagline.indent {
        margin-left: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 1.125rem;
    }
}
