@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Orbitron', sans-serif;
}

a:focus,
a:focus-visible,
button:focus,
button:focus-visible,
input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible {
    outline: 3px solid var(--main-color);
    outline-offset: 4px;
}

:root {
    --bg-img: url("../images/background_light.svg");
    --text-color: #333;
    --main-color: #167deb;
    --logo-color: #0a59b9;
    --button-text-color: #ffffff;
    --surface-color: rgba(255, 254, 254, 0.879);
    --footer-color: rgba(255, 255, 255, 0.7);
    --border-color: rgba(0, 0, 0, 0.08);
}

body.dark-mode {
    --bg-img: url("../images/background_dark.svg");
    --text-color: #f1f1f1;
    --main-color: #55b7ff;
    --logo-color: #fcfdfe;
    --button-text-color: #101820;
    --surface-color: rgba(20, 25, 35, 0.9);
    --footer-color: rgba(20, 25, 35, 0.0);
    --border-color: rgba(255, 255, 255, 0.2);
}

.theme-toggle {
    width: 4rem;
    height: 4rem;
    margin-left: 1rem;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    background: transparent;
    color: var(--main-color);
    font-size: 2rem;
    cursor: pointer;
}

.theme-toggle:hover {
    background: var(--main-color);
    color: var(--text-color);
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: var(--bg-img);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-color);
    font-size: 1.6rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(1.2rem, 2vw, 2rem) clamp(1.5rem, 9vw, 9%);
    border-radius: 8px;
    background: transparent;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 100;
    transition: background-color 0.2s ease;
}

.header .button {
    width: auto;
    height: auto;
    margin-left: auto;
    order: 3;
}

.header .button .btn {
    width: 14rem;
    height: 4.8rem;
    font-size: 3rem;
}

.header .theme-toggle {
    order: 4;
}

.header .menu-icon {
    order: 2;
}

.navbar {
    position: fixed;
    top: 15px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.4rem, 2vw, 1.4rem) clamp(1rem, 3vw, 3rem);
    padding: clamp(0.8rem, 1.5vw, 1rem) clamp(1.2rem, 3vw, 3.6rem);
    background: var(--surface-color);
    border: 2px solid var(--main-color);
    border-radius: 8px;
    width: fit-content;
    max-width: 90vw;
    z-index: 1000;
    transition: none;
}

.header.sticky {
    background: var(--surface-color);
}

footer {
    min-height: 6.4rem;
    font-size: 2rem;
    margin-top: auto;
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    background: transparent;
    width: auto;
    color: var(--text-color);
}

footer p {
    padding: 1rem 2rem;
    border: 2px solid var(--main-color);
    border-radius: 6px;
    background: var(--surface-color);
}

.logo {
    font-size: clamp(1rem, 3vw, 3.2rem);
    color: var(--main-color);
    font-weight: 500;
    background: var(--surface-color);
    border: .2rem solid var(--main-color);
    border-radius: 4px;
    padding: 0.2rem;
}

.navbar a {
    font-size: clamp(2.6rem, 2.5vw, 2.5rem);
    color: var(--main-color);
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--main-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.navbar a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.navbar a:hover,
.navbar a:active {
    color: var(--text-color);
}

.menu-icon {
    display: none;
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    background: transparent;
    border: none;
}

.menu-icon:hover {
    color: var(--main-color);
}

@media (max-width: 900px) {
    .header {
        position: relative;
    }

    .logo {
        margin-right: auto;
    }

    .menu-icon {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .header .button .btn {
        width: 14rem;
        height: 4.4rem;
        font-size: 1.8rem;
    }

    .navbar {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        right: auto;
        width: min(1200px, 300px);
        padding: 1rem;
        background: var(--main-color);
        border: transparent;
        border-radius: 2rem;
        color: var(--button-text-color);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -8px);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
    }

    .navbar a {
        color: var(--button-text-color);
    }

    .navbar.open {
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, 0);
        pointer-events: auto;
        transition-delay: 0s;
    }
}

section {
    flex: 1;
    min-height: auto;
    padding: 10rem 9% 2rem;
}

.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 9%;
    background-image: var(--bg-img);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.home-content {
    max-width: 100rem;
    text-align: center;
}

.home .button {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.home-content h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: clamp(6rem, 6vw, 6rem);
    font-weight: 700;
    line-height: 1.5;
}

.home-content .text-animate {
    position: relative;
    display: inline-block;
    width: max-content;
    max-width: auto;
    overflow: hidden;
    white-space: nowrap;
    font-size: clamp(6rem, 4vw, 5rem);
    font-weight: 600;
    color: transparent;
    -webkit-text-stroke: .8px var(--main-color);
}

.home-content .text-animate::before {
    content: "Welcome to my digital CV!";
    position: absolute;
    inset: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--main-color);
    animation: revealText 6s ease forwards;
}

@keyframes revealText {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.button {
    position: relative;
    display: flex;
    justify-content: flex-start;
    width: min(40rem, 100%);
    height: 4.3rem;
    margin-top: 3rem;
}

.button .btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: min(25rem, 100%);
    height: 100%;
    background: var(--surface-color);
    border: .2rem solid var(--main-color);
    border-radius: 5px;
    padding: 0.5rem;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 600;
    letter-spacing: .1rem;
    color: var(--main-color);
    z-index: 1;
    overflow: hidden;
}

.button .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgb(6, 191, 243);
    z-index: -1;
    transition: .5s;
}

.button .btn:hover::before {
    width: 100%;
}

.button .btn:hover {
    color: var(--text-color);
}

.social-media-icons {
    position: absolute;
    width: 200px;
    display: flex;
    justify-content: space-between;
}

.home .social-media-icons {
    position: static;
    justify-content: center;
    gap: clamp(1rem, 3vw, 3rem);
    width: 350px;
    margin-top: 1.5rem;
}

.contact {
    position: relative;
}

.social-media-icons a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: clamp(3.2rem, 4vw, 5.5rem);
    height: clamp(3.2rem, 4vw, 5.5rem);
    background: transparent;
    border: .2rem solid var(--text-color);
    border-radius: 50%;
    font-size: clamp(2rem, 3vw, 3rem);
    color: var(--text-color);
    z-index: 1;
    overflow: hidden;
}

.social-media-icons a:hover {
    color: var(--text-color);
}

.social-media-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgb(6, 191, 243);
    z-index: -1;
    transition: .5s;
}

.social-media-icons a:hover::before {
    width: 100%;
}

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 6rem;
}

.heading {
    font-size: 6rem;
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
}

.headshot-img {
    position: relative;
    width: 45rem;
    height: 45rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.headshot-img img {
    width: 93%;
    border-radius: 50%;
    border: .3rem solid var(--main-color);
    object-fit: cover;
}

.headshot-img .circle-spin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .4rem solid var(--border-color);
    border-bottom: .4rem solid var(--border-color);
    border-left: .4rem solid var(--main-color);
    border-right: .4rem solid var(--main-color);
    animation: portraitNetOrbit 24s linear infinite;
}

@keyframes portraitNetOrbit {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        filter: drop-shadow(0 0 2px var(--main-color));
    }

    50% {
        filter: drop-shadow(0 0 7px var(--main-color));
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        filter: drop-shadow(0 0 2px var(--main-color));
    }
}

.about-content {
    text-align: center;
}

.about-content h2 {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 600;
    text-align: center;
}

.about-content h3 {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.about-content p {
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 2rem;
    border: .2rem solid var(--main-color);
    border-radius: 8rem;
    background: var(--surface-color);
    padding: 1rem;
}

.skills h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 6rem;
    font-weight: 600;
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 3rem;
}

.skills h2 {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    color: #da8607;
    font-size: 5rem;
    font-weight: 600;
    gap: 2rem;
    margin-bottom: 2rem;
    border: transparent;
    border-radius: 4rem;
    background: white;
    background: var(--surface-color);
    width: fit-content;
    margin: 0 auto 2rem;
    padding: 1.8rem;
}

.skills h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 33px;
    font-weight: 500;
    width: auto;
    margin-bottom: 5rem;
    border: 0.2rem solid var(--text-color);
    border-radius: 4rem;
    padding: 1.5rem;
    background: white;
    background: var(--surface-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
}

.skill-card {
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--surface-color);
    border: 0.3rem solid var(--text-color);
    border-radius: 2rem;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.10s ease, transform 0.10s ease;
    margin-bottom: 2rem;
    width: fit-content;
    gap: 1rem;
}

.skill-card:hover {
    border-color: var(--main-color);
    transform: translateY(-3px);
}

