:root {
  --f1-red: #ff1801;
  --f1-dark: #15151e;
  --f1-carbon: #1f1f27;
  --f1-silver: #e1e1e1;
  --neon-cyan: #00f0ff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-racing: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

body {
  background-color: var(--f1-dark);
  color: var(--f1-silver);
  font-family: var(--font-body);
  overflow-x: hidden;
  background-image: 
    linear-gradient(rgba(21, 21, 30, 0.95), rgba(21, 21, 30, 0.98)),
    repeating-linear-gradient(45deg, #000 00px, #000 02px, #222 02px, #222 04px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--f1-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--f1-red);
  border-radius: 4px;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  font-family: var(--font-racing);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo span {
  color: var(--f1-red);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: var(--f1-silver);
  text-decoration: none;
  font-family: var(--font-racing);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--f1-red);
  text-shadow: 0 0 10px rgba(255, 24, 1, 0.5);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 24, 1, 0.1) 0%, transparent 70%);
  animation: pulse-glow 4s infinite alternate;
}

@keyframes pulse-glow {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.2); opacity: 0.8; }
}

.hero h1 {
  font-family: var(--font-racing);
  font-size: 6rem;
  line-height: 1;
  text-transform: uppercase;
  font-style: italic;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero h1 .glitch {
  display: block;
  color: var(--f1-silver);
}

.hero p {
  font-size: 1.5rem;
  max-width: 600px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  border-left: 3px solid var(--f1-red);
  padding-left: 1rem;
  text-align: left;
}

.cta-btn {
  padding: 12px 30px;
  background: transparent;
  border: 2px solid var(--f1-red);
  color: #fff;
  font-family: var(--font-racing);
  text-transform: uppercase;
  font-size: 1rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  text-decoration: none;
  z-index: 1;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.cta-btn:hover {
  background: var(--f1-red);
  box-shadow: 0 0 20px rgba(255, 24, 1, 0.6);
  transform: skewX(-10deg);
}

/* Grid Layout */
.grid-section {
  padding: 5rem 10%;
}

.section-title {
  font-family: var(--font-racing);
  font-size: 3rem;
  margin-bottom: 3rem;
  border-bottom: 4px solid var(--f1-red);
  display: inline-block;
  padding-right: 2rem;
  font-style: italic;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 4px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  
  /* ADD THESE FOUR LINES */
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Keeps text aligned to the left */
  height: 100%; /* Ensures all cards in a row are the same height */
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--f1-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--f1-red);
}

.card:hover::after {
  transform: scaleX(1);
}

.card h3 {
  font-family: var(--font-racing);
  margin-bottom: 1rem;
  color: var(--neon-cyan);
}

/* Stats Section (Telemetry) */
.telemetry {
  display: flex;
  justify-content: space-around;
  background: #000;
  padding: 4rem 5%;
  border-top: 2px solid var(--f1-red);
  border-bottom: 2px solid var(--f1-red);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-racing);
  font-size: 4rem;
  color: #fff;
  display: block;
}

.stat-label {
  color: var(--f1-red);
  text-transform: uppercase;
  letter-spacing: 2px;
}

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.9rem;
  opacity: 0.7;
}

.circuit-decoration {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 600px;
  height: 600px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
/* About Section Integration */
.telemetry-about {
  background: var(--f1-dark);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--glass-border);
  border-bottom: 2px solid var(--f1-red); /* Matches your telemetry border style */
}

.about-container {
  max-width: 900px;
  width: 100%;
  text-align: center;
  z-index: 1;
  
}

/* Using your existing .section-title style but centering it */
.telemetry-about .section-title {
  display: inline-block;
  padding-right: 0; 
  padding-left: 0;
  margin-bottom: 2.5rem;
  font-size: 2.5rem; /* Slightly smaller than hero to keep hierarchy */
  border-bottom: 4px solid var(--f1-red);
}

.content-wrapper {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 3rem;
  backdrop-filter: blur(5px);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
  /* The clip-path above matches your .cta-btn's "rapid corner" look */
}

