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

:root {
    --bg-color: #ffffff;
    --text-color: #333;
    --header-bg: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    --card-bg: rgba(250, 250, 250, 0.9);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    overflow-x: hidden;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress Bar */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #333, #666, #000);
    width: 0%;
    z-index: 9998;
    transition: width 0.1s;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--header-bg);
    color: white;
    padding: 120px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.header-content {
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.4em;
    margin-bottom: 30px;
    font-weight: 500;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-btn {
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

nav.scrolled {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    flex-wrap: wrap;
}

nav ul li {
    margin: 5px 25px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 15px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background: #333;
    transition: transform 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-link:hover,
.nav-link.active {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

/* Sections */
section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin: 40px auto;
    padding: 60px 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s, transform 0.6s;
}

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

h2 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #666, #333, #000);
    border-radius: 2px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    align-items: start;
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6em;
    color: white;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 5px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
}

.about-content p {
    font-size: 1.2em;
    line-height: 1.9;
    margin-bottom: 20px;
}

.certification-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(240, 240, 240, 0.8), rgba(250, 250, 250, 0.8));
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.certification-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Skills Section */
.skills-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #333;
    background: transparent;
    color: #333;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: #333;
    color: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skill-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    border-left: 5px solid #333;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform-origin: center;
}

.skill-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.skill-card.hidden {
    display: none;
}

.skill-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.skill-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.skill-card ul {
    list-style: none;
}

.skill-card ul li {
    padding: 5px 0 5px 20px;
    position: relative;
}

.skill-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #333;
    font-weight: bold;
    font-size: 1.2em;
}

/* Experience Section */
.timeline {
    position: relative;
}

.experience-item {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 20px;
    border-left: 5px solid #000;
    transition: var(--transition);
    cursor: pointer;
}

.experience-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-hover);
}

.experience-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.experience-header h3 {
    color: #2c3e50;
    font-size: 1.5em;
}

.duration {
    color: #666;
    font-weight: 600;
}

.company {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 15px;
    font-weight: 500;
}

.experience-item ul {
    margin-left: 20px;
}

.experience-item ul li {
    margin-bottom: 10px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.project-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.project-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3em;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.05);
}

.project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 70%);
    transition: all 0.5s;
}

.project-card:hover::before {
    top: -25%;
    right: -25%;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: #333;
}

.project-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.project-card p {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    position: relative;
    z-index: 1;
}

.tech-tag {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag:hover {
    transform: scale(1.1);
}

.project-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.project-btn:hover {
    background: #000;
    transform: translateY(-2px);
}

/* Education Section */
.education-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.education-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    border-left: 5px solid #333;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.education-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.degree {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.school {
    color: #666;
    margin-bottom: 5px;
}

.year {
    color: #555;
    font-weight: 600;
}

.location {
    margin-top: 10px;
    color: #666;
}

.certification-section {
    margin-top: 30px;
    text-align: center;
}

.certification-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    display: inline-block;
    border: 3px solid var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.certification-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.certification-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.cert-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.cert-org {
    color: #555;
    margin-top: 5px;
}

/* Contact Section */
.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-btn {
    color: #333;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    font-weight: 600;
}

.contact-btn:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #000;
    transform: translateY(-5px);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }

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

    .profile-img {
        width: 200px;
        height: 200px;
        font-size: 5em;
    }

    nav ul {
        padding: 15px 0;
    }

    nav ul li {
        margin: 5px 10px;
    }

    .experience-header {
        flex-direction: column;
    }

    .skills-grid,
    .projects-grid,
    .education-section {
        grid-template-columns: 1fr;
    }

    section {
        padding: 40px 20px;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }
}