:root {
    --bg-primary: #0a0a0a;
    --bg-card: #141414;
    --text-body: #a1a1aa;
    --text-heading: #e4e4e7;
    --text-nav: #a1a1aa;
    --text-white: #ffffff;
    --accent-color: #cf3f36;
    --accent-rgb: 207 63 54;
    --accent-hover: #ef4444;
    --bg-badge: #27272a;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(207, 63, 54, 0.1);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-card: #f4f4f5;
    --text-body: #52525b;
    --text-heading: #18181b;
    --text-nav: #52525b;
    --text-white: #18181b;
    --bg-badge: #e4e4e7;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-bg-hover: rgba(207, 63, 54, 0.05);
}

.theme-toggle {
    cursor: pointer;
    /* padding: 10px; */
    margin-bottom: 14px;
    font-size: 20px;
    color: var(--text-nav);
    transition: color 0.3s;
    margin-left: 20px;
}
.theme-toggle:hover {
    color: var(--accent-color);
}

* {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
}
.body {
    overflow: hidden;
    background-color: var(--bg-primary);
}

.header {
    min-height: 90vh;
    width: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
}

/*-----------------Globally p tag targeted styling-----------------*/

@media screen and (max-width: 768px) {
    h4,
    h2 {
        font-size: 18px !important;
    }

    h6 {
        font-size: 14px !important;
    }
    p {
        font-size: 14px;
    }

    .project-img,
    .experience-img {
        width: 100%;
        height: 25px;
        width: 25px;
    }

    .project-headers,
    .experience-headers {
        display: none !important;
    }
}

nav {
    max-width: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15%;
    z-index: 1000;
}

.nav-links {
    display: flex;
    align-items: center;
}

.menu-item {
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding: 0;
}

.menu-item li {
    margin: 0 10px;
}

.alllogo {
    top: 10px;
    position: relative;
    height: 50px;
}

.logo:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}
.logo {
    text-decoration: none;
    color: var(--accent-color);
    font-size: 40px;
    font-family: "Lucida Calligraphy";
    font-weight: 600;
}

