/* --- Google Fonts & Variables --- */
:root {
    --bg-color: #0b0f19;
    /* Deep dark blue for AI theme */
    --card-bg: rgba(17, 25, 40, 0.75);
    /* Glassmorphism base */
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    --card-border: rgba(255, 255, 255, 0.1);
    --hover-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
    --transition: all 0.3s ease;
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Canvas Particles --- */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #0b1120 0%, #050814 100%);
}

/* --- Typography & Utilities --- */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.section-title span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.glow-text {
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

section {
    padding: 100px 10%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: var(--hover-shadow);
    transform: translateY(-3px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Glassmorphism Cards --- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: var(--hover-shadow);
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 10%;
    z-index: 1000;
    transition: var(--transition);
}

nav.sticky {
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 10%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
}

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

.logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

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

.nav-links li a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

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

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

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 120px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero-content h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.typing-text {
    color: var(--primary-color);
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.glass-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    transition: var(--transition);
    font-size: 1.2rem;
}

.glass-icon:hover {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

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

.profile-img-container {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    padding: 10px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 50px rgba(0, 210, 255, 0.2);
    position: relative;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-container::before {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px dashed var(--primary-color);
    border-radius: 50%;
    animation: spin-slow 10s linear infinite;
    opacity: 0.3;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(0, 210, 255, 0.3);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

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

/* --- About Section --- */
.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.personal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-item i {
    font-size: 2rem;
}

.info-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-item p {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

/* --- Skills Section --- */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 2rem 1rem;
}

.skill-card i {
    font-size: 3rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    transition: var(--transition);
}

.skill-card:hover i {
    transform: scale(1.2);
}

.skill-card span {
    font-weight: 500;
    letter-spacing: 1px;
}

/* --- Experience Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 5px 0 15px;
    font-weight: 500;
}

.timeline-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.timeline-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- Projects Section --- */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img {
    height: 200px;
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
}

.img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.project-card:hover .img-placeholder {
    transform: scale(1.1);
    color: var(--primary-color);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tech span {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 10px;
}

/* --- Certifications Section --- */
.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    text-align: center;
}

.cert-card i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.cert-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.cert-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Achievements Section --- */
.achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 50px 10%;
    min-height: auto;
}

.achievement-item {
    text-align: center;
    padding: 2rem;
}

.achievement-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.achievement-item h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    display: inline-block;
}

.achievement-item span {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
}

.achievement-item p {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 5px;
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-list .info-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-list .info-item i {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.contact-form button {
    align-self: flex-start;
}

/* --- Footer --- */
footer {
    background: rgba(11, 15, 25, 0.9);
    border-top: 1px solid var(--card-border);
    padding: 50px 10% 20px;
    text-align: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

footer p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--gradient);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    font-size: 0.9rem;
}

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

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

/* --- Responsive Design --- */
@media (max-width: 991px) {
    section {
        padding: 80px 5%;
    }

    nav {
        padding: 15px 5%;
    }

    nav.sticky {
        padding: 10px 5%;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 50px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-buttons,
    .social-icons {
        justify-content: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .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);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
        border-bottom: 1px solid var(--card-border);
    }

    .nav-links.active {
        left: 0;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: 21px !important;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.3rem;
    }
}
