@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Libre+Bodoni:ital,wght@0,400..700;1,400..700&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');

@font-face {
    font-family: 'Onder';
    src: url('fonts/ONDER-REGULAR.ttf') format('truetype');
    font-weight: 700;
}

:root {
    --bg: #0a0a0c;
    --surface: #141418;
    --elevated: #1e1e24;
    --border: #2a2a32;
    --accent: #8e0300;
    --accent-hov: #b50400;
    --accent-dim: #3d0100;
    --text-1: #f0eff4;
    --text-2: #a8a6b4;
    --text-3: #5a5868;
}

[data-theme="hacker"] {
    --bg: #050905;
    --surface: #080f08;
    --elevated: #0f1a0f;
    --border: #0d1f0e;
    --accent: #00cc33;
    --accent-hov: #00ff41;
    --accent-dim: #0a2412;
    --text-1: #d4e8d4;
    --text-2: #a8c8a8;
    --text-3: #6a9a6a;
    --text-4: #3d6e3d;
}



* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: color, background-color, border-color;
    transition-duration: 1s;
    transition-timing-function: ease;
}


/*---GENERAL---*/

html {
    /* scroll-behavior: smooth; */
}

body {
    font-family: 'Inter';
    color: var(--text-1);
    background-color: var(--bg);
    height: 100vh;
    overflow-x: hidden;
}

.glitch {
    display: inline-block;
    opacity: 0;
}

.emph {
    color: var(--accent-hov);
}

.preloader {
    font-family: 'Onder';
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    inset: 0;
    background-color: var(--bg);
    z-index: 9999;
    text-align: center;
    font-size: 1vw;
    transition: transform 1s ease;
}

.preloader.loaded:has(h1.done) {
    animation: load 1s 0.8s ease forwards;
}

.preloader h1 {
    position: relative;
}

.preloader h1::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c94a1a;
    transition: width 0.5s 0.2s ease;
}

.preloader h1.done::after {
    width: 100%;
}

@keyframes load {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-100%);
    }
}

/*---NAV---*/
header {
    position: fixed;
    left: 0;
    right: 0;
    top: 2%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: transform 0.3s ease;
}

.head-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    width: 80%;
    background-color: rgba(10, 10, 12, 0.4);
    border: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
    backdrop-filter: blur(6px);
    padding: 1em 3em;
    border-radius: 0.5em;
}

.logo {
    text-align: center;
    overflow: hidden;
    height: 1.4em;
}

.logo h1 {
    font-family: 'Onder';
    font-size: 0.75em;
    color: var(--accent-hov);
    animation: switch 10s ease alternate infinite;
}

.nav-ham {
    display: none;
}


nav ul {
    display: flex;
    list-style: none;
    gap: 1.5em;
}

nav ul li {
    font-family: 'Inter';
    color: var(--text-2);
}

nav ul li a {
    position: relative;
    text-decoration: none;
    color: var(--text-2);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c94a1a;
    transition: width 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    color: var(--text-1);
}

nav ul li a:hover::after {
    width: 100%;
}

@keyframes switch {

    0%,
    45% {
        transform: translateY(0);
    }

    55%,
    100% {
        transform: translateY(-2em);

    }

}

/*---HERO---*/


.hero {
    padding: 1.5em;
    height: 100%;
}

[data-theme="hacker"] .hero-main {
    background-image: url(./assets/theme-hero-bg.png);
}

[data-theme="hacker"] .highlight {
    opacity: 0;
}

.hero-main {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url(./assets/hero-bg.png);
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    border-radius: 1em;
    overflow: hidden;
    transition: background-image 1s ease;
}

.hero-heading {
    font-family: 'Onder';
    margin-top: auto;
    font-size: 1em;
    color: var(--text-1);
}

.hero-heading h1 {
    will-change: filter, transform, opacity;
}

.hero-heading p {
    font-size: 0.75em;
    margin-top: 1em;
    text-align: center;
    will-change: filter, transform, opacity;
}

.highlight {
    position: absolute;
    top: -100px;
    left: 0;
    transform: rotate(-30deg);
    width: 20%;
    opacity: 1;
    transition: opacity 1s ease;
}

.avatar {
    position: relative;
    margin-top: auto;
    width: 60%;
    text-align: center;
    aspect-ratio: 20/10;
    overflow: hidden;
    will-change: filter, transform, opacity;
}

.avatar img {
    position: absolute;
    inset: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
    max-width: 100%;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

#top {
    clip-path: circle(0px at 0px 0px);
    will-change: clip-path;
    transform: translateZ(0);
    transition: clip-path 0.8s ease-out;
}

.dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: difference;
    z-index: 10;
    transition: opacity .15s;
}

.avatar.on .dot {
    opacity: 1;
}

.hint {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .2);
    pointer-events: none;
    z-index: 5;
    transition: opacity .25s;
}










/*---ABOUT---*/

.about {
    padding: 5%;
}