.nav-links ul li {
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a {
    color: var(--text-nav);
    text-decoration: none;
    font-size: 20px;
}

.nav-links ul li::after {
    content: "";
    width: 0%;
    height: 2px;
    background: var(--accent-hover);
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links.sticky ul li::after {
    background: #f44336; /* Adjust the background color for sticky state */
}

.nav-links ul li:hover::after,
.nav-links.sticky ul li.active::after {
    width: 100%;
}

.wrapper {
    display: flex;
    height: calc(127vh - 210px);
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    padding: 0 15%;
    position: relative;
}

/* .wrapper::before {
    position: absolute;
    content: "";
    height: 310px;
    width: 350px;
    border-radius: 50%;
    left: -12%;
    top: 39%;
    background: linear-gradient(45deg, pink, #cf3f36);
    animation: object1 6s linear infinite;
}

.wrapper::after {
    position: absolute;
    content: "";
    height: 150px;
    width: 150px;
    border-radius: 50%;
    left: 80%;
    top: 4%;
    background: linear-gradient(45deg, #cf3f36, pink);
    animation: object2 6s linear infinite;
}
@keyframes object1 {
    50% {
        left: -16%;
        top: 44%;
    }
}
@keyframes object2 {
    50% {
        left: 85%;
        top: 0%;
    }
} */

.cols {
    width: 50%;
}
.cols0 {
    width: 60%;
    z-index: 5;
}
.topline {
    display: block;
    position: relative;
    font-size: 40px;
    font-weight: 500;
    letter-spacing: 5px;
    color: var(--text-heading);
}
/* .topline::after {
    position: absolute;
    content: "";
    height: 4px;
    width: 45px;
    bottom: 10px;
    background-color: var(--text-heading);
} */
h1 {
    display: block;
    font-size: 5em;
    font-weight: 900;
}

.multiText {
    color: var(--accent-color);
    text-transform: capitalize;
}
.wrapper .cols p {
    display: block;
    font-weight: 500;
    font-size: 1em;
    color: var(--text-body);
    font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
        sans-serif;
}

.wrapper .cols > a {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;

    font-size: 18px;
    text-align: left;
    margin-right: 50px;
    font-weight: 500;
    padding: 10px 24px;
    margin-top: 30px;
    border-radius: 9999px; /* Pill shape */
    border: 1px solid var(--accent-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}
.wrapper .cols a:hover {
    color: var(--accent-color);
    background: none;
}

.imgbox {
    position: relative;
    width: 100%;
    height: 100%;
}

.imgbox img {
    position: relative;
    height: 100%;
    width: calc(100% - 90px);
    top: 15px;
    right: 100px;
}

nav .fa {
    display: none;
}

.title-btn {
    background-color: transparent;
    border: 1px solid var(--accent-color);
    border-radius: 9999px;
    padding: 10px 24px;
    color: var(--text-nav);
    width: auto;
    min-width: 140px;
    height: auto;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 500;
}

.title-btn::after {
    content: "";
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    display: block;
    position: absolute;
    top: 0;
    left: -100%;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.title-btn:hover::after {
    left: 0%;
}

.title-btn > span {
    position: relative;
    z-index: 1;
    color: var(--text-heading);
    transition: color 0.3s;
}

.title-btn:hover > span {
    color: #fff;
}

.icon-bar {
    position: fixed !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 9999 !important;
}
 
.icon-bar a {
    display: block;
    text-align: center;
    padding: 9px;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    margin-bottom: 5px;
    border-radius: 0 10px;
}

.icon-bar a:hover {
    background-color: var(--glass-bg-hover);
    margin-right: -8px;
    box-shadow: 2px 5px 10px grey;
    transition: all ease-in-out 0.5s;
}

.icon-bar a:hover i {
    transform: rotate(360deg);
    transition: all 0.5s;
    color: #e0d9d9 !important;
}

@media (max-width: 600px) {
    .icon-bar {
        display: none;
    }
}

@media only screen and (max-width: 768px) {
    nav {
        position: relative;
        padding: 15px 0;
    }

    .fa-bars {
        position: absolute;
        right: 20px;
        top: 20px;
        font-size: 24px;
        cursor: pointer;
    }

    .alllogo {
        display: block;
        position: relative;
        height: 45px;
        width: 45px;
        top: 0;
        left: 20px;
        color: var(--accent-color);
        font-size: 32px;
        font-family: "Lucida Calligraphy";
        font-weight: 600;
    }
    .header p {
        font-size: 40px;
        text-align: left;
    }

    .menu-item {
        margin-left: 0;
    }
    .text-box h1 {
        font-size: 20px;
    }

    .logo {
        display: none;
    }
    .nav-links {
        position: fixed;
        background: var(--bg-card);
        height: 100vh;
        width: 280px;
        top: 0;
        right: -280px;
        display: flex;
        flex-direction: column;
        text-align: left;
        z-index: 2000;
        transition: right 0.4s ease-in-out;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding-top: 20px;
    }

    nav .fa {
        display: block;
        color: var(--text-nav);
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }
    
    nav .fa-times {
        position: absolute;
        top: 20px;
        left: 20px;
        color: var(--text-nav);
        font-size: 24px;
        margin: 0;
    }

    .nav-links ul {
        padding: 60px 20px 20px 20px;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links ul li {
        display: block;
        margin: 15px 0;
        width: 100%;
    }
    .nav-links ul li a {
        color: var(--text-nav) !important;
        font-size: 18px;
        display: block;
    }
    .nav-links ul li::after {
        content: "";
        width: 0%;
        height: 2px;
        background: var(--accent-color);
        display: block;
        margin-top: 5px;
        transition: 0.5s;
    }
}

.counter-container-numbers {
    font-size: 4px;
}
/* Mobile */
@media only screen and (max-width: 700px) {
    .header {
        min-height: 60vh;
    }
    .wrapper {
        height: auto;
        min-height: calc(80vh - 60px);
        padding: 2rem 5%;
    }

    .wrapper::before {
        height: 100px;
        width: 86px;
        left: 1%;
        top: 38%;
    }

    .wrapper::after {
        margin-top: 30px;
        height: 69px;
        width: 53px;
        left: 78%;
        top: 4%;
    }

    .cols {
        width: 100%;
    }

    .topline {
        font-size: 35px;
        letter-spacing: 4px;
    }
    .topline::after {
        height: 3px;
        width: 20px;
        bottom: 7px;
    }

    h1 {
        font-size: 1.5em;
    }

    .wrapper .cols p {
        margin-top: 10px;
        font-size: 14px;
    }

    .wrapper .cols a {
        font-size: 14px;
        margin-top: 15px;
        margin-bottom: 20px;
    }
    .nav-links ul {
        padding: 30px;
        display: inline !important;
    }
    .nav-links ul li a {
        color: #c6d2cb !important;
    }
    .nav-links ul li::after {
        content: "";
        width: 0%;
        height: 2px;
        background: #000;
        display: block;
        margin: auto;
        transition: 0.5s;
    }
}

/* Tablet */
@media only screen and (min-width: 701px) and (max-width: 1023px) {
    .wrapper {
        height: calc(100vh - 47px);
        padding: 0 5%;
    }

    .wrapper::before {
        height: 230px;
        width: 250px;
        left: -12%;
        top: 39%;
    }

    .wrapper::after {
        height: 120px;
        width: 120px;
        left: 88%;
        top: -8%;
    }
}

.cols {
    width: 100%;
}

.topline {
    font-size: 30px;
    letter-spacing: 4px;
}

h1 {
    font-size: 4em;
}

.wrapper .cols a {
    font-size: 16px;
    margin-top: 10px;
}

.imgbox img {
    width: calc(100% - 40px);
    right: 50px;
}

@keyframes animateUser {
    50% {
        right: 80px;
        top: 5px;
    }
}

/*----------------project list section styling start-------------*/

.container-fluid {
    background: var(--bg-primary);
    color: var(--text-body);
    padding: 50px 15% !important;

    .project-title {
        color: var(--text-heading);
    }

    .project-title:hover {
        color: var(--accent-color) !important;
    }

    .project-svg:hover {
        transform: translateY(-5px);
        transition: all 0.5s;
    }

    .fa-square-github {
        color: var(--text-body);
        font-size: 23px;
    }

    .fa-square-github:hover {
        color: var(--accent-color) !important;
        transform: translateY(-5px);
        transition: all 0.5s;
    }

    .more-projects {
        color: var(--accent-color);
        font-size: 20px;
    }

    .more-projects:hover {
        color: var(--text-heading);
    }

    .fa-angle-up {
        color: var(--text-heading);
        font-size: 20px;
    }

    .fa-angle-up:hover {
        color: var(--accent-color) !important;
    }
}

h4,
h2 {
    color: var(--text-heading) !important;
}
.badge {
    background-color: var(--bg-badge);
    color: var(--accent-color) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

@media only screen and (max-width: 480px) {
    .more-projects {
        font-size: 15px !important;
    }
    .projects li {
        font-size: 14px !important;
    }
}

@media only screen and (min-width: 481px) and (max-width: 768px) {
    .more-projects {
        font-size: 20px !important;
    }
    .projects li {
        font-size: 1rem !important;
    }
}

/*----------------project section styling end---------------*/
/*----------------- skills section styling ---------------- */

.progress {
    height: 20px !important;
    align-items: center;
    justify-content: center;
}

.progresscards {
    margin-left: 10px;
    margin-right: 10px;
}

.info {
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    padding: 0 10px;
    font-size: 18px;
}

.progress-container {
    height: 20px;
    border-radius: 50px;
    background-color: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.bg-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-badge) !important;
}

.line-html {
    height: 100%;
    border-radius: 50%;
    width: 0;
    position: absolute;
    animation: progressAnimation 5s linear infinite;
}

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

.skillCards > img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 80px; /* Fixed width */
    height: 80px; /* Fixed height to prevent shift */
    object-fit: contain;
    margin-bottom: 15px;
    transition: opacity 0.3s;
}

/* Redefine content for cleaner hover */
.content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
    color: var(--text-heading);
}

.skillCards:hover .content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    bottom: auto; /* reset default */
}

.skillCards:hover .progresscards,
.skillCards:hover > img {
    opacity: 0.1;
    filter: blur(2px);
}

.skills-section {
    width: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
    padding: 50px 15% 30px 15%;
}

.skillCards {
    width: 200px;
    height: 180px;
    background-color: var(--bg-card);
    position: relative;
    overflow: hidden;
    padding: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 20px;
    border-radius: 16px;
    border: 1px solid var(--bg-badge);
}

.skillCards:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px var(--glass-bg-hover);
}

@media (max-width: 768px) {
    .skillCards {
        width: 120px;
        height: 120px;
    }

    .content img {
        width: 50px;
        height: 50px;
    }

    .content {
        bottom: 150px;
        left: 35px;
        margin-bottom: 25px;
    }
}

/*----------------- skills section styling end ---------------- */

/*-----------------article section styling start-----------------*/

.fa-eye {
    color: var(--accent-color);
}
.fa-eye:hover {
    color: var(--text-body);
    cursor: pointer;
}

/* .article {
    min-height: 120vh;
    width: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
    padding: 0 15%;
} */
.article-card {
    padding: 10px 20px;
    background: var(--bg-card) !important;
    box-shadow: var(--shadow-color) 4px 19px 151px;
}
.card-title {
    color: var(--text-heading) !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    font-size: 25px;
    font-weight: 400;
}
.card-subtitle {
    color: var(--text-body) !important;
    display: flex;
    justify-content: start;
}

.card-subtitle > span {
    margin-right: 8px;
}

.article-description {
    /* display: -webkit-box; */
    color: var(--text-body) !important;
    /* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */
    /* row-count: 2; */
    height: 3em;
    overflow: hidden;
    position: relative;
    line-height: 1.5em;
    transition: height 0.5s;
}
.article-card > a {
    color: var(--accent-color);
}
.article-card > a:hover {
    color: var(--text-body);
}

@media screen and (max-width: 768px) {
    .article-card {
        padding: 20px 15px;
    }
    .card-title {
        font-size: 18px;
    }
    p {
        font-size: 14px;
    }
}

/*-----------------article section styling end-----------------*/

/*-----------------article single page styling start-----------------*/
.article-single {
    min-height: 120vh;
    width: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
    padding: 0 15%;
}

.a-title {
    color: var(--text-heading);
}
.article-single .a-subtitle {
    color: var(--text-body);
}
.a-description {
    color: var(--text-body);
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    font-size: 2rem;
    justify-content: space-around;
    padding: 0 0.2em;
    text-align: center;
    width: 5em;
}

.star-rating input {
    display: none;
}

.star-rating label {
    color: #ccc;
    cursor: pointer;
}

.star-rating :checked ~ label {
    color: #f90;
}

.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fc0;
}

