/* colors */
:root {
    --bg: #e0c7f0;
    --accent: #5e2b7e;
    --card: #eeeff2;
    --card-alt: #dfe1e7;
    --text: #1f1f2e;
}

/* fonts */
html {
    scroll-behavior: smooth;
}

body, html {
    margin: 0;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    color: var(--text);
    line-height: 1.5;
}

/* only html gets the background, so the snake canvas behind body still shows */
html {
    background-color: var(--bg);
}

a {
    color: var(--accent);
    font-weight: bold;
}

a:hover {
    color: var(--text);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 80%;
    max-width: 1200px;
    margin: 0 auto;
}

/* navigation */
.topnav {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--accent);
}

.topnav .container {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 12px 0;
}

.topnav a {
    color: var(--card);
    text-decoration: none;
}

.topnav a:hover {
    color: var(--bg);
    text-decoration: underline;
}

.topnav .brand {
    margin-right: auto;
    font-size: 26px;
}

/* sections */
#home {
    padding: 80px 0 40px;
    text-align: center;
}

#home h1 {
    font-size: 56px;
    margin: 0;
}

.tagline {
    color: var(--accent);
    font-size: 24px;
    margin: 8px 0 0;
}

section {
    padding: 32px 0;
    scroll-margin-top: 60px;
}

h2 {
    border-bottom: 1px solid var(--accent);
    padding-bottom: 8px;
}

.about-grid {
    display: flex;
    gap: 32px;
    align-items: center;
}

.about-grid p {
    flex: 2;
}

#csg-logo {
    flex: 1;
    margin: 0;
    text-align: center;
}

figcaption {
    font-size: 16px;
    color: var(--accent);
}

/* project cards */
.project {
    display: flex;
    gap: 32px;
    align-items: center;
    background-color: var(--card);
    border-top: 4px solid var(--accent);
    padding: 24px;
    margin-bottom: 32px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(94, 43, 126, 0.15);
}

.project:nth-of-type(even) {
    background-color: var(--card-alt);
}

.project figure {
    flex: 1;
    margin: 0;
}

.project-body {
    flex: 2;
}

.project h3 {
    margin-top: 0;
    font-size: 28px;
}

.project ul {
    list-style: none;
    padding: 0;
}

/* guitar videos */
.videos {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.video {
    flex: 3 1 400px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(94, 43, 126, 0.15);
}

.video.short {
    flex: 0 1 280px;
    aspect-ratio: 9 / 16;
}

.video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* art gallery: widths follow each painting's aspect ratio so they share one height */
.gallery {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 720px;  /* keeps the paintings ~230px tall on desktop */
    margin: 0 auto;
}

.gallery figure {
    flex: var(--ratio) 1 0;
    margin: 0;
    text-align: center;
}

.gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(94, 43, 126, 0.15);
    transition: transform 0.15s;
}

.gallery a:hover img {
    transform: scale(1.02);
}

.gallery figcaption {
    margin-top: 8px;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--accent);
    color: var(--card);
    text-decoration: none;
    border: 2px solid var(--text);
    transition: transform 0.1s;
}

.button:hover {
    color: var(--card);
    transform: translate(-2px, -2px);
}

.stars {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid var(--card);
}

#passion {
    border-top: 1px solid var(--accent);
    font-size: 32px;
    text-align: center;
    padding-bottom: 24px;
}

#passion .button {
    font-size: 20px;
}

footer {
    text-align: center;
    font-size: 16px;
    color: var(--accent);
    padding: 24px 0;
}

/* wandering snake (snake.js) */
#snake {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* phones */
@media (max-width: 700px) {
    body, html {
        font-size: 17px;
    }

    .container {
        width: auto;
        padding: 0 16px;
    }

    #home h1 {
        font-size: 36px;
    }

    .about-grid,
    .project,
    .gallery {
        flex-direction: column;
    }

    .gallery {
        align-items: center;
    }

    .gallery figure {
        flex: none;
        width: min(100%, 260px);
    }

    #passion {
        font-size: 24px;
    }
}
