:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --card-bg: #1e293b;
}

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


body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    
    /* 
      Layer 1: The soft blue spotlight in the top left 
      Layer 2: The developer dot grid (now 2px wide for larger dots) 
    */
    background-image: 
        radial-gradient(circle at 15% 0%, rgba(56, 189, 248, 0.15) 0%, transparent 60%),
        radial-gradient(rgba(56, 189, 248, 0.15) 2px, transparent 2px);
    
    /* 
      Size 1: 100% for the spotlight so it covers the screen 
      Size 2: 35px spacing for the larger dots 
    */
    background-size: 100% 100%, 35px 35px;
    background-attachment: fixed;
    
    color: var(--text-main);
    line-height: 1.6;
}


h1, h2, h3, .typing-text {
    font-family: 'Fira Code', monospace;
}

/* Navigation (Smaller Floating Pill) */
nav {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0); /* Normal position */
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 0.6rem 1.6rem; /* 15% smaller padding */
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.3, 1, 0.2, 1); /* Smooth slide animation */
}

/* This class will be applied by JavaScript to hide the nav */
nav.nav-hidden {
    transform: translateX(-50%) translateY(-150%); /* Slides it up off-screen */
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 2rem; /* Reduced gap */
}

.nav-content h2 {
    font-size: 1.1rem; /* Slightly smaller logo */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem; /* Reduced gap */
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem; /* 10% smaller text */
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 1rem 0 2rem 0;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--accent);
    color: var(--bg-color);
}

/* Containers & Sections */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-title {
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* --- TIMELINE SECTION --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The central vertical line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--accent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

/* Container for each timeline event */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

/* Alternating sides */
.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* The dots on the timeline */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-color);
    border: 4px solid var(--accent);
    border-radius: 50%;
    top: 24px;
    z-index: 1;
}

/* Fix dot position for even items (right side) */
.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

/* Timeline text boxes */
.timeline-content {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-top: 3px solid var(--accent); /* Changed border to top for variety */
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-date {
    display: inline-block;
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Responsive Design: Stack timeline on smaller screens */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0%;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }
}

/* Cards & Grids */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card, .project-card, .content-box {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    transition: transform 0.3s ease;
}

.skill-card:hover, .project-card:hover {
    transform: translateY(-5px);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- CONTACT SECTION --- */
.contact-grid {
    display: grid;
    /* Changed from 200px to 240px */
    grid-template-columns: repeat(auto-fit, minmax(214px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem 1rem;
    border-radius: 8px;
    border-top: 3px solid var(--accent);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease, background 0.3s ease;
}

/* SVG Icon Styling */
.contact-card svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.contact-card h3 {
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Hover effect only for clickable links */
a.contact-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8); /* Slightly lighter background on hover */

}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- ANIMATIONS --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
