/* Font Face Declarations */
@font-face {
    font-family: 'KapraNeueRegular';
    src: url('/fonts/KapraNeueRegular.70e2cdd4.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KapraNeueMediumCondensed';
    src: url('/fonts/KapraNeueMediumCondensed.3bb312f4.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* CSS Variables for easy customization */
:root {
    --primary-font: 'Lato', sans-serif;
    --heading-font: 'Oswald', sans-serif;
    --text-color: #333333;
    --background-color: #ffffff;
    --tag-bg-color: #cce8e4;
    --tag-text-color: #3a5f5a;
    --meta-text-color: #666666;
}

/* Basic Reset and Body Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* --- Hero Section (Top part with image) --- */

.hero-section {
    height: 100vh; /* Full viewport height */
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    align-items: flex-start; /* Position at top instead of center */
    padding: 4rem 4rem 2rem; /* More top padding */
    max-width: 94vw;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align to top */
    padding-top: 2rem; /* Additional top spacing */
}

.hero-text .pre-title {
    font-family: 'KapraNeueRegular', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-text h1 {
    font-family: 'KapraNeueMediumCondensed', var(--heading-font);
    font-size: 3rem;
    line-height: 1.05;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-text .tag {
    background-color: var(--tag-bg-color);
    color: var(--tag-text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    align-self: flex-start; /* Only be as wide as its content */
    margin-bottom: 2rem; /* Add spacing before timeline/skills */
}

/* Timeline and Skills styling for hero section */
.hero-timeline {
    font-family: 'KapraNeueRegular', serif;
    color: #999999;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.hero-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
}

.hero-skill-tag {
    font-family: 'KapraNeueRegular', serif;
    display: inline-block;
    background: #f5f5f5;
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.hero-skill-tag:hover {
    background: #eeeeee;
}

.hero-image-container {
    position: relative;
    width: 55vw;
    height: 80vh; /* Give image a fixed height within the container */
    overflow: visible; /* Allow caption to be visible outside container */
}

.hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents image stretching */
}

.image-caption {
    position: absolute;
    bottom: 20.5%;
    right: 58rem;
    transform: rotate(-90deg) translateY(50%);
    transform-origin: center;
    font-size: 0.8rem;
    color: #333333;
    background-color: transparent;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
    font-family: 'KapraNeueRegular', sans-serif;
    z-index: 10;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    cursor: pointer !important;
    z-index: 1000;
    user-select: none;
}

.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-indicator:hover {
    color: #333 !important;
    transform: translateY(-5px);
    cursor: pointer !important;
}

.scroll-indicator .scroll-text {
    writing-mode: vertical-rl; /* Vertical text */
    margin-bottom: 10px;
    cursor: pointer !important;
    pointer-events: none;
}

.scroll-indicator svg {
    cursor: pointer !important;
    pointer-events: none;
}

/* --- Article Section (Blog content) --- */

.article-section {
    padding: 5rem 2rem;
    display: flex;
    justify-content: center;
}

.article-content {
    max-width: 700px; /* Optimal reading width */
    width: 100%;
}

.article-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 0.5rem;
    display: inline-block; /* Make border only as wide as the text */
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
}

.article-content .meta {
    font-size: 1rem;
    color: var(--meta-text-color);
    margin-bottom: 2.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 300;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 300;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
}

/* --- Responsive Design for smaller screens --- */

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr; /* Stack columns */
        height: auto;
        padding: 4rem 2rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }

    .hero-text .tag {
        align-self: center; /* Center tag when stacked */
    }

    .hero-skills {
        justify-content: center; /* Center hero skills on mobile */
    }

    .hero-image-container {
        margin-top: 2rem;
        height: 50vh;
        width: 85vw;
    }

    .scroll-indicator {
        display: none; /* Hide on mobile as it can be obtrusive */
    }
}

@media (max-width: 500px) {
     .hero-text h1 {
        font-size: 2.5rem;
    }
 }

/* Right Sidebar Styles - matching projects.html */
.right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 5.63vw;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 1.04vw;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 3.70vh;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20.26vh;
    margin-bottom: 4.63vh;
    margin-right: 0.52vw;
}

.nav-item {
    transform: rotate(-90deg);
    white-space: nowrap;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 0.83vw;
    font-weight: 600;
    letter-spacing: 0.26vw;
    text-transform: uppercase;
    display: block;
    padding: 0.93vh 0;
    position: relative;
    overflow: hidden;
}

/* Expanding border bottom hover effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0.19vh;
    background-color: #666;
    transition: width 0.4s ease !important;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:active::after,
.nav-link.active::after {
    width: 100%;
}

/* Black Curtain for Panel Background */
.panel-curtain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(0.42vw);
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.panel-curtain.active {
    opacity: 1;
    visibility: visible;
}

/* Slide-out Panel Styles */
.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(0.52vw);
    z-index: 25;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform, background-color;
}

.slide-panel.active {
    transform: translateX(0);
}

/* Contact Panel Styles - matching projects.html exactly */
.contact-panel {
    width: 100% !important;
    height: 100vh !important;
    background: #d6c432 !important;
    backdrop-filter: none !important;
    transform: translateY(-100%) !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.08vw;
}

.contact-panel.active {
    transform: translateY(0) !important;
}

/* Contact Panel Header and Image */
.contact-header {
    position: absolute;
    top: 8.89vh;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
    overflow: hidden;
}

.contact-image {
    max-width: 20.83vw;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
    cursor: pointer;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.46vh;
    align-items: center;
    justify-content: center;
}

.contact-link {
    font-family: 'Raleway', sans-serif;
    font-size: 1.67vw;
    font-weight: 100;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0px;
    transition: all 0.3s ease;
    display: block;
    background: none;
    border: none;
    padding: 0;
}

.contact-link:hover {
    color: #333;
    transform: scale(1.05);
}

/* Contact Panel Close Button */
.panel-close-btn {
    position: absolute;
    top: 4.44vh;
    right: 2.34vw;
    width: 2.08vw;
    height: 3.70vh;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-close-btn::before,
.panel-close-btn::after {
    content: '';
    position: absolute;
    width: 1.56vw;
    height: 0.09vh;
    background-color: #000;
    transition: all 0.3s ease;
}

.panel-close-btn::before {
    transform: rotate(45deg);
}

.panel-close-btn::after {
    transform: rotate(-45deg);
}

.panel-close-btn:hover::before,
.panel-close-btn:hover::after {
    background-color: #333;
}

.panel-close-btn:hover::before {
    transform: rotate(135deg);
}

.panel-close-btn:hover::after {
    transform: rotate(45deg);
}

/* Contact Panel specific content adjustments */
.contact-panel .panel-content {
    padding: 5.93vh 2.08vw;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Mobile responsive styles for navbar */
@media (max-width: 1024px) {
    /* Right Sidebar Mobile Styles */
    .right-sidebar {
        position: fixed;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        width: 95vw;
        height: auto;
        z-index: 100;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0.8rem 1.2rem;
        background: #181516;
        border-radius: 25px;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .sidebar-nav {
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .nav-list {
        list-style: none;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 5rem;
    }

    .nav-item {
        transform: none;
        white-space: nowrap;
    }

    .nav-link {
        color: #c4b2aa;
        text-decoration: none;
        font-family: 'Lato', sans-serif;
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 0.1rem;
        text-transform: uppercase;
        display: block;
        padding: 0.5rem 0;
        position: relative;
        overflow: hidden;
    }

    /* Contact Panel Mobile Styles */
    .contact-panel {
        width: 100% !important;
        height: 100vh !important;
        background: #d6c432 !important;
        backdrop-filter: none !important;
        transform: translateY(-100%) !important;
        padding: 1.5rem;
    }

    .contact-panel.active {
        transform: translateY(0) !important;
    }

    .contact-panel .panel-content {
        padding: 3rem 1.5rem;
        justify-content: center;
        align-items: center;
        text-align: center;
        position: relative;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }

    .contact-header {
        position: absolute;
        top: 15vh;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 0;
        overflow: hidden;
    }

    .contact-image {
        max-width: 40vw;
        height: auto;
        display: block;
        margin: 0 auto;
    }

    .contact-links {
        gap: 2vh;
        align-items: center;
        justify-content: center;
    }

    .contact-link {
        font-family: 'Raleway', sans-serif;
        font-size: 5vw;
        font-weight: 100;
        background: none;
        border: none;
        padding: 0;
    }

    /* Contact Panel Close Button Mobile */
    .panel-close-btn {
        top: 1.5rem;
        right: 1.5rem;
        width: 2rem;
        height: 2rem;
    }

    .panel-close-btn::before,
    .panel-close-btn::after {
        width: 1.2rem;
        height: 2px;
    }
}