:root {
    --bg-color: #000000;
    --surface-color: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.15);
    --surface-border-hover: rgba(255, 255, 255, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent-1: #ffffff;
    --accent-2: #eeeeee;
    --accent-gradient: #ffffff;
    --header-bg: rgba(0, 0, 0, 0.8);
    --header-border: rgba(255, 255, 255, 0.15);
    --logo-color: #ffffff;
    --link-color: #999999;
    --link-color-hover: #ffffff;
    --button-border-color: rgba(255, 255, 255, 0.15);

    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Ensure smooth transitions on all color changes */
body,
body * {
    transition-property: background-color, color, border-color, box-shadow;
    transition-duration: 0.4s;
    transition-timing-function: ease;
}

/* Light Theme Variables */
body.light-theme {
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(0, 0, 0, 0.08);
    --surface-border-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --header-bg: rgba(255, 255, 255, 0.9);
    --header-border: rgba(0, 0, 0, 0.08);
    --logo-color: #1e3a8a;
    --link-color: #2563eb;
    --link-color-hover: #1d4ed8;
    --button-border-color: #bfdbfe;
}

/* Background Shapes */
.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    display: none;
}

body.light-theme .shape {
    display: block;
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.3);
}

.shape-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(139, 92, 246, 0.2);
    animation-delay: -5s;
}

.shape-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: rgba(16, 185, 129, 0.15);
    animation-delay: -10s;
}


@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 5%) scale(1.05);
    }

    100% {
        transform: translate(-5%, 8%) scale(0.95);
    }
}

/* Typography & General */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-heading {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

/* Glassmorphism */
.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--surface-border-hover);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--header-border);
    transition: padding 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

body.light-theme header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
}

body.light-theme .logo {
    color: var(--logo-color);
    transition: color 0.3s ease;
}

body.light-theme .nav-links a {
    color: var(--link-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

body.light-theme .nav-links a:hover {
    color: var(--link-color-hover);
}

body.light-theme .theme-btn {
    color: var(--link-color);
    transition: color 0.3s ease;
}

body.light-theme .lang-btn {
    color: var(--link-color);
    border-color: var(--button-border-color);
    transition: all 0.3s ease;
}

body.light-theme .hamburger .line {
    background: var(--logo-color);
    transition: background 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .line {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.greeting {
    color: var(--accent-1);
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 1rem;
}

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

#hero h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

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

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

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

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

.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-family: var(--font-heading);
}

.primary-btn {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
}

body.light-theme .primary-btn {
    background: var(--accent-gradient);
    color: white;
}

.primary-btn:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
}

.secondary-btn:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Sections */
section {
    padding: 6rem 0;
}

/* Timeline (Education & Experience) */
.timeline {
    position: relative;
    padding-left: 2rem;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2.45rem;
    top: 5px;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: 3px solid var(--bg-color);
}

.timeline-content {
    padding: 1.5rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.timeline-header .date {
    color: var(--accent-1);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

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

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

.project-links a {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: color 0.3s;
}

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

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-category {
    font-size: 0.9rem;
    color: var(--accent-2);
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-features {
    list-style: none;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.project-features li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.project-features li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-1);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    font-size: 0.8rem;
    font-family: var(--font-heading);
    color: var(--accent-1);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Skills section */
.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.skills-category {
    padding: 2rem;
}

.category-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.branch-icon {
    color: var(--accent-1);
}

.skill-group {
    margin-bottom: 2rem;
}

.skill-group h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

.language-item {
    width: 100%;
}

.lang-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.lang-name {
    font-weight: 500;
}

.lang-level {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-border);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 3px;
    transform-origin: left;
    transition: transform 1s ease-out;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--surface-border);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    color: var(--text-muted);
}

.footer-socials {
    margin: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .skills-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-header .date {
        margin-top: 0.25rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--bg-color);
        backdrop-filter: blur(20px);
        transition: all 0.3s ease;
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        border-bottom: 1px solid var(--surface-border);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}

/* Language Switcher */
.theme-lang-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.theme-btn:hover {
    color: var(--accent-1);
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.lang-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.lang-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

body.light-theme .lang-btn.active {
    background: var(--accent-1);
    color: white;
    border-color: var(--accent-1);
    transition: all 0.3s ease;
}
