/* =====================================================
   main.css
   Things every page of the website will use:
   colors, text, nav bar, buttons, footer, accessibility
   ===================================================== */


/* ---------- Colors (change them here and they change everywhere) ---------- */
:root {
    --blue: #234466;
    --dark: #0A141E;
    --cyan: #00FFFF;
    --light-blue: #4B75FF;
    --white: #fff;
    --corner: 10px;
}


/* ---------- Page basics ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;   /* so the nav bar doesn't cover headings we jump to */
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: white;
    background: linear-gradient(180deg, var(--dark) 0%, var(--blue) 55%, var(--dark) 100%);
}

a {
    color: white;
    text-decoration: none;
}

h1 {
    margin: 0;
    font-size: 3rem;
    line-height: 1.15;
    color: var(--cyan);
}

h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.3;
}

/* little colored line under every h2 */
h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    margin-top: 16px;
    background: var(--cyan);
    border-radius: 2px;
}


/* ---------- Images (the size is locked, no matter the picture) ---------- */
img {
    width: 400px;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--corner);
}


/* ---------- Nav bar ---------- */
/* The header is the part that sticks to the top. It has to be the header
   and not the nav inside it, because sticky only works inside a tall parent. */
header {
    position: static;
    top: 0;
    z-index: 10;
    background: rgba(10, 20, 30, 0.85);
    backdrop-filter: blur(8px);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 32px;
}

.logo img {
    display: block;
    width: 64px;
    height: 48px;
}

.nav-links {
    display: flex;
    gap: 8px;
    margin: 0 auto 0 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 10px 16px;
    border-radius: var(--corner);
}

.nav-links a:hover {
    background: rgba(0, 255, 255, 0.15);
    color: var(--cyan);
}

/* the page we are on right now */
.nav-links a[aria-current="page"] {
    color: var(--cyan);
    font-weight: bold;
}


/* ---------- Search bar ---------- */
.search-bar {
    display: flex;
}

.search-bar input {
    min-height: 44px;
    padding: 0 14px;
    font-size: 1rem;
    background: white;
    color: var(--dark);
    border: none;
    border-radius: var(--corner) 0 0 var(--corner);
}

.search-bar button {
    border-radius: 0 var(--corner) var(--corner) 0;
}


/* ---------- Buttons ---------- */
button,
.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    font-size: 1rem;
    font-weight: bold;
    background: var(--cyan);
    color: var(--dark);
    border: none;
    border-radius: var(--corner);
    cursor: pointer;
}

button:hover,
.button:hover {
    background: white;
}


/* ---------- Footer ---------- */
footer {
    padding: 40px 32px;
    text-align: center;
}

footer p {
    margin: 0;
}


/* ---------- Accessibility ---------- */
/* thick cyan outline when using the keyboard */
:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

/* hidden on screen but still read by screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* "skip to content" link, only shows up when you press Tab */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 20;
    padding: 12px 20px;
    background: var(--cyan);
    color: var(--dark);
    font-weight: bold;
    border-radius: var(--corner);
}

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

/* no animations for people who turned them off on their computer */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}


/* ---------- Phones and small screens ---------- */
@media (max-width: 800px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    img {
        width: 100%;
    }

    .navbar {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .nav-links {
        order: 3;          /* links drop to their own row */
        width: 100%;
        flex-wrap: wrap;
    }
}

/* Everything above was from the template */

/* Profile page ------------------------------------------------------------------------ */

/* sections start hidden and profile.js reveals them, so the rules below that
   set display must not beat the hidden attribute */
[hidden] {
    display: none !important;
}

.profile {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.banner {
    background-color: var(--blue);
    height: 240px;
    border-bottom: 3px solid var(--cyan);
}

.profilehead {
    position: relative;
    margin-bottom: 40px;
    text-align: center;
}

/* the source for the image is set by profile.js */

.pfp {
    display: block;
    background-color: var(--dark);
    width: 230px;
    height: 230px;
    margin: -120px auto 0;
    border: 6px solid var(--cyan);
    border-radius: 50%;
    object-fit: cover;
}

/* initials shown when there is no usable picture */
.pfp-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 6rem;
    font-weight: bold;
    background-color: var(--cyan);
    color: var(--dark);
}

.name {
    padding-top: 20px;
    padding-bottom: 8px;
    overflow-wrap: anywhere;
}

/* program and graduation year */
.profilemeta {
    margin: 0;
    color: #6788AA;
    font-size: 1.4rem;
    font-style: italic;
}

.status {
    margin: 32px 0;
    text-align: center;
}

/* section blocks */

.section {
    display: block;
    background-color: var(--dark);
    padding: 40px 64px 50px;
    border-top: 2px solid var(--blue);
}

.bio {
    margin: 24px 0 0;
    padding: 10px;
    background-color: var(--blue);
    font-size: 1.3rem;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.note {
    margin: 32px 64px 0;
    font-size: 0.95rem;
}

.back {
    margin: 40px 64px 0;
}

.back a {
    color: var(--cyan);
    text-decoration: underline;
}

@media (max-width: 800px) {
    .section {
        padding: 32px 20px 40px;
    }

    .note,
    .back {
        margin-left: 20px;
        margin-right: 20px;
    }

    .pfp {
        width: 160px;
        height: 160px;
        margin-top: -80px;
    }

    .pfp-initials {
        font-size: 4rem;
    }
}
