/* Color palette */
:root {
    --ink: #1c2530;                 /* body text */
    --ink-soft: #4a5663;            /* secondary text */
    --header-bg: #14213d;           /* banner, footer (Oxford navy) */
    --header-ink: #ffffff;          /* text in banner and footer */
    --button-bg: #b08d57;           /* download and back-to-top buttons (muted gold) */
    --button-hover: #c29d65;
    --button-ink: #14213d;          /* text on buttons */
    --nav-active-line: #b08d57;     /* underline under the current menu item */
    --nav-bg: #ffffff;
    --nav-border: #dde3ea;
    --nav-ink: #243447;
    --nav-hover: #eef3f8;
    --rule: #d6dde5;                /* section dividers, research border */
    --table-border: #dde3ea;
    --table-head: #eef2f6;
    --table-stripe: #f8fafc;
    --table-hover: #eef3f8;
    --kctcs-accent: #1F4E79;        /* current Somerset / KCTCS content */
}

/* Base Styles */
body {
    font-family: 'Lora', serif;
    color: var(--ink);
    background-color: white;
    margin: 0;
    padding: 0;
    font-size: 18px; /* Adjusted for better readability on mobile */
}

.top-button {
    display: inline-block;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    background-color: var(--button-bg);
    color: var(--button-ink);
    border-radius: 5px;
    font-weight: bold;
}

html {
    scroll-behavior: smooth;
}

header, footer {
    background-color: var(--header-bg);
    color: var(--header-ink);
    text-align: center;
    padding: 1rem 0;
    line-height: 0.5;
}

#contact-info {
    margin-top: 2.25rem;
    color: var(--ink);
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

/* Top Navigation */
nav#topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 2px 6px rgba(27, 47, 69, 0.06);
}

nav#topnav ul {
    list-style: none;
    margin: 0 auto;
    padding: 0 16px;
    max-width: 1100px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav#topnav ul li {
    margin: 0;
}

nav#topnav a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 14px 13px 12px;
    color: var(--nav-ink);
    text-decoration: none;
    font-size: 15px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

nav#topnav a i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

nav#topnav a:hover {
    background-color: var(--nav-hover);
}

nav#topnav a.active {
    color: var(--header-bg);
    font-weight: bold;
    border-bottom-color: var(--nav-active-line);
}

/* Keep section headings clear of the sticky menu when jumping to them */
main section {
    scroll-margin-top: 64px;
}

/* Download Button Styles in Sidebar */
.download-nav-item {
    text-align: center; /* Center text in the cell */
    margin-top: auto; /* Pushes the download button to the bottom */
}

.download-button {
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    padding: 10px;
    display: block; /* Make button fill its container */
    text-align: center; /* Center the text */
}

.download-button i {
    margin-right: 5px; /* Space between icon and text */
}

/* Main Content Styles */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 50px 50px;
}

#banner {
    background-color: var(--header-bg);
    color: var(--header-ink);
    text-align: center;
    padding: 20px 0;
    font-size: 24px;
    font-weight: bold;
}

/* Button Styles */
.download-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--button-bg); /* Main color */
    color: var(--button-ink); /* Text color */
    border-radius: 25px; /* Rounded corners */
    font-size: 16px; /* Font size */
    font-weight: bold; /* Bold text */
    text-decoration: none; /* No underline */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth transitions */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Subtle shadow */
}

.download-button i {
    margin-right: 8px; /* Space between icon and text */
}

.download-button:hover {
    background-color: var(--button-hover); /* Lighter shade on hover */
    transform: translateY(-2px); /* Slight upward movement on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow effect on hover */
}


.spacer {
    height: 15px;
    width: 100%;
    clear: both;
}

/* Section Specific Styles */
#previous-teaching-appointments, #previous-teaching-experience, #education, #teaching-experience, #healthcare-experience, #humanitarian-work, #military-experience, #certifications {
    margin: 1em 0;
    line-height: 1.5;
    text-align: justify;
}

.tight-paragraph {
    margin-top: 0;
    margin-bottom: 0px;
    font-weight: normal;
}

/* Table Styles */
.courses-table {
    border: 1px solid var(--table-border);
    padding: 1px;
    line-height: 1.25;
    text-align: center;
    table-layout: fixed;
    font-size: 18px;
    width: 100%;
    margin: 0 auto;
    overflow-x: auto;
    border-collapse: collapse;
    font-family: 'Lora', sans-serif;
}

.courses-table th {
    background-color: var(--table-head);
    padding: 12px 8px;
    border: 1px solid var(--table-border);
    text-align: center;
    font-weight: bold;
}

.courses-table td {
    border: 1px solid var(--table-border);
    padding: 12px 8px;
    font-size: 16px;
    font-weight: normal;
    text-align: center;
    word-wrap: break-word;
}

.courses-table tr:nth-child(even) {
    background-color: var(--table-stripe);
}

.courses-table tr:hover {
    background-color: var(--table-hover);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .courses-table {
        font-size: 14px;
    }

    .courses-table th, .courses-table td {
        padding: 10px 5px;
    }

    /* Let columns size to their content so words don't split mid-word */
    .courses-table {
        table-layout: auto;
        width: 100%;
    }

    .courses-table td {
        word-wrap: normal;
        overflow-wrap: normal;
    }

    /* Phone layout for the menu is still to be refined; for now it scrolls sideways */
    nav#topnav ul {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 8px;
    }

    nav#topnav a {
        padding: 12px 10px 10px;
        font-size: 14px;
    }

    #previous-teaching-appointments, #previous-teaching-experience, #education, #teaching-experience, #healthcare-experience, #humanitarian-work, #military-experience, #certifications {
        text-align: left;
    }

    main {
        padding: 20px;
    }

    body {
        font-size: 16px;
    }

    .button {
        padding: 15px 30px;
        font-size: 18px;
    }

    header, footer {
        padding: 0.5rem 0;
    }

    #banner {
        padding: 10px 0;
        font-size: 18px;
    }

    #banner h1 {
        font-size: 24px;
        margin: 0.5em 0;
    }

    #banner h4 {
        font-size: 14px;
        margin: 0.5em 0;
    }
}

/* Research projects listed under a degree */
.research-label {
    margin-top: 0.6em;
}

.research-projects {
    margin: 0.6em 0 1.4em 1em;
    padding-left: 1em;
    border-left: 2px solid var(--rule);
}

.research-description {
    margin: 0.15em 0 0.75em;
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--ink-soft);
}

.research-projects .research-description:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .research-projects {
        margin-left: 0.25em;
        padding-left: 0.75em;
    }
}

/* Extra breathing room around the lines dividing sections */
main hr {
    margin: 2.5rem 0;
    border: none;
    border-top: 1px solid var(--rule);
}

/* Current Somerset Community College / KCTCS appointment accents */
.contact-title {
    font-size: 1.25em;
    font-weight: bold;
}

/* Email and phone under the name in the banner */
.hero-contact {
    margin: 0.4em 0 0;
    font-size: 17px;
    font-weight: normal;
    line-height: 1.4;
}

.hero-contact a {
    color: var(--header-ink);
    text-decoration: none;
}

.hero-contact a:hover {
    text-decoration: underline;
}

.kctcs-system {
    color: var(--kctcs-accent);
}

.kctcs-heading {
    color: var(--kctcs-accent);
}

.kctcs-entry .courses-table th {
    border-bottom: 2px solid var(--kctcs-accent);
}

.hr-custom {
    width: 50%;
    border: none;
    height: 1px;
    background-color: #000;
    margin: 0em;
}
