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

/* ====================== BASE STYLES ====================== */
body {
    font-family: 'Karla', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Karla', sans-serif;
}

/* ====================== CONTAINER ====================== */
.container, .max-w-7xl {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ====================== HEADER ====================== */
.header {
    background-color: #5d5ca4;
    color: #DDDDDD;
    width: 100%;
    padding: 20px 0;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 20px;
}

.header-logo {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    height: 80px;
    width: auto;
}

.header-text {
    text-align: center;
}

.header-with-logo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem;
    margin: 2rem 0;
}

.section-logo {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    height: 50px;
    width: auto;
}

/* ====================== TEXT STYLES ====================== */
.intro-text {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    height: auto;
}

.intro-text strong {
    color: #1E3A8A;
    font-weight: bold;
}

.intro-textlong {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    height: 600px;
}

.article-text {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}

.article-text strong {
    color: #1E3A8A;
    font-weight: bold;
}

/* ====================== HAMBURGER MENU ====================== */
.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 20px 40px;
}

.menu-overlay.active {
    right: 0;
}

#menu-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 9999px;
    z-index: 10000;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.85);
}

#menu-toggle i {
    color: white;
    font-size: 1.75rem;
}

#close-menu {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#close-menu:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

#close-menu i {
    color: white;
    font-size: 1.75rem;
}

.menu-link {
    margin: 18px 0;
    font-size: 1.45rem;
    color: white;
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.menu-link:hover::after,
.menu-link:focus::after {
    width: 100%;
}

.menu-link:hover,
.menu-link:focus {
    color: #ddd;
}

/* ====================== PHOTO GRID ====================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    width: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.photo-item-square {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.photo-item img,
.photo-item-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img,
.photo-item-square:hover img {
    transform: scale(1.5);
}

/* ====================== VIDEO CONTAINER ====================== */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================== MISC COMPONENTS ====================== */
.techbox {
    padding: 20px;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
}

.project-details {
    max-width: 800px;
    margin: 0 auto;
}

.image-container {
    margin: 20px 0;
    text-align: center;
}

.project-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

/* ====================== ARTICLE BOX ====================== */
.articlebox {
    align-items: stretch;
}

.articlebox p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.articlebox strong {
    color: #1E3A8A;
    font-weight: bold;
}

.articlebox a {
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.articlebox + .grid img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* ====================== FULL PHOTO BOX ====================== */
.fullphotobox {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.fullphotobox .center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullphotobox img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    width: 100%;
}

/* ====================== LIGHTBOX ====================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-family: 'Karla', sans-serif;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ====================== GALLERY HOVER ====================== */
.thumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.thumbnail:hover {
    transform: scale(1.55);
    box-shadow: 0 30px 60px -12px rgb(0 0 0 / 0.35);
    z-index: 30;
    border-radius: 16px;
}

.thumbnail-grid {
    overflow: hidden;
}

/* ====================== HERO SLIDESHOW ====================== */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #1a1a1a;
}

/* ====================== MEDIA QUERIES ====================== */
@media (min-width: 768px) {
    .menu-overlay {
        width: 400px;
        right: -400px;
    }
    .menu-overlay.active {
        right: 0;
    }
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .thumbnail:hover {
        transform: scale(1.25);
    }
}

@media (max-width: 640px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    .intro-text {
        font-size: 0.9rem;
    }
}