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

:root {
    --bg-color: #0b1121;
    /* Very dark blue */
    --card-bg: #151e32;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    /* Sky blue */
    --accent-glow: rgba(56, 189, 248, 0.3);
    --gradient-1: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);

    --nav-height: 80px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
    line-height: 1.2;
}

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

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Staggered Animation Delay for list items */
.nav-links li:nth-child(1) {
    transition-delay: 0.1s;
}

.nav-links li:nth-child(2) {
    transition-delay: 0.2s;
}

.nav-links li:nth-child(3) {
    transition-delay: 0.3s;
}

.nav-links li:nth-child(4) {
    transition-delay: 0.4s;
}

.nav-links li:nth-child(5) {
    transition-delay: 0.5s;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--gradient-1);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.section-title:hover::after {
    width: 100px;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--gradient-1);
    color: #fff !important;
    /* Force white text */
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.6);
}

.btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    border-width: 1px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(11, 17, 33, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-size: 1.8rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -1px;
}

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

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

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

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

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

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

.nav-links .btn-primary {
    margin-left: 0;
    padding: 0.6rem 1.5rem;
    color: #fff !important;
}

.nav-links .btn-primary::after {
    display: none;
    /* No underline for button */
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 40%);
}

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

.greeting {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: block;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.bio {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
    font-size: 1.1rem;
}

.hero-btns {
    margin-bottom: 2.5rem;
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1.5rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
    display: inline-block;
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image {
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30px;
    position: relative;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.hero-image-bg {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 30px;
    background: var(--gradient-1);
    top: 20px;
    right: -20px;
    /* Offset relative to image wrapper centering */
    z-index: 1;
    opacity: 0.2;
}

/* Fix offset for centered grid item */
.hero-image-wrapper .hero-image-bg {
    right: 50%;
    transform: translateX(65%);
    /* Adjust based on image width */
}


/* About Section */
.about-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.personal-traits {
    margin-top: 2rem;
}

.personal-traits ul {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.personal-traits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.personal-traits i {
    color: var(--accent-color);
}


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

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

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

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: default;
}

.tag:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.2);
}

.cert-list {
    list-style: disc inside;
    color: var(--text-secondary);
}

.cert-list li {
    margin-bottom: 0.5rem;
}

/* Snake Animation Divider */
.snake-divider {
    padding: 2rem 0;
}

.snake-visual-container {
    height: 100px;
    background: rgba(11, 17, 33, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.snake-grid-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.snake-runner {
    position: absolute;
    top: 50%;
    left: -50px;
    width: 60px;
    height: 14px;
    background: #ef4444;
    /* Red Snake */
    border-radius: 4px 10px 10px 4px;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    animation: snakeRun 6s linear infinite;
    z-index: 2;
}

/* Eyes */
.snake-runner::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 3px;
    width: 3px;
    height: 3px;
    background: #000;
    border-radius: 50%;
    box-shadow: 0 5px 0 #000;
}

/* Tongue */
.snake-runner::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid #ef4444;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}

.snake-food {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #22c55e;
    /* Green Apple */
    font-size: 1.2rem;
    z-index: 1;
    animation: appleEat 6s linear infinite;
}

@keyframes snakeRun {
    0% {
        left: -60px;
        width: 60px;
    }

    40% {
        width: 60px;
    }

    /* Normal length */
    45% {
        width: 70px;
    }

    /* Stretch slightly when eating */
    50% {
        left: 50%;
        width: 80px;
    }

    /* Grow after eating */
    100% {
        left: 110%;
        width: 80px;
    }
}

@keyframes appleEat {

    0%,
    48% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }

    100% {
        opacity: 0;
    }
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding-left: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.timeline-content h3 {
    margin-bottom: 0.2rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-content .date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.8rem;
    color: var(--accent-color);
}

.card-content .tags span::before {
    content: '#';
    margin-right: 2px;
}

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

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item h4 {
    margin-bottom: 0.3rem;
}

.info-item p,
.info-item a {
    color: var(--text-secondary);
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(11, 17, 33, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea {
    outline: none;
    border-color: var(--accent-color);
}

/* Footer */
footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.social-links-footer a {
    color: var(--text-secondary);
    margin: 0 0.5rem;
    font-size: 1.2rem;
}

.social-links-footer a:hover {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 1s ease-out;
}


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

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-btns,
    .social-links {
        justify-content: center;
        display: flex;
    }

    .bio {
        margin: 0 auto 2.5rem;
    }

    .hero-image-wrapper {
        order: -1;
        margin-bottom: 3rem;
    }

    .hero-image-bg {
        right: 50%;
        transform: translateX(50%);
    }

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

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        background: var(--card-bg);
        flex-direction: column;
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
    }

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

    .hamburger {
        display: block;
    }

    .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px auto;
        -webkit-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
        background-color: #fff;
    }

    .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);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

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

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}