.about-p {
  color: var(--f1-silver);
  font-family: var(--font-body);
  line-height: 1.8;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  
}

.about-p strong {
  color: var(--f1-red);
  font-family: var(--font-racing);
  font-weight: normal;
  letter-spacing: 1px;
}

.red-accent-bar {
  width: 60px;
  height: 4px;
  background: var(--f1-red);
  margin: 2rem auto 0;
  transform: skewX(-20deg); /* Gives it that F1 "speed" lean */
}
.contact-footer {
  background-color: var(--f1-dark);
  border-top: 2px solid var(--f1-red);
  text-align: center;
  padding: 80px 10%;
}

.contact-description {
  font-family: var(--font-body);
  color: var(--f1-silver);
  margin-bottom: 50px;
  opacity: 0.8;
}

/* The 3-column layout from your photo */
.contact-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-label {
  font-family: var(--font-racing);
  color: #fff;
  font-size: 1.4rem;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.contact-item p, 
.email-address {
  font-family: var(--font-body);
  color: var(--f1-silver);
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Email underline to match the reference style but in F1 red */
.email-address {
  border-bottom: 1px solid var(--f1-red);
  transition: opacity 0.3s;
}

.email-address:hover {
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 20px;
  font-size: 1.8rem;
}

.social-links a {
  color: var(--f1-silver);
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--f1-red);
}

/* Mobile check: stack columns on small screens */
@media (max-width: 768px) {
  .contact-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
/* 1. The container must be relative */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 2. Push the video to the back */
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1; /* This moves it behind the content */
}

/* 3. Pull your name to the front */
.hero-content {
  position: relative; 
  z-index: 10; /* This ensures it sits on top of the video */
  color: white; /* Make sure the text color stands out */
  text-align: center;
}
/* Mobile Optimization (Screens 768px and smaller) */
@media screen and (max-width: 768px) {
  /* Fix Hero Header Text Overlap */
  .hero h1 {
    font-size: 3.5rem; /* Drastically reduce from 6rem to fit phone screen */
    line-height: 1.1;
    margin-bottom: 0.5rem;
  }

  .hero p {
    font-size: 1.1rem; /* Adjust from 1.5rem */
    max-width: 90%;
    margin: 0 auto 1.5rem;
    text-align: center; /* Center text on mobile for better balance */
    border-left: none;
    border-bottom: 3px solid var(--f1-red); /* Move accent to bottom */
    padding: 0 0 10px 0;
  }

  /* Stack Header/Navigation vertically or simplify */
  header {
    padding: 1rem 5%;
    flex-direction: column; /* Stacks logo above nav links */
    gap: 10px;
  }

  nav ul {
    gap: 1rem;
    flex-wrap: wrap; /* Allows links to wrap if screen is too narrow */
    justify-content: center;
  }

  nav a {
    font-size: 0.75rem;
  }

  /* Stack Project Cards */
  .cards {
    grid-template-columns: 1fr; /* Force 1 column instead of 2 or 3 */
    gap: 1.5rem;
  }

  /* Adjust About Section padding */
  .grid-section {
    padding: 3rem 5%; /* Less side padding on small screens */
  }

  .content-wrapper {
    padding: 1.5rem; /* More room for text */
  }

  .section-title {
    font-size: 2rem;
  }
}
/* Container for the badges */
.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 20px 0;
}

/* Individual Badge Styling */
.badge {
  background: rgba(255, 255, 255, 0.05); /* Subtle dark background */
  border: 1px solid rgba(255, 25, 25, 0.4); /* F1 Red border */
  color: #fff;
  padding: 5px 12px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px; /* Sharp edges look more mechanical than rounded ones */
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hover Effect: "Activates" the badge */
.badge:hover {
  background: #ff1919; /* Solid F1 Red */
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 25, 25, 0.6);
  transform: translateY(-2px);
  border-color: #ff1919;
}

/* Font Awesome Icon sizing inside badge */
.badge i {
  font-size: 0.75rem;
}
/* Project Detail Page Specifics */
.project-page .project-detail-hero {
    padding-top: 150px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(255, 24, 1, 0.05), transparent);
}

