/* =========================================
   GENERAL WEBSITE
   ========================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, #e8f3ff, transparent 35%),
        linear-gradient(135deg, #f7fbff, #eef5fa);

    color: #243746;
    line-height: 1.7;
}


/* =========================================
   HEADER
   ========================================= */

header {
    background-image:
        linear-gradient(
            rgba(10, 40, 55, 0.55),
            rgba(10, 40, 55, 0.55)
        ),
        url("images/kente.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: white;

    padding: 45px 20px 30px;

    text-align: center;

    position: relative;

    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

    padding: 45px 20px 30px;

    text-align: center;

    position: relative;

    overflow: hidden;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}


header::before {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.08);

    top: -120px;
    left: -80px;
}


header::after {
    content: "";

    position: absolute;

    width: 200px;
    height: 200px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    bottom: -120px;
    right: -50px;
}


.header-content {
    position: relative;
    z-index: 2;
}


.course-label {
    font-size: 13px;

    letter-spacing: 2px;

    margin-bottom: 10px;

    opacity: 0.85;
}


header h1 {
    font-size: 48px;

    margin: 5px 0;

    letter-spacing: 1px;
}


.header-subtitle {
    font-size: 18px;

    margin: 5px 0 28px;

    opacity: 0.9;
}


/* =========================================
   NAVIGATION
   ========================================= */

nav {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 12px;
}


nav a {
    color: white;

    text-decoration: none;

    padding: 10px 22px;

    border: 1px solid rgba(255, 255, 255, 0.45);

    border-radius: 30px;

    font-weight: bold;

    transition: all 0.3s ease;
}


nav a:hover,
nav a.active {
    background: white;

    color: #174b65;

    transform: translateY(-3px);

    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.15);
}


/* =========================================
   MAIN
   ========================================= */

main {
    max-width: 1100px;

    margin: 55px auto;

    padding: 0 25px;
}


/* =========================================
   SECTIONS
   ========================================= */

section {
    background: rgba(255, 255, 255, 0.92);

    border-radius: 20px;

    margin-bottom: 35px;

    padding: 45px;

    box-shadow: 0 12px 35px rgba(31, 70, 90, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.8);
}


/* =========================================
   HERO
   ========================================= */

.hero {
    display: grid;

    grid-template-columns: 1.5fr 1fr;

    align-items: center;

    gap: 50px;

    overflow: hidden;
}


.welcome {
    color: #287b9d;

    font-size: 14px;

    font-weight: bold;

    letter-spacing: 3px;
}


.hero h2 {
    color: #123c53;

    font-size: 42px;

    line-height: 1.2;

    margin: 10px 0 20px;
}


.hero p {
    font-size: 18px;

    color: #536b78;
}


.hero-buttons {
    margin-top: 30px;

    display: flex;

    gap: 15px;

    flex-wrap: wrap;
}


/* =========================================
   PROFILE IMAGE
   ========================================= */

.hero-image {
    text-align: center;
}


.profile-picture {
    width: 320px;

    height: 320px;

    object-fit: cover;

    border-radius: 50%;

    border: 6px solid white;

    box-shadow:
        0 0 0 4px #2b7896,
        0 15px 35px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}


.profile-picture:hover {
    transform: scale(1.08) rotate(2deg);

    box-shadow:
        0 0 0 7px #2b7896,
        0 20px 40px rgba(0, 0, 0, 0.25);
}


/* =========================================
   BUTTONS
   ========================================= */

.primary-button,
.secondary-button {
    display: inline-block;

    padding: 13px 24px;

    border-radius: 10px;

    text-decoration: none;

    font-weight: bold;

    transition: all 0.3s ease;
}


.primary-button {
    background: linear-gradient(135deg, #1a536e, #2e83a4);

    color: white;

    box-shadow: 0 6px 15px rgba(31, 99, 130, 0.25);
}


.secondary-button {
    background: white;

    color: #1d5c77;

    border: 2px solid #2c7897;
}


.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-4px);

    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}


/* =========================================
   SECTION HEADINGS
   ========================================= */

.section-heading {
    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}


.section-heading h2 {
    color: #153f55;

    font-size: 30px;

    margin: 0;
}


.section-number {
    color: white;

    background: #287b9d;

    width: 42px;

    height: 42px;

    border-radius: 50%;

    display: flex;

    justify-content: center;

    align-items: center;

    font-weight: bold;

    font-size: 14px;
}


/* =========================================
   ABOUT
   ========================================= */

.about-section p {
    font-size: 17px;
}


.about-section strong {
    color: #1e6c8b;
}


/* =========================================
   RESOURCE CARDS
   ========================================= */

.resource-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 22px;
}


