/* ==================== 
   Midnight Nebula Theme 
   ==================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Base Colors */
    --bg-dark: #050507;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.07);

    /* Accents */
    --accent-primary: #6366f1;
    /* Indigo */
    --accent-secondary: #06b6d4;
    /* Cyan */
    --accent-glow: rgba(99, 102, 241, 0.5);

    /* Text */
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #475569;

    /* Borders & Glass */
    --border-light: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);

    /* Spacing */
    --container-width: 1100px;
    --nav-height: 80px;

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease-out);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== Utilities ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.has-glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 15px 30px -5px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* ==================== Background Canvas ==================== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(5, 5, 7, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dot {
    color: var(--accent-secondary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    cursor: pointer;
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    z-index: 10;
}

.greeting {
    font-size: 1.1rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff 20%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.typing-container {
    font-size: 1.5rem;
    font-family: 'Code', monospace;
    /* Fallback if needed */
    color: var(--text-muted);
    margin-bottom: 2rem;
    height: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.typing-text {
    font-family: 'Courier New', Courier, monospace;
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translate(-50%, 0);
    }

    40% {
        transform: translate(-50%, -10px);
    }

    60% {
        transform: translate(-50%, -5px);
    }
}

/* ==================== Sections Common ==================== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* ==================== About Section ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.image-frame {
    border-radius: 24px;
    overflow: hidden;
    border: 2px solid var(--border-light);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.image-frame:hover {
    transform: rotate(0);
}

.profile-img {
    width: 100%;
    height: auto;
    filter: grayscale(20%) contrast(110%);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    background: rgba(10, 10, 15, 0.85);
    /* Darker override */
}

.exp-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-secondary);
    line-height: 1;
}

.exp-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-heading {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--accent-primary);
}

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

.stats-row {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ==================== Skills Section ==================== */
.skills-wrapper {
    display: grid;
    gap: 4rem;
}

.group-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-secondary);
}

.skill-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.skill-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s, border-color 0.3s;
}

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

.skill-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
}

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

.comp-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-light);
}

.comp-icon {
    font-size: 2rem;
}

/* ==================== Projects Section ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    border-radius: 16px;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-primary);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.folder-icon {
    color: var(--accent-primary);
}

.project-links a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.project-links a:hover {
    color: var(--accent-secondary);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

.project-tech-list {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: 'Code', monospace;
}

.more-projects {
    text-align: center;
    margin-top: 4rem;
}

/* ==================== Contact & Footer ==================== */
.contact-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-text {
    max-width: 500px;
    margin: 0 auto 2.5rem;
    color: var(--text-muted);
}

.big-btn {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.footer-socials {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-weight: 500;
}

.footer-socials a:hover {
    color: var(--accent-secondary);
}

.main-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
    }

    .bar {
        position: absolute;
        width: 100%;
        height: 2px;
        background: var(--text-main);
        transition: 0.3s;
    }

    .bar-1 {
        top: 0;
    }

    .bar-2 {
        bottom: 0;
    }

    .mobile-menu-active .bar-1 {
        transform: rotate(45deg);
        top: 9px;
    }

    .mobile-menu-active .bar-2 {
        transform: rotate(-45deg);
        bottom: 9px;
    }

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

    .about-image-wrapper {
        width: 80%;
        margin: 0 auto;
    }
}