/* ======================== //
// Bos Eriko Reyes (c) 2016 //
// ======================== */

/* ===================================== //
// ........ TABLE OF CONTENTS .......... //
// ..................................... //
// ..... I. Tokens ..................... //
// .... II. General Style .............. //
// ... III. Header Style ............... //
// .... IV. Welcome Screen Style ....... //
// ..... V. About Me Section Style ..... //
// .... VI. Profiles Section Style ..... //
// ... VII. Footer Style ............... //
// .. VIII. Motion ..................... //
// ..................................... //
// ===================================== */

/* ========= //
// I. Tokens //
// ========= */
:root{
    --paper: #F6F3EE;
    --ink: #1B1A19;
    --muted: #6B6660;
    --line: #DDD7CE;
    --accent: #E53A40;
    --accent-ink: #B52424;
    --display: 'Abril Fatface', Georgia, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --header-height: 64px;
    --gutter: clamp(20px, 5vw, 64px);
    --content: 1180px;
}
/* ========= */

/* ================= //
// II. General Style //
// ================= */
*,
*::before,
*::after{
    box-sizing: border-box;
}
html{
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}
body{
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}
img{
    display: block;
    max-width: 100%;
    height: auto;
}
figure{
    margin: 0;
}
h1,
h2{
    font-family: var(--display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1;
    margin: 0;
}
a{
    color: var(--accent-ink);
}
a:focus-visible,
button:focus-visible{
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
svg{
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}
.eyebrow{
    color: var(--accent-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    margin: 0 0 16px;
    text-transform: uppercase;
}
.visually-hidden{
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
.skip-link{
    background-color: var(--ink);
    color: #fff;
    left: 16px;
    padding: 8px 16px;
    position: absolute;
    top: -100px;
    z-index: 10;
}
.skip-link:focus{
    top: 16px;
}
/* ================= */

/* ================= //
// III. Header Style //
// ================= */
.site-header{
    align-items: center;
    background-color: rgba(246, 243, 238, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 24px;
    min-height: var(--header-height);
    padding: 0 var(--gutter);
    position: sticky;
    top: 0;
    z-index: 5;
    -webkit-backdrop-filter: saturate(1.4) blur(8px);
    backdrop-filter: saturate(1.4) blur(8px);
}
.logo{
    align-items: center;
    background-color: var(--accent);
    color: #fff;
    display: flex;
    flex: none;
    font-family: var(--display);
    font-size: 26px;
    height: 40px;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.2s ease-out;
    width: 40px;
}
.logo:hover{
    background-color: var(--accent-ink);
}
.main-nav{
    margin-left: auto;
}
.main-nav ul{
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav a{
    color: var(--ink);
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 6px 0;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
}
.main-nav a::after{
    background-color: var(--accent);
    bottom: 0;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease-out;
    width: 100%;
}
.main-nav a:hover::after,
.main-nav a[aria-current="true"]::after{
    transform: scaleX(1);
}
.nav-toggle{
    align-items: center;
    background: none;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    display: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 10px;
    letter-spacing: 0.12em;
    margin-left: auto;
    min-height: 44px;
    padding: 0 4px;
    text-transform: uppercase;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after{
    background-color: currentColor;
    display: block;
    height: 2px;
    position: relative;
    transition: transform 0.2s ease-out, background-color 0.2s ease-out;
    width: 20px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after{
    content: "";
    position: absolute;
}
.nav-toggle-bars::before{
    top: -6px;
}
.nav-toggle-bars::after{
    top: 6px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars{
    background-color: transparent;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before{
    transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after{
    transform: translateY(-6px) rotate(-45deg);
}
@media (max-width: 759px){
    .js .nav-toggle{
        display: flex;
    }
    .js .main-nav{
        background-color: var(--paper);
        border-bottom: 1px solid var(--line);
        display: none;
        left: 0;
        margin: 0;
        position: absolute;
        right: 0;
        top: 100%;
    }
    .js .main-nav.is-open{
        display: block;
    }
    .js .main-nav ul{
        flex-direction: column;
        gap: 0;
    }
    .main-nav ul{
        flex-wrap: wrap;
        gap: 0 16px;
    }
    .js .main-nav a{
        border-top: 1px solid var(--line);
        display: block;
        padding: 16px var(--gutter);
    }
    .js .main-nav a::after{
        display: none;
    }
    .js .main-nav a[aria-current="true"]{
        color: var(--accent-ink);
    }
}
/* ================= */

/* ======================= //
// IV. Welcome Screen Style //
// ======================= */
.hero{
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: max(520px, calc(100vh - var(--header-height)));
    min-height: max(520px, calc(100svh - var(--header-height)));
    overflow: hidden;
    padding: var(--gutter);
    position: relative;
}
.hero-image{
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center 35%;
    position: absolute;
    width: 100%;
}
.hero::before{
    background: linear-gradient(to top, rgba(18, 16, 15, 0.82) 0%, rgba(18, 16, 15, 0.35) 50%, rgba(18, 16, 15, 0.15) 100%);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}
.hero-content,
.hero-more{
    position: relative;
    z-index: 2;
}
.hero-content{
    max-width: var(--content);
    width: 100%;
}
.hero h1{
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.95;
}
.hero h1 span{
    display: block;
}
.hero h1 span::after{
    color: var(--accent);
    content: ".";
}
.hero-lede{
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(1.0625rem, 2vw, 1.375rem);
    margin: 24px 0 0;
    max-width: 32ch;
}
.hero-more{
    align-items: center;
    align-self: flex-end;
    color: #fff;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 8px;
    letter-spacing: 0.16em;
    margin-top: 40px;
    text-decoration: none;
    text-transform: uppercase;
}
.hero-more svg{
    height: 18px;
    transition: transform 0.2s ease-out;
    width: 18px;
}
.hero-more:hover svg{
    transform: translateY(3px);
}
/* ======================= */

/* ========================= //
// V. About Me Section Style //
// ========================= */
.about{
    padding: clamp(72px, 12vw, 160px) var(--gutter);
}
.about-inner{
    align-items: center;
    display: grid;
    gap: clamp(40px, 7vw, 96px);
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    margin: 0 auto;
    max-width: var(--content);
}
.about-portrait{
    margin-right: 20px;
    position: relative;
}
.about-portrait::before{
    background-color: var(--accent);
    content: "";
    inset: 20px -20px -20px 20px;
    position: absolute;
}
.about-portrait img{
    aspect-ratio: 1;
    object-fit: cover;
    position: relative;
    width: 100%;
}
.about h2{
    font-size: clamp(2.75rem, 6vw, 4.75rem);
    margin-bottom: 32px;
}
.about-body > p:not(.eyebrow):not(.about-mail){
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0 0 20px;
    max-width: 60ch;
}
.about-actions{
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin-top: 36px;
}
.button{
    background-color: var(--accent);
    color: #fff;
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 14px 28px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease-out;
}
.button:hover{
    background-color: var(--accent-ink);
}
.text-link{
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-decoration-thickness: 2px;
    text-transform: uppercase;
    text-underline-offset: 6px;
    transition: text-decoration-color 0.2s ease-out;
}
.text-link:hover{
    text-decoration-color: var(--accent);
}
.about-mail{
    color: var(--muted);
    font-size: 0.875rem;
    margin: 24px 0 0;
}
@media (max-width: 859px){
    .about-inner{
        grid-template-columns: minmax(0, 1fr);
    }
    .about-portrait{
        max-width: 280px;
    }
}
/* ========================= */

/* ========================== //
// VI. Profiles Section Style //
// ========================== */
.profiles{
    margin: 0 auto;
    max-width: calc(var(--content) + 2 * var(--gutter));
    padding: 0 var(--gutter) clamp(72px, 10vw, 140px);
}
.profile{
    align-items: center;
    border-top: 1px solid var(--line);
    display: grid;
    gap: clamp(32px, 6vw, 80px);
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    padding: clamp(48px, 7vw, 96px) 0;
}
.profile:nth-child(even) .profile-image{
    order: 2;
}
.profile-image{
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.profile-image img{
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease-out;
    width: 100%;
}
.profile:hover .profile-image img{
    transform: scale(1.03);
}
.profile-index{
    align-items: center;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    margin: 0 0 20px;
}
.profile-index span{
    color: var(--accent);
    font-family: var(--display);
    font-size: 1.25rem;
}
.profile-index .icon{
    fill: currentColor;
    height: 28px;
    stroke: none;
    width: 28px;
}
.profile h2{
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    margin-bottom: 20px;
}
.profile-body > p:not(.profile-index){
    color: #3D3A37;
    font-size: 1.125rem;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 42ch;
}
.profile-link{
    align-items: center;
    border-bottom: 2px solid var(--ink);
    color: var(--ink);
    display: inline-flex;
    font-size: 0.8125rem;
    font-weight: 700;
    gap: 8px;
    letter-spacing: 0.12em;
    padding-bottom: 6px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.profile-link svg{
    height: 16px;
    transition: transform 0.2s ease-out;
    width: 16px;
}
.profile-link:hover{
    border-color: var(--accent);
    color: var(--accent-ink);
}
.profile-link:hover svg{
    transform: translate(2px, -2px);
}
@media (max-width: 859px){
    .profile{
        grid-template-columns: minmax(0, 1fr);
    }
    .profile:nth-child(even) .profile-image{
        order: 0;
    }
}
/* ========================== */

/* ================== //
// VII. Footer Style //
// ================== */
.site-footer{
    background-color: var(--accent-ink);
    background-image: linear-gradient(rgba(181, 36, 36, 0.92), rgba(181, 36, 36, 0.92)), url("../graphics/footer-background.jpg");
    background-position: center;
    background-size: cover;
    color: #fff;
    padding: clamp(80px, 12vw, 160px) var(--gutter) 40px;
}
.footer-inner{
    margin: 0 auto;
    max-width: var(--content);
}
.site-footer .eyebrow{
    color: rgba(255, 255, 255, 0.8);
}
.footer-mail{
    color: #fff;
    display: inline-block;
    font-family: var(--display);
    font-size: clamp(2rem, 8vw, 6rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.12em;
    transition: text-decoration-color 0.2s ease-out;
}
.footer-mail:hover{
    text-decoration-color: #fff;
}
.site-footer a:focus-visible{
    outline-color: #fff;
}
.footer-meta{
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8125rem;
    margin: clamp(64px, 10vw, 120px) 0 0;
    padding-top: 24px;
}
/* ================== */

/* ================ //
// VIII. Motion //
// ================ */
.js .reveal{
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.js .reveal.is-visible{
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce){
    html{
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after{
        transition: none !important;
    }
    .js .reveal{
        opacity: 1;
        transform: none;
    }
}
/* ================ */
