/* Base Styles */
:root {
    --primary: #ffffff;
    --primary-light: rgba(255,255,255,0.8);
    --text-light: #ffffff;
    --text-lighter: rgba(255,255,255,0.95);
    --border-light: rgba(255,255,255,0.5);
    --border-lighter: rgba(255,255,255,0.8);
    --hover-bg: rgba(255,255,255,0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Young Serif", serif;
    color: var(--text-lighter);
    line-height: 1.6;
    background: transparent;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 80px;
    overflow-x: hidden;
}

/* Video Background */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -100;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Typography */
h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    overflow: visible;
    white-space: normal;
}

h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 2rem);
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

main {
    position: relative;
    z-index: 1;
    margin-top: 80px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left a {
    font-size: 1.5rem;
    color: var(--text-lighter);
    text-decoration: none;
    font-weight: 600;
}

.nav-center {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-center a {
    color: var(--text-lighter);
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
}

.nav-center a:hover,
.nav-center .current-page {
    border-color: var(--primary);
    background: var(--hover-bg);
}

.nav-right {
    display: flex;
    gap: 1rem;
}

.nav-right a {
    color: var(--text-lighter);
    font-size: 1.3rem;
    transition: all 0.3s;
    padding: 0.5rem;
}

.nav-right a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    margin-top: 0;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
}

.hero-content h2 {
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 400;
    margin-bottom: 2rem;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.3rem);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Buttons */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 160px;
    text-align: center;
}

.primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.primary:hover {
    background: var(--hover-bg);
    transform: translateY(-3px);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section {
    padding: 5rem 7%;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto 4rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-container {
    max-width: 1200px;
    margin: 0 auto;
}

.skills-category {
    margin-bottom: 3rem;
}

.skills-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.skills-category h3 i {
    font-size: 1.2rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: all 0.3s;
    text-align: center;
}

.tech-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tech-item i {
    font-size: 2rem;
    color: var(--primary);
}

.tech-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Projects Section */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.project-card h3 {
    margin-bottom: 1rem;
}

.tech-stack-label {
    color: var(--primary-light);
    font-style: italic;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.project-card p {
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.project-link {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    color: var(--text-lighter);
    transition: all 0.3s;
    text-decoration: none;
    font-size: 0.9rem;
}

.project-link:hover {
    border-color: var(--primary);
    background: var(--hover-bg);
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.achievement-card {
    border: 1px solid var(--border-light);
    padding: 1.8rem;
    border-radius: 12px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.achievement-card h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.achievement-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.achievement-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    word-break: break-word;
    overflow-wrap: break-word;
}

.achievement-card .btn {
    margin-top: auto;
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    align-self: flex-start;
    white-space: nowrap;
}

/* Contact Section */
.connect-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.connect-content h2 {
    margin-bottom: 2rem;
}

.connect-content p {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Vertical Timeline Styles */
.timeline-section {
    padding: 4rem 5%;
    position: relative;
}
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
    min-height: 100px; /* Ensure minimum height */
}

/* Vertical Line - Fixed version */
.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; /* Half of width to center perfectly */
    z-index: 1;
    height: 100%; /* Explicit height */
}

.timeline-item {
    padding: 1rem 2rem;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 2rem; /* Ensure spacing between items */
}

/* Left Side Items */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 4rem;
    text-align: right;
}

/* Right Side Items */
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 4rem;
}

/* Timeline Dots */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--text-lighter);
    top: 1.5rem;
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -10px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.timeline-content h3 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.timeline-date {
    display: block;
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    nav {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-center {
        order: 3;
        width: 100%;
        margin-top: 1rem;
    }
    
    .hero {
        height: auto;
        padding: 4rem 1rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 2rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Timeline Mobile Adjustments */
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 5rem;
        padding-right: 0;
        text-align: left !important;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-dot {
        left: 1rem !important;
    }
    
    .tech-stack {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    .tech-stack {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .nav-center a {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .section {
        padding: 3rem 1.5rem;
    }
    
    .tech-item i {
        font-size: 1.5rem;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 1.2rem;
    }
}