/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
    /* Colors — Warm Paper */
    --color-bg: #f8f9fa;
    --color-text: #2c2825;
    --color-text-secondary: #6d6560;
    --color-text-muted: #7a726b;
    --color-accent: #b5654a;
    --color-border: #d5d8dc;
    --color-social-hover-bg: #3d3835;
    --color-social-hover-text: #f8f9fa;
    --color-glow: rgba(181, 101, 74, 0.03);

    /* Typography */
    --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --font-body: "Karla", system-ui, -apple-system, sans-serif;

    /* Fluid sizes */
    --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
    --text-base: clamp(1rem, 0.925rem + 0.375vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.3rem);
    --text-display: clamp(2.5rem, 1.8rem + 3.5vw, 4.25rem);

    /* Spacing */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Layout */
    --content-max-width: 36rem;
    --page-padding: var(--space-lg);

    /* Animation */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --duration: 0.7s;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1a1816;
        --color-text: #e8e4de;
        --color-text-secondary: #b5afa6;
        --color-text-muted: #857e76;
        --color-accent: #d4845e;
        --color-border: #3a3530;
        --color-social-hover-bg: #e8e4de;
        --color-social-hover-text: #1a1816;
        --color-glow: rgba(212, 132, 94, 0.06);
    }
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: 1fr auto;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.7;
}

/* Subtle warm radial glow behind content */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 60% at 50% 35%,
        var(--color-glow),
        transparent
    );
    pointer-events: none;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--page-padding);
}

.content {
    max-width: var(--content-max-width);
    width: 100%;
}

/* --- Heading --- */

.content h1 {
    font-family: var(--font-display);
    font-size: var(--text-display);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-text);
    animation: reveal var(--duration) var(--ease-out-expo) both;
}

.content h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 2px;
    background-color: var(--color-accent);
    margin-block-start: var(--space-sm);
    border-radius: 1px;
    animation: line-grow var(--duration) var(--ease-out-expo) 0.2s both;
}

/* --- Bio --- */

.bio {
    margin-block-start: var(--space-2xl);
    animation: reveal var(--duration) var(--ease-out-expo) 0.15s both;
}

.bio p {
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
    margin-block-end: var(--space-md);
    text-align: justify;
    text-wrap: pretty;
}

.bio p:last-child {
    margin-block-end: 0;
}

.bio .cta {
    color: var(--color-text-muted);
    font-size: var(--text-base);
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.socials {
    display: flex;
    gap: var(--space-sm);
    margin-block-start: var(--space-2xl);
    animation: reveal var(--duration) var(--ease-out-expo) 0.3s both;
}

.socials a {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-secondary);
    transition:
        background-color 0.4s var(--ease-out-expo),
        color 0.4s var(--ease-out-expo),
        border-color 0.4s var(--ease-out-expo),
        transform 0.4s var(--ease-out-expo);
}

.socials a:hover {
    background-color: var(--color-social-hover-bg);
    color: var(--color-social-hover-text);
    border-color: var(--color-social-hover-bg);
    transform: translateY(-2px);
}

.socials a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

.socials a:active {
    transform: translateY(0);
}

.socials svg {
    width: 1.25rem;
    height: 1.25rem;
}

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

footer {
    padding: var(--space-2xl) var(--page-padding) var(--space-xl);
    animation: reveal var(--duration) var(--ease-out-expo) 0.45s both;
}

/* --- Quote --- */

.quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding-block-end: var(--space-lg);
    color: var(--color-text-muted);
}

.quote svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.quote blockquote {
    font-family: var(--font-display);
    font-size: var(--text-base);
    font-style: italic;
    font-weight: 300;
}

.quote cite {
    font-style: normal;
    white-space: nowrap;
}

/* --- Footer meta --- */

.footer-meta {
    text-align: center;
    padding-block-start: var(--space-lg);
    border-block-start: 1px solid var(--color-border);
}

.footer-meta .site-name {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

.footer-meta .credits {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-block-start: var(--space-2xs);
}

.footer-meta a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
    transition: color 0.3s ease;
}

.footer-meta a:hover {
    color: var(--color-accent);
}

.footer-meta a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes line-grow {
    from {
        width: 0;
    }
    to {
        width: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
