/* =========================
   GENERAL
========================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #172B3A;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

p {
    color: #526574;
}


/* =========================
   GLOBAL LAYOUT
========================= */

:root {
    --content-width: 1500px;
    --side-padding: 4%;
}

.index-content,
.index-container {
    width: min(100%, var(--content-width));
    margin-left: auto;
    margin-right: auto;
}


/* =========================
   NAVIGATION
========================= */

header {
    background: #194269;
    border-bottom: 1px solid #6e6e6e;
    color: white;
}

.navbar {
    width: min(100%, 1200px);
    margin: auto;
    padding: 25px 30px;

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

.logo {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    color: white;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 14px;
    color: #D9E5EE;
    transition: 0.2s;
}

.nav-links a:hover {
    color: #5FA0D5;
}


/* =========================
   HERO
========================= */

.hero {
    min-height: 500px;
    width: 100%;

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

    background: #cfe7ff;

    gap: clamp(30px, 5vw, 60px);
    padding: 40px 5%;
}

.hero-text {
    text-align: left;
}

.eyebrow {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #2563A6;
    margin-bottom: 45px;
}

.hero h1 {
    font-size: clamp(45px, 6vw, 80px);
    line-height: 1.05;
    max-width: 1200px;
    margin-bottom: 15px;
}

.hero-description {
    max-width: 650px;
    font-size: 24px;
    margin-bottom: 0;
}

.hero img {
    width: clamp(200px, 18vw, 259px);
    height: auto;
    border-radius: 20px;
    flex-shrink: 0;
}


/* =========================
   IMAGE TRANSITION
========================= */

.image-slider {
    width: 100%;
    height: 280px;

    position: relative;
    overflow: hidden;

    background: #ffffff;

    padding: 20px 5%;

    border-top: 1pt solid #ff0000;
    border-bottom: 1pt solid #ff0000;

    margin-bottom: -40px;
}

.slide {
    position: absolute;

    width: max-content;
    height: 240px;

    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 4px;

    opacity: 0;
    animation: slideshow 20s infinite;
}

.slide img {
    width: auto;
    height: 240px;

    object-fit: cover;

    border-radius: 10px;
    border: 1pt solid #1c77ff;
}

.slide:nth-child(1) {
    animation-delay: 0s;
}

.slide:nth-child(2) {
    animation-delay: 5s;
}

.slide:nth-child(3) {
    animation-delay: 10s;
}

.slide:nth-child(4) {
    animation-delay: 15s;
}

@keyframes slideshow {
    0% {
        opacity: 0;
    }

    3% {
        opacity: 1;
    }

    17% {
        opacity: 1;
    }

    30% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}


/* =========================
   INDEX CONTENT
========================= */

.index-main {
    background: linear-gradient(to bottom, #ffffff 0%, #cfe7ff);
    padding: 40px var(--side-padding);
}

.index-content {
    margin-top: 40px;
    margin-bottom: 30px;

    padding: 20px clamp(30px, 7vw, 100px);

    border: 2pt solid #525252;
    border-radius: 20px;

    background: #ffffff;
}

.index-content h2 {
    font-size: 24pt;
    margin: 20px 0;
}

.index-content p {
    max-width: 1250px;
    font-size: 18px;
    text-align: justify;
    margin: 20px 0;
}

.index-content a {
    color: #16324F;
}


/* =========================
   FLEX HEADERS
========================= */

.flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}


/* =========================
   INDEX EXPERIENCE
========================= */

/*
    Each employment card is divided into:

    ┌────────────────┬─────────────────────────────┐
    │                │                             │
    │   BLACK LOGO   │       EMPLOYMENT TEXT       │
    │      AREA      │                             │
    │                │                             │
    └────────────────┴─────────────────────────────┘

    Using CSS Grid instead of percentage margins
    keeps this structure consistent at different
    browser zoom levels.
*/

.index-experience1,
.index-experience2,
.index-experience3 {
    width: 100%;

    display: grid;
    grid-template-columns: 28% minmax(0, 1fr);

    min-height: 150px;

    background: #ffffff;

    border-radius: 5px;

    overflow: hidden;
}


/* =========================
   EXPERIENCE LOGO AREA
========================= */

.experience-img1,
.experience-img2,
.experience-img3 {
    width: 100%;
    height: 150px;

    display: block;

    object-fit: contain;

    background: #000000;

    border-radius: 0;

    margin: 0;

    padding: 20px 35px;
}


/* DART */

.experience-img1 {
    padding: 20px 35px;
}


/* BRP */

.experience-img2 {
    padding: 25px 45px;
}


/* FORMULA uOTTAWA */

.experience-img3 {
    padding: 25px 55px;
    filter: invert(1);
    background:#ffffff;
}


/* =========================
   EXPERIENCE TEXT
========================= */

.experience-text1,
.experience-text2,
.experience-text3 {
    min-width: 0;

    padding: 20px 35px;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.experience-text1 h1,
.experience-text2 h1,
.experience-text3 h1 {
    font-size: clamp(18px, 1.4vw, 24px);

    color: #000000;

    margin: 0;

    line-height: 1.2;
}

.experience-text1 h2,
.experience-text2 h2,
.experience-text3 h2 {
    font-size: clamp(14px, 1.1vw, 19px);

    margin: 3px 0 0;

    font-weight: normal;

    line-height: 1.3;
}

.experience-text1 h2,
.experience-text3 h2 {
    color: #ca3535;
}

.experience-text2 h2 {
    color: #0011ff;
}

.experience-text1 p,
.experience-text2 p,
.experience-text3 p {
    font-size: clamp(12px, 0.9vw, 16px);

    color: #383838;

    margin: 10px 0 0;

    line-height: 1.5;
}


/* =========================
   EXPERIENCE DIVIDERS
========================= */

hr.index-experience {
    border: none;

    border-top: 1pt solid #cacaca;

    margin: 20px 0;
}


/* =========================
   INDEX PROJECTS
========================= */

.index-container {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 25px;

    margin-top: 0;
}

.index-box {
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #ffffff 65%,
        #aaaaaa
    );

    border: 2px solid #720000;

    border-radius: 8px;

    overflow: hidden;

    height: 550px;

    position: relative;

    transition: transform 0.2s ease;
}

.index-box p {
    margin: 0 10px;

    font-size: 14px;

    letter-spacing: 1px;

    color: #2563A6;
}

.index-box h3 {
    font-size: 18pt;

    margin: 0 10px;

    color: #002f94;
}

.index-box h4 {
    font-size: 12pt;

    margin: 0 10px 20px;

    color: #003ec4;

    font-weight: normal;
}

.index-box h5 {
    position: absolute;

    bottom: 10px;
    right: 20px;

    color: #750000;

    font-weight: normal;

    font-size: 12pt;
}

.index-box img {
    width: 100%;
    height: auto;

    object-fit: cover;
}

.index-link {
    color: #1c77ff;
}


/* =========================
   INDEX DIVIDER
========================= */

hr.index2 {
    border: none;

    border-top: 1pt solid #949494;

    margin: 30px 0 0;
}


/* =========================
   BUTTONS
========================= */

.hero-buttons {
    display: flex;

    gap: 15px;

    flex-wrap: wrap;
}

.button {
    padding: 14px 24px;

    font-weight: bold;

    transition: 0.2s;
}

.button.primary {
    background: #2563A6;

    color: white;
}

.button.primary:hover {
    background: #16324F;
}

.button.secondary {
    border: 1px solid #2563A6;

    color: #2563A6;
}

.button.secondary:hover {
    background: #2563A6;

    color: white;
}


/* =========================
   EXPERIENCE BUTTON
========================= */

.index-button2 {
    display: inline-block;

    padding: 12px 25px;

    margin: 20px 0;

    background: #142B40;

    color: white !important;

    text-decoration: none;

    font-size: 16px;

    font-weight: 600;

    border-radius: 6px;

    transition: all 0.2s ease;

    flex-shrink: 0;
}

.index-button2:hover {
    background: #142B40;

    color: white;

    transform: translateY(-2px);
}


/* =========================
   VIEW ALL PROJECTS BUTTON
========================= */

.index-button3 {
    display: inline-block;

    padding: 12px 25px;

    margin: 20px 0;

    background: #142B40;

    color: white !important;

    text-decoration: none;

    font-size: 16px;

    font-weight: 600;

    border-radius: 6px;

    transition: all 0.2s ease;
}

.index-button3:hover {
    background: #142B40;

    color: white;

    transform: translateY(-2px);
}


/* =========================
   SECTIONS
========================= */

.section {
    width: min(100%, 1200px);

    margin: auto;

    padding: 110px 30px;
}

.section-heading {
    margin-bottom: 45px;
}

.section-heading h2 {
    font-size: 42px;

    line-height: 1.1;
}

.large-text {
    font-size: 26px;

    max-width: 850px;

    margin-bottom: 25px;
}

.section-about {
    margin-bottom: 45px;

    margin-top: 100px;
}


/* =========================
   CARDS
========================= */

.cards {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 25px;
}

.card {
    background: #F8FAFC;

    padding: 40px;

    border: 1px solid #CBD8E3;
}

.card-number {
    display: block;

    font-size: 13px;

    color: #2563A6;

    margin-bottom: 30px;
}

.card h3 {
    font-size: 26px;

    margin-bottom: 5px;
}

.card h4 {
    color: #526574;

    font-weight: normal;

    margin-bottom: 20px;
}

.card p {
    margin-bottom: 25px;
}

.card a {
    font-weight: bold;

    font-size: 14px;

    color: #2563A6;
}


/* =========================
   PROJECT CARDS
========================= */

.project-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}

