/* =====================
   Global / Body
   ===================== */

body {
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
    color: #e0e0e0;
}

/* =====================
   Container
   ===================== */

.container {
    width: 900px;
    margin: 0 auto;
    padding: 0;
}

/* =====================
   Profile Photo
   ===================== */

.profile-photo {
    float: right;
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin: 4px 4px 16px 24px;
    border-radius: 50%;
    border: 4px solid #90caf9;
    padding: 0;
    display: block;
}

/* =====================
   Header
   ===================== */

header {
    text-align: center;
    padding: 48px 24px 32px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 32px;
}

h1 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-size: 2.8em;
    color: #ffffff;
    margin: 0 0 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.tagline {
    font-size: 1.05em;
    color: #90caf9;
    margin: 0;
    letter-spacing: 1px;
}

/* Banner with a top-left logo (used on the CIS515 tab pages) */

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.site-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.header-inner .header-text {
    text-align: center;
    flex: 1;
}

/* =====================
   Navigation
   ===================== */

nav {
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 0 16px;
    margin-bottom: 28px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

nav li {
    display: inline;
}

nav a {
    display: inline-block;
    text-decoration: none;
    color: #e0e0e0;
    font-weight: bold;
    padding: 12px 16px;
    letter-spacing: 0.5px;
}

nav a:hover,
nav a:focus {
    color: #90caf9;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Single "back to home" link banner nav (used on homework.html) */

.back-nav {
    margin-bottom: 28px;
}

.back-nav a {
    display: inline-block;
    color: #90caf9;
    font-weight: bold;
    text-decoration: none;
    padding: 10px 0;
}

.back-nav a:hover {
    text-decoration: underline;
}

/* =====================
   Main & Sections
   ===================== */

main {
    margin: 0;
    padding: 0;
}

section {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 28px 32px;
    margin-bottom: 24px;
}

/* =====================
   Headings
   ===================== */

h2 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #90caf9;
    font-size: 1.4em;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(144, 202, 249, 0.3);
}

h3 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #b0bec5;
    font-size: 1.05em;
    margin: 20px 0 8px;
    padding: 6px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

h4 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #cfd8dc;
    font-size: 0.95em;
    margin: 16px 0 6px;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* =====================
   Paragraphs & Links
   ===================== */

p {
    font-size: 1em;
    line-height: 1.7;
    color: #cfd8dc;
    margin: 8px 0;
}

a:link {
    color: #90caf9;
}

a:visited {
    color: #ce93d8;
}

a:hover {
    color: #ffffff;
    text-decoration: underline;
}

a:active {
    color: #ef9a9a;
}

/* =====================
   Project card links
   ===================== */

.project-link {
    display: block;
    background-color: rgba(144, 202, 249, 0.1);
    border: 1px solid rgba(144, 202, 249, 0.25);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0;
    color: #90caf9;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.project-link:hover {
    background-color: rgba(144, 202, 249, 0.2);
    color: #ffffff;
    text-decoration: none;
}

/* =====================
   Statistics table (about.html)
   ===================== */

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.stats-table caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    color: #90caf9;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.stats-table th,
.stats-table td {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 14px;
    text-align: left;
}

.stats-table th {
    background-color: rgba(144, 202, 249, 0.15);
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.stats-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.04);
}

/* =====================
   Forms (contact.html)
   ===================== */

.site-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #e0e0e0;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 1em;
    color: #e0e0e0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #8a97a3;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #90caf9;
    background-color: rgba(255, 255, 255, 0.12);
}

.required {
    color: #ef9a9a;
}

fieldset.form-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

fieldset.form-fieldset legend {
    font-weight: bold;
    padding: 0 6px;
    color: #e0e0e0;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.radio-group .option,
.checkbox-group .option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.radio-group label,
.checkbox-group label {
    font-weight: normal;
    color: #cfd8dc;
    margin: 0;
}

.btn-submit {
    background-color: #90caf9;
    color: #0f3460;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
}

.btn-submit:hover {
    background-color: #ffffff;
}

/* =====================
   Placeholder notice
   ===================== */

.placeholder-notice {
    background-color: rgba(239, 154, 154, 0.15);
    border: 1px dashed #ef9a9a;
    color: #ef9a9a;
    padding: 12px 16px;
    border-radius: 6px;
    font-weight: bold;
}

/* =====================
   Footer
   ===================== */

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    font-size: 0.85em;
    color: #78909c;
    margin: 4px 0;
}

footer a:link,
footer a:visited {
    color: #78909c;
}

footer a:hover {
    color: #90caf9;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    background-color: #90caf9;
    color: #0f3460;
    font-weight: bold;
    padding: 10px 16px;
    border-radius: 4px;
    z-index: 100;
}

.skip-link:focus {
    left: 16px;
}

a:focus-visible,
.project-link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
}

.skip-link:link,
.skip-link:visited {
    color: #0f3460;
}