@font-face {
    font-family: 'FT ACTIVICASTRONG';
    src: url('/Assets/Fonts/FT Activica Strong.otf') format('opentype');
}

@font-face {
    font-family: 'ABC Marfa Variable';
    src: url('/Assets/Fonts/ABCMarfa-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Marfa Mono';
    src: url('/Assets/Fonts/ABCMarfaMono-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Roboto';
    src: url('/Assets/Fonts/Roboto-VariableFont_wdth\,wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans Mongolian';
    src: url('/Assets/Fonts/mnglartotf.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans Old Uyghur';
    src: url('/Assets/Fonts/NotoSerifOldUyghur-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Noto Sans Sogdian';
    src: url('/Assets/Fonts/NotoSansSogdian-Regular.ttf') format('truetype');
}

* {
    box-sizing: border-box;
    max-width: 100%;
}

/* Hero background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-background-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background: linear-gradient(to bottom,
            rgba(255, 253, 244, 0) 0%,
            rgba(255, 253, 244, 0.5) 50%,
            rgba(255, 253, 244, 1) 100%);
}

/* Add gradient overlay that fades to background color - only on homepage */
.home-page .hero-background::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30vh;
    background: linear-gradient(to bottom,
            rgba(255, 253, 244, 0) 0%,
            rgba(255, 253, 244, 0.5) 50%,
            rgba(255, 253, 244, 1) 100%);
    z-index: 0;
}

/* Hero sentence styling */
.hero-sentence {
    position: absolute;
    top: 35vh;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    width: 100%;
    padding: 0 2rem;
    font-family: 'ABC Marfa Variable', sans-serif;
    font-size: 7.5rem;
    font-weight: 700;
    color: #fffdf4;
    text-transform: lowercase;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* Continuous content flow - adjust to start sooner after hero section */
.continuous-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 60vh;
    padding-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* For non-homepage pages, different content alignment */
/* Removed .page-content in favor of continuous-content */

/* These old mobile nav styles are replaced by the hamburger menu */

/* Ensure text is readable on all backgrounds */
.container.essay {
    background-color: rgba(255, 253, 244, 1);
    /* Fully opaque */
    border-radius: 4px;
}

.first-essay {
    /* backdrop-filter removed */
}

.essay h2 {
    font-size: 2.2rem;
    color: #0E2758;
}

.essay p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: justify;
}

.paragraph-with-borders {
    position: relative;
    padding: 0 40px;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'ABC Marfa Variable', sans-serif;
    line-height: 1.6;
    background-color: #fffdf4;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 0;
}

/* Override center alignment for blog/writing page */
body.blog-page {
    align-items: stretch;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 0;
    padding-top: 1rem;
    padding-bottom: 0;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Keep header above everything */
header {
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
    background-color: rgba(255, 253, 244, 0.9);
    padding: 0.5rem 0;
    backdrop-filter: blur(5px);
}

header .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Global link styling */
a {
    color: #4a5f8c;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:visited {
    color: #4a5f8c;
}

a:hover {
    color: #1a3875;
    text-decoration: underline;
}

.logo-container {
    display: flex;
    align-items: center;
}

/* Ensure the anchor tag in the logo container doesn't affect layout */
.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-container a:hover {
    text-decoration: none;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav a {
    font-family: 'Marfa Mono', sans-serif;
    text-decoration: none;
    color: #333;
    margin-left: 2rem;
    font-size: 1.3rem;
}

.main-nav a:visited {
    color: #333;
}

.main-nav a.active,
.main-nav a.active:visited {
    color: #859FBE;
}

.main-nav a:hover {
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(39, 129, 239, 0.3);
}

/* Hamburger menu styling */
.hamburger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-icon {
    width: 30px;
    height: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Open state for hamburger icon */
.hamburger-icon.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

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

.hamburger-icon.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

h1,
h2,
h3 {
    font-family: 'ABC Marfa Variable', sans-serif;
    margin: 0 0 0 0;
}

footer {
    text-align: center;
    padding-bottom: 2rem;
    box-sizing: border-box;
}

/* Job application button styling */
.job-apply {
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.apply-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-family: 'Marfa Mono', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    color: #fffdf4 !important;
    background-color: #0E2758;
    border-radius: 8px;
    border: 2px solid #0E2758;
    box-shadow: 0 4px 12px rgba(14, 39, 88, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}

.apply-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(14, 39, 88, 0.3);
    background-color: #1a3875;
    border-color: #1a3875;
    color: #fffdf4 !important;
    text-decoration: none;
}

.apply-button:visited {
    color: #fffdf4 !important;
}

.apply-button:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 39, 88, 0.2);
}


/* Under no circumstances are you to adjust the waveform styling to fit nicely in the flow */

/* Mobile responsive styles for blog and containers */
@media (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Hero size and position adjustments */
    .hero-background {
        height: 60vh;
    }

    .hero-sentence {
        font-size: 3.5rem;
        top: 30vh;
    }

    .continuous-content {
        padding-top: 50vh;
        padding-bottom: 2rem;
    }

    /* .page-content removed */
}

@media (max-width: 600px) {

    /* Hamburger menu for mobile */
    .hamburger-menu {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: rgba(255, 253, 244, 0.97);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav a {
        margin: 0 0 1.5rem 0;
        font-size: 1.2rem;
        width: 100%;
    }

    /* More hero adjustments */
    .hero-background {
        height: 45vh;
    }

    .hero-sentence {
        font-size: 2.8rem;
        top: 25vh;
    }

    .continuous-content {
        padding-top: 35vh;
    }

    /* .page-content removed */
}

@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-background {
        height: 40vh;
    }

    .hero-sentence {
        font-size: 2.2rem;
        top: 20vh;
    }

    .continuous-content {
        padding-top: 30vh;
    }

    /* .page-content removed */

    .main-nav {
        width: 85%;
    }
}

@media (max-width: 768px) {
    .blog-index {
        padding-top: 4rem;
    }

    .blog-index h1 {
        font-size: 2.2rem;
        margin-bottom: 1.5rem;
    }

    .blog-post-card {
        margin-bottom: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .blog-post-card .post-title {
        font-size: 1.7rem;
    }

    .featured-post-card {
        padding: 1.5rem;
        margin-bottom: 3rem;
    }

    .featured-post-label {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }

    .blog-post {
        padding-top: 4rem;
    }

    .blog-post .post-title {
        font-size: 2.2rem;
    }

    .blog-post .post-subtitle {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }

    .blog-post .post-content {
        font-size: 1.1rem;
    }

    .blog-post .post-content h2 {
        font-size: 1.5rem;
    }

    .blog-post .post-content h3 {
        font-size: 1.2rem;
    }

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

@media (max-width: 480px) {
    .blog-index {
        padding-top: 3rem;
    }

    .blog-index h1 {
        font-size: 1.8rem;
        margin-bottom: 1.2rem;
    }

    .blog-post-card {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .blog-post-card .post-title {
        font-size: 1.4rem;
    }

    .blog-post-card .post-meta {
        font-size: 0.8rem;
    }

    .blog-post .post-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .blog-post .post-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .blog-post .post-meta {
        font-size: 0.8rem;
    }

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

    .blog-post .post-content h2 {
        font-size: 1.3rem;
        margin-top: 1.5rem;
    }

    .blog-post .post-content h3 {
        font-size: 1.1rem;
        margin-top: 1rem;
    }

    .featured-post-card {
        padding: 1rem;
        margin-bottom: 2.5rem;
    }

    .featured-post-label {
        top: -10px;
        left: 12px;
        font-size: 0.6rem;
        padding: 0.1rem 0.5rem;
    }

    .blog-back-link {
        font-size: 0.9rem;
    }
}

/* Blog styles */
.blog-index {
    margin-bottom: 4rem;
    width: 100%;
    text-align: left;
    color: #0E2758;
}

.blog-post-card {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    position: relative;
}

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

.featured-post-card {
    background-color: rgba(14, 39, 88, 0.05);
    padding: 2rem;
    border-radius: 4px;
    border-bottom: none;
    margin-bottom: 4rem;
    box-shadow: 0 4px 8px rgba(14, 39, 88, 0.1);
}

.blog-post-card .post-title {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.blog-post-card .post-title a {
    color: #0E2758;
}

.blog-post-card .post-meta,
.post-header .post-meta {
    font-family: 'Marfa Mono', sans-serif;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.blog-post-card .post-excerpt {
    margin-bottom: 1rem;
}

.blog-post-card .read-more {
    font-family: 'Marfa Mono', sans-serif;
    font-size: 0.9rem;
}

.blog-post {
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.blog-post .post-header {
    margin-bottom: 2rem;
}

.blog-post .post-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: #0E2758;
}

.blog-post .post-subtitle {
    font-size: 1.6rem;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: normal;
    color: #4a5f8c;
    font-style: italic;
}

.blog-post .post-author {
    font-weight: 600;
}

.blog-post .post-content {
    font-size: 1.2rem;
    line-height: 1.5;
}

.blog-post .post-content h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.7rem;
}

.blog-post .post-content h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
}

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

.blog-navigation {
    margin-top: 3rem;
    margin-bottom: 4rem;
}

.blog-nav-links {
    display: flex;
    justify-content: center;
}

.blog-back-link {
    font-family: 'Marfa Mono', sans-serif;
    font-size: 1rem;
}

/* Featured post on homepage */
.featured-post {
    padding: 2rem;
    margin-bottom: 2rem;
    background-color: rgba(255, 253, 244, 0.85);
    border-radius: 4px;
    position: relative;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 12px rgba(14, 39, 88, 0.1);
    border-left: 4px solid #0E2758;
}

.featured-post-label {
    position: absolute;
    top: -12px;
    left: 20px;
    background: #0E2758;
    color: #fff;
    font-family: 'Marfa Mono', sans-serif;
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
}

.featured-post-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #0E2758;
}

.featured-post-title a {
    color: #0E2758;
    text-decoration: none;
}

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

.featured-post-meta {
    font-family: 'Marfa Mono', sans-serif;
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.featured-post-content {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.featured-post-link {
    font-family: 'Marfa Mono', sans-serif;
    font-size: 0.9rem;
    display: inline-block;
    color: #0E2758;
    text-decoration: none;
    font-weight: 600;
}

.featured-post-link:hover {
    text-decoration: underline;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 2px solid #0e2758;
    padding: 0.6rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.auth-button--primary {
    background-color: #0e2758;
    color: #fffdf4;
}

.auth-button--primary:hover {
    transform: translateY(-1px);
    background-color: #1a3875;
    box-shadow: 0 4px 12px 0 rgba(30, 39, 120, 0.10);
}

.auth-button--outline {
    background-color: transparent;
    color: #0e2758;
}

.auth-button--outline:hover {
    transform: translateY(-1px);
    border-color: #1a3875;
    color: #1a3875;
    box-shadow: 0 4px 12px 0 rgba(30, 39, 120, 0.10);
}

.auth-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}
