/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', sans-serif;
}

body {
    background-color: #E6EEF2;
    /* Dusty blue */
    color: #1a1a1a;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    padding: 0 2rem;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    background-color: rgba(230, 238, 242, 0.85);
    backdrop-filter: blur(5px);
}

header nav {
    padding-top: 15px;
    display: flex;
    align-items: center;
}

.non-home header {
    background-color: rgba(230, 238, 242, 0.95);
}

header .home-link {
    position: absolute;
    left: 0;
    /* Back to the left edge */
    top: 50%;
    transform: translateY(-50%);
    /* Center vertically */
    width: 80px;
    height: 80px;
    display: none;
    transition: opacity 0.3s ease;
}

header .home-link:hover {
    opacity: 0.8;
}

header .home-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 8px 8px 0;
}

.non-home header .home-link {
    display: block;
}

nav ul {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
    margin-left: 100px;
    line-height: 1;
}

nav a {
    text-decoration: none;
    color: #000000;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    font-weight: 600;
}

nav a:hover {
    color: #F1C40F;
}

/* Style for disabled nav links */
nav a.disabled {
    pointer-events: none;
    cursor: default;
    opacity: 0.7;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(230, 238, 242, 0.98);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 4px;
    overflow: hidden;
    top: calc(100% + 2px);
    left: 0;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
}

.dropdown-content a {
    color: #000000;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: rgba(241, 196, 15, 0.1);
    color: #F1C40F;
}

.dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > a {
    position: relative;
    z-index: 1002;
}

/* Main layout */
.home {
    padding-top: 100px;
    /* Adequate padding for desktop */
    min-height: 100vh;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    gap: 0.5rem;
    /* Reduced gap significantly */
}

/* Headline styles */
.headline {
    position: relative;
    margin-top: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    max-width: 100vw;
}

.headline-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

.headline-link:hover {
    opacity: 0.8;
}

/* Content area styles */
.content-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align to top */
    width: 100%;
    margin-top: 1rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.text-line-1,
.text-line-2 {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 0;
    margin: 0;
}

.text-line-1 span,
.text-line-2 span {
    display: block;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(2rem, 15vw, 18vw);
    line-height: 0.9;
    font-weight: 800;
    letter-spacing: -0.03em;
    white-space: nowrap;
    transform: translate(0px, 0px);
    padding: 0;
    margin: 0;
}

/* Subtitle styles */
.subtext {
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    max-width: 60%;
}

.subtitle-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 800px;
}

.subtitle-item {
    font-size: 3rem;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    line-height: 1.2;
    font-weight: 300;
}

.subtitle-item:hover {
    color: #F1C40F;
}

/* Footer */
footer {
    padding: 2rem 4rem;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* Intro text styles */
.intro-text {
    margin-top: 1.5rem;
    max-width: 100%;
    margin-right: 0;
}

.intro-text p {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #333;
    font-weight: 400;
    margin: 0;
}

/* Profile image styles */
.profile-image {
    position: relative;
    width: 35vw;
    max-width: 450px;
    min-width: 300px;
    z-index: 1;
    mix-blend-mode: multiply;
    margin-right: 0;
    align-self: flex-start;
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .subtext {
        max-width: 55%;
    }

    .profile-image {
        width: 40vw;
        min-width: 280px;
    }
}

@media (max-width: 900px) {
    .content-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .subtext {
        max-width: 100%;
        width: 100%;
    }

    .profile-image {
        width: 50vw;
        max-width: 350px;
        align-self: center;
    }
}

.profile-image img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) contrast(120%);
    object-fit: contain;
    opacity: 0.95;
}

/* Highlight text styling */
.highlight {
    font-weight: 700;
    font-style: italic;
}

