:root {
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
    --color-text: #4d443a;
    /* Dark, earthy brown */
    --color-heading: #3a3228;
    /* Even darker brown for headings */
    --color-background: #fdf6e3;
    /* Parchment paper */
    --color-accent: #8b4513;
    /* Saddle brown, for links/accents */
    --color-border: #d2b48c;
    /* Tan, for borders */
    --color-table-bg: rgba(245, 245, 220, 0.5);
    /* Faint beige */
    --color-table-header: #e0d6c3;
    --icon-size: 1em;
    /* For social icons */
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 2rem 1rem;
    line-height: 1.7;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--color-border);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 2rem 3rem;
}

h1 {
    font-family: var(--font-heading);
    text-align: center;
    color: var(--color-heading);
    font-size: 3rem;
    margin-top: 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5em;
    margin-bottom: 0.8em;
}

h2 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-size: 2.2rem;
    border-bottom: 1px solid var(--color-table-header);
    padding-bottom: 0.4em;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

blockquote {
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-style: italic;
    text-align: center;
    max-width: 80%;
    border: none;
    margin: 1rem auto;
    padding: 0;
    color: var(--color-text);
}

blockquote footer {
    font-style: normal;
    font-size: 1rem;
    color: #7d6f5f;
}

p {
    margin-bottom: 1.2em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95em;
    background-color: var(--color-table-bg);
    border: 1px solid var(--color-border);
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

thead th {
    background-color: var(--color-table-header);
    font-weight: 600;
    color: var(--color-heading);
}

tbody tr:hover {
    background-color: rgba(210, 180, 140, 0.3);
    /* Faint tan on hover */
}

td:first-child {
    font-weight: bold;
    color: var(--color-heading);
    width: 30%;
}

ul {
    list-style-type: disc;
    padding-left: 1.5em;
}

li {
    margin-bottom: 0.75em;
}

strong {
    font-weight: 700;
    color: var(--color-heading);
}

.infobox {
    float: right;
    width: 280px;
    margin: 0.5rem 0 1rem 2rem;
    padding: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-table-bg);
    font-size: 0.9em;
}

.infobox figure {
    margin: 0;
    padding: 0;
}

.infobox img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.infobox figcaption {
    text-align: center;
    font-style: italic;
    font-family: var(--font-heading);
    color: var(--color-heading);
}

.infobox img,
#initial-sketch img {
    transition: transform 0.3s ease-in-out;
}

.infobox img:hover,
#initial-sketch img:hover {
    transform: scale(1.5);
    cursor: pointer;
}

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-accent);
}

/* --- Icon Styling --- */
.artist-link {
    color: var(--color-heading);
    text-decoration: none;
    border-bottom: 1px dotted var(--color-heading);
}

.artist-link:hover {
    border-bottom-style: solid;
}

.social-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    vertical-align: -0.125em;
    /* Aligns icon nicely with text */
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
        line-height: 1.6;
    }

    .profile-container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .infobox {
        float: none;
        width: auto;
        margin: 2rem auto;
        max-width: 320px;
        /* Prevents it from being too wide on tablets */
    }

    /* Make tables more readable on small screens */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid var(--color-border);
        margin-bottom: 1rem;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        /* For the 'Profile/Background' table which has no header */
        border-top: 1px solid var(--color-border);
        position: relative;
        padding-left: 45%;
        /* Make space for the label */
        width: auto;
        white-space: normal;
        text-align: right;
        /* Align content to the right, opposite the label */
    }

    /* Add the label before each cell */
    td::before {
        content: attr(data-label);
        /* Use the data-label attribute we'll add via JS */
        position: absolute;
        left: 10px;
        width: 40%;
        padding-right: 10px;
        white-space: normal;
        text-align: left;
        font-weight: bold;
        color: var(--color-heading);
    }

    td:last-child {
        border-bottom: 0;
    }

    /* For key-value tables without a header, hide the first cell on mobile */
    .key-value-table td:first-child {
        display: none;
    }
}