.skill-card .skill-name {
    font-size: 3rem;
    font-weight: 600;
    color: var(--main-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-card .desc {
    font-size: 2rem;
    font-weight: 500;
}

.education-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.education-content p {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 400;
    color: var(--text-color);
    gap: 2rem;
    border: .1rem solid var(--main-color);
    border-radius: 10px;
    background: var(--surface-color);
}

.education-content h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 6rem;
    font-weight: 600;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 850px;
    width: 100%;
}

.module {
    background: transparent;
    background: var(--surface-color);
    border: 1px solid rgba(45, 44, 44, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
    gap: 3rem;
}

.module-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 20px;
}

.collapsible-boxes {
    font-size: 25px;
    width: min(100vw, 1300px);
    margin: 12rem auto 4rem;
    color: #ee9209;
    background: transparent;
}

.collapsible-boxes input {
    display: none;
}

.collapsible-boxes .collapsible-box {
    display: flex;
    flex-direction: column;
    margin-top: 10rem;
    background: var(--surface-color);
    border: 2px solid var(--text-color);
    border-radius: 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow:
        0 2px 2px 0 rgba(238, 232, 232, 0.014),
        0 2px 8px 0 rgba(8, 8, 8, 0);
}

.collapsible-boxes .collapsible-box:first-of-type {
    margin-top: 0;
}

.collapsible-boxes .title {
    min-height: 80px;
    background: rgb(11, 11, 11);
    background: var(--border-color);
    border-bottom: 1px solid var(--text-color);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.8rem;
    font-size: 35px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.collapsible-boxes .title::after {
    content: "";
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--text-color);
    border-left: 2px solid var(--text-color);
    transform: rotate(-135deg);
    transition: transform 0.3s ease;
}

.collapsible-boxes .close {
    position: absolute;
    width: 100%;
    top: 0;
    cursor: pointer;
}

.collapsible-boxes .content {
    padding: 0 1.8rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s ease, padding 0.35s ease;
}

.collapsible-boxes .content > p {
    font-size: 35px;
    font-weight: 400;
    color: var(--text-color);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.collapsible-boxes input:checked + .collapsible-box .title {
    background: gray;
    background: var(--surface-color);
}

.collapsible-boxes input:checked + .collapsible-box .title::after {
    transform: rotate(45deg);
}

.collapsible-boxes input:checked + .collapsible-box .content {
    border-bottom: 1px solid var(--main-color);
    max-height: 100vh;
    padding: 1.6rem 1.8rem;
}

.collapsible-boxes input:checked + .collapsible-box .content > p {
    opacity: 1;
    transform: translateY(0);
}

.collapsible-boxes input:checked + .collapsible-box .close {
    height: 56px;
}

.collapsible-boxes .collapsible-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgb(41, 155, 231),
        0 0 50px rgb(244, 243, 240),
        0 0 100px rgb(54, 155, 228);
}

.collapsible-boxes .module-image {
    display: block;
    width: min(100%, 600px);
    height: 28rem;
    margin: 0 auto 1.6rem;
    border-radius: .8rem;
    object-fit: cover;
}

.contact {
    min-height: auto;
    padding-bottom: 8rem;
    position: relative;
}

.contact p {
    font-size: 3rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    text-align: center;
    border: .1rem solid var(--main-color);
    border-radius: 10px;
    background: var(--surface-color);
    gap: 2rem;
}

.contact form {
    max-width: 130rem;
    margin: 0 auto;
    text-align: center;
    margin-top: 10rem;
}

.contact form .input-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box .input-field {
    position: relative;
    width: 49%;
    margin: .8rem 0;
}

.contact form .input-box .input-field label,
.contact form .textarea-field label {
    display: block;
    margin-bottom: .8rem;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea {
    width: 100%;
    height: 100%;
    padding: 2rem;
    font-size: 2rem;
    color: var(--text-color);
    border-radius: .6rem;
    border: .3rem solid var(--main-color);
    background: var(--surface-color);
}

.contact form .input-box .input-field input::placeholder,
.contact form .textarea-field textarea::placeholder {
    color: var(--text-color);
}

.contact form .focus {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: .6rem;
    z-index: -1;
    transition: .5s;
}

.contact form .input-box .input-field input:focus~.focus,
.contact form .input-box .input-field input:valid~.focus,
.contact form .textarea-field textarea:focus~.focus,
.contact form .textarea-field textarea:valid~.focus {
    width: 100%;
}

.contact form .textarea-field {
    position: relative;
    margin: .8rem 0 2.7rem;
    display: flex;
    flex-direction: column;
}

.contact form .textarea-field textarea {
    resize: none;
}

.contact form .button .btn {
    cursor: pointer;
}

.form-actions {
    display: flex;
    align-items: center;
    color: var(--text-color);
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.8rem;
    margin: 0;
}

.contact .social-media-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    width: auto;
    margin-left: 70rem;
    position: static;
}

.contact .social-media-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    font-size: 2.5rem;
}

.experience .heading {
    font-size: 6rem;
    font-weight: 600;
    margin-top: -0;
    text-align: center;
}

section.experience > p {
    font-size: 3rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem;
    border: .1rem solid var(--main-color);
    border-radius: 10px;
    background: var(--surface-color);
}

.experience .timeline {
    position: relative;
    width: min(100% - 2rem, 1200px);
    max-width: 1200px;
    margin: 30px auto;
}

.experience .container2 {
    position: relative;
    width: 50%;
    padding: 10px 20px;
    box-sizing: border-box;
    clear: both;
    animation: movedown 1s linear forwards;
    opacity: 0;
    z-index: 1;
}