/* Bio Image Styles */
.bio-image {
    float: right;
    width: 375px;
    height: auto;
    margin: 0 0 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .bio-image {
        width: 300px;
        margin: 0 0 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .bio-image {
        width: 225px;
        margin: 0 0 1rem 0.5rem;
    }
}

/* Blog Styles */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 120px;
    /* Adequate padding to prevent header overlap */
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.blog-header {
    margin-bottom: 1.5rem;
    /* Reduced margin for better spacing */
}

.blog-header h1 {
    font-size: 3.5rem;
    /* Increased font size */
    margin-bottom: 0.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.blog-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

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

/* Blog List Styles */
.blog-list-container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 120px;
    /* Adequate padding to prevent header overlap */
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 2rem;
}

.blog-list-container h1 {
    margin-bottom: 2rem;
}

.blog-list {
    margin-top: 2rem;
}

.blog-preview {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

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

.blog-preview h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.blog-preview h2 a {
    color: inherit;
    text-decoration: none;
}

.blog-preview h2 a:hover {
    text-decoration: underline;
}

.excerpt {
    color: #444;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .home {
        padding: 1rem;
        gap: 0.5rem;
        /* Consistent smaller gap */
        justify-content: center;
        /* Center content vertically */
        padding-top: 140px;
    }

    .content-area {
        flex-direction: column;
        gap: 1rem;
        /* Reduced gap */
        align-items: center;
        /* Center everything */
    }

    .profile-image {
        width: 70vw;
        /* Slightly larger on mobile */
        max-width: 350px;
        margin-right: 0;
        align-self: center;
        order: 1;
        /* Image comes after text */
        margin-bottom: 1rem;
    }

    .subtext {
        order: 2;
        /* Links come after image */
        width: 100%;
        text-align: center;
    }

    .subtitle-grid {
        align-items: center;
    }

    nav ul {
        gap: 1rem;
    }

    .text-line-1 span,
    .text-line-2 span {
        font-size: clamp(2.5rem, 14vw, 16vw);
        line-height: 0.85;
        /* Tighter line height */
        text-align: center;
    }

    .subtitle-item {
        font-size: 1.8rem;
        /* Slightly smaller for mobile */
        text-align: center;
    }

    .intro-text {
        margin-top: 1rem;
        text-align: center;
        margin-right: 0;
    }

    .intro-text p {
        font-size: 1.05rem;
    }

    .blog-post {
        padding: 100px 1.5rem 1.5rem;
    }

    .blog-list-container {
        padding: 100px 1.5rem 1.5rem;
    }

    .blog-header {
        margin-bottom: 1rem;
    }

    .blog-header h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .blog-content {
        font-size: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .home {
        gap: 1.5rem;
        padding-top: 140px;
    }

    .profile-image {
        width: 45vw;
        max-width: 450px;
    }

    .subtitle-item {
        font-size: 2.5rem;
    }
}

@media (min-width: 1400px) {

    .text-line-1 span,
    .text-line-2 span {
        font-size: clamp(4rem, 12vw, 15vw);
        letter-spacing: -0.04em;
    }
}

@media (max-width: 480px) {
    .home {
        gap: 0.5rem;
        /* Consistent small gap */
        padding: 0.5rem;
        padding-top: 140px;
    }

    .content-area {
        gap: 0.8rem;
        /* Even tighter spacing */
    }

    .text-line-1 span,
    .text-line-2 span {
        font-size: clamp(2rem, 12vw, 14vw);
        line-height: 0.8;
        /* Tighter line height */
        letter-spacing: -0.02em;
        text-align: center;
    }

    .profile-image {
        width: 80vw;
        max-width: 300px;
        margin-bottom: 0.5rem;
    }

    .subtitle-item {
        font-size: 1.6rem;
    }

    .intro-text p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .blog-post {
        padding: 100px 1rem 1rem;
    }

    .blog-list-container {
        padding: 100px 1rem 1rem;
    }

    .blog-header {
        margin-bottom: 0.8rem;
    }

    .blog-header h1 {
        font-size: 2rem;
        margin-bottom: 0.3rem;
    }
}