.review_desc {
    column-count: 2;
    height: 3em;
    overflow: hidden;
    position: relative;
    line-height: 1.5em;
    transition: height 0.5s;
    cursor: pointer;
}

.review_desc.expanded {
    height: auto;
}
.review_desc::after {
    /* content: '...'; */
    position: absolute;
    bottom: 0;
    right: 0;
    color: var(--accent-color);
    padding-left: 10px;
}

.review_desc.expanded::after {
    content: "";
}

/*-----------------article single page styling end-----------------*/

/*-----------------contact section styling start-----------------*/

/* .contact-me {
    min-height: 120vh;
    width: 100%;
    background-color: var(--bg-primary);
    background-size: cover;
    background-position: center;
    position: relative;
    text-align: center;
    padding: 50px 15% 30px 15%;
} */

#contact {
    .row {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}

.contact-left {
    flex-basis: 40%;
}
.contact-right {
    flex-basis: 60%;
}

.contact-left a {
    text-decoration: none;
    color: var(--text-body);
}

.contact-left p {
    font-size: 16px;
    margin-top: 25px;
}
.contact-left p i {
    margin-right: 15px;
    font-size: 20px;
}
.contact-left a:hover {
    color: #cf3f36;
}

.contact-right form {
    width: 100%;
}

form input,
form textarea {
    border: solid 1px #cf3f36;
    width: 90%;
    outline: none;
    background: #000;
    color: #ffffffa1 !important;
    font-size: 18px;
    border-radius: 6px;
}

