:root {
    --bg-color: #0d1117;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --accent-gradient: linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
    --card-bg: rgba(22, 27, 34, 0.6);
    --card-border: rgba(255, 255, 255, 0.1);

    --header-bg: rgba(13, 17, 23, 0.8);
    --mobile-nav-bg: rgba(22, 27, 34, 0.95);
    --project-img-bg: linear-gradient(45deg, #1f2937, #111827);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
}

[data-theme="light"] {
    --bg-color: #f6f8fa;
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --accent-color: #0969da;
    --accent-gradient: linear-gradient(135deg, #0969da 0%, #8250df 100%);
    --card-bg: rgba(255, 255, 255, 0.6);
    --card-border: rgba(0, 0, 0, 0.1);

    --header-bg: rgba(246, 248, 250, 0.8);
    --mobile-nav-bg: rgba(255, 255, 255, 0.95);
    --project-img-bg: linear-gradient(45deg, #e1e4e8, #f6f8fa);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Background Blobs for Glassmorphism Context */
.blob-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(88, 166, 255, 0.15) 0%, rgba(13, 17, 23, 0) 70%);
    z-index: -1;
    filter: blur(80px);
    animation: float 20s infinite alternate ease-in-out;
}

.blob-2 {
    top: auto;
    bottom: -10%;
    left: auto;
    right: -10%;
    background: radial-gradient(circle, rgba(188, 140, 255, 0.15) 0%, rgba(13, 17, 23, 0) 70%);
    animation: float 25s infinite alternate-reverse ease-in-out;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
    background-size: 200% auto;
    animation: gradient-shift 5s ease infinite;
}

/* Helper Class */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.5);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(88, 166, 255, 0.1);
    transform: translateY(-2px);
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    /* padding: 10px 0; */
}

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

.logo {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-heading);
}

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

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

.nav-links li a {
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--accent-color);
}

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

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

.nav-controls {
    display: flex;
    gap: 15px;
    margin-left: 20px;
}

.control-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.name {
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    white-space: nowrap;
}

.role {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.summary {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

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

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-wrapper {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--accent-gradient);
    padding: 5px;
    box-shadow: 0 0 40px rgba(88, 166, 255, 0.4);
    animation: breathe 6s infinite ease-in-out;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

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

.about-info h3,
.about-skills h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--accent-color);
}

.about-info ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.about-info ul li {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.about-info ul li strong {
    color: var(--text-primary);
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(88, 166, 255, 0.2);
    transform: translateY(-2px);
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 40px 40px;
}

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

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.6);
    animation: pulse 2s infinite;
}

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

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

.timeline-content .date {
    display: inline-block;
    padding: 0.2rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

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

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

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

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img {
    height: 200px;
    background: var(--project-img-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.project-info p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    flex: 1;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 20px;
    color: var(--accent-color);
}

.project-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

.project-link:hover {
    text-decoration: underline;
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.achievement-card {
    text-align: center;
}

.ach-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.achievement-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Footer & Contact */
.footer {
    padding: 4rem 0 2rem 0;
    border-top: 1px solid var(--card-border);
    margin-top: 80px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
}

.text-center {
    text-align: center;
}

.footer-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.social-icon {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    background: rgba(88, 166, 255, 0.05);
    color: var(--accent-color);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(88, 166, 255, 0.2);
}

.social-icon:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(88, 166, 255, 0.3);
    border-color: transparent;
}

.footer-copy {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations loading */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.8s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    33% {
        transform: translate(30px, -50px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes breathe {
    0% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(88, 166, 255, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 60px rgba(88, 166, 255, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 40px rgba(88, 166, 255, 0.4);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(88, 166, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(88, 166, 255, 0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Responsive Design */
@media screen and (max-width: 968px) {
    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .name {
        font-size: clamp(1.8rem, 8vw, 3.5rem);
        white-space: nowrap;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }

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

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

@media screen and (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--mobile-nav-bg);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
    }

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

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

    .hamburger {
        display: block;
    }

    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}