@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Turret+Road:wght@800&display=swap');

@font-face {
    font-family: 'Byte Bounce';
    src: url('ByteBounce.ttf') format('truetype');
    font-display: swap;
}

:root {
    --primary-color: #131620;
    --secondary-color: #1a1e2a;
    --surface-color: #141822;
    --surface-color-alt: #0e1018;
    /* Pastel accents */
    --lavender:   #c4b5fd;
    --sky:        #93c5fd;
    --rose:       #fda4af;
    --mint:       #86efac;
    --amber:      #fde68a;
    /* Legacy aliases */
    --accent-orange: #c4b5fd;
    --accent-blue:   #93c5fd;
    --accent-purple: #fda4af;
    --accent-hover:  #ddd6fe;
    --text-color: #e2e4f0;
    --text-color-muted: #8892b0;
    --border-color: #222636;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(140deg, #0d0f14 0%, #0e1020 60%, #0f0d16 100%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#p5-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

header,
main,
footer {
    position: relative;
    z-index: 1;
}

header {
    background: rgba(13, 15, 22, 0.9);
    padding: 16px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #222636;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

header h1 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--lavender);
    font-family: 'Byte Bounce', 'Space Mono', 'Poppins', sans-serif;
}

nav ul {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 12px;
    list-style: none;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #222636;
    background: #131620;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.75em;
    letter-spacing: 0.25px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

nav ul li a:hover {
    background: rgba(196, 181, 253, 0.15);
    border-color: var(--lavender);
    color: var(--lavender);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

main {
    padding-top: 100px;
}

section {
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: -1;
}

h2 {
    text-align: center;
    font-size: clamp(5em, 5vw, 4em);
    margin-bottom: 0;
    color: var(--lavender);
    letter-spacing: 1px;
    font-family: 'Byte Bounce', 'Space Mono', 'Poppins', sans-serif;
}

h2::after {
    content: '';
    display: block;
    width: 34px;
    height: 3px;
    background: var(--lavender);
    margin: 7px auto 18px;
    border-radius: 2px;
    opacity: 0.7;
}

.hero h2::after {
    display: none;
}

/* Per-section h2 accent colors */
#career-objective h2 { color: var(--sky); }
#career-objective h2::after { background: var(--sky); }
#senior-design h2 { color: var(--rose); }
#senior-design h2::after { background: var(--rose); }
#research h2 { color: var(--mint); }
#research h2::after { background: var(--mint); }
#experience h2 { color: var(--amber); }
#experience h2::after { background: var(--amber); }
#resume h2 { color: var(--sky); }
#resume h2::after { background: var(--sky); }
#general-education h2 { color: var(--rose); }
#general-education h2::after { background: var(--rose); }
#cumulative-reflection h2 { color: var(--mint); }
#cumulative-reflection h2::after { background: var(--mint); }
#ethics-paper h2 { color: var(--amber); }
#ethics-paper h2::after { background: var(--amber); }

.content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.content-item {
    background: #131620;
    margin: 6px 0;
    padding: 18px 20px;
    border-radius: 10px;
    flex: 1 1 300px;
    max-width: 520px;
    width: 100%;
    text-align: left;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    border: 1px solid #222636;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.content-item:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 181, 253, 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(196, 181, 253, 0.1);
}

.content-item h3 {
    font-size: 1.05em;
    margin-bottom: 5px;
    color: var(--lavender);
    font-family: 'Poppins', sans-serif;
    line-height: 1.35;
}

.content-item h3 .meta {
    font-size: 0.72em;
    font-weight: 400;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0;
    vertical-align: middle;
    margin-left: 6px;
    color: var(--text-color-muted);
}

.content-item p {
    font-size: 0.88em;
    margin-bottom: 8px;
    color: var(--text-color-muted);
}

.btn {
    display: inline-block;
    text-decoration: none;
    background: var(--lavender);
    padding: 10px 22px;
    border-radius: 6px;
    color: #1a1428;
    transition: background-color 0.3s, transform 0.3s;
    font-weight: 700;
}

.btn:hover {
    background-color: var(--accent-hover);
    color: #1a1428;
    transform: translateY(-2px);
}

footer {
    background: #0d0f14;
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid #222636;
}

footer p {
    font-size: 0.9em;
    color: var(--text-color-muted);
}

.hero {
    max-width: 860px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px);
    border-radius: 20px;
    background: #131620;
    border: 1px solid #222636;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.hero-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.hero-copy {
    flex: 1 1 320px;
}

.hero-avatar {
    flex: 0 0 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--lavender);
    box-shadow: 0 0 0 6px rgba(196, 181, 253, 0.1), 0 12px 28px rgba(0, 0, 0, 0.5);
}