.project-card {
    background: #F8FAFC;

    border: 1px solid #CBD8E3;

    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 260px;

    display: flex;

    justify-content: center;
    align-items: center;

    background: #D8E3EC;

    font-size: 30px;

    font-weight: bold;

    color: #2563A6;
}

.project-content {
    padding: 25px;
}

.project-content p {
    font-size: 12px;

    letter-spacing: 1px;

    color: #2563A6;
}

.project-content h3 {
    margin: 8px 0 20px;
}

.project-content span {
    font-size: 14px;

    font-weight: bold;

    color: #2563A6;
}


/* =========================
   CONTACT
========================= */

.home-contact {
    width: 100%;

    padding: 100px 5%;

    background: #cfe7ff;
}

.home-contact-content {
    width: min(90%, 900px);

    margin: 0 auto;

    text-align: center;
}

.home-contact-content h2 {
    margin: 0;

    font-size: 42px;

    font-weight: 500;

    color: #142B40;
}

.home-contact-content hr {
    width: 80px;

    margin: 20px auto 25px;

    border: none;

    border-top: 2px solid #D71920;
}

.home-contact-content p {
    max-width: 650px;

    margin: 0 auto 30px;

    font-size: 17px;

    line-height: 1.6;

    color: #37698f;
}

.contact-buttons {
    display: flex;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;
}

