/* Base Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #fff;
    color: #1d1d1f;
}

/* Navigation */
.global-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px); /* For Safari */
    z-index: 9999;
    display: flex;
    justify-content: center;
}

.nav-content {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.nav-content a {
    color: #f5f5f7;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: -0.01em;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-content a:hover {
    opacity: 1;
}

.logo {
    font-weight: 600;
    font-size: 14px !important;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

/* Sections & Themes */
main {
    margin-top: 48px; /* Offset for fixed nav */
}

.hero {
    height: 85vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    overflow: hidden;
    position: relative;
    border-bottom: 12px solid #fff;
}

.theme-dark {
    background-color: #000;
    color: #f5f5f7;
}

.theme-light {
    background-color: #fbfbfd;
    color: #1d1d1f;
}

.theme-light-gray {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

/* Typography Details */
.headline {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
}

.subhead {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.004em;
    margin-bottom: 18px;
}

.headline-small {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subhead-small {
    font-size: 20px;
    font-weight: 400;
    margin-bottom: 14px;
}

/* Buttons */
.cta-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.btn {
    text-decoration: none;
    font-size: 17px;
    border-radius: 980px; /* Pill shape */
    padding: 11px 21px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0071e3;
    color: #fff;
    font-weight: 400;
}

.btn-primary:hover {
    background-color: #0077ed;
}

.btn-link {
    color: #2997ff;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.theme-light .btn-link {
    color: #0066cc;
}

/* Image Placeholders */
.image-placeholder {
    width: 80%;
    max-width: 1000px;
    height: 500px;
    background-color: #333;
    margin-top: 60px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-family: monospace;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.theme-light .image-placeholder {
    background-color: #e5e5ea;
    color: #999;
}

/* Grid Section (like iPads/Watches on Apple site) */
.project-grid {
    display: flex;
    gap: 12px;
    padding: 0 12px 12px 12px;
}

.grid-item {
    flex: 1;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 50px;
    overflow: hidden;
}

.grid-image, .grid-image2 {
    width: 85%;
    height: auto; 
    max-height: 350px; 
    object-fit: contain; /* Shows the entire image without cropping */
    margin-top: 40px;
    border-radius: 12px 12px 0 0; 
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Slightly darker shadow for the dark theme card */
.theme-dark .grid-image {
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

/* Dark Grey Theme */
.theme-dark-gray {
    background-color: #1c1c1e;
    color: #f5f5f7;
}

/* Ensure the image shadow looks correct on the dark grey background */
.theme-dark-gray .grid-image {
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

.image-placeholder-small {
    width: 70%;
    height: 350px;
    background-color: #e5e5ea;
    margin-top: 40px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-family: monospace;
}

.theme-dark .image-placeholder-small {
    background-color: #222;
    color: #777;
}

/* Footer */
footer {
    padding: 30px;
    text-align: center;
    color: #86868b;
    font-size: 12px;
    background: #f5f5f7;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .project-grid {
        flex-direction: column;
    }
    
    .headline { font-size: 40px; }
    .subhead { font-size: 20px; }
    
    .image-placeholder {
        width: 90%;
        height: 300px;
    }
}

/* Styling for actual images/GIFs */
.project-image {
    width: 80%;
    max-width: 1000px;
    height: auto; /* Keeps the GIF's natural proportions */
    max-height: 500px; 
    object-fit: cover; /* Prevents the GIF from squishing */
    object-position: top; /* Keeps the top of the GIF visible */
    margin-top: 60px;
    border-radius: 20px 20px 0 0; /* The Apple-style rounded top corners */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Soft shadow */
}

/* Styling for the Auckland weather image */
.project-image-weather {
    width: 80%;
    max-width: 1000px;
    height: 500px; /* Fixed height to create a uniform window */
    object-fit: cover; /* Fills the box without squishing */
    /* object-position: center 40%;  Shifts the crop to focus on Auckland */
    object-position: 70% 40%;
    margin-top: 60px;
    border-radius: 20px 20px 0 0; /* Apple-style rounded top corners */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}