:root {
    background-color: #1a1a1a;
    color: white;
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

/* TOPBAR */
#topbar {
    background: linear-gradient(90deg, rgba(0, 128, 220, 0.5) 0%, #0080dc 100%);
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    position: fixed;
    top: 0;
    z-index: 3;
    width: 100%;
    font-family: "Outfit";
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    height: 3rem;
}

#title-text-container {
    margin: 0;
}
#title-text {
    display: block;
    font-weight: bold;
    color: white;
    text-decoration: none;
    font-size: 2.3rem;
    margin-left: 0.5rem;
    background: linear-gradient(to left, #00ddb2, #00e0ff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
}
#title-text::after {
    content: "Nate Levin";
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    background: linear-gradient(to left, #b4fbec, #b5f6ff);
    filter: drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.25));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(0.25rem);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
#title-text:hover::after {
    opacity: 1;
    transform: translateY(0);
}

#links {
    font-size: clamp(1.7rem, 3.5vw, 2rem);
}
#links a {
    color: white;
    text-decoration: none;
    margin: 0 0.7rem;
    display: inline-block;
    position: relative;
    text-underline-offset: 0.1em;
}
#links a::after {
    content: "";
    position: absolute;
    inset: 0;

    background-image: linear-gradient(to right, white 0%, white 100%);
    background-repeat: repeat-x;
    background-size: 16px 2px;
    background-position: 0 120%;
    opacity: 0.1;

    transition: background-position 0.15s ease-out, opacity 0.3s ease-out;
}

#links a:hover::after {
    opacity: 1;
    background-position: 0 1.13em;
}

#hamburger {
    border: none;
    background-color: unset;
    cursor: pointer;
    display: none;
    color: white;
    margin-right: 0.5rem;
}
@media (min-width: 722px) {
    #title-text-container {
        position: unset !important;
        opacity: 1 !important;
    }
    #links {
        display: block !important;
    }
}
@media (max-width: 721px) {
    #hamburger {
        display: block;
    }
    #title-text-container {
        position: unset;
    }
    #links {
        display: none;
        font-size: clamp(1.4rem, 3.5vw, 2rem);
        grid-template-columns: 1fr 1fr;
        margin: 0 auto;
    }
}

/* HERO */
.hero {
    min-height: 90vh;
    position: relative;
}

.hero-bg {
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    height: 100vh;
    min-width: 100%;
    position: fixed;
    top: 0;
    right: 60%;
    transform: translateX(60%);
}
.hero-bg-container {
    overflow: hidden;
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    mask-image: linear-gradient(rgba(0, 0, 0, 1) 85%, rgba(0, 0, 0, 0) 100%);
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    mask-position: left top, left bottom;
    -webkit-mask-image: linear-gradient(
        rgba(0, 0, 0, 1) 85%,
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: left top, left bottom;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding-left: 3rem;

    height: 90vh;
}
.hero-title-container {
    position: relative;
    z-index: 2;
    transform: translateY(-10%);
    width: fit-content;
}
#hero-title {
    position: relative;
    font-size: min(12rem, 16vw, 16vh);
    text-shadow: 0px 3px 1px black;
    margin: 0;
    display: inline-block;
    white-space: nowrap;
}
#hero-title-highlight {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translate(2%, 2%) scale(1.1);
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: highlight-stroke 3s cubic-bezier(0.08, 0.84, 0.83, 0.98) forwards;
    animation-delay: 350ms;
    mix-blend-mode: color;
    z-index: -1;
}