.contact-button {
    display: inline-block;

    padding: 12px 28px;

    border-radius: 6px;

    text-decoration: none;

    font-size: 16px;

    font-weight: 600;

    transition: 0.2s ease;
}

.contact-button.primary {
    background: #142B40;

    color: white !important;
}

.contact-button.secondary {
    background: white;

    color: #142B40 !important;

    border: 2px solid #142B40;
}

.contact-button:hover {
    transform: translateY(-2px);
}

.contact-button.primary:hover {
    background: #2563A6;
}

.contact-button.secondary:hover {
    background: #142B40;

    color: white !important;
}


/* =========================
   SKILLS
========================= */

.skills {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.skills span {
    background: #F8FAFC;

    border: 1px solid #CBD8E3;

    padding: 10px 16px;

    font-size: 14px;
}


/* =========================
   PAGE HEADER
========================= */

.page-header {
    width: min(100%, 1200px);

    margin: auto;

    padding: 120px 30px 80px;
}

.page-header h1 {
    font-size: 70px;

    line-height: 1;

    margin-bottom: 25px;
}

.page-header > p:last-child {
    max-width: 650px;

    font-size: 19px;
}


/* =========================
   EXPERIENCE PAGE
========================= */

.experience-item {
    display: grid;

    grid-template-columns: 200px minmax(0, 1fr);

    gap: 50px;

    padding: 60px 0;

    border-top: 1px solid #CBD8E3;
}

.experience-item h2 {
    font-size: 36px;
}

.experience-item h3 {
    font-size: 20px;

    color: #526574;

    font-weight: normal;

    margin-bottom: 25px;
}

.experience-item h4 {
    margin-top: 30px;

    margin-bottom: 10px;
}

.experience-item ul {
    padding-left: 20px;
}


/* =========================
   FSAE
========================= */

.project-introduction {
    width: 100%;

    margin-bottom: 60px;
}

.project-introduction h2 {
    font-size: 42px;

    margin-bottom: 20px;
}

.technical-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 25px;
}

.technical-grid > div {
    background: #F8FAFC;

    padding: 35px;

    border: 1px solid #CBD8E3;
}

.technical-grid h3 {
    margin-bottom: 10px;
}

.dark-section {
    max-width: none;

    background: #142B40;

    color: white;
}

.dark-section .section-heading,
.dark-section .card {
    max-width: 1140px;
}

.dark-section .section-heading {
    margin-left: auto;

    margin-right: auto;
}

.dark-section .cards {
    max-width: 1140px;

    margin: auto;
}

.dark-section .card {
    background: #1B3A55;

    border-color: #31536D;
}

.dark-section p {
    color: #C8D6E1;
}


/* =========================
   PROJECT LIST
========================= */

.project-list {
    display: flex;

    flex-direction: column;

    gap: 80px;
}

.project-large {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 60px;

    align-items: center;
}

.project-large h2 {
    font-size: 40px;

    margin-bottom: 20px;
}

