/* --- GOOGLE FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

/* --- CSS VARIABLES (ROOT) --- */
:root {
    --primary-color: #00f0ff; /* Bright cyan for accents */
    --primary-color-dark: #00b8c2;
    --secondary-color: #ff007b; /* A secondary accent color (optional) */
    --bg-dark-1: #1a1a2e; /* Deep navy blue */
    --bg-dark-2: #16213e; /* Slightly lighter navy */
    --bg-dark-3: #0f3460; /* Card background */
    --text-light: #e3e3e3;
    --text-white: #ffffff;
    --text-dark: #333;
    --border-color: rgba(0, 240, 255, 0.2);
    --glass-bg: rgba(15, 52, 96, 0.4);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto Mono', monospace;
}

/* --- GENERAL & RESET STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

a:hover {
    color: var(--primary-color-dark);
}

ul {
    list-style: none;
}

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

h1, h2, h3, h4 {
    color: var(--text-white);
    font-weight: 600;
}

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

/* --- HEADER & NAVBAR --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 2rem;
    transition: all 0.3s ease-in-out;
}

.header.scrolled .navbar {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}


.logo a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
}

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

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

.nav-link {
    font-family: var(--font-secondary);
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

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

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

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-white);
    transition: all 0.3s ease-in-out;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--bg-dark-1);
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}


/* --- UPGRADED HERO SECTION STYLES --- */
.hero-upgraded {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark-1); /* Fallback color */
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Behind content */
}

.hero-container {
    position: relative;
    z-index: 2; /* Above particles */
    display: flex;
    align-items: center;
    min-height: 90vh; /* Adjust to leave space for ticker */
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.hero-text .hero-name {
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 700;
    color: var(--text-white);
}

.hero-text #typed {
    color: var(--primary-color);
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 500;
}

.hero-text p {
    font-size: 1.1rem;
    margin: 1.5rem 0 2rem;
    max-width: 550px;
}

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

.hero-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 50%;
    border: 7px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
}


/* --- TECH LOGO TICKER ANIMATION --- */
.logo-ticker-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 52, 96, 0.3);
    padding: 1rem 0;
    overflow: hidden;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.logo-ticker {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.logo-ticker img {
    height: 40px;
    margin: 0 2.5rem;
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.logo-ticker:hover {
    animation-play-state: paused;
}

.logo-ticker img:hover {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}


/* --- REUSABLE SECTION STYLES --- */
.section {
    padding: 100px 0;
}

.page-section {
    padding-top: 140px; /* Offset for fixed header */
}

.bg-darker {
    background-color: var(--bg-dark-2);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.section-title span {
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

/* --- ABOUT SECTION --- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}
.about-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}
.about-image img {
    border-radius: 15px;
    border: 5px solid var(--border-color);
}
.experience-badge {
    position: absolute;
    bottom: 20px;
    right: -20px;
    background: var(--primary-color);
    color: var(--bg-dark-1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
}
.experience-badge .years {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}
.experience-badge .text {
    font-size: 0.9rem;
    font-family: var(--font-secondary);
}
.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.about-text p {
    margin-bottom: 1rem;
}
.about-details {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}
.detail-item p {
    margin-bottom: 0.5rem;
}
.detail-item p span {
    font-weight: 600;
    color: var(--text-white);
}
.about-text .social-links a {
    font-size: 1.5rem;
    margin-right: 15px;
}

/* --- SKILLS SECTION --- */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}
.skills-category {
    background: var(--bg-dark-3);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.skill-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}
.skill-category-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
}
.skill-category-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}
.skill-item {
    margin-bottom: 1rem;
}
.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-family: var(--font-secondary);
}
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-dark-1);
    border-radius: 5px;
}
.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* --- SERVICES SECTION --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.service-card {
    background: var(--bg-dark-3);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.1);
}
.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.service-card ul {
    margin-bottom: 1.5rem;
}
.service-card li {
    margin-bottom: 0.5rem;
}
.read-more {
    font-weight: 600;
}
.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}
.read-more:hover i {
    transform: translateX(5px);
}

/* --- CONTACT SECTION --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--bg-dark-3);
    padding: 3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.info-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
}
.info-item h4 {
    margin-bottom: 0.2rem;
}
.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark-2);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-light);
    font-family: var(--font-primary);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}
.form-group textarea {
    height: 150px;
    resize: vertical;
}
.btn.primary {
    width: 100%;
}
.btn.primary i {
    margin-left: 10px;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--bg-dark-2);
    padding: 60px 0 20px;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 40px;
}
.footer-about h3, .footer-links h3, .footer-services h3, .footer-contact h3 {
    margin-bottom: 1rem;
    color: var(--text-white);
}
.footer-links li, .footer-services li {
    margin-bottom: 0.5rem;
}
.footer-links a, .footer-services a {
    color: var(--text-light);
}
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}
.footer-contact i {
    color: var(--primary-color);
}
.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-social a {
    font-size: 1.2rem;
    margin-left: 15px;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--bg-dark-1);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}


/* --- RESPONSIVE DESIGN (MEDIA QUERIES) --- */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-dark-3);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease-in-out;
    }
    .nav-links.active {
        left: 0;
    }
    .hamburger {
        display: block;
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    .about-content, .contact-container {
        grid-template-columns: 1fr;
    }
    .about-image {
        margin: 0 auto;
        max-width: 400px;
    }
    /* Upgraded Hero Responsive */
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text {
        order: 2;
    }
    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }
    .hero-image img {
        max-width: 300px;
    }
    .hero-text p {
        margin: 1.5rem auto 2rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }
    .page-section {
        padding-top: 120px;
    }
    .about-details {
        flex-direction: column;
        gap: 1rem;
    }
    .skills-container {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .contact-container {
        padding: 1.5rem;
    }
}
