body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

/* Drawing gallery has lots of content — start from top so first row is visible */
body.gallery {
    align-items: flex-start;
}

.centered-container {
    background-color: rgba(255, 255, 255, 0.92);
    padding: 24px;
    text-align: center;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    border-radius: 4px;
}

/* Drawing gallery page is wider to fit the grid */
body.gallery .centered-container {
    max-width: 960px;
}

/* About page is wider to fit experience sections */
body.about .centered-container {
    max-width: 720px;
}

.centered-container h1 {
    margin-bottom: 10px;
}

.centered-container ul {
    list-style-type: none;
    padding: 0;
}

.centered-container li {
    margin-bottom: 10px;
}

/* Hyperlink styles */
.centered-container a {
    text-decoration: none;
    color: #333333;
    font-weight: normal;
    transition: all 0.3s ease;
}

/* Animated rainbow text on hover */
.centered-container a:hover {
    font-weight: bold;
    background-image: linear-gradient(
        90deg,
        #ff0000, #ff7f00, #ffd500, #00c853,
        #00b0ff, #3d5afe, #aa00ff, #ff0000
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: rainbow-shift 3s linear infinite;
}

@keyframes rainbow-shift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.centered-container a:focus-visible {
    outline: 2px solid #3d5afe;
    outline-offset: 2px;
}

/* About Me layout */
.centered-container .about-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.centered-container .photo-container {
    flex: 0 0 40%;
}

.centered-container .photo-container img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 4px;
}

.centered-container .text-container {
    flex: 1;
    text-align: left;
}

/* Drawing gallery grid */
body.gallery .centered-container {
    display: flex;
    flex-direction: column;
}

.drawing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 16px 0;
}

.drawing-container {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drawing-container a {
    display: block;
    width: 100%;
}

.drawing-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.drawing-container img:hover {
    transform: scale(1.03);
}

.drawing-container figcaption {
    margin-top: 8px;
    font-size: 0.9rem;
}

.back-link {
    margin-top: 24px;
}

/* Experience sections on About page */
.experience {
    text-align: left;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.experience h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.experience ul {
    list-style: disc;
    padding-left: 24px;
    margin: 4px 0 12px;
}

.experience li {
    margin-bottom: 4px;
}

.experience p {
    margin: 12px 0 4px;
}

/* Responsive 16:9 video embed (e.g. YouTube iframe) */
.video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 12px 0;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Mobile */
@media only screen and (max-width: 600px) {
    .centered-container .about-content {
        flex-direction: column;
        gap: 10px;
    }

    .centered-container .photo-container,
    .centered-container .text-container {
        width: 100%;
    }

    .centered-container .photo-container {
        display: flex;
        justify-content: center;
    }

    .drawing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