.hero h2 {
    font-size: clamp(2.4em, 6vw, 5.5em);
    margin-bottom: 6px;
    color: var(--lavender);
    font-family: 'Byte Bounce', 'Space Mono', 'Poppins', sans-serif;
}

.tagline {
    font-size: 1.05em;
    color: var(--sky);
    margin-bottom: 10px;
}

.intro {
    color: var(--text-color-muted);
    font-size: 0.92em;
    margin-bottom: 16px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.contact-grid .label {
    display: block;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    margin-bottom: 6px;
    color: var(--mint);
}

.contact-grid a,
.contact-grid span {
    font-size: 1em;
    color: var(--text-color);
}

.contact-grid a:hover {
    color: var(--accent-color);
}

.text-block {
    max-width: 900px;
    margin: 0 auto;
    background: #131620;
    padding: clamp(24px, 3vw, 40px) clamp(20px, 4vw, 48px);
    border-radius: 16px;
    border: 1px solid #222636;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.text-block p {
    color: var(--text-color-muted);
    margin-bottom: 12px;
}

.text-block h3,
.text-block h4 {
    color: var(--lavender);
    margin-bottom: 8px;
}

.text-block ul {
    margin-left: 20px;
    color: var(--text-color-muted);
}

.meta {
    color: var(--sky);
    font-size: 0.82em;
    margin-bottom: 8px;
}

.description {
    color: var(--text-color-muted);
}

.card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    margin-top: 2px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 9px;
    background: rgba(196, 181, 253, 0.08);
    border: 1px solid rgba(196, 181, 253, 0.28);
    border-radius: 4px;
    color: var(--lavender);
    font-size: 0.73em;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.18s, border-color 0.18s;
}

.project-link:hover {
    background: rgba(196, 181, 253, 0.18);
    border-color: rgba(196, 181, 253, 0.5);
}

.detail-group h4 {
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-color-muted);
    margin-bottom: 6px;
    font-weight: 700;
    opacity: 0.75;
}

.detail-group ul {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.detail-group ul li {
    background: rgba(134, 239, 172, 0.06);
    border: 1px solid rgba(134, 239, 172, 0.2);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.76em;
    color: var(--mint);
}

.resume-highlights {
    margin-top: 20px;
    margin-left: 20px;
    color: var(--text-color-muted);
}

.resume-highlights li {
    margin-bottom: 8px;
}

a[aria-disabled="true"] {
    pointer-events: none;
    color: rgba(150, 150, 150, 0.35);
}

.project-img-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid #222636;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
    display: block;
}

.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.project-gallery .project-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #222636;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.project-gallery .project-img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(14, 18, 32, 0.92);
}

.modal-content {
    background-color: #131620;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    height: 80%;
    border: 1px solid #222636;
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--lavender);
    text-decoration: none;
    cursor: pointer;
}

#pdf-container {
    width: 100%;
    height: calc(100% - 40px);
}

@media (max-width: 1024px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    nav {
        display: none;
        width: 100%;
        margin-top: 12px;
    }

    nav.active {
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    nav ul li a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 18px;
        font-size: 0.95em;
        letter-spacing: 0.4px;
        border-radius: 10px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    main {
        padding-top: 120px;
    }

    .content {
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .content-item {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero-layout {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-avatar {
        align-self: center;
    }

    .project-gallery {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .content-item {
        padding: 20px 16px;
    }

    .hero-avatar img {
        width: 130px;
        height: 130px;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }

    .project-img-hero {
        max-height: 160px;
    }
}