/* --------------------------------------- */
/* ----- Basic Setup ----- */
/* --------------------------------------- */

@font-face {
    font-family: 'Hk Grotesk';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/HKGrotesk-Regular.woff') format('woff');
    font-display: swap;
}

@font-face {
    font-family: 'Jost';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/Jost-Regular.ttf') format('truetype');
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

:root {
    --font-size-small: 1.8rem;
    --font-size-normal: 2.2rem;
    --font-size-medium: 2.8rem;
    --font-size-medium-1: 3.6rem;
    --font-size-large: 5.7rem;
    --font-size-huge: 7.5rem;
    --font-stack: 'Hk Grotesk', sans-serif;

    --line-height-normal: 1.7;
    --line-height-small: 1.2;

    --black: linear-gradient(rgba(35, 10, 10, 1), rgb(0, 0, 0));
    --blue: #156fffcc;
    --blue-solid: #156fff;
    --white: #f0e9f2;
    --white-1: #e5e5e6da;

    --container-max-width: 1180px;
    --container-normal-width: 800px;
    --container-medium-width: 700px;
    --container-small-width: 500px;

    --gutter-huge: 6rem;
    --gutter-medium: 5rem;
    --gutter-normal: 3rem;
    --gutter-small-1: 2.5rem;
    --gutter-small: 2rem;

    --border-light: 1px solid rgb(36, 35, 35);
}

html {
    font-size: 62.5%; /* (16/10)*100 = 62.5% => 1rem = 10px */
    box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media(max-width: 1000px) {
    html {
        font-size: 52%;
    }
}

body {
    font-size: var(--font-size-small);
    font-family: var(--font-stack);
    font-weight: 400;
    color: var(--white-1);
    line-height: var(--line-height-normal);
    background: var(--black);
    overflow-x: hidden;
}

.row {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

@media(max-width: 1340px) {
    .row {
        max-width: 1100px;
    }
}

@media(max-width: 1240px) {
    .row {
        padding: 0 var(--gutter-medium);
    }
}

@media(max-width: 600px) {
    .row {
        padding: 0 var(--gutter-small);
    }
}

section {
    padding: var(--gutter-huge) 0;
    border-bottom: var(--border-light);
    position: relative;
}

img {
    object-fit: contain;
    max-width: 100%;
}

/* --------------------------------------- */
/* ----- Headlines and Paragraphs ----- */
/* --------------------------------------- */

h1,
h2,
h3 {
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    line-height: var(--line-height-small);
    color: var(--white);
}

.heading-primary {
    line-height: 1;
    font-size: var(--font-size-huge);
    font-weight: 400;
    background: linear-gradient(
        90deg,
        var(--white) 0%,
        var(--white) 35%,
        #4dabff 50%,
        var(--white) 65%,
        var(--white) 100%
    );
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hero-shimmer 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

@media(max-width: 900px) {
    .heading-primary {
        font-size: 6.5rem;
    }
}

h2 {
    font-size: var(--font-size-large);
    margin-bottom: var(--gutter-medium);
}

h2::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: var(--blue);
    margin: var(--gutter-small) 0;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

h3 {
    font-size: var(--font-size-medium-1);
    margin-bottom: var(--gutter-small);
}

@media(max-width: 500px) {
    .heading-primary {
        font-size: var(--font-size-large);
    }

    h2 {
        font-size: var(--font-size-medium-1);
    }

    h3 {
        font-size: var(--font-size-medium);
    }
}

p {
    margin: var(--gutter-small-1) 0;
}

@media(max-width: 900px) {
    p {
        max-width: var(--container-small-width);
    }
}

p em {
    color: #b3d6ff;
}

/* --------------------------------------- */
/* ----- Buttons and Links ----- */
/* --------------------------------------- */

a {
    color: var(--white);
    font-weight: 400;
    font-family: 'Jost', sans-serif;
    transition: all .2s;
    outline: 2px solid transparent;
    position: relative;
    text-decoration: none;
}

::-moz-focus-inner {
    border: 0;
}

button:focus,
a:focus {
    outline: 2px solid var(--blue);
}

body:not(.user-is-tabbing) button:focus,
body:not(.user-is-tabbing) a:focus {
    outline: none;
}

.link:hover {
    color: var(--blue);
}

.btn {
    position: relative;
    display: inline-block;
    padding: 1rem 4.2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--blue);
    font-weight: 400;
}

.btn:focus {
    outline: none;
}

.btn::after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 100%;
    background: var(--white);
    height: 100%;
    z-index: -1;
    transition: all 0.2s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.btn:hover::after,
.btn:focus::after {
    right: 0;
    background: var(--blue);
}

.btn--blue {
    background: var(--blue);
    transition: all 0.2s;
}

.btn--blue::after {
    display: none;
}

.btn--blue:hover,
.btn--blue:focus {
    background: transparent;
}

br {
    display: block;
    margin: 10px 0;
}

/* ----- Skip Link ----- */

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: .8rem 1.6rem;
    background: var(--blue-solid);
    color: var(--white);
    border-radius: 0 0 4px 4px;
    z-index: 999;
    transition: top 0.2s;
    font-family: 'Jost', sans-serif;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--white);
}

/* ----- Back to Top ----- */

.back-to-top {
    position: fixed;
    bottom: 4rem;
    right: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 5.5rem;
    width: 5.5rem;
    background-color: var(--blue);
    border-radius: 50%;
    z-index: 10;
    visibility: hidden;
    transition: all .4s;
    box-shadow: 0 4px 20px rgba(21, 111, 255, 0.3);
}

.back-to-top:hover {
    background-color: var(--blue-solid);
    box-shadow: 0 6px 28px rgba(21, 111, 255, 0.5);
    transform: scale(1.08);
}

.back-to-top_image {
    height: 70%;
}

@media(max-width: 900px) {
    .back-to-top {
        right: 2rem;
    }
}

@media(max-width: 500px) {
    .back-to-top {
        right: 1rem;
    }
}

/* --------------------------------------- */
/* ----- Navigation ----- */
/* --------------------------------------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--gutter-normal) 0;
    transition: background 0.35s ease, padding 0.35s ease, box-shadow 0.35s ease;
}

.nav.scrolled {
    background: rgba(8, 3, 3, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 1.4rem 0;
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.5);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav_logo {
    font-family: 'Jost', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.25em;
    color: var(--white);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
}

.nav_logo:hover {
    opacity: 1;
    color: var(--white);
}

.nav_items {
    display: flex;
    list-style: none;
    gap: var(--gutter-medium);
}

.nav_link {
    position: relative;
    display: inline-block;
    padding: 1rem 0;
    text-decoration: none;
    color: inherit;
    transition: color .2s;
}

.nav_link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 100%;
    display: inline-block;
    height: 2px;
    background: var(--blue);
    transition: right 0.25s cubic-bezier(1, 0.68, 0.16, 0.9);
}

.nav_link:hover {
    color: var(--blue);
}

.nav_link:hover::after {
    right: 0;
}

/* ----- Mobile Nav Toggle ----- */

.nav_toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2.8rem;
    height: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav_toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav.nav-open .nav_toggle-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav.nav-open .nav_toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav.nav-open .nav_toggle-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media(max-width: 600px) {
    .nav_toggle {
        display: flex;
    }

    .nav_items {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: rgba(8, 3, 3, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: var(--gutter-small) var(--gutter-normal);
        border-top: var(--border-light);
    }

    .nav.nav-open .nav_items {
        display: flex;
    }

    .nav_item {
        padding: 1.4rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav_item:last-child {
        border-bottom: none;
    }
}

@media(max-width: 400px) {
    .nav_items {
        gap: var(--gutter-normal);
    }
}

@media(max-width: 300px) {
    .nav {
        font-size: var(--font-size-small);
    }
}

/* --------------------------------------- */
/* ----- Header ----- */
/* --------------------------------------- */

.header {
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(38, 10, 10, 1)), url('../images/header.gif');
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-size: var(--font-size-normal);
}

.header_text {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
}

.header_text p {
    margin: 1.5rem 0 3.5rem;
    max-width: var(--container-medium-width);
    font-family: 'Jost', sans-serif;
    font-size: var(--font-size-medium);
}

@media(max-width: 500px) {
    .header {
        text-align: center;
    }

    .header_text p {
        transform: scale(.8);
    }
}

/* --------------------------------------- */
/* ----- Scroll Animations ----- */
/* --------------------------------------- */

[data-animate] {
    opacity: 0;
    transform: translateY(2.4rem);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------- */
/* ----- Work ----- */
/* --------------------------------------- */

.work_box {
    display: flex;
    align-items: center;
    padding: var(--gutter-normal) var(--gutter-medium);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.work_box:hover {
    background: rgba(21, 111, 255, 0.04);
    border-color: rgba(21, 111, 255, 0.2);
    box-shadow: 0 8px 40px rgba(21, 111, 255, 0.06);
}

@media(max-width: 900px) {
    .work_box {
        align-items: initial;
        flex-direction: column-reverse;
        padding: var(--gutter-normal);
    }
}

.work_box:not(:last-child) {
    margin-bottom: var(--gutter-normal);
}

@media(max-width: 500px) {
    .work_box:not(:last-child) {
        margin-bottom: var(--gutter-medium);
    }
}

.work_text {
    flex: 0 0 38%;
}

.work_list {
    list-style-type: square;
    list-style-position: inside;
    margin-bottom: var(--gutter-normal);
}

.work_image-box {
    margin-bottom: var(--gutter-normal);
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

@media(min-width: 901px) {
    .work_image-box {
        flex: 1;
        margin: 0 0 0 10rem;
    }
}

/* --------------------------------------- */
/* ----- Companies ----- */
/* --------------------------------------- */

.company_logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company_logo {
    height: 6em;
    max-width: 34rem;
    padding: 1.4rem 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0);
    border: 1px solid transparent;
    filter: invert(100%) grayscale(100%) opacity(.7);
    transition: filter 0.3s ease, transform 0.3s ease, background 0.3s ease,
                border-color 0.3s ease, box-shadow 0.3s ease;
}

.company_logos:hover .company_logo {
    filter: invert(100%) grayscale(100%) opacity(.25);
}

.company_logos:hover .company_logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

@media(max-width: 1240px) {
    .company_logos {
        overflow-x: scroll;
        padding: var(--gutter-normal);
    }

    .company_logo:not(:last-of-type) {
        margin-right: var(--gutter-medium);
    }
}

/* --------------------------------------- */
/* ----- About ----- */
/* --------------------------------------- */

.about_content {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

@media(max-width: 900px) {
    .about_content {
        flex-direction: column-reverse;
        align-items: initial;
    }
}

.about_photo-container {
    margin-bottom: var(--gutter-normal);
}

.about_photo {
    border-radius: 4px;
    border: 1px solid rgba(21, 111, 255, 0.25);
    box-shadow: 0 0 40px rgba(21, 111, 255, 0.08);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.about_photo:hover {
    box-shadow: 0 0 60px rgba(21, 111, 255, 0.2);
    border-color: rgba(21, 111, 255, 0.5);
}

@media(min-width: 901px) {
    .about_text {
        flex: 0 0 35%;
    }

    .about_photo-container {
        flex: 1;
        margin: 0 var(--gutter-huge) 0 0;
    }
}

/* --------------------------------------- */
/* ----- Contact ----- */
/* --------------------------------------- */

.contact_info {
    max-width: var(--container-medium-width);
}

/* --------------------------------------- */
/* ----- Footer ----- */
/* --------------------------------------- */

.footer {
    text-align: center;
    padding: var(--gutter-medium) 0 var(--gutter-normal);
}

.footer_social-links {
    display: flex;
    justify-content: center;
    padding: var(--gutter-normal) 0;
    list-style: none;
}

.footer_social-link-item:not(:last-of-type) {
    margin-right: var(--gutter-small);
}

.footer_social-image {
    height: 4rem;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.2s;
}

.footer_social-image:hover {
    opacity: 1;
    transform: scale(1.12);
}

.footer_coded-with {
    width: 14px;
}

@media(max-width: 500px) {
    .footer {
        padding: var(--gutter-medium) 0;
    }
}

/* ----- Type Scramble ----- */

.jobposition {
    font-weight: 100;
    font-size: var(--font-size-medium);
    color: #FAFAFA;
}

.dud {
    color: #757575;
}

/* ----- Canvas ----- */

canvas {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* --------------------------------------- */
/* ----- Noise Texture Overlay ----- */
/* --------------------------------------- */

.noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.038;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
}

/* --------------------------------------- */
/* ----- Cursor Glow ----- */
/* --------------------------------------- */

.cursor-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(21, 111, 255, 0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    opacity: 0;
    will-change: left, top;
    transition: opacity 0.5s ease;
}

@media (pointer: fine) {
    .cursor-glow { opacity: 1; }
}

/* --------------------------------------- */
/* ----- Hero Entrance Animations ----- */
/* --------------------------------------- */

@keyframes hero-shimmer {
    0%   { background-position: 0% center; opacity: 0; }
    15%  { opacity: 1; }
    100% { background-position: 100% center; opacity: 1; }
}

@keyframes hero-fadein {
    from { opacity: 0; transform: translateY(1.2rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.header_text p {
    animation: hero-fadein-opacity 0.8s ease 1.2s both;
}

@keyframes hero-fadein-opacity {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.btn--blue {
    animation: hero-fadein 0.8s ease 1.7s both;
}

/* --------------------------------------- */
/* ----- Scroll Indicator ----- */
/* --------------------------------------- */

.scroll-indicator {
    position: absolute;
    bottom: 3.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    opacity: 0;
    animation: hero-fadein 0.8s ease 2.4s forwards;
    transition: opacity 0.4s ease;
}

.scroll-indicator_chevron {
    display: block;
    width: 1.4rem;
    height: 1.4rem;
    border-right: 2px solid rgba(21, 111, 255, 0.75);
    border-bottom: 2px solid rgba(21, 111, 255, 0.75);
    transform: rotate(45deg);
    animation: chevron-bounce 1.5s ease-in-out infinite;
}

.scroll-indicator_chevron:nth-child(2) {
    animation-delay: 0.22s;
    opacity: 0.55;
}

@keyframes chevron-bounce {
    0%, 100% { transform: rotate(45deg) translate(0, 0);   opacity: 0.85; }
    50%       { transform: rotate(45deg) translate(5px, 5px); opacity: 0.35; }
}

/* --------------------------------------- */
/* ----- Scroll Spy Active Nav Link ----- */
/* --------------------------------------- */

.nav_link--active {
    color: var(--blue-solid) !important;
}

.nav_link--active::after {
    right: 0;
}

/* --------------------------------------- */
/* ----- Nav Logo Blinking Cursor ----- */
/* --------------------------------------- */

.nav_logo-cursor {
    color: var(--blue-solid);
    margin-left: 2px;
    animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* --------------------------------------- */
/* ----- Animated h2 Underline ----- */
/* --------------------------------------- */

h2.h2--visible::after {
    width: 10rem;
}

/* --------------------------------------- */
/* ----- Section Entry Glow Line ----- */
/* --------------------------------------- */

section[data-glow]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5%;
    width: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(21, 111, 255, 0.5) 25%,
        rgba(21, 111, 255, 0.9) 50%,
        rgba(21, 111, 255, 0.5) 75%,
        transparent 100%
    );
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

section[data-glow].section--glowing::before {
    width: 110%;
}

/* --------------------------------------- */
/* ----- Work: Image Zoom + Tint Overlay ----- */
/* --------------------------------------- */

.work_image {
    display: block;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.work_image-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(21, 111, 255, 0);
    transition: background 0.4s ease;
    pointer-events: none;
    border-radius: 6px;
}

.work_box:hover .work_image {
    transform: scale(1.05);
}

.work_box:hover .work_image-box::after {
    background: rgba(21, 111, 255, 0.08);
}

/* --------------------------------------- */
/* ----- Work Box: Left Accent Bar ----- */
/* --------------------------------------- */

.work_box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--blue-solid), transparent);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.work_box:hover::before {
    transform: scaleY(1);
}

/* --------------------------------------- */
/* ----- Work List: Staggered Items ----- */
/* --------------------------------------- */

.work_list li {
    opacity: 0;
    transform: translateX(-1.2rem);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.work_list li.item--visible {
    opacity: 1;
    transform: translateX(0);
}

/* --------------------------------------- */
/* ----- Contact: Button Pulse Ring ----- */
/* --------------------------------------- */

.contact_info .btn {
    animation: btn-pulse 2.8s ease-in-out 1s infinite;
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(21, 111, 255, 0.45); }
    50%       { box-shadow: 0 0 0 10px rgba(21, 111, 255, 0); }
}

/* --------------------------------------- */
/* ----- Typewriter Cursor on Job Title ----- */
/* --------------------------------------- */

.jobposition::after {
    content: '|';
    color: var(--blue-solid);
    margin-left: 3px;
    animation: cursor-blink 1.1s step-end infinite;
    font-weight: 100;
}

/* --------------------------------------- */
/* ----- Reduced Motion ----- */
/* --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .cursor-glow { display: none; }
}
