
/* From Josh W. Coeau */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
    box-sizing: border-box;
  }
  
  /* 2. Remove default margin */
  * {
    margin: 0;
  }
  
  body {
    /* 3. Add accessible line-height */
    line-height: 1.5;
    /* 4. Improve text rendering */
    -webkit-font-smoothing: antialiased;
  }
  
  /* 5. Improve media defaults */
  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }
  
  /* 6. Inherit fonts for form controls */
  input, button, textarea, select {
    font: inherit;
  }
  
  /* 7. Avoid text overflows */
  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
  
  /* 8. Improve line wrapping */
  p {
    text-wrap: pretty;
  }
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
  }

:root {
    --dark-blue: #03045E;
    --dark-brown: #474306;
    --light-yellow: #FBF8CC;
    --yellow: #F5EE84;

    --space: 1.5rem;

    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto
    }
}

html {
    font-size: 16px;

    @media (min-width:768px) {
        font-size: 20px;
    }
}

body {
    background-color: var(--light-yellow);
    font-family: "Poppins", sans-serif;
    color: var(--dark-blue);
    margin: 0 auto;
    max-width: 45rem;
}

img:not(.decorative) {
    height: 100%;
    width: 100%;
}

a {
    color: var(--dark-blue);
    font-weight: bold;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

a:focus {
    outline: 2px solid var(--dark-blue);
    outline-offset: 3px;
}

a:not(.fancy) {
    border-bottom: 2px solid transparent;
    transition: border-color 250ms ease-in-out;
}

a:not(.fancy):hover {
    border-color: var(--dark-blue);
}

a.fancy {
    display: inline-block;
}

a.fancy::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.1rem;
    background-color: var(--dark-blue);
    opacity: 1;
    transform: translate3d(-100%, 0, 0);
    transition: transform 250ms ease-in-out;
}

a.fancy:hover::after {
    transform: translate3d(0, 0, 0);
}

a.ext svg,
a.decorated svg {
    display: inline-block;
    vertical-align: middle;
    padding-bottom: 3px;
}   

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2rem;
}

h2.section {
    font-size: 3.25rem;
    font-weight: 900;
    text-transform: lowercase;
}

h2.section:after {
    content:".";
}

p, li {
    font-size: 1.25rem;
    line-height: 1.6;
}

button,
a.button {
    background-color: transparent;
    border: 1px solid var(--dark-brown);
    border-radius: 6px;
    color: var(--dark-brown);
    display: inline-block;
    padding: .75rem 1.5rem;
    transform: translate(-6px, -6px);
    transition: all 250ms ease;
}

button:hover,
a.button:hover {
    background-color: var(--dark-blue);
    color: var(--light-yellow);
    cursor: pointer;
}

.button-wrapper {
    background-color: var(--yellow);
    border-radius: 6px;
    width: fit-content;
}

header {
    align-items: center;
    background-color: var(--light-yellow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1rem 1rem 1rem;
    position: sticky;
    top: 0;
    transition: box-shadow 0.3s ease-in;
    z-index: 2;

    @media (min-width:768px) {
        flex-direction: row;
    }
}

header.sticky {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.identity a {
    font-size: 1.5rem;
    font-weight: 600;
}

nav { 
    display: flex;
    gap: 2.5rem;
}

nav a {
    font-size: 1.1rem;
    font-weight: normal;
}

.socials {
    display: flex;
    gap: 1.5rem;
}

.socials a {
    padding-bottom: 3px;
}

main {
    padding: 1rem;
}

.banner {
    --space: .5rem;
    padding: 3rem 0 6rem 0;
}

.banner--interior {
    --space: 1rem;
    padding: 3rem 0 2rem 0;
    overflow: hidden;
}

.banner .ani-step,
.banner--interior .ani-step {
    opacity: 0;
    transform: translateY(100%);
}

.banner h1,
.banner--interior h1 {
    line-height: 1.1;
    font-size: 3.5rem;
    font-weight: 900;
}

.banner .image,
.banner--interior .image {
    min-width: 15rem;
}

.banner .image-wrapper {
    padding: 1rem;
    position: relative;
    opacity: 0; /* animates in */
}

.banner--interior .image-wrapper {
    padding: 3rem 1rem 1rem 1rem;
    position: relative;
    opacity: 0; /* animates in */
}

.banner--interior .image-wrapper::before {
    background-image: url('img/crosses.svg');
    background-repeat: no-repeat;
    content: '';
    display: inline-block;
    height: 56px;
    position: absolute;
    right: 30px;
    top: 0px;
    transform: scale(1);
    width: 50px;
    z-index: 1;
}

.banner--interior .image-wrapper::before {
    top: -10px;
}

.banner--interior .image-wrapper::after {
    background-image: url('img/slashes.svg');
    background-repeat: no-repeat;
    bottom: 40px;
    content: '';
    display: inline-block;
    height: 30px;
    position: absolute;
    left: -20px;
    width: 104px;
    z-index: 1;
}

.banner--interior .image-wrapper::after {
    bottom: -30px;
    left: 10px;
}

.banner .crosses {
    position: absolute;
    right: 0;
}

.banner .slashes {
    bottom: 40px;
    position: absolute;
    left: -20px;
}

.banner img.headshot {
    mask-image: url('img/oval-mask.svg');
    mask-repeat: no-repeat;
    mask-size: contain;
}

.banner .decoration {
    display: inline-block;
    height: calc(100% - 2rem);
    width: calc(100% - 2rem);
    position: absolute;
    background-image: url('img/oval.svg');
    background-repeat: no-repeat;
    background-size: contain;
    top: 30px;
    right: 30px;
}

.banner button {
    transform: scale(.9);
}

footer {
    padding: 1rem 1rem 3rem 1rem;
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    @media (min-width:768px) {
        flex-direction: row;
        gap: 2rem;
    }
}

.contacts a {
    align-items: center;
    display: flex;
    gap: 3px;
}

.contacts a svg {
    margin: 2px;
    transition: transform 250ms ease-in-out;
}


/* https://www.a11yproject.com/posts/how-to-hide-content/ */
.visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.stack {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
  
.stack > * {
    margin-block: 0;
} 

.stack > * + * {
    margin-block-start: var(--space, 1.5rem);
}

.switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.switcher > * {
    flex-grow: 1;
    flex-basis: calc(( 30rem - 100%) * 999);
}

.switcher > :nth-last-child(n+ 3),
.switcher > :nth-last-child(n+ 3) ~ * {
    flex-basis: 100%;
}