@keyframes movedown {
    0% {
        opacity: 1;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

.container2:nth-child(1) {
    animation-delay: 0s;
}

.container2:nth-child(2) {
    animation-delay: 1s;
}

.container2:nth-child(3) {
    animation-delay: 2s;
}

.container2:nth-child(4) {
    animation-delay: 3s;
}

.text-box {
    padding: 20px 30px;
    background: rgb(11, 11, 11);
    background: var(--surface-color);
    position: relative;
    border: 4px solid rgba(0, 0, 0, 0.28);
    border-radius: 6px;
}

.experience .container2.left {
    left: 0;
}

.experience .container2.right {
    left: 50%;
}

.experience .container2:nth-child(n + 2) {
    margin-top: -20rem;
}

.container2 img {
    position: relative;
    width: 100%;
    height: auto;
    max-height: 260px;
    border-radius: 6px;
    object-fit: cover;
}

.experience .container2.right::after {
    right: auto;
    left: -200px;
}

.timeline::after {
    content: "";
    position: absolute;
    width: 4px;
    height: auto;
    background: var(--main-color);
    top: 22px;
    left: 50%;
    margin-left: -2px;
    z-index: 0;
    animation: moveline 4s linear forwards;
}

@keyframes moveline {
    0% {
        height: 0;
    }

    100% {
        height: calc(100% - 17px);
    }
}

.text-box h2 {
    font-weight: 600;
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    color: var(--main-color);
}

.text-box small {
    display: inline-block;
    margin-bottom: 15px;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 500;
    color: #bc7305;
}

.text-box p {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 500;
    color: var(--text-color);
}

.text-box ul {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 400;
}
.left-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid rgba(156, 154, 154, 0.8);
    right: -20px;
}
.right-arrow {
    height: 0;
    width: 0;
    position: absolute;
    top: 28px;
    z-index: 1;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid rgba(156, 154, 154, 0.8);
    left: -20px;
}
@media screen and (max-width: 800px){

    .contact form .input-box .input-field {
        width: 100%;
    }

    .contact .social-media-icons {
        width: 100%;
        margin-left: 0;
        justify-content: center;
    }

    .headshot-img {
        width: min(45rem, 85vw);
        height: min(45rem, 85vw);
    }

    .heading,
    .skills h1,
    .education-content h1,
    .experience .heading {
        font-size: clamp(3.6rem, 10vw, 6rem);
    }

    .skills h3,
    .education-content p,
    .contact p,
    section.experience > p {
        font-size: clamp(1.7rem, 4vw, 3rem);
    }

    .experience .timeline{
        width: calc(100% - 2rem);
        margin: 120px auto 40px;
    }
    .experience .timeline::after{
        left: 1.5rem;
        margin-left: -3px;
    }
    .experience .container2,
    .experience .container2.left,
    .experience .container2.right{
        width: 100%;
        left: 0;
        padding: 10px 0 10px 4rem;
    }
    .experience .container2:nth-child(n + 2) {
        margin-top: -20px;
    }
    .experience .container2 img{
        max-height: 180px;
    }
    .experience .text-box{
        font-size: 1.4rem;
    }
    .experience .text-box small{
        margin-bottom: 10px;
    }
    .experience .left-arrow,
    .experience .right-arrow{
        left: -2rem;
        right: auto;
    }
    .experience .right-arrow{
        border-right: 0;
        border-left: 15px solid rgba(156, 154, 154, 0.8);
    }
    .experience .container2::after,
    .experience .container2.right::after{
        left: 2rem;
        right: auto;
        transform: translateX(-50%);
    }
}

    :root {
        --bg-img: none;
        --page-bg: #f5f3eb;
        --text-color: #202923;
        --muted-color: #657067;
        --main-color: #246b54;
        --logo-color: #202923;
        --button-text-color: #fffdf7;
        --surface-color: #fffdf7;
        --footer-color: transparent;
        --border-color: #deded3;
        --accent-color: #d17a55;
        --shadow-soft: 0 18px 54px rgba(34, 48, 39, 0.09);
    }

    body.dark-mode {
        --page-bg: #17231e;
        --text-color: #edf0e9;
        --muted-color: #bec9be;
        --main-color: #9ac5a9;
        --logo-color: #f4f0e4;
        --button-text-color: #14221b;
        --surface-color: #22332b;
        --footer-color: transparent;
        --border-color: #3a4d41;
        --accent-color: #e6a080;
        --shadow-soft: 0 18px 54px rgba(0, 0, 0, 0.2);
    }

    html {
        scroll-padding-top: 10rem;
    }

    body {
        background-color: var(--page-bg);
        background-image: radial-gradient(rgba(36, 107, 84, 0.075) 0.7px, transparent 0.7px);
        background-size: 17px 17px;
        background-attachment: fixed;
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 1.6rem;
        line-height: 1.65;
        transition: background-color 0.25s ease, color 0.25s ease;
    }

    body.dark-mode {
        background-image: radial-gradient(rgba(154, 197, 169, 0.08) 0.7px, transparent 0.7px);
    }

    * {
        font-family: 'Orbitron', sans-serif;
    }

    a {
        color: inherit;
    }

    .header {
        position: fixed;
        top: 1.6rem;
        left: 50%;
        width: min(132rem, calc(100% - 4rem));
        min-height: 6.4rem;
        padding: 0.9rem 1.2rem 0.9rem 1.8rem;
        transform: translateX(-50%);
        justify-content: space-between;
        gap: 1.4rem;
        background: color-mix(in srgb, var(--surface-color) 94%, transparent);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(32, 41, 35, 0.07);
        backdrop-filter: blur(16px);
    }

    .header.sticky {
        background: color-mix(in srgb, var(--surface-color) 96%, transparent);
    }

    .logo {
        order: 1;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--logo-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 2.1rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .navbar {
        position: static;
        order: 2;
        display: flex;
        width: auto;
        max-width: none;
        margin: 0 auto;
        padding: 0;
        gap: 0.2rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        transform: none;
    }

    .navbar a {
        padding: 0.8rem 1rem;
        border-radius: 5px;
        color: var(--muted-color);
        font-size: 1.35rem;
        font-weight: 600;
        white-space: nowrap;
    }

    .navbar a::after {
        display: none;
    }

    .navbar a:hover,
    .navbar a.active {
        background: color-mix(in srgb, var(--main-color) 10%, transparent);
        color: var(--main-color);
    }

    .header .button {
        order: 3;
        width: auto;
        height: auto;
        margin: 0;
    }

    .header .button .btn,
    .button .btn {
        width: auto;
        min-height: 4.1rem;
        padding: 0.8rem 1.6rem;
        border: 1px solid var(--main-color);
        border-radius: 5px;
        background: var(--main-color);
        color: var(--button-text-color);
        font-size: 1.4rem;
        font-weight: 700;
        letter-spacing: 0;
        transition: transform 0.2s ease, background-color 0.2s ease;
    }

    .button .btn::before {
        display: none;
    }

    .button .btn:hover {
        color: var(--button-text-color);
        transform: translateY(-2px);
    }

    .theme-toggle {
        order: 4;
        width: 4rem;
        height: 4rem;
        margin: 0;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        color: var(--text-color);
        font-size: 1.7rem;
    }

    .theme-toggle:hover {
        background: var(--main-color);
        color: var(--button-text-color);
    }

    .menu-icon {
        order: 5;
        color: var(--text-color);
    }

    section {
        width: min(132rem, 100%);
        margin: 0 auto;
        padding: 12rem 5rem 7rem;
    }

    .home {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(32rem, 0.92fr);
        align-items: center;
        gap: clamp(3rem, 8vw, 10rem);
        min-height: 100vh;
        padding-top: 12rem;
        padding-bottom: 8rem;
        overflow: hidden;
        background: none;
    }

    .home-content {
        position: relative;
        z-index: 2;
        max-width: 66rem;
        text-align: left;
        animation: rise-in 0.7s ease both;
    }

    .eyebrow {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 2rem;
        color: var(--main-color);
        font-size: 1.3rem;
        font-weight: 700;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }

    .eyebrow span {
        width: 0.8rem;
        height: 0.8rem;
        border-radius: 50%;
        background: var(--accent-color);
        box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-color) 15%, transparent);
    }

    .home-content h1 {
        display: block;
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: clamp(5.2rem, 7.5vw, 9.2rem);
        font-weight: 600;
        line-height: 1.02;
    }

    .home-content h1 em {
        color: var(--main-color);
        font-family: inherit;
        font-weight: 500;
    }

    .home-content h2 {
        max-width: 56rem;
        margin-top: 2rem;
        color: var(--text-color);
        font-size: clamp(2.1rem, 3vw, 3rem);
        font-weight: 600;
        line-height: 1.35;
    }

    .home-content .home-intro {
        max-width: 55rem;
        margin-top: 1.5rem;
        color: var(--muted-color);
        font-size: 1.75rem;
        line-height: 1.8;
    }

    .skills-carousel {
        display: grid;
        grid-template-columns: 4.4rem minmax(0, 1fr) 4.4rem;
        align-items: center;
        gap: 1rem;
    }

    .carousel-control {
        display: inline-grid;
        place-items: center;
        width: 4.4rem;
        height: 4.4rem;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        background: var(--surface-color);
        color: var(--main-color);
        font-size: 1.5rem;
        cursor: pointer;
        transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
    }

    .carousel-control:hover:not(:disabled) {
        border-color: var(--main-color);
        background: color-mix(in srgb, var(--main-color) 10%, var(--surface-color));
    }

    .carousel-control:disabled {
        opacity: 0.35;
        cursor: not-allowed;
    }

    .skills-carousel .skills-grid {
        display: flex;
        min-width: 0;
        gap: 1.5rem;
        padding: 0.4rem 0.2rem 1rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .skills-carousel .skills-grid::-webkit-scrollbar {
        display: none;
    }

    .skills-carousel .skill-card {
        flex: 0 0 calc((100% - 1.5rem) / 2);
        scroll-snap-align: start;
    }

    .skills-carousel .skills-grid:focus-visible {
        outline: 2px solid var(--main-color);
        outline-offset: 3px;
    }

    @media (max-width: 800px) {
        .skills-carousel {
            grid-template-columns: 3.8rem minmax(0, 1fr) 3.8rem;
            gap: 0.7rem;
        }

        .carousel-control {
            width: 3.8rem;
            height: 3.8rem;
        }

        .skills-carousel .skills-grid {
            gap: 1rem;
        }

        .skills-carousel .skill-card {
            flex-basis: 100%;
        }
    }

    .home-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 2.2rem;
        margin-top: 3rem;
    }

    .home-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 1.2rem;
        min-height: 5rem;
        padding: 1.2rem 1.9rem;
        border-radius: 5px;
        background: var(--main-color);
        color: var(--button-text-color);
        font-size: 1.5rem;
        font-weight: 700;
        transition: transform 0.2s ease;
    }

    .home-actions .btn:hover {
        transform: translateY(-2px);
    }

    .text-link {
        display: inline-flex;
        align-items: center;
        gap: 0.8rem;
        color: var(--text-color);
        font-size: 1.45rem;
        font-weight: 700;
    }

    .text-link i {
        color: var(--accent-color);
    }

    .home .social-media-icons {
        position: static;
        display: flex;
        justify-content: flex-start;
        gap: 1rem;
        width: auto;
        margin-top: 4rem;
    }

    .social-media-icons a {
        width: 4.2rem;
        height: 4.2rem;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        color: var(--main-color);
        font-size: 1.7rem;
        transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    }

    .social-media-icons a::before {
        display: none;
    }

    .social-media-icons a:hover {
        transform: translateY(-2px);
        background: var(--main-color);
        color: var(--button-text-color);
    }

    .home-portrait {
        position: relative;
        width: min(100%, 48rem);
        margin: 0 auto;
        padding: 2rem 2rem 5.6rem;
        animation: rise-in 0.8s 0.12s ease both;
    }

    .portrait-frame {
        position: relative;
        z-index: 1;
        height: clamp(36rem, 47vw, 58rem);
        overflow: hidden;
        border: 8px solid var(--surface-color);
        border-radius: 48% 48% 5px 5px;
        background: var(--border-color);
        box-shadow: var(--shadow-soft);
    }

    .portrait-frame img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 35%;
    }

    .portrait-note {
        position: absolute;
        z-index: 2;
        right: 0;
        bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 1.1rem;
        padding: 1.4rem 1.8rem;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        box-shadow: var(--shadow-soft);
        color: var(--muted-color);
        font-size: 1.25rem;
        font-weight: 600;
    }

    .portrait-note span {
        color: var(--accent-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 2.1rem;
    }

    .portrait-orbit {
        position: absolute;
        top: -0.5rem;
        right: -1rem;
        width: 11rem;
        height: 11rem;
        border: 1px solid var(--accent-color);
        border-radius: 50%;
        opacity: 0.55;
    }

    .home-index {
        position: absolute;
        right: 5rem;
        bottom: 3rem;
        color: var(--muted-color);
        font-size: 1.1rem;
        font-weight: 700;
        letter-spacing: 0.12em;
    }

    .heading,
    .skills h1,
    .education-content h1,
    .experience .heading {
        margin: 0 0 2rem;
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: clamp(4rem, 6vw, 6.4rem);
        font-weight: 600;
        line-height: 1.1;
    }

    .about {
        display: grid;
        grid-template-columns: minmax(24rem, 0.75fr) minmax(0, 1.25fr);
        align-items: center;
        gap: 2rem 7rem;
        padding-top: 14rem;
    }

    .about > .heading {
        grid-column: 1 / -1;
        text-align: center;
    }

    .headshot-img {
        width: min(100%, 38rem);
        height: auto;
        aspect-ratio: 1;
        justify-self: center;
    }

    .headshot-img img {
        width: 93%;
        height: 93%;
        object-fit: cover;
        border: 7px solid var(--surface-color);
        box-shadow: var(--shadow-soft);
    }

    .headshot-img .circle-spin {
        border: 1px solid var(--accent-color);
        border-left: 1px solid var(--main-color);
        border-right: 1px solid var(--main-color);
    }

    .about-content {
        text-align: left;
    }

    .about-content h2 {
        margin-bottom: 2.5rem;
        color: var(--main-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 2.5rem;
    }

    .about-content h3 {
        margin: 2.3rem 0 0.8rem;
        color: var(--accent-color);
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.1em;
    }

    .about-content p {
        margin-bottom: 1rem;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--muted-color);
        font-size: 1.6rem;
        line-height: 1.8;
    }

    .skills > h1 {
        justify-content: flex-start;
    }

    .skills h3 {
        display: block;
        width: 100%;
        margin: 0 0 4rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted-color);
        font-size: 1.7rem;
        font-weight: 400;
        line-height: 1.8;
    }

    .skills-section {
        margin-top: 4rem;
    }

    .skills h2 {
        justify-content: flex-start;
        gap: 1.2rem;
        width: auto;
        margin: 0 0 1.8rem;
        padding: 0;
        border-radius: 0;
        background: transparent;
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 2.8rem;
    }

    .skills h2 span {
        color: var(--accent-color);
        font-size: 1.8rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr));
        gap: 1.5rem;
    }

    .skill-card {
        width: 100%;
        min-height: 19rem;
        margin: 0;
        padding: 2.2rem;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        text-align: left;
        box-shadow: 0 6px 20px rgba(32, 41, 35, 0.035);
        transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }

    .skill-card:hover {
        transform: translateY(-3px);
        border-color: var(--main-color);
        box-shadow: var(--shadow-soft);
    }

    .skill-card .skill-name {
        justify-content: flex-start;
        margin-bottom: 1rem;
        color: var(--main-color);
        font-size: 1.85rem;
        line-height: 1.35;
    }

    .skill-card .desc {
        color: var(--muted-color);
        font-size: 1.45rem;
        line-height: 1.7;
    }

    .education-content {
        display: block;
    }

    .education-content h1 {
        align-items: flex-start;
        max-width: none;
    }

    .education-content > p {
        display: block;
        max-width: 85rem;
        margin: 0 auto 3rem 0;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted-color);
        font-size: 1.7rem;
        line-height: 1.8;
    }

    .collapsible-boxes {
        width: 100%;
        max-width: 100rem;
        margin: 3rem auto;
        color: var(--text-color);
        font-size: 1.6rem;
    }

    .collapsible-boxes .collapsible-box {
        position: relative;
        margin-top: 1.2rem;
        overflow: hidden;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        box-shadow: none;
    }

    .collapsible-boxes .title {
        min-height: 6.4rem;
        padding: 1.5rem 2rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--text-color);
        font-size: 1.7rem;
        font-weight: 700;
    }

    .collapsible-boxes .title::after {
        flex: 0 0 1rem;
        width: 1rem;
        height: 1rem;
        border-color: var(--main-color);
    }

    .collapsible-boxes .content {
        padding: 0 2rem;
    }

    .collapsible-boxes .content > p {
        margin: 1.4rem 0;
        color: var(--muted-color);
        font-size: 1.5rem;
        line-height: 1.8;
    }

    .collapsible-boxes input:checked + .collapsible-box .title {
        background: color-mix(in srgb, var(--main-color) 7%, var(--surface-color));
    }

    .collapsible-boxes input:checked + .collapsible-box .content {
        max-height: 120rem;
        border-bottom: 0;
        padding: 1.8rem 2rem 2rem;
    }

    .collapsible-boxes .collapsible-box:hover {
        transform: none;
        box-shadow: var(--shadow-soft);
    }

    .collapsible-boxes .module-image {
        max-height: 32rem;
    }

    .experience .heading {
        margin-top: 0;
    }

    section.experience > p {
        max-width: 85rem;
        margin: 0 auto 3rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted-color);
        font-size: 1.7rem;
        line-height: 1.8;
    }

    .experience .timeline {
        width: min(100% - 5rem, 108rem);
        margin: 0 auto 5rem;
    }

    .experience .container2 {
        padding: 1.5rem 2.5rem;
        animation: none;
        opacity: 1;
    }

    .experience .container2:nth-child(n + 2) {
        margin-top: -8rem;
    }

    .text-box {
        padding: 2rem;
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        box-shadow: 0 8px 26px rgba(32, 41, 35, 0.045);
    }

    .container2 img {
        max-height: 24rem;
        margin-bottom: 1.2rem;
        border-radius: 3px;
    }

    .text-box h2 {
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 2.2rem;
    }

    .text-box small {
        margin-bottom: 0.8rem;
        color: var(--accent-color);
        font-size: 1.35rem;
        font-weight: 700;
    }

    .text-box p,
    .text-box ul {
        color: var(--muted-color);
        font-size: 1.45rem;
        line-height: 1.7;
    }

    .text-box ul {
        padding-left: 2rem;
    }

    .timeline::after {
        width: 2px;
        background: var(--border-color);
        animation: none;
    }

    .left-arrow {
        border-left-color: var(--surface-color);
    }

    .right-arrow {
        border-right-color: var(--surface-color);
    }

    .contact .heading {
        text-align: left;
    }

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

    .contact-layout {
        display: grid;
        grid-template-columns: minmax(22rem, 0.75fr) minmax(0, 1.25fr);
        align-items: start;
        gap: clamp(3rem, 6vw, 8rem);
        width: 100%;
    }

    .contact-copy > p {
        display: block;
        width: 100%;
        margin: 0 0 3rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--muted-color);
        font-size: 1.7rem;
        line-height: 1.8;
        text-align: left;
    }

    .contact-links {
        display: grid;
        gap: 1rem;
    }

    .contact-link {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        min-width: 0;
        padding: 1.2rem 1.4rem;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        color: var(--text-color);
        font-size: 1.4rem;
        overflow-wrap: anywhere;
        transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    }

    .contact-link i {
        flex: 0 0 1.8rem;
        color: var(--main-color);
        text-align: center;
    }

    .contact-link:hover {
        border-color: var(--main-color);
        background: color-mix(in srgb, var(--main-color) 7%, var(--surface-color));
        color: var(--main-color);
    }

    .contact form {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: clamp(1.8rem, 3vw, 3rem);
        border: 1px solid var(--border-color);
        border-radius: 5px;
        background: var(--surface-color);
        box-shadow: var(--shadow-soft);
        text-align: left;
    }

    .contact form .input-box {
        gap: 1.4rem;
    }

    .contact form .input-box .input-field {
        width: calc(50% - 0.7rem);
        margin: 0 0 1.6rem;
    }

    .contact form .input-box .input-field label,
    .contact form .textarea-field label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .contact form .input-box .input-field input,
    .contact form .textarea-field textarea {
        min-height: 4.8rem;
        padding: 1.2rem 1.4rem;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        background: var(--page-bg);
        color: var(--text-color);
        font-size: 1.5rem;
    }

    .contact form .input-box .input-field input::placeholder,
    .contact form .textarea-field textarea::placeholder {
        color: var(--muted-color);
        opacity: 0.8;
    }

    .contact form .textarea-field textarea {
        min-height: 18rem;
    }

    .form-actions {
        justify-content: flex-start;
        margin-top: 0;
    }

    .contact form .button {
        width: auto;
        height: auto;
    }

    .contact form .button .btn {
        width: auto;
        min-width: 16rem;
        min-height: 4.8rem;
        padding: 1rem 1.8rem;
        font-size: 1.4rem;
        cursor: pointer;
    }

    footer {
        min-height: 6rem;
        padding: 1.5rem;
        color: var(--muted-color);
        font-size: 1.2rem;
    }

    footer p {
        padding: 0;
        border: 0;
        background: transparent;
    }

    @keyframes rise-in {
        from { opacity: 0; transform: translateY(1.6rem); }
        to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 1050px) {
        .header {
            width: calc(100% - 3rem);
            gap: 0.6rem;
            padding-left: 1.4rem;
        }

        .navbar {
            gap: 0;
        }

        .navbar a {
            padding: 0.8rem 0.65rem;
            font-size: 1.2rem;
        }

        .home {
            gap: 3rem;
        }

        section {
            padding-right: 3rem;
            padding-left: 3rem;
        }
    }

    @media (max-width: 800px) {
        .contact-layout {
            grid-template-columns: 1fr;
            gap: 2.5rem;
        }

        .contact-copy > p {
            margin-bottom: 1.8rem;
        }

        .contact-links {
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
        }
    }

    @media (max-width: 800px) {
        .header {
            position: fixed;
            top: 1rem;
            min-height: 5.8rem;
            padding: 0.8rem 1rem 0.8rem 1.4rem;
        }

        .logo {
            margin-right: auto;
            font-size: 1.9rem;
        }

        .menu-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 4rem;
            height: 4rem;
            font-size: 2rem;
        }

        .header .button .btn {
            min-height: 3.8rem;
            padding: 0.7rem 1.2rem;
            font-size: 1.3rem;
        }

        .theme-toggle {
            width: 3.8rem;
            height: 3.8rem;
            font-size: 1.5rem;
        }

        .navbar {
            position: absolute;
            top: calc(100% + 0.8rem);
            left: auto;
            right: 0;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            width: min(27rem, calc(100vw - 3rem));
            padding: 0.8rem;
            border: 1px solid var(--border-color);
            border-radius: 5px;
            background: var(--surface-color);
            box-shadow: var(--shadow-soft);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-0.8rem);
            pointer-events: none;
            transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        }

        .navbar a {
            padding: 1rem 1.2rem;
            font-size: 1.4rem;
        }

        .navbar.open {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: auto;
        }

        section {
            padding: 10rem 2.2rem 5rem;
        }

        .home {
            grid-template-columns: 1fr 0.8fr;
            min-height: 100vh;
            gap: 1.5rem;
            padding-top: 10rem;
        }

        .home-content h1 {
            font-size: clamp(4.8rem, 10vw, 7rem);
        }

        .home-content .home-intro {
            font-size: 1.55rem;
        }

        .home-portrait {
            padding-right: 0;
            padding-left: 0;
        }

        .portrait-frame {
            height: clamp(30rem, 58vw, 45rem);
        }

        .portrait-note {
            right: -1rem;
            max-width: 24rem;
            padding: 1rem;
            font-size: 1.1rem;
        }

        .about {
            grid-template-columns: minmax(20rem, 0.8fr) minmax(0, 1.2fr);
            gap: 2rem 3rem;
        }

        .experience .timeline {
            width: calc(100% - 1rem);
            margin: 0 auto 3rem;
        }

        .experience .timeline::after {
            left: 1rem;
            margin-left: -1px;
        }

        .experience .container2,
        .experience .container2.left,
        .experience .container2.right {
            width: 100%;
            left: 0;
            padding: 1rem 0 1rem 3rem;
        }

        .experience .container2:nth-child(n + 2) {
            margin-top: 0;
        }

        .experience .container2 img {
            max-height: 19rem;
        }

        .experience .left-arrow,
        .experience .right-arrow {
            left: -2rem;
            right: auto;
        }

        .experience .right-arrow {
            border-right: 0;
            border-left: 15px solid var(--surface-color);
        }

        .experience .container2::after,
        .experience .container2.right::after {
            left: 1rem;
            right: auto;
            transform: translateX(-50%);
        }
    }

    @media (max-width: 580px) {
        .header {
            gap: 0.3rem;
        }

        .logo {
            font-size: 1.7rem;
        }

        .header .button .btn {
            min-height: 3.5rem;
            padding: 0.6rem 0.9rem;
            font-size: 1.2rem;
        }

        .menu-icon,
        .theme-toggle {
            width: 3.4rem;
            height: 3.4rem;
        }

        section {
            padding-right: 1.8rem;
            padding-left: 1.8rem;
        }

        .home {
            grid-template-columns: 1fr;
            align-content: center;
            padding-top: 10rem;
            padding-bottom: 7rem;
        }

        .home-content {
            padding-top: 2rem;
        }

        .home-content h1 {
            font-size: clamp(4.8rem, 15vw, 7rem);
        }

        .home-content h2 {
            margin-top: 1.4rem;
            font-size: 2.1rem;
        }

        .home-content .home-intro {
            margin-top: 1rem;
            font-size: 1.5rem;
        }

        .home-actions {
            gap: 1.5rem;
            margin-top: 2rem;
        }

        .home .social-media-icons {
            margin-top: 2.5rem;
        }

        .home-portrait {
            width: min(82%, 32rem);
            padding: 0 0 3rem;
            border-radius: 30%;
        }

        .portrait-frame {
            height: 34rem;
            border-radius: 30%;
        }

        .portrait-note {
            right: -2rem;
            bottom: 0;
        }

        .portrait-orbit {
            width: 7rem;
            height: 7rem;
        }

        .home-index {
            right: 1.8rem;
            bottom: 1.8rem;
        }

        .about {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 1.5rem;
        }

        .about > .heading {
            text-align: center;
        }

        .headshot-img {
            width: min(30rem, 75vw);
            margin: 1rem auto;
        }

        .about-content h3 {
            margin-top: 1.8rem;
        }

        .skills-grid {
            grid-template-columns: 1fr;
        }

        .contact form {
            padding: 1.5rem;
        }

        .contact form .input-box .input-field {
            width: 100%;
        }

        .form-actions {
            align-items: flex-start;
            flex-direction: column;
        }

        .contact .social-media-icons {
            justify-content: flex-start;
        }

        .collapsible-boxes .title {
            gap: 1rem;
            font-size: 1.5rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            scroll-behavior: auto !important;
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    :root {
        --page-bg: #03070c;
        --text-color: #e5fbff;
        --muted-color: #91aeb8;
        --main-color: #19f4ff;
        --logo-color: #f2fdff;
        --button-text-color: #041014;
        --surface-color: #09131a;
        --border-color: #16404b;
        --accent-color: #ff9f43;
        --shadow-soft: 0 18px 54px rgba(0, 0, 0, 0.5);
    }

    body.light-mode,
    html.light-mode body {
        --page-bg: #e8f5f4;
        --text-color: #10272b;
        --muted-color: #49656a;
        --main-color: #007e8a;
        --logo-color: #10272b;
        --button-text-color: #f2ffff;
        --surface-color: #f5fffd;
        --border-color: #b8d9d8;
        --accent-color: #bd541d;
        --shadow-soft: 0 18px 54px rgba(19, 46, 61, 0.14);
        background-image: radial-gradient(ellipse at 72% 42%, rgba(0, 126, 138, 0.08), transparent 54%);
    }

    body {
        background-color: var(--page-bg);
        background-image:
            radial-gradient(ellipse at 72% 42%, rgba(0, 167, 190, 0.13), transparent 52%),
            linear-gradient(135deg, rgba(255, 159, 67, 0.045), transparent 48%);
        background-size: 100% 100%, 100% 100%;
    }

    .header {
        border-color: color-mix(in srgb, var(--main-color) 38%, var(--border-color));
        background: color-mix(in srgb, var(--surface-color) 94%, transparent);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34), 0 0 18px rgba(0, 229, 255, 0.055);
    }

    .logo,
    .home-content h1,
    .heading,
    .skills h1,
    .education-content h1,
    .experience .heading,
    .about-content h2,
    .skills h2,
    .text-box h2 {
        font-family: 'Orbitron', sans-serif;
    }

    .logo {
        font-size: 2rem;
        font-weight: 700;
        text-shadow: 0 0 18px color-mix(in srgb, var(--main-color) 25%, transparent);
    }

    body {
        font-family: 'Orbitron', sans-serif;
    }

    .navbar a,
    .button .btn,
    .home-actions .btn,
    .heading,
    .skills h1,
    .education-content h1,
    .experience .heading,
    .about-content h2,
    .skills h2,
    .text-box h2 {
        font-family: 'Orbitron', sans-serif;
    }

    .eyebrow,
    .portrait-note span,
    .home-index {
        font-family: 'Orbitron', sans-serif;
        letter-spacing: 0;
    }

    .eyebrow {
        font-size: 1.2rem;
    }

    .home-content h1 {
        font-weight: 700;
    }

    .home-content h1 em {
        color: var(--main-color);
        font-style: normal;
        text-shadow: 0 0 12px color-mix(in srgb, var(--main-color) 55%, transparent),
            0 0 32px color-mix(in srgb, var(--main-color) 22%, transparent);
    }

    .home-content h2 {
        font-family: 'Orbitron', sans-serif;
        font-weight: 500;
    }

    .portrait-frame {
        border: 1px solid color-mix(in srgb, var(--main-color) 48%, var(--border-color));
        border-radius: 5px;
        box-shadow: var(--shadow-soft), 0 0 28px rgba(0, 229, 255, 0.1);
    }

    .portrait-frame::after {
        position: absolute;
        inset: 1.2rem;
        border: 1px solid color-mix(in srgb, var(--main-color) 48%, transparent);
        content: '';
        pointer-events: none;
    }

    .portrait-orbit {
        top: -0.5rem;
        right: -1rem;
        width: 8rem;
        height: 8rem;
        border: 1px solid var(--main-color);
        border-radius: 0;
        border-top: 0;
        border-left: 0;
        opacity: 0.9;
        filter: drop-shadow(0 0 5px var(--main-color));
    }

    .portrait-note {
        border-color: var(--border-color);
        font-size: 1.2rem;
    }

    .portrait-note span {
        font-size: 1.6rem;
    }

    .home-index {
        font-size: 1rem;
    }

    .skill-card {
        position: relative;
        overflow: hidden;
        border-radius: 4px;
        border-color: color-mix(in srgb, var(--main-color) 23%, var(--border-color));
        background: linear-gradient(145deg, var(--surface-color), color-mix(in srgb, var(--main-color) 4%, var(--surface-color)));
    }

    .skill-card::before {
        position: absolute;
        top: 0;
        left: 0;
        width: 4rem;
        height: 2px;
        background: var(--main-color);
        content: '';
        box-shadow: 0 0 10px color-mix(in srgb, var(--main-color) 75%, transparent);
        transition: width 0.25s ease;
    }

    .skill-card:hover::before {
        width: 100%;
    }

    .text-box,
    .contact form,
    .collapsible-boxes .collapsible-box {
        border-radius: 4px;
    }

    .text-box h2 {
        font-weight: 600;
    }

    .text-box small {
        font-family: 'Orbitron', sans-serif;
        font-size: 1.2rem;
    }

    .navbar a.active {
        box-shadow: inset 0 -2px var(--main-color);
        text-shadow: 0 0 12px color-mix(in srgb, var(--main-color) 48%, transparent);
    }

    .button .btn,
    .home-actions .btn {
        box-shadow: 0 0 20px color-mix(in srgb, var(--main-color) 23%, transparent);
    }

    .button .btn:hover,
    .home-actions .btn:hover {
        box-shadow: 0 0 26px color-mix(in srgb, var(--main-color) 38%, transparent);
    }

    .social-media-icons a:hover {
        box-shadow: 0 0 16px color-mix(in srgb, var(--main-color) 32%, transparent);
    }

    .text-box,
    .contact form,
    .collapsible-boxes .collapsible-box {
        border-color: color-mix(in srgb, var(--main-color) 20%, var(--border-color));
        background: color-mix(in srgb, var(--surface-color) 96%, transparent);
    }

    .contact form .input-box .input-field input,
    .contact form .textarea-field textarea {
        border-color: var(--border-color);
        background: color-mix(in srgb, var(--page-bg) 85%, var(--surface-color));
    }

    .contact form .input-box .input-field input:focus,
    .contact form .textarea-field textarea:focus {
        border-color: var(--main-color);
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--main-color) 20%, transparent);
    }

    .collapsible-boxes input:checked + .collapsible-box .title {
        color: var(--main-color);
    }

    .theme-toggle:focus-visible,
    .button .btn:focus-visible,
    .home-actions .btn:focus-visible {
        outline-color: var(--main-color);
    }

    @media (max-width: 580px) {
        .portrait-orbit {
            right: -0.5rem;
        }
    }

    .portrait-frame {
        position: relative;
        display: grid;
        place-items: center;
        width: min(100%, 38rem);
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
        overflow: visible;
        border: 0;
        border-radius: 50%;
        background: transparent;
        box-shadow: none;
    }

    .portrait-frame img {
        width: 93%;
        height: 93%;
        border: 7px solid var(--surface-color);
        border-radius: 50%;
        box-shadow: var(--shadow-soft), 0 0 28px rgba(0, 229, 255, 0.1);
    }

    .portrait-frame::after {
        border-radius: 50%;
    }

    .portrait-orbit {
        top: 50%;
        left: 50%;
        z-index: 2;
        width: 106%;
        height: auto;
        aspect-ratio: 1;
        transform: translate(-50%, -50%);
        border: 0.4rem solid var(--border-color);
        border-right-color: var(--main-color);
        border-left-color: var(--main-color);
        border-radius: 50%;
        opacity: 1;
        filter: drop-shadow(0 0 5px var(--main-color));
        animation: portraitNetOrbit 24s linear infinite;
        pointer-events: none;
    }

    .skills-intro {
        display: block;
        max-width: 85rem;
        margin: 0 auto 3rem;
        color: var(--muted-color);
        font-size: 1.7rem;
        line-height: 1.8;
        text-align: center;
    }

    .skills-section {
        min-height: 0;
        margin: 3rem 0 0;
        padding: 3rem 0 0;
        border-top: 1px solid var(--border-color);
    }

    .skills-section h2 {
        margin-bottom: 1.5rem;
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
        gap: 1.2rem;
    }

    .skill-card {
        min-height: 0;
        padding: 1.8rem;
    }

    .education-content > p {
        margin-bottom: 2rem;
    }

    .collapsible-boxes {
        margin: 2rem 0 4rem;
    }

    .collapsible-boxes .collapsible-box + input + .collapsible-box {
        margin-top: 1rem;
    }

    .collapsible-boxes .title {
        min-height: 5.8rem;
        padding: 1.3rem 1.6rem;
        font-size: 1.55rem;
    }

    .collapsible-boxes .content > p {
        margin: 1.2rem 0;
    }

    .collapsible-boxes .module-image {
        max-height: 26rem;
        border: 1px solid var(--border-color);
    }

    .collapsible-boxes input {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .collapsible-boxes input:focus-visible + .collapsible-box .title {
        outline: 2px solid var(--main-color);
        outline-offset: -2px;
    }

    .experience .timeline {
        width: min(100% - 3rem, 108rem);
        margin-bottom: 4rem;
    }

    .experience .container2 {
        padding: 1rem 2rem;
    }

    .experience .container2:nth-child(n + 2) {
        margin-top: 0;
    }

    .experience .container2 img {
        border: 1px solid var(--border-color);
    }

    .text-box {
        padding: 1.8rem;
    }

    @media (max-width: 800px) {
        .skills-section {
            margin-top: 2.5rem;
            padding-top: 2.5rem;
        }

        .experience .container2,
        .experience .container2.left,
        .experience .container2.right {
            padding: 1rem 0 1rem 3rem;
        }
    }

    .experience .timeline {
        display: grid;
        grid-template-columns: repeat(4, minmax(28rem, 1fr));
        gap: 2.4rem;
        width: min(calc(100% - 3rem), 132rem);
        max-width: 132rem;
        margin: 4rem auto 6rem;
        padding-top: 3.2rem;
        overflow: visible;
    }

    .experience .timeline::after {
        top: 17.6rem;
        left: 0;
        width: 100%;
        height: 2px;
        margin: 0;
        background: var(--border-color);
        box-shadow: none;
    }

    .experience .timeline::before {
        position: absolute;
        top: 17.6rem;
        left: calc(100% - 26rem);
        z-index: 1;
        width: 26rem;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--main-color), transparent);
        box-shadow: 0 0 12px var(--main-color);
        content: '';
        animation: timelineSweep 4s linear infinite;
        pointer-events: none;
    }

    @keyframes timelineSweep {
        from {
            left: calc(var(--timeline-track-width, 100%) - 26rem);
            opacity: 0;
        }

        8%, 90% {
            opacity: 1;
        }

        to {
            left: 0;
            opacity: 0;
        }
    }

    @keyframes timelineCardIn {
        from {
            opacity: 0;
            transform: translateY(2.4rem) scale(0.96);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes timelineNodePulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(0.85);
            box-shadow: 0 0 6px color-mix(in srgb, var(--main-color) 40%, transparent);
        }

        50% {
            transform: translate(-50%, -50%) scale(1.3);
            box-shadow: 0 0 16px var(--main-color);
        }
    }

    .experience .container2,
    .experience .container2.left,
    .experience .container2.right {
        position: relative;
        display: flex;
        flex-direction: column;
        width: auto;
        left: auto;
        clear: none;
        margin: 0;
        padding: 0;
        animation: timelineCardIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
        opacity: 1;
    }

    .experience .container2:nth-child(4) {
        animation-delay: 0s;
    }

    .experience .container2:nth-child(3) {
        animation-delay: 0.12s;
    }

    .experience .container2:nth-child(2) {
        animation-delay: 0.24s;
    }

    .experience .container2:nth-child(1) {
        animation-delay: 0.36s;
    }

    .experience .container2:nth-child(n + 2) {
        margin-top: 0;
    }

    .experience .container2::before {
        position: absolute;
        top: 16.5rem;
        left: 50%;
        z-index: 2;
        width: 1rem;
        height: 1rem;
        border: 2px solid var(--main-color);
        border-radius: 50%;
        background: var(--page-bg);
        box-shadow: 0 0 12px color-mix(in srgb, var(--main-color) 60%, transparent);
        transform: translate(-50%, -50%);
        content: '';
        animation: timelineNodePulse 1.6s ease-in-out infinite;
    }

    .experience .container2 > img {
        width: 100%;
        height: 16rem;
        max-height: none;
        margin: 0 0 1rem;
        object-fit: cover;
    }

    .experience .container2 .text-box {
        flex: 1;
        padding: 2rem;
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    }

    .experience .container2:hover .text-box {
        transform: translateY(-3px);
        border-color: var(--main-color);
        box-shadow: 0 0 24px color-mix(in srgb, var(--main-color) 18%, transparent);
    }

    .experience .container2 .text-box h2 {
        font-size: 1.9rem;
        line-height: 1.35;
    }

    .experience .container2 .text-box p,
    .experience .container2 .text-box ul {
        font-size: 1.4rem;
        line-height: 1.6;
    }

    .experience .left-arrow,
    .experience .right-arrow {
        display: none;
    }

    @media (max-width: 1300px) {
        .experience .timeline {
            --timeline-track-width: 127.2rem;
            grid-template-columns: none;
            grid-auto-columns: 30rem;
            grid-auto-flow: column;
            gap: 2.4rem;
            width: calc(100% - 3rem);
            padding: 3.2rem 0.2rem 1.4rem;
            overflow-x: auto;
            overflow-y: hidden;
            overscroll-behavior-x: contain;
            scroll-snap-type: x mandatory;
            scrollbar-color: var(--main-color) var(--surface-color);
            scrollbar-width: thin;
        }

        .experience .timeline::after {
            top: 19.7rem;
            width: 127.2rem;
        }

        .experience .timeline::before {
            top: 19.7rem;
        }

        .experience .container2 {
            scroll-snap-align: start;
        }
    }

    @media (min-width: 1301px) {
        .experience .timeline::after,
        .experience .timeline::before {
            top: 19.7rem;
        }
    }

    @media (max-width: 800px) {
        .experience .container2 > img {
            height: 16rem;
        }
    }

    .education-content {
        width: 100%;
    }

    .education-content > p {
        max-width: 92rem;
        margin: 0 auto 2.5rem;
        text-align: center;
    }

    /* Timeline polish: calmer nodes, year badges, hover-linked dots, vertical mobile layout */
    .experience .container2::before {
        animation: none;
        transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    }

    .experience .container2:hover::before,
    .experience .container2:focus-within::before {
        background: var(--main-color);
        transform: translate(-50%, -50%) scale(1.5);
        box-shadow: 0 0 16px var(--main-color);
    }

    .experience .container2 .text-box small {
        display: inline-block;
        margin-bottom: 0.8rem;
        padding: 0.2rem 1rem;
        border: 1px solid var(--main-color);
        border-radius: 2rem;
        color: var(--main-color);
        font-size: 1.2rem;
        font-weight: 600;
    }

    .experience .container2 .text-box ul {
        padding-left: 1.8rem;
    }

    .experience .container2:nth-child(1) { animation-delay: 0s; }
    .experience .container2:nth-child(2) { animation-delay: 0.12s; }
    .experience .container2:nth-child(3) { animation-delay: 0.24s; }
    .experience .container2:nth-child(4) { animation-delay: 0.36s; }

    @media (max-width: 800px) {
        .experience .timeline {
            --timeline-track-width: 100%;
            display: flex;
            flex-direction: column;
            gap: 2.4rem;
            width: calc(100% - 3rem);
            padding: 1rem 0 1rem 3rem;
            overflow: visible;
        }

        .experience .timeline::after {
            top: 0;
            bottom: 0;
            left: 0.8rem;
            width: 2px;
            height: auto;
        }

        .experience .timeline::before {
            display: none;
        }

        .experience .container2,
        .experience .container2.left,
        .experience .container2.right {
            padding: 0;
        }

        .experience .container2::before {
            top: 1.6rem;
            left: -2.2rem;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .experience .container2,
        .experience .timeline::before {
            animation: none;
        }
    }

    .education-overview {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 92rem;
        margin: 0 auto 2.5rem;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .education-overview > div {
        min-width: 0;
        padding: 1.4rem 1.6rem;
        text-align: center;
    }

    .education-overview > div + div {
        padding-left: 1.6rem;
        border-left: 1px solid var(--border-color);
    }

    .education-overview dt {
        margin-bottom: 0.5rem;
        color: var(--main-color);
        font-size: 1.1rem;
        text-transform: uppercase;
    }

    .education-overview dd {
        color: var(--text-color);
        font-size: 1.35rem;
        line-height: 1.5;
    }

    .collapsible-boxes {
        position: relative;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 1.8rem;
        width: 100%;
        max-width: 120rem;
        margin: 2.5rem auto 4rem;
    }

    .collapsible-boxes .collapsible-box,
    .collapsible-boxes .collapsible-box + input + .collapsible-box {
        min-width: 0;
        margin: 0;
        border-color: color-mix(in srgb, var(--main-color) 28%, var(--border-color));
        background: linear-gradient(145deg, var(--surface-color), color-mix(in srgb, var(--main-color) 4%, var(--surface-color)));
        transition: border-color 0.25s ease, box-shadow 0.25s ease;
    }

    .collapsible-boxes .title {
        min-height: 7rem;
        justify-content: space-between;
        gap: 1.5rem;
        padding: 1.6rem 1.8rem;
        font-family: 'Orbitron', sans-serif;
        font-size: 1.45rem;
        line-height: 1.5;
        text-align: left;
    }

    .collapsible-boxes .title::after {
        transition: transform 0.25s ease, border-color 0.25s ease;
    }

    .collapsible-boxes .module-summary {
        margin: 0 1.8rem 1.5rem;
        padding-left: 1rem;
        border-left: 2px solid var(--main-color);
        color: var(--muted-color);
        font-size: 1.2rem;
        line-height: 1.6;
    }

    .collapsible-boxes .collapsible-box:hover {
        border-color: var(--main-color);
        box-shadow: 0 0 22px color-mix(in srgb, var(--main-color) 14%, transparent);
    }

    .collapsible-boxes input:checked + .collapsible-box {
        border-color: color-mix(in srgb, var(--main-color) 72%, var(--border-color));
        box-shadow: 0 0 24px color-mix(in srgb, var(--main-color) 14%, transparent);
    }

    .collapsible-boxes input:checked + .collapsible-box .title {
        color: var(--main-color);
    }

    .collapsible-boxes .content {
        padding-right: 1.8rem;
        padding-left: 1.8rem;
    }

    .collapsible-boxes input:checked + .collapsible-box .content {
        max-height: 120rem;
        padding: 1.6rem 1.8rem 2rem;
    }

    .collapsible-boxes .module-image {
        width: 100%;
        height: 17rem;
        max-height: none;
        margin-bottom: 1.5rem;
        object-fit: cover;
    }

    .collapsible-boxes .content > p {
        font-size: 1.45rem;
        line-height: 1.75;
    }

    .collapsible-boxes .content > .module-aim {
        margin-top: 0;
        padding: 1.2rem 1.4rem;
        border-left: 2px solid var(--main-color);
        background: color-mix(in srgb, var(--main-color) 6%, var(--surface-color));
        color: var(--text-color);
        font-family: 'Orbitron', sans-serif;
        font-size: 1.25rem;
    }

    @media (max-width: 800px) {
        .education-overview {
            grid-template-columns: minmax(0, 1fr);
        }

        .education-overview > div,
        .education-overview > div + div {
            padding: 1.2rem 0;
            border-left: 0;
        }

        .education-overview > div + div {
            border-top: 1px solid var(--border-color);
        }

        .collapsible-boxes {
            grid-template-columns: minmax(0, 1fr);
            gap: 1.2rem;
        }

        .collapsible-boxes .module-image {
            height: 18rem;
        }
    }

    h1,
    h2,
    h3,
    .home-content h1,
    .home-content h2,
    .heading,
    .skills h1,
    .skills h2,
    .education-content h1,
    .experience .heading,
    .about-content h2,
    .about-content h3,
    .text-box h2 {
        font-family: 'Orbitron', sans-serif;
    }

    .skills > h1,
    .education-content h1 {
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .about {
        --accent-color: #ffffff;
    }

    body.light-mode .about,
    html.light-mode body .about {
        --accent-color: #000000;
    }

    #vanta-net {
        position: fixed;
        inset: 0;
        z-index: -1;
        overflow: hidden;
        opacity: 0.36;
        pointer-events: none;
        transform: scale(1);
        transition: opacity 0.18s cubic-bezier(0.2, 0.8, 0.2, 1),
            transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    body.light-mode #vanta-net,
    html.light-mode body #vanta-net {
        opacity: 0.28;
    }

    body.page-entering #vanta-net,
    body.page-leaving #vanta-net {
        opacity: 0.52;
        transform: scale(1.03);
    }

    #vanta-net canvas {
        display: block;
    }

    body {
        position: relative;
        isolation: isolate;
    }

    body.page-entering > :not(script):not(header):not(#vanta-net) {
        animation: pageSlideInFromRight 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    body.page-leaving > :not(script):not(header):not(#vanta-net) {
        animation: pageSlideOutLeft 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    }

    @keyframes pageSlideInFromRight {
        from { opacity: 0.65; transform: translateX(7vw); }
        to { opacity: 1; transform: translateX(0); }
    }

    @keyframes pageSlideOutLeft {
        from { opacity: 1; transform: translateX(0); }
        to { opacity: 0.65; transform: translateX(-100vw); }
    }

    .portrait-orbit,
    .headshot-img .circle-spin {
        border: 0.4rem solid var(--border-color);
        border-right-color: var(--main-color);
        border-left-color: var(--main-color);
        border-radius: 50%;
        opacity: 1;
        filter: drop-shadow(0 0 5px var(--main-color));
        animation: portraitNetOrbit 24s linear infinite;
    }

    .headshot-img .circle-spin {
        width: 106%;
        height: 106%;
        pointer-events: none;
    }

    /* Experience carousel */
    .carousel {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 1.6rem;
        width: min(100% - 3rem, 120rem);
        margin: 3rem auto 6rem;
    }

    .carousel-track {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        border-radius: 1rem;
    }

    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-slide {
        flex: 0 0 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
        gap: 3rem;
        align-items: center;
        min-height: 46rem;
        padding: 2rem;
        scroll-snap-align: start;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        max-height: 40rem;
        border-radius: 1rem;
        border: 1px solid var(--border-color);
        object-fit: cover;
    }

    .carousel-slide .text-box {
        padding: 3rem;
    }

    .carousel-slide .text-box h2 {
        font-size: clamp(2.2rem, 3vw, 3.2rem);
    }

    .carousel-btn {
        display: grid;
        place-items: center;
        width: 4.8rem;
        height: 4.8rem;
        border: 2px solid var(--main-color);
        border-radius: 50%;
        background: transparent;
        color: var(--main-color);
        font-size: 1.8rem;
        cursor: pointer;
        transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
    }

    .carousel-btn:hover:not(:disabled),
    .carousel-btn:focus-visible {
        background: var(--main-color);
        color: var(--page-bg);
    }

    .carousel-btn:disabled {
        opacity: 0.3;
        cursor: default;
    }

    .carousel-track:focus-visible {
        outline: 2px solid var(--main-color);
    }

    .carousel-dots {
        display: flex;
        grid-column: 2;
        justify-content: center;
        gap: 1rem;
    }

    .carousel-dots button {
        width: 1.2rem;
        height: 1.2rem;
        padding: 0;
        border: 2px solid var(--main-color);
        border-radius: 50%;
        background: transparent;
        cursor: pointer;
        transition: transform 0.25s ease, background 0.25s ease;
    }

    .carousel-dots button.active {
        background: var(--main-color);
        transform: scale(1.3);
    }

    @media (max-width: 800px) {
        .carousel {
            grid-template-columns: 1fr 1fr;
        }

        .carousel-track {
            grid-column: 1 / -1;
            grid-row: 1;
        }

        .carousel-btn.prev { grid-row: 3; justify-self: end; }
        .carousel-btn.next { grid-row: 3; justify-self: start; }

        .carousel-dots {
            grid-column: 1 / -1;
            grid-row: 2;
        }

        .carousel-slide {
            grid-template-columns: 1fr;
            min-height: 0;
            padding: 0.5rem;
        }

        .carousel-slide img {
            max-height: 22rem;
        }
    }

.portfolio-chat-launcher {
    position: fixed;
    right: 2.4rem;
    bottom: 2.4rem;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    min-height: 5.2rem;
    padding: 0 1.8rem;
    border: 1px solid var(--main-color);
    border-radius: 5px;
    background: var(--main-color);
    color: var(--button-text-color);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
}

.portfolio-chat-launcher i {
    font-size: 1.8rem;
}

.portfolio-chat-launcher:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
}

