@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600&family=Outfit:wght@300;400;500;600&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #252422;
    --text-main: #fffcf2;
    --accent-color: #ffe1a8;
    --text-muted: #ffcb69;
    --border-color: #262626;
    --font-serif: 'Space Grotesk', sans-serif;
    --font-sans: 'Outfit', sans-serif;
    --font-script: 'Caveat', cursive;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navigation - Minimal & Fullscreen Overlay */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1002;
    background: transparent;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    z-index: 1002;
}

.logo-circle {
    width: 32px;
    height: 32px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-family: var(--font-serif);
    box-shadow: 0 0 15px rgba(224, 122, 95, 0.4);
}

/* Hamburger Menu (Always visible) */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1002;
    padding: 10px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--accent-color);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--accent-color);
}

/* Fullscreen Overlay Menu */
.nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-links.active {
    opacity: 1;
    pointer-events: all;
}

/* Glowing horizontal line */
.nav-links::before {
    content: '';
    position: absolute;
    top: 80px;
    left: 10%;
    width: 80%;
    height: 1px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    opacity: 0.6;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 1.4rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    text-shadow: 0 0 15px rgba(169, 132, 103, 0.4);
    transform: scale(1.1);
}

/* Main Container */
main {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 5% 6rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Typography */
.overline {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: block;
}

.page-tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.section-title em {
    color: var(--accent-color);
    font-style: italic;
}

.script-text {
    font-family: var(--font-script);
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* Footer */
footer {
    padding: 3rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-main);
}

.footer-desc {
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.footer-credits {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* --- Page Specific Layouts --- */

/* Home Layout */
.page-home {
    flex-direction: row;
    align-items: center;
    gap: 5rem;
}

.page-home .content-left {
    flex: 1;
}

.page-home .content-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image {
    width: 100%;
    aspect-ratio: 4/5;
    background-color: var(--border-color);
    background-size: cover;
    background-position: center 20%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(169, 132, 103, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    filter: contrast(1.05) saturate(1.1);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-image:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(169, 132, 103, 0.25);
    filter: contrast(1.1) saturate(1.2);
}

.btn-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-color);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-secondary {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    color: var(--accent-color);
}

.location {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* About Layout */
.page-about {
    flex-direction: row;
    align-items: flex-start;
    gap: 5rem;
}

.page-about .content-left {
    flex: 1;
}

.page-about .content-right {
    flex: 1.5;
    padding-top: 1rem;
}

.drop-cap {
    float: left;
    font-family: var(--font-serif);
    font-size: 5.5rem;
    color: var(--accent-color);
    line-height: 0.8;
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.about-text {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-main);
}

.reach-me {
    margin-top: 3rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    clear: both;
}

.reach-me a {
    color: var(--accent-color);
}

/* List Layout (Career/Journal/Thoughts/Timeline) */
.page-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center content */
    justify-content: center;
}

.page-list > div {
    width: 100%;
}

.item-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.list-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

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

.item-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.item-meta {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.item-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;
}

.timeline-container {
    border-left: 1px solid var(--border-color);
    padding-left: 2rem;
    margin-top: 3rem;
    width: 100%;
}

.timeline-node {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-node::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 0.4rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
}

.empty-state {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Postcards Gallery */
.page-gallery {
    display: block;
    justify-content: flex-start;
    padding-top: 6rem;
}

.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}

.gallery-item {
    border-radius: 12px;
    filter: grayscale(30%);
    transition: filter 0.4s ease, transform 0.4s ease;
    overflow: hidden;
}

.postcard-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
}

@media (max-width: 768px) {
    .postcard-img {
        width: 100%;
        min-height: 120px;
        object-fit: cover;
        object-position: center;
    }
}

.gallery-item:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Contact Form */
.page-contact {
    flex-direction: row;
    gap: 5rem;
    align-items: flex-start;
}

.page-contact .content-left {
    flex: 1;
}

.page-contact .content-right {
    flex: 1.2;
    padding-top: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom-color: var(--text-main);
}

.input-group textarea {
    resize: none;
    height: 40px;
}

.btn-submit {
    background-color: var(--text-main);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.3s;
}

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

@media (max-width: 900px) {

    .page-about,
    .page-contact {
        flex-direction: column;
        gap: 3rem;
    }

    .page-about .content-left,
    .page-contact .content-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }

    main {
        padding: 6rem 5% 3rem 5%;
    }

    /* Perfect Mobile Homepage Ordering */
    main.page-home {
        display: flex;
        flex-direction: column;
    }

    .page-home .content-left,
    .page-home .content-right {
        display: contents;
    }

    .page-home .overline {
        order: 1;
        margin-top: 3rem;
    }

    .page-home .section-title {
        order: 2;
        margin-bottom: 2.5rem;
    }

    .page-home .hero-image {
        order: 3;
        width: 100%;
        max-width: 400px;
        aspect-ratio: 4/5;
        margin: 0 auto 1.5rem auto;
        border-radius: 20px;
        align-self: center;
    }

    .page-home .script-text {
        order: 4;
        align-self: center;
        margin-bottom: 3.5rem;
    }

    .page-home .about-text {
        order: 5;
        margin-bottom: 2rem;
        font-size: 1.1rem;
    }

    .page-home .btn-group {
        order: 6;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .page-home .location {
        order: 7;
        margin-top: 2rem;
    }

    /* Other Layout Adjustments */
    .drop-cap {
        font-size: 4rem;
    }

    footer {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    /* Mobile layout fixes */
    .page-list {
        overflow: visible;
    }

    .overline,
    .section-title,
    .page-tagline,
    .script-text,
    .page-list h1,
    .page-list h1 + p,
    .page-list > div > div > h2 {
        width: 100%;
        text-align: center;
    }

    .footer-icons {
        justify-content: center;
        gap: 1rem;
    }

    .footer-logo,
    .footer-desc,
    .footer-credits {
        width: 100%;
        text-align: center;
    }

}

.footer-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.footer-icons a {
    color: var(--text-muted);
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.footer-icons a:hover {
    color: var(--text-main);
}

.footer-icons svg {
    width: 20px;
    height: 20px;
}

/* Horizontal Timeline */
.horizontal-timeline-wrapper {
    position: relative;
    width: 100%;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.horizontal-timeline {
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding-bottom: 2rem;
    padding-top: 15px;
    scrollbar-width: none;
    width: 100%;
    max-width: 840px;
}

.horizontal-timeline::-webkit-scrollbar {
    display: none;
}

.ht-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 33.333%;
    flex-shrink: 0;
    min-width: 0;
}

.ht-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    width: 90%;
    max-width: 90%;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: rgba(255, 255, 255, 0.02);
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    transition: transform 0.2s, border-color 0.2s;
}

.ht-box:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
}

.ht-box h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.ht-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    word-wrap: break-word;
    max-width: 100%;
}

.ht-connector {
    width: 1px;
    height: 40px;
    background-color: var(--accent-color);
}

.ht-axis {
    width: 100%;
    height: 1px;
    background-color: var(--accent-color);
}

.ht-year {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--accent-color);
    margin-top: 0.5rem;
    font-weight: 500;
}

.ht-nav {
    display: flex;
    gap: 10px;
    margin-top: 2rem;
    justify-content: center;
}

.ht-nav-btn {
    width: 45px;
    height: 45px;
    background-color: var(--border-color);
    color: var(--text-main);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ht-nav-btn:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

@media (max-width: 900px) {
    .horizontal-timeline-wrapper {
        padding: 0 1rem;
        justify-content: flex-start;
    }

    .horizontal-timeline {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 560px;
    }

    .ht-item {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        scroll-snap-align: center;
    }

    .ht-box {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
    }

    .ht-box h4 {
        font-size: 1.1rem;
    }

    .ht-box p {
        font-size: 0.95rem;
        word-break: break-word;
    }

    .ht-year {
        font-size: 1.8rem;
    }

    .ht-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}