/* Base Styles & Variables */
:root {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-primary: #6366f1; /* Indigo */
    --accent-secondary: #a855f7; /* Purple */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', sans-serif;
    --nav-bg: rgba(10, 10, 10, 0.8);
}

body.light-theme {
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #4f46e5;
    --accent-secondary: #9333ea;
    --glass-border: rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(248, 250, 252, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

/* Layout */
.section {
    padding: 100px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Glassmorphism utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    z-index: 1000;
    transition: var(--transition);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 0.8rem 5%;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.mobile-menu.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
}

.mobile-menu a:hover {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    max-width: 700px;
    z-index: 10;
}

.greeting {
    color: var(--accent-primary);
    font-family: monospace;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    min-height: calc(clamp(2rem, 5vw, 3.5rem) * 1.1); /* Prevent layout shift */
}

.title .cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Hero Background Glows */
.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 10s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: 10%;
    right: 10%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: 20%;
    right: 30%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.about-text .date {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.about-text .location {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.about-text .bio {
    color: var(--text-secondary);
}

.skills-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.skill-section {
    margin-bottom: 1.5rem;
}

.skill-section h4 {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Experience Section Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    left: 14px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
}

.company {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-family: monospace;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--accent-primary);
}

.project-links a {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-left: 1rem;
}

.project-links a:hover {
    color: var(--accent-primary);
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.view-more-container {
    text-align: center;
}

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.cert-icon {
    font-size: 2rem;
    color: var(--accent-secondary);
}

.cert-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.cert-org {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cert-date {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-family: monospace;
    margin-top: 0.3rem;
}

/* Contact Section */
.contact-section {
    max-width: 800px;
    text-align: center;
}

.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
    font-size: 1.1rem;
}

.contact-btn {
    margin-bottom: 3rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

.footer-subtext {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 80px 5%;
    }
}