.portfolio-chat {
    position: fixed;
    inset: auto 2.4rem 8.8rem auto;
    display: none;
    flex-direction: column;
    width: min(42rem, calc(100vw - 3.2rem));
    height: min(62rem, calc(100dvh - 11rem));
    max-height: calc(100dvh - 11rem);
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    font-family: inherit;
}

.portfolio-chat[open] {
    display: flex;
}

.portfolio-chat::backdrop {
    background: rgba(12, 20, 17, 0.38);
    backdrop-filter: blur(2px);
}

.portfolio-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.8rem 2rem 1.4rem;
    border-bottom: 1px solid var(--border-color);
}

.portfolio-chat-kicker {
    margin: 0 0 0.4rem;
    color: var(--main-color);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.portfolio-chat-header h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.3;
}

.portfolio-chat-close,
.portfolio-chat-form button {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: transparent;
    color: var(--text-color);
    font-size: 1.7rem;
    cursor: pointer;
}

.portfolio-chat-close:hover {
    background: color-mix(in srgb, var(--main-color) 12%, var(--surface-color));
}

.portfolio-chat-note {
    margin: 0;
    padding: 1rem 2rem;
    color: var(--muted-color, var(--text-color));
    font-size: 1.2rem;
}

.portfolio-chat-messages {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    min-height: 12rem;
    padding: 1.4rem 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.portfolio-chat-message {
    width: fit-content;
    max-width: 88%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.35rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.portfolio-chat-message.assistant {
    align-self: flex-start;
    background: color-mix(in srgb, var(--main-color) 8%, var(--surface-color));
}

.portfolio-chat-message.user {
    align-self: flex-end;
    border-color: var(--main-color);
    background: var(--main-color);
    color: var(--button-text-color);
}

.portfolio-chat-typing {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 5.8rem;
    min-height: 4.2rem;
}

.portfolio-chat-typing span {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--main-color);
    animation: portfolio-chat-pulse 1s ease-in-out infinite;
}

.portfolio-chat-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.portfolio-chat-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes portfolio-chat-pulse {
    0%,
    60%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-0.35rem);
    }
}