@keyframes highlight-stroke {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.hero-text-container {
    z-index: 2;
}

#hero-tagline {
    font-size: min(2rem, 3vh);
    color: rgb(255, 255, 255, 0.83);
    text-shadow: 0px 1px 3px #000000;
    max-width: min(45rem, 60vw);
    margin: 0;
    position: relative;
    animation: tagline-in 0.5s ease-out forwards;
    animation-delay: 1000ms;
    transform: translateY(1rem);
    opacity: 0;
}
@keyframes tagline-in {
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

#hero-img-container {
    position: absolute;
    z-index: 1;
    top: 10%;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#hero-img {
    max-height: calc(100% - 5rem);
    max-width: 100%;

    pointer-events: none;
    position: absolute;
    bottom: 5rem;
    right: -15%;
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    animation: hero-in 0.5s ease-out forwards;
    animation-delay: 100ms;
    transform: translateX(1rem);
    opacity: 0;
}
@keyframes hero-in {
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* RECORD */
@keyframes record-spin {
    to {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}
.record {
    position: absolute;
    height: 120%;
    width: unset !important;
    top: 50%;
    left: 0%;
    transform: rotate(0deg) translate(-50%, -50%);
    transform-origin: top left;
    animation: record-spin 20s linear infinite;
}

/* SECTION  */
.section {
    padding: 2rem min(4vw, 2rem);
    padding-bottom: 0;
}
.section-heading {
    font-family: "Montserrat", sans-serif;
    font-size: 3rem;
    margin: 0;
    margin-bottom: 0.5rem;
    margin-left: 0.1rem;
}
.section-bar {
    content: "";
    display: block;
    height: 5px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.5);
}
.section-desc {
    color: #dadada;
    font-size: 1.3rem;
    max-width: 80ch;
}

/* CAROUSEL */
.img-carousel {
    display: flex;
    align-items: center;
    gap: max(2rem, 5vw);

    width: calc(100% - 4rem);
    overflow-x: auto;

    background: radial-gradient(at 100px 100px, #2d5de139, transparent), #121e3e;
    background-size: 100px 100px;
    box-shadow: 0px 0px 16px 1px #001063;
    padding: 2rem 2rem;
    margin: 2rem auto;
    animation: 3s carousel-bg infinite linear;
}
@keyframes carousel-bg {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100px 100px;
    }
}
.img-carousel::-webkit-scrollbar {
    background: transparent;
    height: 15px;
}
.img-carousel::-webkit-scrollbar-thumb {
    background-color: rgba(94, 101, 125, 0.5);
    border-radius: 10px;
    background-clip: padding-box;
    border: 3px solid rgba(0, 0, 0, 0);
    height: 10px;
}
.img-carousel.interacting::-webkit-scrollbar-thumb {
    background-color: rgb(104, 113, 141);
}
.carousel-img {
    height: 12rem;
    border: 4px solid #0066af;
    border-radius: 6px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.carousel-img:hover {
    box-shadow: 0px 8px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.3rem) scale(1.1);
}

/* TESTIMONIAL */
.testimonial {
    margin: auto;
    width: min(60ch, 80vw);
    margin: 3rem auto;
}
.testimonial:not(:first-child) {
    margin-top: 4rem;
}
.testimonial-text {
    background-color: rgb(255, 255, 255);
    border-radius: 12px;
    color: black;
    font-size: 1.5rem;
    padding: 1rem;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.2));
    transition: transform 0.2s, filter 0.2s;
}
.testimonial-text::after {
    content: "";
    display: block;
    height: 20px;
    width: 20px;
    background-color: inherit;
    border: inherit;
    position: absolute;
    bottom: -10px;
    left: calc(50% - 10px);
    clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
    transform: rotate(-45deg);
    border-radius: 0 0 0 0.25em;
}
.testimonial-text:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.2));
}
.testimonial-quote {
    margin: 0;
    padding-left: 1ch;
    position: relative;
}
.testimonial-quote::before {
    content: "“";
    color: rgba(0, 0, 0, 0.5);
    font-size: 2rem;
    position: absolute;
    left: 0;
    top: -0.1rem;
}
.testimonial-quote::after {
    content: "”";
    margin-left: 0.125rem;
    color: rgba(0, 0, 0, 0.25);
}
.testimonial-author {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
}
.testimonial-author-img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 100%;
}
.testimonial-author-name {
    display: inline-block;
    font-size: min(1.1rem, calc(0.7rem + 1vw));
}

#testimonials {
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.3) 3%,
        transparent 3%
    );
    background-size: 100px 100px;
    animation: dots 20s linear infinite alternate;
}
@keyframes dots {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 300px 0;
    }
}

