@import url('fonts/ibm-plex-sans/css/ibm-plex-sans-all.css');
@import url('fonts/ibm-plex-serif/css/ibm-plex-serif-all.css');

html {
    background: #DCE2E8;

    /* min, preferred fluid value, max */
    font-size: clamp(1rem, 0.875rem + 0.5vw, 1.2rem);
}

body {
    margin: 0;
    font-family: 'IBM Plex Sans', sans-serif;
    color: #222;
}

hr {
    margin: 2.5rem .2rem 2rem .2rem;
    background-color: none;
    border: .5px solid #D8D8D8;
}

main, footer {
    margin: 0 auto;
    margin: 0 2rem;
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
    max-width: 76rem;
    padding: .8rem 0 .8rem 0;
    border-bottom: 1px solid #D8D8D8;
}

.header .logo-container {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: inherit;
}

.header .logo-container .logo {
    display: flex;
    align-items: center;
    width: 1.8rem;
}

.header .logo-container .logo img {
    width: 100%;
    height: auto;
}

.header .logo-text {
    align-items: center;
    line-height: 1;
    font-size: .8rem;
    font-weight: 600;
    color: #393a3b;
}

.header .logo-text span {
    padding: .6rem 0 0 .2rem;
    font-weight: 400;
    font-size: .6rem;
    color: #555;
    font-family: 'IBM Plex Serif', 'IBM Plex Sans', serif;
}

.content-area {
    margin: 0 auto;
    margin-top: 4rem;
    max-width: 42rem;
}

.long-form {
    max-width: 32rem;
}

.splash {
    min-height: 56rem;
    padding-top: 4rem;
}

.hero {
    margin: 0 auto;
    margin-top: 2rem;
    max-width: 25rem;
    text-align: center;
}

.intro .lead {
    text-align: center;
}

.intro h1 {
    font-size: 2rem;
    font-weight: 400;
    font-family: 'IBM Plex Serif', 'IBM Plex Sans', serif;
}

.intro {
    margin: 0 auto;
    margin-top: 2rem;
    max-width: 25rem;
}

.intro p {
    font-family: 'IBM Plex Sans', sans-serif;
}

.intro .projects a {
    display: flex;
    color: #000;
    flex-direction: column;
    align-items: baseline;
    border-bottom: dotted lightgray 0px;
    text-decoration: none;
    font-size: .8rem;
}

.intro .projects a:hover {
    border-bottom: dotted darkgray 0px;
}

.intro .projects {
    margin: 0 auto;
    margin-top: 2rem;
    max-width: 25rem;
    text-align: left;
    line-height: 1.4em;
}

.intro .projects span {
    font-size: .8rem;
    color: #444;
    padding-left: 1rem;

}

/* Logo animation */
.logo-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    transition: transform 0.2s ease-in-out;
}

.splash .logo-container:hover,
.splash .logo-container:focus-visible {
    transform: rotate(-1deg);
}

.logo-container img {
    display: block;
    width: 10rem;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.logo-container .logo-outline {
    display: none;
}

/* Fade transition animations scoped to .fade-transitions */
.fade-transitions .logo-container .logo-outline {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: none;
    animation: outlineFade 4s ease-in-out forwards;
}

.fade-transitions .logo-container .logo-svg,
.fade-transitions .logo-container .logo-fade {
    width: 12.5rem;
    opacity: 0;
    animation: logoTransition 4s ease-in-out forwards, scaleDown 2s ease-in-out 4s forwards;
}

@keyframes outlineFade {
    0%, 20% {
        opacity: 1;
    }
    80%, 100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes logoTransition {
    0%, 20% {
        opacity: 0;
    }
    80%, 100% {
        opacity: 1;
    }
}

@keyframes scaleDown {
    0% {
        width: 12.5rem;
        max-width: 100%;
    }
    100% {
        width: 10rem;
    }
}

.fade-transitions .intro {
    opacity: 0;
    animation: fadeIn 3s ease-in 6s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-container .logo-outline {
        display: none !important;
    }
    .logo-container .logo-svg,
    .logo-container .logo-fade {
        opacity: 1 !important;
        width: 10rem !important;
        max-width: 10rem !important;
        animation: none !important;
    }
    .intro,
    .fade-transitions .intro {
        opacity: 1 !important;
        animation: none !important;
    }
}

footer {
    margin: 0 auto;
    max-width: 42rem;
    margin-top: 6rem;
    margin-bottom: 4rem;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #dbdbdb;
}

footer section {
    display: flex;
    gap: .8rem;
}

footer a, footer span {
    font-size: .8rem;
    color: #555;
}

footer a {
    text-decoration: underline dotted #555;
}

footer a:hover {
    color: #222;
    text-decoration: underline dotted #222;
}
