/* Base styles for Adam Shand site */

:root {
    --body-bg: #f5f5f5;
    --body-bg-image: url('/assets/images/white-stone.jpg');
    --card-bg: #ffffff;
    --card-bg-rgb: 255, 255, 255;
    --text-color: #1b1b1b;
    --secondary-text: #555555;
    --shadow-color: rgba(0, 0, 0, 0.12);
    --quote-color: #444444;
    --quote-link-color: #b58900;
    --quote-link-hover: #d97706;
    --radius-drawn-5: 24px;

    --title-mono: "MONO" 0;
    --title-casl: "CASL" 1;
    --title-wght: "wght" 800;
    --title-slnt: "slnt" 0;
    --title-CRSV: "CRSV" 0;

    --text-mono: "MONO" 0;
    --text-casl: "CASL" 1;
    --text-wght: "wght" 300;
    --text-slnt: "slnt" 0;
    --text-CRSV: "CRSV" 1;
}

@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #121212;
        --body-bg-image: url('/assets/images/dark-pattern.jpg');
        --card-bg: #1f1f1f;
        --card-bg-rgb: 31, 31, 31;
        --text-color: #f5f5f5;
        --secondary-text: #d4d4d4;
        --shadow-color: rgba(0, 0, 0, 0.6);
        --quote-color: #cccccc;
        --quote-link-color: #d4a017;
        --quote-link-hover: #f59e0b;
    }
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Recursive', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-variation-settings: var(--text-mono), var(--text-casl), var(--text-wght), var(--text-slnt), var(--text-CRSV);
    background-color: var(--body-bg);
    background-image: var(--body-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    padding: 40px;
    gap: 30px;
}

/* Business Card */
.business-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-drawn-5);
    box-shadow: 0 6px 30px var(--shadow-color);
    max-width: 780px;
    width: min(780px, 100%);
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.photo-section {
    flex: 0 0 40%;
    min-height: 320px;
    overflow: hidden;
}

.photo-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.content-section {
    flex: 1;
    padding: 40px;
}

.name {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-variation-settings: var(--title-mono), var(--title-casl), var(--title-wght), var(--title-slnt), var(--title-CRSV);
}

.bio {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--secondary-text);
    margin-bottom: 18px;
    text-align: justify;
    hyphens: auto;
    font-variation-settings: var(--text-mono), var(--text-casl), var(--text-wght), var(--text-slnt), var(--text-CRSV);
}

/* Contact Icons */
.contact-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-block: 0 1rem;
}

.contact-icons a,
.contact-icons a:hover {
    text-decoration: none;
    transition: transform 0.5s ease;
    display: inline-flex;
}

.contact-icons img {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
}

.contact-icons a:hover {
    transform: rotate(var(--rotate)) scale(var(--scale));
}

.emoji-loading {
    width: 2.5rem;
    height: 2.5rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.emoji-loading::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #888;
    border-radius: 50%;
    animation: grow 1.5s ease-in-out infinite;
}

@keyframes grow {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.8);
        opacity: 0.3;
    }
}

.emoji-loading img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.emoji-loading.loaded img {
    opacity: 1;
}

.emoji-loading.loaded::before {
    display: none;
}

/* Quote Section */
.quote-section {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    box-sizing: border-box;
}

.quote-content p,
.quote-aside p,
.quote-section p {
    display: inline;
    margin: 0;
}

.quote-section.loaded {
    opacity: 1;
}


.quote-content {
    --text-slnt: "slnt" -15;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--quote-color);
    font-variation-settings: var(--text-mono), var(--text-casl), var(--text-wght), var(--text-slnt), var(--text-CRSV);
    font-style: italic;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    word-break: break-word;
}

.quote-author {
    color: var(--quote-color);
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    word-break: break-word;
}

.quote-author::before {
    content: '— ';
}

.quote-loading {
    text-align: center;
    color: var(--secondary-text);
    font-size: 1rem;
    opacity: 0.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Quote links */
.quote-content a,
.quote-content a:visited,
.quote-aside a,
.quote-aside a:visited {
    color: var(--quote-link-color);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.quote-content a:hover,
.quote-aside a:hover {
    color: var(--quote-link-hover);
    text-decoration-color: currentColor;
}

/* Quote Page Card */
.quote-card {
    background-color: rgba(var(--card-bg-rgb), 0.48);
    border-radius: var(--radius-drawn-5);
    box-shadow: 0 6px 30px var(--shadow-color);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    max-width: min(1280px, 94vw);
    width: min(1280px, 94vw);
    padding: clamp(2rem, 4.5vmin, 5rem) clamp(1.5rem, 4vmin, 4rem);
    text-align: center;
}

.quote-card > *:last-child {
    margin-bottom: 0;
}

.quote-page .quote-card .quote-content {
    font-size: clamp(1.45rem, 0.8rem + 2.1vmin, 3.8rem);
    line-height: 1.14;
    text-shadow: none;
    margin-bottom: clamp(1rem, 1.8vmin, 1.75rem);
}

.quote-page .quote-card .quote-author {
    font-size: clamp(1.05rem, 0.82rem + 0.9vmin, 1.75rem);
    text-shadow: none;
    margin-bottom: 0;
}

.quote-page .quote-card .quote-aside {
    display: inline;
    margin-top: 0;
    font-size: 0.9em;
    opacity: 0.8;
}


/* Responsive */
@media (max-width: 720px) {
    body {
        padding: 20px;
    }

    .business-card {
        flex-direction: column;
        max-width: 460px;
    }

    .photo-section {
        flex: none;
        width: 100%;
        min-height: 250px;
    }

    .content-section {
        padding: 30px 25px;
    }

    .name {
        font-size: 1.8rem;
        text-align: center;
    }

    .contact-icons {
        justify-content: center;
    }

    .quote-content {
        font-size: 1.1rem;
    }

    .quote-card {
        width: min(100%, 1100px);
        padding: 30px 25px;
    }
}