/* LISTEN */
.listen-frame-container {
    display: flex;
    justify-content: center;
}
.listen-frame {
    max-width: 80rem;
    border-radius: 6px;
    transition: box-shadow 0.3s, transform 0.3s;
}
.listen-frame:hover {
    box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

/* CONTACT */
#contact {
    --box-size: 75px;
    --stroke-width: 2px;
    --stroke-color: rgba(255, 255, 255, 0.05);
    background: linear-gradient(#1a1a1a, transparent 100px),
        linear-gradient(
            to right,
            var(--stroke-color) var(--stroke-width),
            transparent var(--stroke-width)
        ),
        linear-gradient(
            to bottom,
            var(--stroke-color) var(--stroke-width),
            transparent var(--stroke-width)
        ),
        linear-gradient(#1a1a1a, rgb(42, 41, 44) 100px);
    background-size: 100% 100%, var(--box-size) var(--box-size),
        var(--box-size) var(--box-size), 100% 100%;
    animation: boxes 1s linear infinite forwards;
    padding-top: 6rem;
    padding-bottom: 2rem;
    position: relative;
}
@keyframes boxes {
    from {
        background-position: 0 0, 0px 0px, 0px 0px, 0 0;
    }
    to {
        background-position: 0 0, 0px var(--box-size), 0px var(--box-size), 0 0;
    }
}
.email-me-container {
    display: block;
    background: linear-gradient(white 0%, white 40%, transparent 60%);
    background-size: 8rem 10.3rem;
    background-position-y: -6rem;
    border-radius: 6px;
    position: relative;
    width: min(14.5rem, 90vw);
    height: 4.2rem;
    transition: background-position-y 0.25s ease-in-out,
        transform 0.5s ease-in-out, box-shadow 0.5s ease-out;
    box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.25);
}
.email-me-container:hover,
.email-me-container:has(> .email-me:focus-visible) {
    background-position-y: 0rem;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    transform: scale(1.1);
}
.email-me {
    background-color: rgb(16, 25, 237);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-family: inherit;
    font-size: 1.7rem;
    cursor: pointer;
    position: absolute;
    inset: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    text-decoration: none;
    border-radius: 4px;
}
.email-icon {
    width: 2.2rem;
    animation: email 4s infinite;
    animation-fill-mode: forwards;
}
@keyframes email {
    0% {
        transform: rotate(0) scale(1.1);
    }
    30% {
        transform: rotate(0);
    }
    70% {
        transform: rotate(360deg);
    }
    100% {
        transform: rotate(360deg) scale(1.1);
    }
}
.contact-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: auto;
    width: min(45rem, 90vw);
    flex-wrap: wrap;
    padding: 2rem 0;
}
.or {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.75);
    width: 4rem;
    text-align: center;
}
.email-form {
    background-color: #11122f;
    color: white;
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    font-size: 1.3rem;
    width: min(17.5rem, 70vw);
}
.form-item label,
.form-item input,
.form-item textarea {
    display: block;
}
.form-item label {
    margin-bottom: 0.4rem;
}
.form-item {
    transition: font-size 0.5s;
}
#message-container:has(> #message:focus) ~ .form-item,
#message-container:has(> #message:focus) ~ .form-item > .form-input {
    font-size: 0.7rem;
}
#message:focus {
    height: 9rem;
}
.form-input {
    font-size: 1.2rem;
    padding: 0.5rem 0.6rem;
    background: transparent;
    border: 1.5px solid #1019ed;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    font-weight: normal;
    transition: box-shadow 0.2s, border 0.2s, font-size 0.5s;
    outline: none;
    width: calc(100% - 1.5rem);
}
.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.form-input:focus {
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25);
    border-color: rgb(0, 119, 255);
}
#message {
    height: 6rem;
    transition: height 0.5s;
    resize: none;
    font-size: 0.9rem;
    box-sizing: border-box;
    width: 100%;
}
.form-send-container {
    display: flex;
    justify-content: center;
}
.form-send {
    display: inline-block;
    background-color: #1019ed;
    border: none;
    color: white;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.5rem;
    border-radius: 10px;
    padding: 0.3rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}
.form-send:hover,
.form-send:focus-visible {
    background-color: rgb(0, 68, 255);
}
#insta-link {
    margin-left: 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.21rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    transition: color 0.13s;
}
#insta-link:hover {
    color: rgba(255, 255, 255, 1);
}

/* FOOTER */
.footer {
    display: flex;
    justify-content: space-between;
    background-color: #3b3d41;
    box-shadow: 0px -1px 4px rgba(0, 0, 0, 0.05);
    font-size: calc(0.9rem + 0.3vw);
    padding: 0.3rem 0.5rem;
}
.back-to-top,
.footer-link {
    color: #dadada;
    text-decoration: none;
}
.footer-links {
    display: flex;
    gap: 0.7rem;
}

/* MEDIA QUERIES */
@media (max-width: 694px) {
    .contact-items {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    /* Mobile-only styles */
    .record {
        display: none;
    }
    .hero-content {
        padding-left: 0rem;
        margin: auto;
        width: fit-content;
    }
    #hero-img {
        max-width: 125%;
    }
    #insta-link {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 600px) and (min-height: 600px) {
    .hero-text-container {
        transform: translateY(-20%);
    }
}
