/* =========================================================
   F1 LUXURY PORTFOLIO CSS
   Theme: Premium Black + Gold
========================================================= */

/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: #0A0A0A;
    color: #E5E5E5;
    overflow-x: hidden;
}

/* ================= VARIABLES ================= */

:root {
    --gold: #D4AF37;
    --gold-glow: #FFD700;
    --black-primary: #0A0A0A;
    --black-secondary: #111111;
    --white-text: #E5E5E5;
    --transition: all 0.4s ease;
}

/* ================= CARBON FIBER BACKGROUND ================= */

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            45deg,
            #111 0px,
            #111 2px,
            #0A0A0A 2px,
            #0A0A0A 4px
        );
    opacity: 0.15;
    z-index: -1;
}

/* ================= LOADER ================= */

.loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-track {
    width: 300px;
    height: 4px;
    background: #222;
    position: relative;
    overflow: hidden;
}

.loader-car {
    width: 60px;
    height: 4px;
    background: var(--gold);
    position: absolute;
    left: -60px;
    animation: race 2s linear infinite;
    box-shadow: 0 0 10px var(--gold-glow);
}

@keyframes race {
    0% { left: -60px; }
    100% { left: 300px; }
}

.loading-text {
    margin-top: 20px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 4px;
    color: var(--gold);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%,100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ================= NAVBAR ================= */

.navbar {
    position: fixed;
    width: 100%;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: var(--white-text);
}

.logo span {
    color: var(--gold);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--white-text);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--gold);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--gold);
}

/* ================= HAMBURGER ================= */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--gold);
}

/* ================= HERO SECTION ================= */

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 8%;
    position: relative;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212,175,55,0.1), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.intro-line {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 60px;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold-glow);
}

.typing-text {
    font-size: 24px;
    color: var(--gold);
    min-height: 30px;
}

.hero-description {
    max-width: 600px;
    margin: 20px auto;
    color: #aaa;
}

.hero-buttons {
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    margin: 10px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    background: #fff;
}

.btn-secondary {
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-secondary:hover {
    background: var(--gold);
    color: #000;
}

/* ================= RACING GOLD LINE ================= */

.racing-line {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: speedLine 3s linear infinite;
}

@keyframes speedLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ================= STATS SECTION ================= */

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 100px 8%;
    flex-wrap: wrap;
    background: var(--black-secondary);
}

.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(212,175,55,0.2);
    transition: var(--transition);
    min-width: 200px;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
}

.stat-card h2 {
    font-size: 40px;
    color: var(--gold);
}

.stat-card p {
    margin-top: 10px;
    color: #bbb;
}

/* ================= CUSTOM CURSOR ================= */

.cursor {
    width: 15px;
    height: 15px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    transition: transform 0.1s ease;
    z-index: 9999;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 992px) {
    .hero-title {
        font-size: 40px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: #000;
        position: absolute;
        top: 80px;
        right: 0;
        width: 200px;
        padding: 20px;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 28px;
    }

    .stat-card {
        width: 100%;
    }
}





/* ================= PARTICLES ================= */

.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.particle {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #FFD700);
    position: absolute;
    animation: particleMove linear infinite;
}

@keyframes particleMove {
    from { transform: translateY(-100vh); }
    to { transform: translateY(100vh); }
}

/* ================= SPEEDOMETER ================= */

.speedometer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'Orbitron', sans-serif;
    color: #FFD700;
    font-size: 18px;
    letter-spacing: 2px;
}



/* =========================================================
   EDUCATION PAGE – F1 TIMELINE
========================================================= */

.education-hero {
    height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #111;
    text-align: center;
}

.education-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    color: #FFD700;
}

.education-hero p {
    color: #aaa;
    margin-top: 10px;
}

/* TIMELINE */

.education-timeline {
    position: relative;
    padding: 100px 10%;
}

.timeline-track {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #FFD700, transparent);
    transform: translateX(-50%);
}

