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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This is the "zoom to fit" part */
}

.outereverything {
    display: flex;
    justify-content: center;
    padding: 20px;
    position: relative; /* Ensure it's above the background */
    z-index: 1;
}

.everything {
    width: min(1100px, 100%);
    background-color: rgba(255, 255, 255, 0.2);
    padding: 25px;
    border-radius: 10px;
    border-color: #fff;
    border-style: solid;
    border-width: 3px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

#background {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background: url('./images/chinesetropical.webp') no-repeat center center;
    background-size: cover;
    opacity: 0.7;
    z-index: -1;
}

/* Navigation */
#navbar {
    background-color: #555;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2px;
}

#navbar li a {
    display: block;
    color: white;
    padding: 14px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

#navbar li a:hover,
#navbar li a.active {
    background-color: #ddd;
    color: black;
}

/* Header Sections */
.header {
    background-color: #f4f4f4;
    text-align: center;
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Card Layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img-container {
    height: 180px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 10px;
    color: #222;
}

.card-content p {
    color: #555;
    margin-bottom: 15px;
    flex: 1;
}

.project-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Certifications */
.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.cert-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cert-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* Video Embeds */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .everything {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
        margin: 20px 0;
    }
    
    .project-grid,
    .certification-grid {
        grid-template-columns: 1fr;
    }
    
    #navbar ul {
        flex-direction: column;
        gap: 0;
    }
}

@media (orientation: portrait) {
    #background {
        background-image: url('./images/chinesetropical_vert.webp');
    }
}

@media (orientation: landscape) {
    #navbar ul {
        flex-direction: row;
    }
}