.status-tag {
    font-family: var(--font-racing);
    color: var(--neon-cyan);
    letter-spacing: 3px;
    font-size: 0.9rem;
    margin-top: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /*p 2/3 for info, 1/3 for specs */
    gap: 40px;
    align-items: start;
    
}

.project-info h3 {
    font-family: var(--font-racing);
    color: var(--f1-red);
    margin: 2rem 0 1rem 0;
    font-size: 1.2rem;
}

.spec-list {
    width: 100%;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    font-family: var(--font-body);
    font-size: 1rem;
}

.spec-item span {
    color: var(--f1-red);
    font-weight: bold;
    font-family: var(--font-racing);
    font-size: 0.8rem;
}

/* Mobile responsive project grid */
@media screen and (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}
/* Centering the container */
.repo-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 3rem; /* Adds space above the button */
    padding-bottom: 2rem;
}

/* Making the button bigger and more prominent */
.big-repo-btn {
    padding: 20px 50px; /* Larger hit area */
    font-size: 1rem;  /* Bigger text */
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Adding an extra glow effect on hover */
.big-repo-btn:hover {
    transform: scale(1.1) skewX(-10deg); /* Grows and leans when hovered */
    background: var(--f1-red);
    box-shadow: 0 0 30px rgba(255, 24, 1, 0.8);
}

.big-repo-btn i {
    font-size: 1rem; /* Makes the GitHub icon pop */
}
/* --- Centered Career Circuit --- */
.experience-track-container {
    position: relative;
    background: var(--f1-dark);
    padding: 100px;
    width: 100vw; /* Match the 10% side padding of .grid-section */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers the whole column content */
    border-top: 2px solid var(--f1-red);
    overflow: hidden;
}

.experience-track-container .section-title {
    text-align: center; /* Changed from left to center */
    display: block; 
    margin: 0 auto 5rem auto; /* Added extra bottom margin for breathing room */
    border-bottom: 4px solid var(--f1-red);
    width: fit-content;
}

.track-wrapper {
    position: relative;
    width: 100%;      /* Fill the entire container */
    height: 600px;    /* Increased height for more vertical curve depth */
    display: flex;
    justify-content: center;
    align-items: center;
}

.track-svg {
    width: 110%;      /* Slightly wider than 100% to let the track bleed off-edge */
    height: 100%;
    overflow: visible; 
    filter: drop-shadow(0 0 15px rgba(0,0,0,0.5));
}

/* Keep your existing Milestone and Car Marker code below this */
.track-milestones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.milestone {
    position: absolute;
    width: 250px;
    pointer-events: all;
    z-index: 10;
}



.milestone-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 15px;
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--f1-red);
    transition: transform 0.3s ease;
}

.milestone:hover .milestone-content {
    transform: scale(1.1);
    border-color: var(--neon-cyan);
}
#car-marker {
    /* Ensures the car rotates around its own center, not the SVG corner */
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.1s linear; /* Makes movement look smooth like a live broadcast */
}
/* --- MOBILE RESPONSIVE REPAIR --- */
@media screen and (max-width: 768px) {
    /* Reset the container to allow vertical scrolling */
    .experience-track-container {
        padding: 60px 20px;
        height: auto;
        overflow: visible;
        display: block;
    }

    /* Hide the SVG track on mobile - it's too wide for portrait */
    .track-svg {
        display: none;
    }

    /* Reset the wrapper to stack cards vertically */
    .track-wrapper {
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding-left: 20px;
        border-left: 2px dashed var(--f1-red); /* Vertical Racing Line */
    }

    .track-milestones {
        position: relative; /* Change from absolute */
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    /* Force milestones to ignore their 'left' and 'top' coordinates */
    .milestone {
        position: relative !important; 
        left: 0 !important;
        top: 0 !important;
        width: 100%;
        transform: none !important;
    }

    .milestone-content {
        width: 100%;
        margin: 0 !important;
        padding: 20px;
        /* Re-apply the F1 corner cut for mobile */
        clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    }

    .experience-track-container .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        text-align: center;
    }
}