/*==============================================================*/
/* 1. Theme                                                     */
/* The red of the former Flower garden page, on warm neutrals.  */
/*==============================================================*/
:root {
    color-scheme: light dark;

    --color-background: #faf6f4;
    --color-surface: #ffffff;
    --color-text: #201a19;
    --color-text-muted: #625956;
    --color-border: #ebe2de;
    --color-brand: #8b1e1e;
    --color-brand-strong: #6e1515;
    --color-brand-soft: #f7e8e6;
    --color-accent: #c2410c;
    --color-on-brand: #ffffff;

    --shadow-card: 0 1px 2px rgb(32 26 25 / 5%), 0 10px 30px -12px rgb(32 26 25 / 14%);
    --shadow-card-hover: 0 2px 4px rgb(32 26 25 / 6%), 0 18px 40px -14px rgb(139 30 30 / 28%);

    --radius-card: 20px;
    --radius-icon: 16px;
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --content-width: 72rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #141111;
        --color-surface: #1d1918;
        --color-text: #f4efed;
        --color-text-muted: #b9afab;
        --color-border: #2f2826;
        --color-brand: #ee8a80;
        --color-brand-strong: #ffb3aa;
        --color-brand-soft: #34201e;
        --color-accent: #fdba74;
        --color-on-brand: #2a0d0b;

        --shadow-card: 0 1px 2px rgb(0 0 0 / 40%), 0 10px 30px -12px rgb(0 0 0 / 60%);
        --shadow-card-hover: 0 2px 4px rgb(0 0 0 / 45%), 0 18px 40px -14px rgb(238 138 128 / 22%);
    }
}


/*==============================================================*/
/* 2. Base                                                      */
/*==============================================================*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
}

:focus-visible {
    outline: 3px solid var(--color-brand);
    outline-offset: 3px;
    border-radius: 8px;
}

.container {
    width: min(100% - 2.5rem, var(--content-width));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Shown only when reached with the keyboard */
.skip-link {
    position: absolute;
    top: -4rem;
    left: 1rem;
    z-index: 20;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--color-on-brand);
    background: var(--color-brand);
}

.skip-link:focus {
    top: 1rem;
}


/*==============================================================*/
/* 3. Header                                                    */
/*==============================================================*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-background) 82%, transparent);
    backdrop-filter: blur(14px);
}

.site-header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.identity__photo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-brand-soft);
}

.site-header__navigation {
    display: flex;
    gap: 0.25rem;
}

.site-header__link {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.site-header__link:hover {
    color: var(--color-brand);
    background: var(--color-brand-soft);
}


/*==============================================================*/
/* 4. Hero                                                      */
/*==============================================================*/
.hero {
    padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem);
    background:
        radial-gradient(40rem 22rem at 12% -10%, var(--color-brand-soft), transparent 70%),
        radial-gradient(32rem 20rem at 95% 0%, color-mix(in srgb, var(--color-accent) 14%, transparent), transparent 70%);
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-brand);
    background: var(--color-surface);
}

/* A green dot: these projects are online */
.hero__eyebrow::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 4px rgb(22 163 74 / 18%);
}

.hero__title {
    max-width: 18ch;
    font-size: clamp(2.4rem, 4.5vw + 1rem, 4.25rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.hero__highlight {
    color: var(--color-brand);
    background: linear-gradient(110deg, var(--color-brand) 20%, var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero__lead {
    max-width: 44rem;
    margin-top: 1.5rem;
    font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.25rem);
    color: var(--color-text-muted);
}


/*==============================================================*/
/* 5. Projects                                                  */
/*==============================================================*/
.projects {
    padding-bottom: clamp(3.5rem, 8vw, 6rem);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.projects__empty {
    grid-column: 1 / -1;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-card);
    text-align: center;
    color: var(--color-text-muted);
}

.project {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--color-brand) 35%, var(--color-border));
    box-shadow: var(--shadow-card-hover);
}

.project__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* The initial stays behind the image: it shows when the project has no icon */
.project__icon {
    position: relative;
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    overflow: hidden;
    border-radius: var(--radius-icon);
    background: var(--color-brand-soft);
}

.project__initial {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-brand);
}

.project__icon-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-surface);
}

.project__name {
    font-size: 1.3rem;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.project__name-link {
    text-decoration: none;
    transition: color 0.2s ease;
}

.project__name-link:hover {
    color: var(--color-brand);
}

.project__description {
    flex: 1;
    color: var(--color-text-muted);
}

.project__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.project__link:hover {
    color: var(--color-brand);
    border-color: var(--color-brand);
}

/* The main page of the project stands out */
.project__links li:first-child .project__link {
    border-color: transparent;
    color: var(--color-on-brand);
    background: var(--color-brand);
}

.project__links li:first-child .project__link:hover {
    background: var(--color-brand-strong);
}

.project__link-arrow {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.project__link:hover .project__link-arrow {
    transform: translate(2px, -2px);
}


/*==============================================================*/
/* 6. Footer                                                    */
/*==============================================================*/
.site-footer {
    padding-block: 2.5rem 2rem;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.site-footer__content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.site-footer__about {
    max-width: 30rem;
}

.site-footer__name {
    font-weight: 700;
}

.site-footer__text {
    color: var(--color-text-muted);
}

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.socials__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.socials__link:hover {
    color: var(--color-brand);
    border-color: var(--color-brand);
    background: var(--color-brand-soft);
}

.socials__icon {
    width: 1.1rem;
    height: 1.1rem;
}

.site-footer__legal {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Inside the sentence, on the line of the text */
.site-footer__logo {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: -0.2em;
}


/*==============================================================*/
/* 7. Accessibility                                             */
/*==============================================================*/
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }

    .project:hover {
        transform: none;
    }
}