.portfolio-chat-prompts {
    display: flex;
    gap: 0.7rem;
    padding: 0.8rem 1.6rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.portfolio-chat-prompts::-webkit-scrollbar {
    display: none;
}

.portfolio-chat-prompts button {
    flex: 0 0 auto;
    min-height: 3.4rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: transparent;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
}

.portfolio-chat-prompts button:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.portfolio-chat-form {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 1.6rem;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.portfolio-chat-form input {
    flex: 1 1 auto;
    width: 0;
    min-height: 4rem;
    padding: 0 0.8rem;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font-size: 1.3rem;
}

.portfolio-chat-form input::placeholder {
    color: var(--muted-color, var(--text-color));
    opacity: 0.8;
}

.portfolio-chat-form button {
    border-color: var(--main-color);
    background: var(--main-color);
    color: var(--button-text-color);
}

.portfolio-chat-form button:disabled {
    opacity: 0.55;
    cursor: wait;
}

.portfolio-chat-status {
    min-height: 2.8rem;
    margin: 0;
    padding: 0.4rem 2rem 0.8rem;
    color: var(--muted-color, var(--text-color));
    font-size: 1.1rem;
}

.portfolio-chat .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .portfolio-chat-launcher {
        right: 1.4rem;
        bottom: 1.4rem;
        min-height: 4.8rem;
        padding: 0 1.4rem;
    }

    .portfolio-chat {
        inset: auto 1rem 7.4rem 1rem;
        width: auto;
        height: min(58rem, calc(100dvh - 9rem));
        max-height: calc(100dvh - 9rem);
    }

    .portfolio-chat-header {
        padding: 1.4rem;
    }

    .portfolio-chat-note {
        padding: 0.8rem 1.4rem;
    }

    .portfolio-chat-messages {
        padding: 1.2rem 1.4rem;
    }

    .portfolio-chat-prompts {
        padding-right: 1.2rem;
        padding-left: 1.2rem;
    }
}