.resource-card {
    padding: 28px;

    background: linear-gradient(145deg, #f7fbfd, #edf5f8);

    border-radius: 15px;

    border: 1px solid #dcebf1;

    transition: all 0.35s ease;
}


.resource-card:hover {
    transform: translateY(-8px);

    box-shadow: 0 15px 30px rgba(30, 80, 105, 0.15);

    border-color: #6faac0;
}


.card-icon {
    font-size: 35px;

    margin-bottom: 10px;
}


.resource-card h3 {
    color: #174b65;

    font-size: 21px;
}


.resource-card p {
    color: #5b707c;

    font-size: 15px;
}


.card-link {
    color: #1e6f91;

    text-decoration: none;

    font-weight: bold;
}


.card-link:hover {
    text-decoration: underline;
}


/* =========================================
   NEW FEATURE
   ========================================= */

.feature-section {
    border-left: 8px solid #2c7897;
}


.feature-box {
    display: flex;

    gap: 25px;

    align-items: flex-start;

    background: linear-gradient(135deg, #edf8fc, #f8fcfe);

    padding: 25px;

    border-radius: 15px;
}


.feature-icon {
    font-size: 40px;
}


.feature-box h3 {
    color: #174b65;

    margin-top: 0;
}


/* =========================================
   MESSAGE SECTION
   ========================================= */

.message-section {
    text-align: center;

    background:
        linear-gradient(135deg, #123c53, #287b9d);

    color: white;
}


.message-section h2 {
    color: white;

    font-size: 30px;
}


.message-section p {
    color: #e6f4f8;

    font-size: 18px;

    max-width: 650px;

    margin: 0 auto 25px;
}


.message-section .primary-button {
    background: white;

    color: #174b65;
}


/* =========================================
   FOOTER
   ========================================= */

footer {
    background: #102f44;

    color: white;

    text-align: center;

    padding: 40px 20px;

    margin-top: 50px;
}


footer h3 {
    margin: 0;

    font-size: 22px;
}


footer p {
    color: #c8dce5;
}


.footer-links {
    margin: 20px 0;
}


.footer-links a {
    color: white;

    text-decoration: none;

    margin: 0 12px;
}


.footer-links a:hover {
    text-decoration: underline;
}


.copyright {
    font-size: 13px;

    opacity: 0.7;
}


/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

@media (max-width: 800px) {

    header h1 {
        font-size: 38px;
    }


    .hero {
        grid-template-columns: 1fr;

        text-align: center;
    }


    .hero-buttons {
        justify-content: center;
    }


    .resource-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    main {
        padding: 0 15px;

        margin-top: 30px;
    }


    section {
        padding: 28px 22px;
    }


    header {
        padding: 35px 15px 25px;
    }


    header h1 {
        font-size: 32px;
    }


    .header-subtitle {
        font-size: 15px;
    }


    nav a {
        padding: 8px 14px;

        font-size: 14px;
    }


    .hero h2 {
        font-size: 32px;
    }


    .profile-picture {
        width: 150px;

        height: 150px;
    }


    .feature-box {
        flex-direction: column;
    }

}
/* =========================================
   AUTOMATIC FLIPPING PHOTO
   ========================================= */

.flip-card {
    width: 320px;
    height: 320px;
    margin: 30px auto;
    perspective: 1000px;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.flip-card-front img,
.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-back {
    transform: rotateY(180deg);
}
/* COLORFUL GHANAIAN KENTE BACKGROUND */
header {
    background-image: url("images/kente.jpg") !important;
    background-size: 450px auto;
    background-position: center 30px;
    background-repeat: repeat;
}

/* MAKE HEADER WRITING CLEARER */
header h1,
header h2,
header p {
    color: white;
    text-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.95),
        0 0 12px rgba(0, 0, 0, 0.85);
}

/* MAKE NAVIGATION WRITING CLEARER */
header nav a {
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: bold;
}
/* AUTOMATIC PHOTO SLIDESHOW */

.photo-slideshow {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 30px auto;
    border: 8px solid white;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.photo-slideshow img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    opacity: 0;
    animation: photoChange 16s infinite;
}

.photo-slideshow img:nth-child(1) {
    animation-delay: 0s;
}

.photo-slideshow img:nth-child(2) {
    animation-delay: 4s;
}

.photo-slideshow img:nth-child(3) {
    animation-delay: 8s;
}

.photo-slideshow img:nth-child(4) {
    animation-delay: 12s;
}

@keyframes photoChange {
    0%, 20% {
        opacity: 1;
    }

    25%, 95% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}
/* Small DY/DX book covers */

.books-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.books-gallery img {
    width: 150px;
    height: 210px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* Make the rotating profile pictures slightly smaller */

.photo-slideshow {
    width: 310px;
    height: 310px;
    max-width: 100%;
    margin: 20px auto;
    position: relative;
}

.photo-slideshow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Keep DY/DX book covers small */

.my-books,
.books-gallery {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
    flex-wrap: wrap;
}

.my-books img,
.books-gallery img {
    width: 180px;
    height: 260px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* TECHNOLOGY IMAGE - ASSIGNMENTS PAGE ONLY */

.assignment-title {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.assignment-title h1 {
    margin: 0;
}

.assignment-title img {
    width: 120px !important;
    height: 80px !important;
    max-width: 120px !important;
    object-fit: cover;
    border-radius: 10px;
}

/* Assignment 5 tables */

.assignment-five {
    margin-top: 45px;
}

.assignment-five h2 {
    color: #12344b;
    margin-bottom: 15px;
}

.assignment-five h3 {
    color: #17577b;
    margin-top: 35px;
    margin-bottom: 15px;
}

.resource-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 35px;
    background: white;
}

.resource-table th,
.resource-table td {
    border: 1px solid #d7e4ed;
    padding: 15px;
    text-align: left;
    vertical-align: top;
}

.resource-table th {
    background: #12344b;
    color: white;
}

.resource-table tr:nth-child(even) {
    background: #f0f7fb;
}

.resource-table a {
    color: #006eaa;
    font-weight: bold;
}

.resource-table a:hover {
    text-decoration: underline;
}

/* MATH 5010 Assignment Grid */
.assignment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.assignment-card {
    background: #eef5fa;
    border: 1px solid #d5e4ef;
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.assignment-card h3 {
    color: #15364c;
    margin: 0 0 15px;
}

.assignment-card a {
    color: #006b9b;
    font-weight: bold;
}

.assignment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Responsive layout */
@media (max-width: 800px) {
    .assignment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .assignment-grid {
        grid-template-columns: 1fr;
    }
}
/* Return Home Button */
.return-home {
    margin-top: 35px;
    text-align: center;
}

.return-home a {
    display: inline-block;
    background-color: #12364c;
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.return-home a:hover {
    background-color: #0876a3;
}