.about h2 {
    font-family: 'Onder';
    font-size: 1em;
    margin-bottom: 1em;
}

.abt-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1em;
}

.abt-card {
    background-color: var(--surface);
    padding: 2em 1em;
    grid-column: 1;
    border-radius: 0.5em;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2) inset;
    color: var(--text-2);
    animation: fadeup;
    animation-timeline: view(80% auto);
}

.abt-card:last-child {
    grid-row: 1 / span 2;
    grid-column: 2;
}

.abt-card h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-1);
}

.abt-tags {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 1em;
}

.abt-tag {
    position: relative;
    background-color: var(--elevated);
    padding: 1em 2em;
    border-radius: 0.25em;
    border: none;
    border-left: 2px solid var(--accent-hov);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
    color: var(--text-2);
}

@keyframes fadeup {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0px);
        opacity: 1;
    }
}

/*---QUOTE---*/

.quote {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 5% 15%;
    background-color: var(--elevated);
    margin: 5% 0;
    font-size: 1.5em;
    text-align: center;
    color: var(--text-2);
    animation: wipe;
    animation-timeline: view(100% auto);
}

@keyframes wipe {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0% 0 0);
    }
}


/*---PROJECTS---*/

.projects {
    text-align: center;
    padding: 10%;
}

.projects>h2 {
    font-family: 'Onder';
}

.projects>p {
    font-family: 'Onder';
    font-size: 0.5em;
}

.proj-grid {
    margin-top: 4em;
    display: grid;
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2em;
    height: 100%;
}

.proj {
    animation: fadeup;
    animation-timeline: view(80% auto);
}


.proj-img {
    border: 1px solid var(--border);
    border-radius: 1em;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
    background-color: var(--surface);
}

.proj-img img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.proj-desc {
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 1em;
    padding: 2em 3em;
    margin-top: 1em;
    background-color: var(--elevated);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

.proj-desc>span {
    font-weight: 500;
    color: var(--text-3);
    font-size: 1em;
    /* float: right; */
}

.proj-desc p {
    font-weight: 300;
}

.proj-tags {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin-top: 1em;
    font-size: 0.75em;
    text-wrap: nowrap;

}

.proj-tag {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 1em;
    background-color: var(--surface);
    padding: 0.5em 1em;
    border-radius: 10000em;
    color: var(--text-2);
}

/*---SKILLS---*/

.skills {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5%;
}

.terminal {
    font-family: monospace;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
    overflow: hidden;
    width: 100%;
}

.term-bar {
    display: flex;
    justify-content: space-between;
    background-color: var(--elevated);
    padding: 0.5em 1em;
}

.term-main {
    padding: 1em;
    line-height: 1.4em;
    font-size: 1.1em;
    width: 100%;
    overflow-x: auto;
}

.term-main .b1 {
    font-size: 1.75em;
}

.term-main .b2 {
    color: var(--text-2);
    font-size: 1.5em;
}

.term-main hr {
    border: none;
    border-top: 1px solid var(--text-3);
    margin: 1em;
}

.term-main .typing::after {
    content: '_';
    animation: blink 1s linear infinite;
}

.term-main>p {
    opacity: 0;
    text-wrap: nowrap;
}


@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/*---SERVICES---*/

.services {
    position: relative;
    padding: 5%;
    width: 100%;

}

.grid-wrap {
    position: absolute;
    inset: 0;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 75% 50%, var(--bg) 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 55% at 75% 50%, var(--bg) 30%, transparent 100%);
    z-index: -1;
}

.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(204, 51, 0, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 51, 0, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
}

.services h2 {
    font-family: 'Onder';
    margin-bottom: 2em;
}

.serv-main {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 4em;
}

.service {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    max-width: 60%;
}

.serv-intro {
    display: flex;
    gap: 1em;
}

.serv-intro h3 {
    font-size: 2em;
    font-family: 'Onder';
    color: var(--accent);
}

.serv-intro h3::before {
    content: '0';
    color: var(--text-1);
}

.serv-label {
    display: inline;
    writing-mode: vertical-rl;
    font-size: 1.25em;
    font-weight: 600;
    color: var(--text-3);
    margin-top: 1em;
}

.serv-label::before {
    content: '——';
}

.serv-content {
    margin: 2em;
}

.serv-content p {
    max-width: 70%;
}

.serv-content h3 {
    font-size: 1.5em;
    margin-bottom: 1em;
}

.service:nth-child(2) {
    align-self: flex-end;
}

.service:nth-child(3) {
    align-self: center;
}

/*---CONTACT---*/


.contact {
    padding: 10%;
}

.cont-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2em;
}

.cont-form form {
    display: flex;
    flex-direction: column;
    padding: 1em;
}

.ani-input {
    position: relative;
    display: flex;
    align-items: center;
}

.ani-input .input {
    flex: 1;
    height: 2em;
    border: none;
    border: 1px solid var(--border);
    color: var(--main-tx);
    border-radius: 5px;
    background-color: var(--elevated);
    font-size: 1rem;
    caret-color: var(--text-1);
    outline: none;
}