.timeline-item {
    width: 50%;
    padding: 40px;
    position: relative;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.4s ease;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.timeline-content h2 {
    color: #FFD700;
    font-family: 'Orbitron', sans-serif;
}

.timeline-content h3 {
    margin-top: 10px;
}

.timeline-content p {
    margin-top: 10px;
    color: #bbb;
}

/* DOTS */

.timeline-item::before {
    content: "";
    position: absolute;
    top: 50px;
    width: 20px;
    height: 20px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 15px #FFD700;
}

.timeline-item.left::before {
    right: -10px;
}

.timeline-item.right::before {
    left: -10px;
}

/* RESPONSIVE */

@media (max-width: 900px) {

    .timeline-item,
    .timeline-item.left,
    .timeline-item.right {
        width: 100%;
        left: 0;
        text-align: left;
        padding-left: 60px;
    }

    .timeline-track {
        left: 20px;
    }

    .timeline-item::before {
        left: 10px;
    }
}



/* =========================================================
   SKILLS PAGE – F1 DASHBOARD
========================================================= */

.skills-hero {
    height: 40vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.skills-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    color: #FFD700;
}

.skills-hero p {
    margin-top: 10px;
    color: #aaa;
}

/* GAUGE SECTION */

.gauge-section {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 100px 10%;
    flex-wrap: wrap;
}

.gauge {
    position: relative;
    width: 150px;
    height: 150px;
}

.gauge svg {
    transform: rotate(-90deg);
}

.gauge circle {
    fill: none;
    stroke-width: 10;
    stroke: #222;
}

.gauge .progress {
    stroke: #FFD700;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    transition: stroke-dashoffset 2s ease;
    filter: drop-shadow(0 0 10px #FFD700);
}

.gauge-text {
    position: absolute;
    top: 60px;
    width: 100%;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    color: #FFD700;
}

/* SPEED BARS */

.speed-bars {
    padding: 100px 15%;
}

.bar {
    margin-bottom: 40px;
}

.bar h3 {
    margin-bottom: 10px;
}

.bar-track {
    height: 8px;
    background: #222;
    border-radius: 10px;
}

.bar-fill {
    height: 8px;
    width: 0;
    background: linear-gradient(90deg, #FFD700, #D4AF37);
    border-radius: 10px;
    transition: width 2s ease;
    box-shadow: 0 0 10px #FFD700;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .gauge-section {
        flex-direction: column;
        align-items: center;
    }
}



/* =========================================================
   PROJECTS PAGE – F1 SHOWROOM
========================================================= */

.projects-hero {
    height: 40vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.projects-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    color: #FFD700;
}

.projects-hero p {
    color: #aaa;
    margin-top: 10px;
}

/* GRID */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    padding: 100px 10%;
}

/* 3D CARD */

.project-card {
    perspective: 1000px;
}

.project-inner {
    position: relative;
    width: 100%;
    height: 300px;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.project-card:hover .project-inner {
    transform: rotateY(180deg);
}

.project-front,
.project-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #111;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transition: 0.4s;
}

.project-front h2 {
    font-family: 'Orbitron', sans-serif;
    color: #FFD700;
}

.project-back {
    transform: rotateY(180deg);
    padding: 20px;
}

.project-back p {
    color: #bbb;
    margin-bottom: 20px;
}

.project-back a {
    padding: 8px 20px;
    border: 1px solid #FFD700;
    color: #FFD700;
    text-decoration: none;
    border-radius: 20px;
    transition: 0.3s;
}

.project-back a:hover {
    background: #FFD700;
    color: #000;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .project-inner {
        height: 250px;
    }
}



/* =========================================================
   CONTACT PAGE – F1 PIT STOP
========================================================= */

.contact-hero {
    height: 40vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contact-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    color: #FFD700;
}

.contact-hero p {
    color: #aaa;
    margin-top: 10px;
}

/* SECTION */

.contact-section {
    padding: 100px 10%;
}

.contact-container {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    justify-content: center;
}

/* FORM */

.f1-form {
    flex: 1;
    min-width: 300px;
}

.input-group {
    position: relative;
    margin-bottom: 40px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid #444;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 12px;
    color: #aaa;
    pointer-events: none;
    transition: 0.3s;
}

.input-group input:focus,
.input-group textarea:focus {
    border-bottom: 2px solid #FFD700;
}

.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:valid + label,
.input-group textarea:valid + label {
    top: -10px;
    font-size: 12px;
    color: #FFD700;
}

