/* CSS Variables & Reset */
:root {
    /* Color Palette - Dark Premium */
    --bg-color: #0d0d10;
    /* Very dark mostly black */
    --surface-color: #16161c;
    /* Slightly lighter for cards */
    --surface-hover: #1e1e26;
    --primary-accent: #6c5ce7;
    /* Soft purple */
    --secondary-accent: #00cec9;
    /* Teal/Cyan for highlights */
    --text-primary: #ededed;
    --text-secondary: #a0a0b0;
    --border-color: #2d2d3a;

    /* Spacing & Sizes */
    --nav-height: 70px;
    --container-width: 1100px;

    /* Transitions */
    --ease-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    font-weight: 700;
}

h2.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    /* Removed absolute positioning centering hack */
}

/* Center the section title container */
.container {
    text-align: center;
    /* Ensures inline-block title is centered */
}

/* Reset text-align for content that shouldn't be centered */
.hero-container,
.experience-grid,
.projects-grid,
.skills-wrapper,
.exp-header,
.project-content {
    text-align: left;
}

h2.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    /* Start from center */
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-accent), var(--secondary-accent));
    border-radius: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--ease-smooth);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(13, 13, 16, 0.9);
    /* Glassmorphism base */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-accent);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

.hero-content {
    max-width: 800px;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 3px solid rgba(108, 92, 231, 0.3);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
    transition: var(--ease-smooth);
}

.profile-img:hover {
    transform: scale(1.05);
    border-color: var(--primary-accent);
}

.profile-img-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.hero-section h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-section h1 .highlight {
    background: linear-gradient(to right, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.role .divider {
    margin: 0 10px;
    opacity: 0.5;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-bottom: 2.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--primary-accent);
    transform: translateY(-3px);
}

.cta-button,
.secondary-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--ease-smooth);
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-accent), #a29bfe);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.25);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.35);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.secondary-btn:hover {
    border-color: var(--primary-accent);
    color: var(--primary-accent);
    background-color: rgba(108, 92, 231, 0.05);
}

.hero-glow {
    position: absolute;
    top: 20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, rgba(13, 13, 16, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

/* Sections Global */
.section {
    padding: 100px 0;
}

/* Experience Section */
.experience-grid {
    display: grid;
    gap: 20px;
}

.experience-card {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: var(--ease-smooth);
}

.experience-card:hover {
    background-color: var(--surface-hover);
    border-color: rgba(108, 92, 231, 0.2);
    transform: translateY(-2px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.exp-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.exp-header .company {
    color: var(--primary-accent);
    font-weight: 600;
    margin-right: auto;
    margin-left: 10px;
}

.exp-header .duration {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.exp-details {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-secondary);
}

.exp-details li {
    margin-bottom: 8px;
}

.exp-details strong {
    color: var(--text-primary);
}

/* Services Section */
.services-grid {
    display: grid;
    /* Adjusted min-width to 280px to safely fit 3 items (280*3 + 30*2 = 900px < 1100px) */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    justify-content: center;
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure uniform height */
}

.service-card:hover {
    border-color: var(--primary-accent);
    transform: translateY(-8px) scale(1.02);
    /* Pop up effect */
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.2);
    background-color: var(--surface-hover);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-accent);
    min-width: 40px;
    text-align: center;
}

.service-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.service-cluster {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.service-item {
    border-left: 2px solid rgba(108, 92, 231, 0.3);
    padding-left: 15px;
    transition: var(--ease-smooth);
}

.service-item:hover {
    border-left-color: var(--primary-accent);
    background: linear-gradient(90deg, rgba(108, 92, 231, 0.05) 0%, transparent 100%);
}

.service-item h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-weight: 600;
}

.service-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    background-color: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--ease-smooth);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 180px;
    background: #1e1e26;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1e26 0%, #25252e 100%);
}

.project-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Tech Stack Icons in Project Cards */
.tech-stack-icons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.5rem;
}

.tech-stack-icons i:hover {
    color: var(--primary-accent);
    transform: translateY(-2px);
    transition: var(--ease-smooth);
}


.project-links {
    display: flex;
    gap: 15px;
}

.project-links a {
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.project-links a:hover {
    color: var(--primary-accent);
}

.center-btn {
    text-align: center;
}

/* Skills Section */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--ease-smooth);
}

.skill-category:hover {
    border-color: var(--secondary-accent);
}

.skill-category h3 {
    margin-bottom: 20px;
    color: var(--secondary-accent);
    font-size: 1.2rem;
}

/* New Skill Icons Grid */
.skill-icons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-icons-grid i {
    font-size: 3rem;
    color: var(--text-secondary);
    /* Fallback */
    transition: var(--ease-smooth);
    cursor: pointer;
}

/* Let Devicon colored icons shine, but add effect on hover */
.skill-icons-grid i:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* Contact Section & Footer */
.contact-section {
    text-align: center;
    background: linear-gradient(180deg, var(--bg-color) 0%, var(--surface-color) 100%);
}

.narrow-container {
    max-width: 600px;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.footer-socials {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-socials a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    color: var(--text-primary);
}

.footer {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.small-text {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

/* Animations (Intersection Observer) */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-in.visible {
    opacity: 1;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Responsiveness */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        background-color: var(--surface-color);
        height: calc(100vh - var(--nav-height));
        width: 70%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .role {
        font-size: 1.2rem;
    }
}