/*
    Name: Carolina Cherechinsky
    Course: Introduction to Web Design and Computer Principles
    Date: October 21, 2026
    Project: Assignment 05 - Vector Graphics
    Shared external stylesheet, updated with SVG roundel logo rules,
    hover/focus states and the custom showcase theme
*/

/* ===== Base & Typography ===== */

body {
    font-family: Georgia, serif;
    font-size: 16px;
    color: #2D211C;
    background-color: #FAF8F4;
    margin: 16px;
}

h1 {
    font-family: Georgia, serif;
    color: #4A3428;
    font-size: 40px;
    letter-spacing: 2px;
    border-bottom: 3px solid #DCEAF2;
    padding-bottom: 10px;
}

h2,
h3 {
    font-family: Georgia, serif;
    color: #4A3428;
    letter-spacing: 1px;
}

/* ===== Fluid Image Sizing ===== */

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

/* ===== Link Styles ===== */

a:link {
    color: #4A6572;
}

a:visited {
    color: #7A6255;
}

a:hover {
    color: #4A3428;
    text-decoration: underline;
}

a:focus,
a:active {
    color: #2D211C;
    background-color: #DCEAF2;
}

/* ===== Header with SVG Logo ===== */

/* Flexbox puts the roundel logo and the page title side by side,
   and lets the title wrap underneath on very narrow screens. */
header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

header h1 {
    flex: 1 1 250px;
    margin: 16px 0;
}

/* The link around the header logo (goes back to the portfolio home) */
.logo-link {
    display: inline-block;
    line-height: 0;
    border-radius: 8px;
}

/* Stop the general a:focus background from boxing in the logo */
.logo-link:focus,
.logo-link:active {
    background-color: transparent;
}

/* Header logo size - the viewBox keeps the proportions, CSS sets the width */
.roundel-logo {
    display: block;
    width: 72px;
    height: auto;
}

/* ===== SVG Roundel - Primary Theme (red, blue, white) ===== */

/* Hollow Ring Technique: no fill, only a thick stroke, so the
   page background shows through above and below the bar. */
.roundel-ring {
    fill: none;
    stroke: #DC241F;
    stroke-width: 30;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.roundel-bar {
    fill: #0019A8;
    transition: fill 0.3s ease;
}

.roundel-text {
    fill: #FFFFFF;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ===== SVG Interactivity (hover and keyboard focus) ===== */

/* Subtle change: the ring darkens and thickens slightly */
.logo-link:hover .roundel-ring,
.logo-link:focus-visible .roundel-ring {
    stroke: #A3170F;
    stroke-width: 34;
}

.logo-link:hover .roundel-bar,
.logo-link:focus-visible .roundel-bar {
    fill: #000F6B;
}

/* Clear keyboard focus outline around the logo link */
.logo-link:focus-visible {
    outline: 3px solid #4A3428;
    outline-offset: 4px;
}

/* ===== Vector Showcase Page ===== */

/* Striped frame so the transparent halves of the ring are visible */
.showcase-frame {
    margin: 30px 0;
    padding: 30px 16px;
    border: 1px solid #E8DED2;
    background-color: #FAF8F4;
    background-image: repeating-linear-gradient(
        45deg,
        #DCEAF2 0,
        #DCEAF2 12px,
        #FAF8F4 12px,
        #FAF8F4 24px
    );
}

/* Large standalone roundel - fluid, never wider than its container */
.roundel-large {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
}

.roundel-large:focus-visible {
    outline: 3px solid #4A3428;
    outline-offset: 6px;
}

.showcase-frame figcaption {
    margin-top: 20px;
    padding: 10px;
    background-color: #FAF8F4;
    text-align: center;
    font-style: italic;
}

/* ===== Custom Theme Override (showcase SVG only) =====
   The shapes have no colours in the HTML, so adding the class
   "custom-theme" to the large SVG lets these rules replace the
   red/blue/white palette. They are more specific than the primary
   rules above (class + class), so they win. Autumn palette:
   amber ring, dark brown bar, cream lettering. */

.custom-theme .roundel-ring {
    stroke: #D98E04;
    stroke-width: 26;
}

.custom-theme .roundel-bar {
    fill: #2D211C;
}

.custom-theme .roundel-text {
    fill: #FAF8F4;
    font-family: Georgia, serif;
    letter-spacing: 2px;
}

/* Hover/focus on the custom theme */
.custom-theme:hover .roundel-ring,
.custom-theme:focus-visible .roundel-ring {
    stroke: #4A6572;
    stroke-width: 32;
}

.custom-theme:hover .roundel-bar,
.custom-theme:focus-visible .roundel-bar {
    fill: #4A3428;
}

/* Code examples on the showcase page */
pre {
    background-color: #F1ECE4;
    color: #2D211C;
    border-left: 5px solid #DCEAF2;
    padding: 16px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== Navigation & Flexbox ===== */

nav {
    background-color: #DCEAF2;
    padding: 15px 20px;
}

/* Flexbox keeps the navigation links in one horizontal row. */
nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    font-weight: bold;
}

#main-nav {
    border-bottom: 2px solid #4A3428;
}

/* ===== Content Cards ===== */

.about-card {
    background-color: #DCEAF2;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #E8DED2;
}

.background-card {
    background-color: #FAF8F4;
    padding: 25px;
    margin: 30px 0;
    border-left: 5px solid #DCEAF2;
}

.interests-card {
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #E8DED2;
}

/* Rounded corners on card photos (sizing comes from the img rule above) */
.about-card img,
.background-card img,
.interests-card img {
    border-radius: 12px;
}

/* ===== Raster Graphics - Hero with CSS Background Image ===== */

.hero-container {
    background-image: url("/media/bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 60vh;
    padding: 30px 30px 0;
}

/* Object Fitting - cut-out keeps its proportions, never stretched */
.hero-container img {
    display: block;
    width: auto;
    max-height: 55vh;
    object-fit: contain;
    object-position: center bottom;
}

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

footer {
    background-color: #DCEAF2;
    color: #4A3428;
    padding: 20px;
    margin-top: 30px;
    border-top: 3px solid #4A3428;
}

footer a {
    color: #4A3428;
    font-weight: bold;
}

/* ===== Tablet View (481px and up) ===== */

@media (min-width: 481px) {
    body {
        margin: 24px;
    }

    .roundel-logo {
        width: 90px;
    }

    .showcase-frame {
        padding: 40px 30px;
    }

    .hero-container {
        min-height: 70vh;
        padding: 40px 40px 0;
    }

    .hero-container img {
        max-height: 65vh;
    }
}

/* ===== Desktop View (1025px and up) ===== */

@media (min-width: 1025px) {
    body {
        margin: 40px;
    }

    .roundel-logo {
        width: 110px;
    }

    .hero-container {
        min-height: 80vh;
        padding: 60px 60px 0;
    }

    .hero-container img {
        max-height: 75vh;
    }
}
