:root {
    --bg-color: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-color: #10b981;
    --card-bg: #f9fafb;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e5e7eb;
    --circle-bg: #dbeafe;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --font-main: 'Outfit', sans-serif;
    --nav-height: 80px;
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #34d399;
    --card-bg: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --border-color: #334155;
    --circle-bg: #1e293b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: transform 0.3s;
}

.theme-btn:hover {
    transform: rotate(15deg) scale(1.1);
    color: var(--accent-color);
}

.btn-download {
    padding: 10px 20px;
    background-color: var(--text-primary);
    color: var(--bg-color);
    /* Inverted for button */
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.btn-download:hover {
    background-color: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border: 2px solid var(--text-primary);
    border-radius: 50px;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    /* Hidden on desktop */
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    padding-top: var(--nav-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Background Gradients */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    filter: blur(60px);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: -5%;
    width: 30%;
    height: 40%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    filter: blur(60px);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Profile Image Area */
.profile-container {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.decorative-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background-color: var(--circle-bg);
    border-radius: 50%;
    z-index: -1;
}

.profile-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));

}

/* Floating Icons */
.floating-icon {
    position: absolute;
    background: var(--card-bg);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    font-size: 1.5rem;
    color: var(--text-primary);
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    border: 1px solid var(--border-color);
}

.icon-1 {
    top: 20%;
    left: -20px;
    animation-delay: 0s;
    color: #61DAFB;
}

.icon-2 {
    bottom: 30%;
    right: -20px;
    animation-delay: 2s;
    color: #F7DF1E;
}

.icon-3 {
    top: 10%;
    right: 10px;
    animation-delay: 4s;
    color: #E34F26;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Circular Text Badge */
.circular-text {
    position: absolute;
    top: 0;
    right: -40px;
    width: 120px;
    height: 120px;
    animation: rotate 20s linear infinite;
    z-index: 2;
}

.circular-text text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    fill: var(--text-primary);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Hero Text */
.text-content {
    margin-top: 0;
}

.text-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.text-content h2 {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.social-bar {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-bar a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.1rem;
    background: var(--card-bg);
}

.social-bar a:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

/* Brand Logos */
.brand-logos {
    margin-top: 2rem;
    padding: 20px 0;
    display: flex;
    gap: 50px;
    opacity: 0.5;
    font-size: 2rem;
    justify-content: center;
    width: 100%;
}

.brand-logos i:hover {
    opacity: 1;
    color: var(--text-primary);
}

/* --- Sections General --- */
.section-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-align: center;
    font-weight: 700;
}

/* --- Education Cards --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    transition: transform 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card .subtitle {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 5px;
}

/* --- Experience Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-color);
    position: relative;
    border: 1px solid var(--border-color);
}

.timeline-item .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.timeline-item .role {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.timeline-item .company {
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- Skills Tags --- */
.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-tag {
    padding: 12px 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-weight: 500;
    transition: all 0.3s;
}

.skill-tag:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    transform: scale(1.05);
    border-color: var(--text-primary);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px;
    background: var(--text-primary);
    color: var(--bg-color);
    margin-top: 50px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        height: calc(100vh - var(--nav-height));
        padding: 50px;
        transition: 0.3s;
        border-top: 1px solid var(--border-color);
        gap: 30px;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    /* Hamburger Animation when Active */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .text-content h1 {
        font-size: 3rem;
    }

    .profile-container {
        width: 280px;
        height: 280px;
    }

    .decorative-circle {
        width: 260px;
        height: 300px;
    }

    .profile-img {
        width: 240px;
    }

    .btn-download {
        display: none;
        /* Hide 'Download CV' text button on very small screens if crowded, or we can keep it icon only */
    }

    /* Ensure button is visible but maybe smaller/icon only if needed, 
       but for now we keep it and just rely on flex layout */
    .btn-download {
        display: flex;
        font-size: 0.8rem;
        padding: 8px 15px;
    }
}

/* --- Gallery Grid --- */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
    padding-bottom: 50px;
}

@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    break-inside: avoid;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay h3 {
    color: #fff;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay h3 {
    transform: translateY(0);
}