/* ---------- PAGE PRESETS ---------- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Century Gothic", Avenir, sans-serif;
    background-color: #2c2c2c;
    color: #ffffff;
}

/* ---------- HEADER ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    padding: 16px 24px;
    background-color: #1f1f1f;
    gap: 20px;
}

.name-section {
    text-decoration: none;
    color: inherit;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.name-section:hover {
    background-color:#2c2c2c;
}

.name {
    margin: 0;
    font-size: 28px;
}

.title-text {
    margin: 4px 0 0;
    font-size: 16px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #2c2c2c;
}

.contact-link {
    background-color: #4d4d4d;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    white-space: nowrap;
}

.contact-link:hover {
    background-color: #5d5d5d;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    width: 100%;
    min-height: 70vh;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
}

.hero-content {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding: 40px;
    text-align: center;
    max-width: 1300px;
    margin: auto;
}

.hero-content h2 {
    font-size: clamp(36px, 8vw, 90px);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: clamp(16px, 3vw, 24px);
    line-height: 1.6;
}

/* ---------- LINK BOXES ---------- */
.link-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.link-box {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.3s;
}

.link-box span {
    background: rgba(0, 0, 0, 0.6);
    padding: 14px 22px;
    border-radius: 14px;
    font-size: clamp(22px, 4vw, 48px);
    position: relative;
    z-index: 1;
}

.link-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(44, 44, 44, 0);
    transition: background-color 0.3s;
}

.link-box:hover::before {
    background-color: rgba(44, 44, 44, 0.5);
}

/* ---------- BACKGROUND IMAGES ---------- */
.product-design-box { background: url("Index-Page-Photos/Product-Design.jpg") center/cover; }
.cad-box { background: url("Index-Page-Photos/CAD.jpg") center/cover; }
.prototyping-box { background: url("Index-Page-Photos/Prototyping.JPG") center/cover; }
.electronics-box { background: url("Index-Page-Photos/Electronics.jpg") center/cover; }
.manufacturing-box { background: url("Index-Page-Photos/Manufacturing.jpg") center/cover; }
.other-box { background: url("Index-Page-Photos/Other.jpg") center/cover; }

/* ---------- FOOTER ---------- */
.footer-barrier {
    height: 60px;
    background-color: #1f1f1f;

    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text {
    font-size: 14px;
    margin: 0;
}

/* ---------- RESPONDS TO DIFFERENT DEVICES ---------- */
@media (max-width: 1024px) {
    .link-boxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
    }

    .link-boxes {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 80vh;
    }
}

/* ---------- HEADER COMPACT (MOBILE ONLY) ---------- */
@media (max-width: 870px) {
    .header {
        transition: padding 0.3s ease, min-height 0.3s ease;
    }

    .header--compact {
        padding: 8px 16px;
    }

    .header--compact .nav-links,
    .header--compact .contact-link {
        display: none;
    }

    .header--compact .name {
        font-size: 20px;
    }

    .header--compact .title-text {
        font-size: 14px;
    }
}