.ani-input textarea {
    height: 10em !important;
    resize: none;
    padding: 0.5em;
    font-family: 'Inter';
}

.ani-input:has(textarea) label {
    top: 0;
}

.ani-input svg {
    position: absolute;
    right: 10px;
}

.ani-input label {
    margin: 5px 10px;
    color: var(--text-2);
    position: absolute;
    background-color: var(--elevated);
    border-radius: 2px;
    padding: 0px;
    font-size: 1em;
    text-wrap: nowrap;
    transition: transform 0.3s ease, color 0.3s ease;
}

.ani-input .input:focus {
    border-color: var(--accent);
    outline: none;
}


.ani-input .input:not(:placeholder-shown)+label,
.ani-input .input:focus+label {
    transform: translateY(-15px) scale(0.9);
    color: var(--text-1);

}


.input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px var(--elevated) inset !important;
    -webkit-text-fill-color: var(--text-1) !important;
}

/* Firefox */
.input:-moz-autofill {
    box-shadow: 0 0 0px 1000px var(--elevated) inset !important;
    text-fill-color: var(--text-1) !important;
}

.err {
    color: darkred;
    font-size: 0.9em;
    margin: 0.1em;
    margin-bottom: 1em;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cont-err {
    opacity: 1;
}

.submit {
    height: 2em;
    background-color: var(--accent);
    border: none;
    border-radius: 999em;
    color: var(--text-1);
    font-size: 1em;
    font-weight: bold;
    transition: 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2) inset;
}

.submit:hover {
    background-color: var(--accent-hov);
    transform: translateY(-3px);
}

.submit:active {
    transform: translateY(0px);
    background-color: var(--accent-dim);
}

.cont-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.cont-social>* {
    display: flex;
    align-items: center;
    gap: 0.5em;
    text-wrap: nowrap;
    color: var(--text-2);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.1s;
}

.cont-social a:hover {
    color: var(--text-1);
}

.cont-info {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.cont-info h3 {
    font-family: 'Onder';
}

.cont-tags {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin-top: auto;
    margin-bottom: 2em;
}

.cont-tags p {
    background-color: var(--surface);
    padding: .5em 2em;
    border-radius: 1em;
}


.mail-sent {
    pointer-events: none;
    visibility: hidden;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-1);
}

div.mail-sent.open {
    visibility: visible;
}

.mail-sent div {
    pointer-events: all;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1em;
    background-color: var(--bg);
    border-radius: 10px;
    padding: 20px;
}

.mail-sent div button {
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    padding: 5px 20px;
    background-color: var(--elevated);
    color: var(--text-2);
    z-index: 1000;
    transition: background-color 0.1s ease, transform 0.1s ease;
}


.mail-sent button:hover {
    background-color: var(--accent-dim);
    transform: translateY(-3px);
}

.mail-sent button:active {
    transform: translateY(0px);
    background-color: var(--accent);
}

.mail-sent svg {
    background-color: red;
}

/*---FOOTER---*/



footer {
    border-top: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
    padding: 1.5rem 3rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    text-wrap: nowrap;
}

.social-icons {
    display: flex;
    gap: 1.5em;
}

.social-icons a {
    color: var(--text-2);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

.social-icons a:hover {
    color: var(--text-1);
}

/*---RESPONSIVENESS---*/


@media (max-width: 768px) {

    .mr {
        display: none;
    }



    .head-content {
        padding: 1em;
    }

    .logo {
        font-size: 0.75em;
        text-align: left;
    }

    #nav-togg:not(:checked)+nav {
        display: none;
    }

    .nav-ham {
        display: block;
    }

    nav {
        border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
        padding-top: 1em;
        margin-top: 1em;
        flex-basis: 100%;
    }

    nav ul {
        flex-direction: column;
        height: 100%;
        padding: 0% 3em;
        gap: 1em;
    }









    .hero-heading {
        font-size: 0.4em;
        text-align: center;
    }

    .avatar {
        width: 150%;
    }

    .abt-grid {
        grid-template-rows: auto;
        grid-template-columns: 1fr;
    }

    .abt-card:last-child {
        grid-row: 3;
        grid-column: 1;
    }

    .quote {
        font-size: 1em;
    }


    .projects {
        padding: 5%;
    }

    .projects>h2 {
        font-size: 1em;
    }


    .proj-desc {
        padding: 1em 2em;
    }

    .services h2 {
        font-size: 1em;
        text-align: center;
    }

    .services .service {
        align-self: center;
        max-width: 100%;
    }

    .serv-intro h3 {
        font-size: 1em;
    }

    .serv-content {
        margin: 1em;
    }

    .cont-main {
        grid-template-columns: 1fr;
    }

    .cont-form {
        grid-row: 2;
    }

    footer {
        padding: 1.5em 2em;
        text-align: center;
    }
}