.project-large .project-image {
    height: 350px;
}


/* =========================
   FOOTER
========================= */

footer {
    background: #142B40;

    color: white;

    padding: 50px 30px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 30px;
}

footer p {
    color: #AFC2D2;
}

.footer-links {
    display: flex;

    gap: 25px;

    flex-wrap: wrap;
}

.footer-links a:hover {
    color: #5FA0D5;
}


/* =========================
   RESUME
========================= */

.resume-pdf {
    width: min(100% - 8%, 1200px);

    margin: 50px auto;
}

.resume-pdf iframe {
    width: 100%;

    height: 1200px;

    border: none;
}


/* =========================
   CONTACT PAGE
========================= */

.contact-section {
    width: min(100%, 900px);

    margin: auto;

    padding: 60px 30px;
}

.contact-section h1 {
    font-size: 75px;

    line-height: 1;

    margin-bottom: 30px;
}

.contact-section > p {
    font-size: 20px;

    max-width: 650px;
}

.contact-list {
    margin-top: 50px;
}

.contact-list a {
    display: flex;

    justify-content: space-between;

    padding: 22px 0;

    border-top: 1px solid #CBD8E3;

    font-size: 18px;
}

.contact-list span {
    font-weight: bold;
}


/* =========================
   TABLET / SMALL DESKTOP
========================= */

@media (max-width: 1100px) {

    .navbar {
        padding-left: 20px;
        padding-right: 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .index-content {
        padding-left: 5%;
        padding-right: 5%;
    }

    .index-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /*
        Employment cards keep their grid structure.
        The logo area simply becomes slightly narrower
        as the screen gets smaller.
    */

    .index-experience1,
    .index-experience2,
    .index-experience3 {
        grid-template-columns: 26% minmax(0, 1fr);
    }

    .experience-img1,
    .experience-img2,
    .experience-img3 {
        padding-left: 25px;
        padding-right: 25px;
    }

    .experience-text1,
    .experience-text2,
    .experience-text3 {
        padding-left: 25px;
        padding-right: 25px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 800px) {

    .navbar {
        flex-direction: column;

        gap: 20px;

        text-align: center;
    }

    .nav-links {
        gap: 15px;

        flex-wrap: wrap;

        justify-content: center;
    }


    /* =====================
       HERO
    ===================== */

    .hero {
        min-height: 650px;

        flex-direction: column;

        text-align: center;

        padding: 60px 30px;
    }

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

    .hero img {
        width: 220px;
    }

    .eyebrow {
        margin-bottom: 30px;
    }

    .hero-buttons {
        justify-content: center;
    }


    /* =====================
       CONTENT
    ===================== */

    .index-main {
        padding: 25px 4%;
    }

    .index-content {
        padding: 20px 25px;
    }

    .index-content h2 {
        font-size: 20pt;
    }

    .index-content p {
        font-size: 16px;

        text-align: left;
    }


    /* =====================
       EXPERIENCE
    ===================== */

    .flex {
        flex-direction: column;

        align-items: flex-start;
    }

    /*
        On mobile the logo becomes a full-width
        black section above the employment text.
    */

    .index-experience1,
    .index-experience2,
    .index-experience3 {
        grid-template-columns: 1fr;

        gap: 0;

        padding: 0;
    }

    .experience-img1,
    .experience-img2,
    .experience-img3 {
        width: 100%;

        height: 110px;

        padding: 20px 40px;

        margin: 0;
    }

    .experience-text1,
    .experience-text2,
    .experience-text3 {
        width: 100%;

        padding: 20px 25px;
    }


    /* =====================
       PROJECTS
    ===================== */

    .index-container,
    .cards,
    .project-grid,
    .technical-grid,
    .project-large {
        grid-template-columns: 1fr;
    }

    .index-box {
        height: 500px;
    }


    /* =====================
       OTHER
    ===================== */

    .experience-item {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .page-header h1,
    .contact-section h1 {
        font-size: 50px;
    }

    footer {
        flex-direction: column;

        gap: 25px;

        text-align: center;
    }

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


/* =========================
   VERY SMALL SCREENS
========================= */

@media (max-width: 500px) {

    .nav-links {
        font-size: 13px;

        gap: 10px;
    }

    .hero h1 {
        font-size: 45px;
    }

    .hero img {
        width: 180px;
    }

    .index-content {
        padding: 15px;
    }

    .index-box {
        height: 480px;
    }

    .home-contact {
        padding: 70px 20px;
    }

    .home-contact-content h2 {
        font-size: 34px;
    }

    .experience-img1,
    .experience-img2,
    .experience-img3 {
        height: 100px;

        padding: 15px 30px;
    }
}