/* ----- Global Styles ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f6fa;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

/* ----- Navigation ----- */
nav {
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    transition: background 0.3s, color 0.3s;
    justify-content: space-between; 
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
    position: absolute;       
    left: 50%;              
    transform: translateX(-50%); 
}


nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

.logo {
    font-weight: bold;
}

/* ----- Sections ----- */
.section {
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
}

.center {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    justify-content: center;
}

/* ----- Cards ----- */
.card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 300px;
    transition: transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.intro-card {
    width: 400px;
    p#primary-nav{
        margin-bottom: 10px;
    }
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.links{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    font-size: small;
}

/* ----- Project Cards Layout ----- */
.card-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 10vh;
    gap: 5px;
}

.project-card h3 {
    margin-bottom: 10px;
}

.project-card p {
    flex-grow: 1;
}

.project-card .btn {
    align-self: center;
    margin-top: 10px;
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    background: #0077ff;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

.btn:hover {
    background: #005ad1;
}

.big-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
}

.btn-container {
    text-align: center;
    margin-top: 20px;
}

/* ----- PDF Container ----- */
.pdf-container {
    width: 100%;
    max-width: 750px;
    height: 1080px;
    margin: 0 auto 40px;
    border: 2px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: border 0.3s;
}

.pdf-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ----- Dark Mode ----- */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode nav {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode nav a,
body.dark-mode .logo {
    color: #e0e0e0;
}

body.dark-mode .card {
    background: #1e1e1e;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

body.dark-mode .btn {
    background: #0d6efd;
    color: white;
}

body.dark-mode .btn:hover {
    background: #0956b3;
}

body.dark-mode .pdf-container {
    border: 2px solid #333;
}

.theme-icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: transform 0.3s;
}

#dark-mode-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Hamburger menu button (hidden by default, shown on small screens) */
#menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 6px 8px;
    color: #333;
    transition: color 0.3s;
}

body.dark-mode #menu-toggle {
    color: #e0e0e0;
}

#dark-mode-toggle .theme-icon {
    transition: transform 0.3s;
}

#dark-mode-toggle:active .theme-icon {
    transform: rotate(720deg);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

body.dark-mode #back-to-top {
    background: #0d6efd;
}

#back-to-top:hover {
    background: #005ad1;
}

body.dark-mode #back-to-top:hover {
    background: #0956b3;
}

/* ----- Footer ----- */
footer {
    width: 100%;
    padding: 30px 20px;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 10px;
    font-family: Arial, sans-serif;
    transition: background 0.3s, color 0.3s;
}

footer p {
    margin: 0;
    text-align: center;
}

body.dark-mode footer {
    background: #1e1e1e;
    border-top: 1px solid #333;
    color: #e0e0e0;
}

/* ----- Responsive: Mobile Navigation ----- */
@media (max-width: 1000px) {
    nav {
        padding: 12px;
        align-items: center;
    }

    .logo {
        font-size: 1rem;
        margin-right: auto;
    }

    /* Hide the centered horizontal list on small screens; use a vertical stacked menu when shown */
    nav ul {
        position: static;
        left: auto;
        transform: none;
        display: none; /* hidden by default on mobile */
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
        background: transparent;
        padding: 0;
    }

    /* Utility class to show the mobile menu (toggle via JS adding/removing this class) */
    nav ul.show {
        display: flex;
        align-items: center;
    }

    nav li a {
        padding: 8px 12px;
    }

    /* Keep the dark mode button visible on the right */
    #dark-mode-toggle {
        order: 2;
        margin-left: 8px;
    }

    /* Show hamburger on small screens */
    #menu-toggle {
        display: block;
        order: 1;
        margin-right: 8px;
    }

    /* Optionally reduce card widths for small screens */
    .card, .intro-card {
        width: 100%;
        max-width: 360px;
    }

    /* Allow for side by side when width is sufficient */
    @media (min-width: 1000px) {
        .links {
            flex-direction: row;
            justify-content: space-between;
            gap: 0;
        }
}
}
