/* UNIVERSAL STYLES */
:root {
    --margin: 32px;
    --maxWidth:1200px;
    --bgColor: #E6E6E6;
}

/* FONTS */
@font-face {
    font-family: 'ABCDiatypeRounded';
    src: url('/assets/fonts/ABCDiatypeRounded-Regular.woff2') format('woff2'),
        url('/assets/fonts/ABCDiatypeRounded-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ABCDiatypeRounded';
    src: url('/assets/fonts/ABCDiatypeRounded-RegularItalic.woff2') format('woff2'),
        url('/assets/fonts/ABCDiatypeRounded-RegularItalic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'ABCDiatypeRounded';
    src: url('/assets/fonts/ABCDiatypeRounded-Bold.woff2') format('woff2'),
        url('/assets/fonts/ABCDiatypeRounded-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'ABCDiatypeRounded';
    src: url('/assets/fonts/ABCDiatypeRounded-Black.woff2') format('woff2'),
        url('/assets/fonts/ABCDiatypeRounded-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
}


body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:var(--bgColor);

    font-family: 'ABCDiatypeRounded', Arial, sans-serif;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;

    line-height: 1.2;
}

* {
    box-sizing: border-box;
}

/* TYPOGRAPHIC STYLING */
strong, b {
    font-weight: 700;
}

i, em {
    font-style: italic;
}

p, h1, h2, h3 {
    margin: 0;
    padding: 0;
    max-width:100%;
}

h1 {
    font-size:8em;
    line-height:1em;
    text-align:center;
    font-weight: 700;
}

h2 {
    font-size: .67em;
    font-weight: 900;
}

h3 {
    font-size: .67em;
    font-weight: 700;

    margin: 1em 0 0 0;  /*Extra margin for h3 elements, used as subheads within info sections*/
}

p {
    hyphens: auto;
}

.unit, .column, .contactCV  {
    display: flex;
    flex-direction: column;
}

.unit, .contactCV {
    gap: .5em;
}

.home-content.unit {
    gap: calc(2*var(--margin)); /*Keep gap between .about and .extra-info same as between header and .about*/
}

.hidden {
    display:none;
}
.invisible {
    opacity: 0;
}

/* IMAGES & LINKS */
img {
    width:100%;
    height:auto;
    display:block;
    background: rgba(0, 0, 0, .1);
}

a {
    color:inherit;
}

a.transition {
    text-decoration: none;
}

a.transition:hover, a.transition.current, a.transition.error-link {
    text-decoration: underline;
}


/* IFRAMES */
iframe {
    /* Maintain aspect ratio and ensure it covers */
    width: 100vw;  /* fallback for Safari 14 and older browsers */
    width: 100dvw;
    height: 56.25vw; /* 16:9 aspect ratio (9 / 16 * 100) - fallback for Safari 14 and older browsers */
    height: 56.25dvw; /* 16:9 aspect ratio (9 / 16 * 100) */

    min-width: 177.78vh; /* 16:9 aspect ratio (16 / 9 * 100) - fallback for Safari 14 and older browsers */
    min-width: 177.78dvh; /* 16:9 aspect ratio (16 / 9 * 100) */
    min-height: 100vh; /* fallback for Safari 14 and older browsers */
    min-height: 100dvh;
    /* background:black; */
}

video {
    min-width: 100vw; /* fallback for Safari 14 and older browsers */
    min-width: 100dvw;
    min-height: 100vh; /* fallback for Safari 14 and older browsers */
    min-height: 100dvh;
}

/* CLIP */
.clip {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: circle(100% at center); /* Initial large circle */
    transition: clip-path 0.8s ease-in-out;
    background:var(--bgColor);
    z-index:100;

}

/* Active state: shrinks the mask */
.clip.active {
    clip-path: circle(0% at center); /* Full circle */
    position:absolute;
    top:0;
    left:0;
}

.clip.no-transition {
    transition: none !important;
}

/* CONTENT */
#content {
    width: 100vw;  /* fallback for Safari 14 and older browsers */
    width: 100dvw;
    height: 100vh; /* fallback for Safari 14 and older browsers */
    height: 100dvh;
    overflow-x: hidden;
    overflow-y:auto;
    /* background:pink; */
}

/* CONTAINERS / WRAPPERS */
.about-container, .works-container, .project-container, .home-container, .error-container {
    display:flex;
    flex-flow: row wrap;
    justify-content: center;
}

/* .wrapper is for all pages */
.wrapper {
    width: 100%;
    padding: var(--margin);
}

.home {
    max-width: 1400px;
}

.about, .works, .project, .error {
    max-width: var(--maxWidth);

    display:flex;
    flex-flow: row wrap;
    justify-content: center;
    align-content:flex-start;
}

.home-content, .works-content, .project-content, .about-content, .error-content {
    width: 100%;
}

/* NAV */
.nav, .nav-home {
    width:100%;
    padding-bottom: var(--margin);
    
    position:relative;

    display:flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

.nav-home {
    padding-bottom: calc(2*var(--margin));
}

.worksAbout a:first-of-type {
    margin-right: var(--margin);
}

/* MEDIA QUERIES */
@media (max-width: 800px) {
    :root {
        --margin: 24px;
        --maxWidth: none;
    }

    body, html {
        font-size: 18px;
    }
    
    h1 {
        font-size:5.5em;
    }
    
}

@media (orientation: portrait), (max-width: 800px) {
    /* To center the video horizontally */
    iframe {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}
