:root {
    --primary: #333;
    --accent: #0077cc;
    --background: #f9f9f9;
    --font: 'Segoe UI', sans-serif;
}



body {
    margin: 0;
    font-family: var(--font);
    background: var(--background);
    color: var(--primary);
}

a {
    text-decoration: none;
    color: var(--primary);
}

a:hover {
    color: var(--accent);
}

p {
    font-size: 1.1rem;
    line-height: 1.5rem;
}

header {
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    justify-content: center;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-logo {
    max-width: 100%;
    height: auto;
    max-height: 40px;
    margin-right: 10px;
}

.header-title {
    margin: 0; 
    font-size: 3rem;
    color: #fff;
}

.ff-monospace {
    font-family: "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
}

.motto {
    margin: 5px 0 0 0;
    font-size: 1.2rem;
    color: #eee;
    font-weight: normal;
}

main {
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

footer {
    width: 100%;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    box-sizing: border-box;
}

article {
    margin-bottom: 60px;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 40px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-title {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.article-title {
    font-size: 1.6rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.article-date {
    font-size: 0.9rem;
    color: gray;
    margin-bottom: 15px;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.recent-posts li {
    flex: 1 1 150px; /* Flex-grow, flex-shrink, flex-basis */
}

.recent-posts a {
    text-decoration: none;
    color: var(--primary);
    display: block;
}

.recent-post-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.3rem;
    }

    header {
        min-height: 75px;
        gap: 5px;
    }
}

.all-posts ul {
    list-style-type: none;
    padding-left: 0;
}

/* Hero Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}
.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}
.hero-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}
.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}
.hero-main .hero-card {
    height: 420px;
}
.hero-sub .hero-card {
    height: 200px;
}
.hero-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    box-sizing: border-box;
}
.hero-text strong {
    display: block;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.hero-text span {
    color: #ddd;
    font-size: 0.9rem;
}
@media (max-width: 600px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-main .hero-card,
    .hero-sub .hero-card {
        height: 250px;
    }
}

/* Hero Header Elements */
.hero-header {
    position: relative;
    width: 100%;
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: white;
    text-align: center;
    padding: 0;
    box-shadow: none;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    filter: brightness(0.65) contrast(1.1);
    object-fit: cover;
}

.hero-content {
    position: relative;
    cursor: pointer;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-logo {
    width: 60px;
    height: auto;
}

.hero-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem); 
    font-weight: 400; 
    margin: 0; 
    letter-spacing: -1px;
    color: white;
}

.hero-subtitle {
    font-family: monospace;
    font-weight: lighter;
    font-size: 1.25rem;
}

.post-tags {
    margin-top: -10px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    background: #e0e0e0;
    color: #333;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Continent Navigation Menu */
.continent-nav {
    background: #fff;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
    padding: 20px 15px;
}

.nav-title {
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--primary);
}

.nav-item:hover .nav-title {
    color: var(--accent);
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 200px;
    border-radius: 4px;
    z-index: 100;
}

.nav-item:hover .dropdown {
    display: block;
}

.dropdown li {
    padding: 12px 20px;
    text-align: center;
}

.dropdown li a {
    display: block;
    color: var(--primary);
    font-size: 0.8rem;
    text-decoration: none;
}

.dropdown li a:hover {
    color: var(--accent);
    background-color: #f9f9f9;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 15px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 4px 0;
    transition: 0.4s;
}

/* Hamburger to X animation */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-8px, 7px);
}
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-8px, -8px);
}

@media (max-width: 768px) {
    .continent-nav {
        justify-content: flex-end; /* Align hamburger to the right */
        width: 100%;
    }

    .menu-toggle {
        display: flex;
        margin-right: 15px;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        padding: 0;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #eee;
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-title {
        display: block;
        padding: 15px;
        text-align: center;
    }

    .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        background: #f9f9f9;
        display: none;
        width: 100%;
        padding: 0;
    }
    
    /* Override hover for mobile, only use active class */
    .nav-item:hover .dropdown {
        display: none;
    }
    
    .nav-item.active .dropdown {
        display: block;
    }
}