:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #020617;
    --bg-card: rgba(30, 41, 59, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-color: #38bdf8;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --mesh-gradient: radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    --container-width: 1200px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    background-image: var(--mesh-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-category h3 {
    margin-bottom: 2rem;
    color: var(--accent-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 4rem;
    /* Increased horizontal gap/spacing */
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 6px rgba(99, 102, 241, 0.3));
    transition: var(--transition);
}

.nav-brand:hover .brand-logo svg {
    transform: rotate(15deg) scale(1.1);
    filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.6));
}

.nav-brand span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Navbar Profile */
.nav-profile {
    position: relative;
    margin-left: 1.5rem;
}

.profile-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    padding: 2px;
    transition: var(--transition);
    object-fit: cover;
}

.nav-profile:hover .avatar-img {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1001;
    pointer-events: none;
}

.nav-profile.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-header h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.dropdown-header p {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.dropdown-list {
    list-style: none;
}

.dropdown-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.dropdown-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-link:hover {
    color: var(--primary-color);
}

.dropdown-list li span {
    font-size: 1.1rem;
}

.dropdown-list li.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 1rem 0;
}

.dropdown-list li strong {
    color: var(--text-main);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    filter: blur(150px);
    opacity: 0.1;
    top: -100px;
    right: -100px;
    z-index: -1;
}

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

.hero-title {
    font-size: 5rem;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 1rem;
}

.hero-description {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

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

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-small {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-bw {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
}

.btn-bw:hover {
    background: transparent;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

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

/* About Section */
.about {
    padding: 100px 0;
    background: rgba(30, 41, 59, 0.5);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Projects Grid */
.projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5), 0 18px 36px -18px rgba(99, 102, 241, 0.3);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

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

.project-problem {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.project-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.project-features li::before {
    content: '→';
    margin-right: 0.8rem;
    color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* Skills Section */
.skills {
    padding: 100px 0;
    background: rgba(30, 41, 59, 0.5);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

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

.skill-list li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.skill-list li::before {
    content: '●';
    margin-right: 0.8rem;
    font-size: 0.6rem;
    color: var(--primary-color);
}

.skill-note {
    margin-top: 3rem;
    text-align: center;
    background: rgba(56, 189, 248, 0.05);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    position: relative;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.contact-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.contact-card-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.resume-cta-container {
    margin-top: 5rem;
    display: flex;
    justify-content: center;
}

.resume-elegant-box {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 32px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.resume-elegant-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.resume-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.resume-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.resume-elegant-box .btn-bw {
    padding: 1rem 3rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

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

    .nav-menu {
        display: none;
    }
}

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

.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}