/* =====================================================
   CIS515 Full Stack Web Dev - Beatriz Paz
   M04 T3: Styles for index.html, about.html, contact.html
   M05: Bootstrap 5.3.3 is linked BEFORE this file, so these rules win.
   ===================================================== */

/* =====================
   Universal Styles
   ===================== */

/* A little breathing room on every element */
* {
    box-sizing: border-box;
    padding: 2px;
}

/* =====================
   Page Background & Text
   ===================== */

/* Global text styling: one font, margins, and padding for the whole site */
body {
    margin: 0;
    padding: 40px 20px;
    min-height: 100vh;
    font-family: 'Lato', Arial, Helvetica, sans-serif;
    color: #e0e0e0;
    background-color: #16213e;
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-attachment: fixed;
}

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

header {
    padding: 40px 24px 28px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 28px;
}

/* Layout: display flex puts the logo and the title side by side */
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

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

/* =====================
   Headings & Paragraphs
   ===================== */

h2 {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #ffcc80;
}

/* Class selector for the main page title (h1) */
.site-title {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    color: #ffcc80;
    font-size: 2.4em;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

h2 {
    font-size: 1.4em;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 204, 128, 0.3);
}

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

/* My own rule: makes my bio paragraphs (Home and About pages) stand out
   with brighter text, bigger size, extra line spacing, and an accent bar */
.bio {
    color: #e3f2fd;
    font-size: 1.1em;
    line-height: 1.9;
    border-left: 3px solid #ffcc80;
    padding-left: 14px;
}

/* =====================
   Links
   ===================== */

a:link {
    color: #90caf9;
}

a:visited {
    color: #ce93d8;
}

a:hover {
    color: #ffffff;
}

/* My own rule: turns the CIS515 Projects link into a full-width button */
.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 24px;
    color: #90caf9;
    font-weight: bold;
    text-decoration: none;
}

.project-link:hover {
    background-color: rgba(144, 202, 249, 0.2);
}

/* =====================
   Navigation Bar (Bootstrap navbar)
   ===================== */

/* Keep my navy nav box; Bootstrap handles the layout and the hamburger collapse */
.site-navbar {
    background-color: #0f3460;
    border: 1px solid rgba(144, 202, 249, 0.3);
    border-radius: 6px;
    margin-bottom: 20px;
}

.site-navbar .navbar-brand {
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #ffcc80;
}

/* Needs .site-navbar in front so it beats my global a:link / a:visited colors */
.site-navbar .nav-link {
    font-weight: bold;
    color: #e0e0e0;
    transition: color 0.2s;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
    color: #ffcc80;
}

/* The current page gets my gold accent */
.site-navbar .nav-link.active {
    color: #ffcc80;
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* =====================
   Main Content
   ===================== */

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;
}

/* =====================
   Image Borders
   ===================== */

img {
    border: 3px double #90caf9;
    border-radius: 8px;
}

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

/* School logo + credit line on index.html */
.school-logo {
    clear: both;
    margin: 24px 0 12px;
}

.school-logo figcaption {
    font-size: 0.85em;
    color: #90caf9;
    margin-top: 6px;
}

.profile-photo {
    float: right;
    width: 180px;
    height: 180px;
    object-fit: cover;
    margin: 4px 4px 16px 24px;
    border: 4px dashed #ffcc80;
    border-radius: 50%;
}

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

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

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

.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;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
}

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

/* =====================
   Contact Form (contact.html)
   ===================== */

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

/* Bootstrap .form-control / .form-select with my see-through dark look
   (the form has data-bs-theme="dark" so arrows, checkboxes, and error colors suit the dark page) */
.site-form .form-label,
.form-fieldset legend {
    font-weight: bold;
}

.site-form .form-control,
.site-form .form-select {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
}

.site-form .form-control:focus,
.site-form .form-select:focus {
    border-color: #ffcc80;
    box-shadow: 0 0 0 0.25rem rgba(255, 204, 128, 0.25);
}

.required {
    color: #ef9a9a;
}

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

/* Undo Bootstrap's reboot (which floats legends full width) so the legend sits on the border again */
.form-fieldset legend {
    float: none;
    width: auto;
    font-size: 1em;
    margin-bottom: 0;
    padding: 0 6px;
}

.form-fieldset .form-check-label {
    color: #cfd8dc;
}

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

/* ID selector: smaller text in a different font */
#site-footer {
    clear: both;
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-size: 0.8em;
}

#site-footer p {
    color: #78909c;
    margin: 4px 0;
}

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

#site-footer a:hover {
    color: #ffcc80;
}

/* =====================
   Small Screens
   ===================== */

/* Responsive: shrink the title and stack the photo on phone-size screens */
@media (max-width: 600px) {
    .site-title {
        font-size: 1.6em;
        letter-spacing: 1px;
    }

    section {
        padding: 20px 16px;
    }

    .profile-photo {
        float: none;
        display: block;
        margin: 0 auto 16px;
    }

    /* Tighter table so all four columns fit on a phone */
    .stats-table {
        font-size: 0.8em;
    }

    .stats-table th,
    .stats-table td {
        padding: 6px 4px;
    }

    .stats-table th {
        font-size: 0.75em;
        letter-spacing: 0;
    }
}

.color-btn {
  background-color: #0066cc;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin: 16px 0;
}

.color-btn:hover {
  background-color: #004080;
}