.col-form-label {
    display: flex;
    color: #747884;
}

.form-control {
    border: solid 1px #747884;
    background: #000 !important;
    color: #747884;
    border: 1px solid #ced4da4f !important;
    border-radius: 10px;
}

.form-control:focus {
    background: #000;
    color: #747884;
    border: 1px solid #747884 !important;
    border-radius: 10px;
}

.button-click {
    display: flex;
    justify-content: center;
}

.title-btn {
    background-color: transparent;
    border: 2px solid #cf3f36;
    border-radius: 8px;
    color: #fff;
    padding: 10px 20px;
    color: #fff;
    width: 170px;
    height: 50px;
    overflow: hidden;
    position: relative;
}

.title-btn::after {
    content: "";
    width: 100%;
    height: 100%;
    background-color: #cf3f36;
    display: block;
    position: absolute;
    top: 0;
    left: -100%;
    transition: left 0.8s;
}

.title-btn:hover::after {
    left: 0%;
}

.title-btn > span {
    position: relative;
    z-index: 1;
}

/*-----------------contact section styling end-----------------*/

/*-----------------footer section styling start-----------------*/
.social-icons-at-footer {
    display: none;
}

@media (max-width: 600px) {
    .social-icons-at-footer {
        max-width: 100px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .social-icons-at-footer a {
        text-decoration: none;
        font-size: 30px !important;
        margin-right: 15px;
        color: var(--text-body);
        display: inline-block;
        transition: transform 0.5s;
    }

    .social-icons-at-footer a:hover {
        color: var(--accent-color);
        transform: translateY(-5px);
        transition: all 0.5s;
    }
}

footer {
    background: var(--bg-primary);
}

.copyright {
    width: 100%;
    text-align: center;
    padding: 25px 0;
    background: var(--bg-primary);
    color: var(--text-body);
    font-weight: 500;
    margin-top: 0;
}

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

@media only screen and (max-width: 600px) {
    .contact-left p i {
        margin-right: 10px;
        font-size: 20px;
    }

    .contact-left p {
        font-size: 15px;
        margin-top: 20px;
    }

    .contact-left,
    .contact-right {
        flex-basis: 100%;
    }
    .social-icons-at-footer a {
        font-size: 24px !important;
        margin-right: 10px;
    }
    .copyright {
        font-size: 14px;
    }
}

/*-----------------contact section styling end-----------------*/
@media only screen and (max-width: 768px) {
    .wrapper,
    .container-fluid,
    .skills-section,
    .article,
    .article-single,
    .contact-me {
        padding-left: 5% !important;
        padding-right: 5% !important;
    }
}

/* ========================================================================== */
/*                       3D ROAD JOURNEY — Experience                         */
/* ========================================================================== */

.road-container {
    position: relative;
    min-height: 600px;
    perspective: 1200px;
    perspective-origin: 50% 40%;
}

/* ---- SVG Road ---- */
.road-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.road-body {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 48;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-glow-edge {
    stroke: var(--accent-color);
    stroke-width: 50;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.07;
}

.road-center-line {
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 2;
    stroke-dasharray: 16 12;
    stroke-linecap: round;
}

.traveler-trail {
    stroke: var(--accent-color);
    stroke-width: 3;
    opacity: 0.6;
    stroke-linecap: round;
}

/* ---- Traveler Dot ---- */
.traveler-dot {
    fill: var(--accent-color);
    opacity: 0.7;
}

.traveler-core {
    fill: #fff;
}

@keyframes travelerPulse {
    0%, 100% { r: 8; opacity: 0.7; }
    50% { r: 12; opacity: 0.4; }
}

#travelerDot {
    animation: travelerPulse 2s ease-in-out infinite;
}

/* ---- Milestone Markers ---- */
.milestone-circle {
    fill: var(--bg-primary, #0a0a0a);
    stroke: var(--accent-color);
    stroke-width: 2;
}

.milestone-text {
    fill: var(--accent-color);
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
}

/* ---- Station Cards ---- */
.road-station {
    position: relative;
    width: 42%;
    margin-bottom: 100px;
    z-index: 5;
    /* 3D initial state — hidden */
    opacity: 0;
    transform: translateY(50px) scale(0.88);
    transition: none; /* JS handles animation */
}

.road-station:last-child {
    margin-bottom: 40px;
}

/* Alternating positions */
.road-left {
    margin-left: 5%;
    transform-origin: right center;
}

.road-right {
    margin-left: 53%;
    transform-origin: left center;
}

/* ---- Station Connector (branch line to road) ---- */
.station-connector {
    position: absolute;
    top: 30px;
    width: 30px;
    height: 2px;
    background: linear-gradient(
        to right,
        transparent,
        var(--accent-color)
    );
    opacity: 0;
    transition: opacity 0.6s ease 0.3s;
}

.road-left .station-connector {
    right: -30px;
    background: linear-gradient(to right, transparent, var(--accent-color));
}

.road-right .station-connector {
    left: -30px;
    background: linear-gradient(to left, transparent, var(--accent-color));
}

.road-station.is-reached .station-connector {
    opacity: 1;
}

/* ---- Glassmorphic Card ---- */
.station-card {
    position: relative;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    overflow: hidden;
}

.station-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-color),
        transparent
    );
    opacity: 0;
    transition: opacity 0.6s ease 0.4s;
}