/* BUTTON */

.f1-btn {
    padding: 12px 30px;
    background: linear-gradient(90deg, #FFD700, #D4AF37);
    border: none;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    border-radius: 30px;
    transition: 0.3s;
}

.f1-btn:hover {
    box-shadow: 0 0 20px #FFD700;
    transform: scale(1.05);
}

/* CONTACT INFO */

.contact-info {
    flex: 1;
    min-width: 250px;
}

.contact-info h3 {
    font-family: 'Orbitron', sans-serif;
    color: #FFD700;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #FFD700;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.social-links a:hover {
    border-bottom: 1px solid #FFD700;
}

/* RESPONSIVE */

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
}


/* =========================================================
   CERTIFICATES PAGE
========================================================= */

.cert-hero {
    height: 40vh;
    background: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cert-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 40px;
    color: #FFD700;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 100px 10%;
}

.cert-card {
    background: #111;
    border: 1px solid rgba(255,215,0,0.3);
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: 0.4s;
}

.cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px #FFD700;
}

.cert-card h3 {
    color: #FFD700;
    font-family: 'Orbitron', sans-serif;
}

/* MODAL */

.cert-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #111;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #FFD700;
    width: 300px;
}

.modal-title {
    color: #FFD700;
}

.close-modal {
    cursor: pointer;
    float: right;
    color: #FFD700;
}


.theme-toggle {
    background: none;
    border: 1px solid #FFD700;
    color: #FFD700;
    padding: 5px 10px;
    cursor: pointer;
}
.light-mode {
    background: #f5f5f5;
    color: #111;
}


/* ================= MOBILE NAV FIX ================= */

@media (max-width: 992px) {

    .navbar {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        padding: 20px 5%;
        z-index: 2000;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: #0A0A0A;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s ease;
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-links a {
        font-size: 18px;
        color: #FFD700;
    }

    .hamburger {
        display: flex;
        z-index: 2500;
    }

}


.hamburger span {
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* ================= GLOBAL RESPONSIVE RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    height: auto;
}

section {
    width: 100%;
    padding: 80px 8%;
}

@media (max-width: 768px) {
    section {
        padding: 60px 5%;
    }
}



/* ================= STATS RESPONSIVE ================= */

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    text-align: center;
}

.stat-card {
    flex: 1 1 220px;
    min-width: 220px;
    max-width: 260px;
    padding: 40px 20px;
    background: #111;
    border: 1px solid rgba(255,215,0,0.2);
    transition: 0.4s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 20px rgba(255,215,0,0.3);
}



/* ================= PROJECTS GRID RESPONSIVE ================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}


/* ================= GAUGE RESPONSIVE ================= */

.gauge-section {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .gauge-section {
        flex-direction: column;
        align-items: center;
    }
}


/* ================= CONTACT RESPONSIVE ================= */

.contact-container {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.contact-container > * {
    flex: 1 1 300px;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
    }
}


/* ================= SMOOTH ANIMATIONS ================= */

section {
    animation: fadeUp 1s ease forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

button, a, .stat-card, .project-card {
    transition: 0.3s ease;
}



/* ================= CLEAN HERO FIX ================= */

.hero {
    min-height: 100vh;
    padding-top: 90px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

/* REMOVE overlay completely */
.hero-overlay {
    display: none;
}

/* Image */
.hero-image {
    margin-bottom: 25px;
}

.hero-image img {
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #FFD700;
    box-shadow:
        0 0 25px rgba(255,215,0,0.7),
        0 0 50px rgba(255,215,0,0.4);
}

/* Text block */
.hero-content {
    max-width: 600px;
    width: 100%;
}

/* Desktop layout */
@media (min-width: 992px) {

    .hero {
        flex-direction: row;
        gap: 80px;
        text-align: left;
    }

    .hero-image {
        margin-bottom: 0;
    }

}



/* ================= HERO BUTTON FIX ================= */

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.hero-buttons a {
    padding: 12px 25px;
    font-size: 14px;
    border-radius: 30px;
    text-align: center;
    min-width: 130px;
}


@media (max-width: 600px) {

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-buttons a {
        width: 80%;
        max-width: 260px;
    }

}