.road-station.is-reached .station-card::before {
    opacity: 1;
}

.road-station.is-reached .station-card {
    border-color: rgba(var(--accent-rgb), 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(var(--accent-rgb), 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ---- Station Number Badge ---- */
.station-number {
    position: absolute;
    top: -14px;
    right: 20px;
    background: var(--accent-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

/* ---- Company Header ---- */
.station-company {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    margin-bottom: 12px;
    color: inherit;
}

.station-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.station-company-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.station-company:hover .station-company-name {
    color: var(--accent-color);
}

.station-dates {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--text-body);
    opacity: 0.7;
}

.station-location {
    font-size: 11px;
    color: var(--text-body);
    opacity: 0.6;
    display: flex;
    align-items: center;
    gap: 6px;
}

.station-location i {
    color: var(--accent-color);
    font-size: 9px;
}

.station-link-icon {
    width: 16px;
    height: 16px;
    color: var(--text-body);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.station-company:hover .station-link-icon {
    opacity: 1;
    transform: translateX(0);
}

/* ---- Role ---- */
.station-role {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 0 10px 0;
    padding-left: 12px;
    border-left: 2px solid var(--accent-color);
    line-height: 1.4;
}

/* ---- Description ---- */
.station-description {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
    opacity: 0.85;
}

.station-description ul {
    padding-left: 16px;
    margin: 6px 0;
}

.station-description li {
    margin-bottom: 4px;
}

/* ---- Light Theme Adjustments ---- */
[data-theme="light"] .road-body {
    stroke: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .road-glow-edge {
    opacity: 0.05;
}

[data-theme="light"] .road-center-line {
    stroke: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .station-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .station-logo {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .milestone-circle {
    fill: #fff;
}

/* ---- Celestial Starfield ---- */
.road-stars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Behind everything */
}

/* ---- Floating Tech Assets ---- */
.road-floating-assets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.road-asset {
    position: absolute;
    color: var(--accent-color);
    filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.3));
    will-change: transform;
}

/* ---- Interactive 3D Card Support ---- */
.road-station {
    transform-style: preserve-3d;
}

/* ---- Station Card: Ultra Modernization ---- */
.station-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 1px 1px rgba(255, 255, 255, 0.03);
    transition: all 0.6s cubic-bezier(0.2, 1, 0.2, 1);
    will-change: transform, opacity;
    
    /* Reactive variables */
    --reactive-glow: 0; 
    --beam-opacity: 0;
}

.station-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(var(--accent-rgb), 0.4);
    transform: translateY(-5px) scale(1.02);
}

/* Holographic Shimmer */
.card-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(var(--accent-rgb), 0.05) 45%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(var(--accent-rgb), 0.05) 55%,
        rgba(255, 255, 255, 0) 70%,
        transparent 100%
    );
    background-size: 200% 200%;
    background-position: var(--shimmer-pos, 200%) var(--shimmer-pos, 200%);
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: color-dodge;
    transition: background-position 0s;
}

/* Animated Border Beam */
.border-beam {
    position: absolute;
    inset: -2px;
    padding: 2px;
    background: conic-gradient(
        from var(--beam-angle, 0deg),
        transparent 0%,
        transparent 80%,
        var(--accent-color) 90%,
        transparent 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
    opacity: var(--beam-opacity);
    transition: opacity 0.5s ease;
}

@property --beam-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.road-station.is-reached .border-beam {
    animation: beam-rotate 4s linear infinite;
    --beam-opacity: 0.6;
}

@keyframes beam-rotate {
    to { --beam-angle: 360deg; }
}

.card-grain {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    filter: url(#noiseFilter);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: overlay;
}

/* ---- Tech Tags: Buoyant & Modern ---- */
.station-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-tag {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--accent-color);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: 100px;
    font-weight: 700;
    backdrop-filter: blur(5px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: tag-drift 3s ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

@keyframes tag-drift {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

.tech-tag:nth-child(2) { --delay: -1s; }
.tech-tag:nth-child(3) { --delay: -2s; }

.tech-tag:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1) translateY(-6px) !important;
    box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.4);
}

/* ---- Milestone Shockwave ---- */
.shockwave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    pointer-events: none;
    z-index: 2;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.8;
}

@keyframes shockwave-expand {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* ---- Milestone: Pulse when reached ---- */
.road-station.is-reached .milestone-circle {
    filter: drop-shadow(0 0 15px var(--accent-color));
    animation: milestone-pulse 2s infinite;
}

@keyframes milestone-pulse {
    0% { r: 14; opacity: 1; transform: scale(1); }
    50% { r: 18; opacity: 0.8; transform: scale(1.1); }
    100% { r: 14; opacity: 1; transform: scale(1); }
}

/* ---- Depth Fog (Mask) ---- */
#roadContainer::before,
#roadContainer::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 15%;
    z-index: 10;
    pointer-events: none;
}

#roadContainer::before {
    top: 0;
    background: linear-gradient(to bottom, var(--bg-primary) 0%, transparent 100%);
}

#roadContainer::after {
    bottom: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
}

/* ---- Scroll Reveal Backdrop (Text) ---- */
.scroll-reveal-text {
    position: absolute;
    top: 180px;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(5rem, 18vw, 20rem);
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
    z-index: 0;
    opacity: 0.12;
    pointer-events: none;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px var(--text-heading);
    background: linear-gradient(to right, var(--accent-color) 0%, var(--accent-color) 100%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    transition: opacity 0.5s ease;
    user-select: none;
}

[data-theme="light"] .scroll-reveal-text {
    -webkit-text-stroke: 1.5px var(--text-heading);
    opacity: 0.04;
}

@media (max-width: 768px) {
    .scroll-reveal-text {
        font-size: clamp(2rem, 12vw, 4rem);
        opacity: 0.08;
        top: 35% !important; /* Move it slightly up on mobile to avoid overlapping main text */
    }
}
