:root {
    --bg-color: #1a1a2e;
    --primary-color: #0f3460;
    --secondary-color: #16213e;
    --neon-cyan: #00ffff;
    --neon-blue: #64779c;
    --text-color: #e3e3e3;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

main {
    padding-top: 60px;
}
/* --- General Styles --- */
h1,
h2,
h3 {
    color: #fff;
    text-shadow: 0 0 5px var(--neon-cyan);
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

section {
    padding: 80px 10%;
    min-height: 80vh;
}

section[id] {
    scroll-margin-top: 70px;
    /* Adjusted to match main padding-top */
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--neon-cyan);
    border-radius: 5px;
    color: var(--bg-color);
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.btn:hover {
    background: transparent;
    color: var(--neon-cyan);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-cyan);
}

.btn-secondary:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
}

/* --- Header & Navbar --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 20px 10%; /* Increased padding for better spacing */
    background: rgba(22, 33, 62, 0.5);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding 0.3s ease, background 0.3s ease;
}

header.scrolled {
    padding: 15px 10%;
    background: rgba(22, 33, 62, 0.85);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700; /* Bolder logo */
    color: #fff;
    text-shadow: 0 0 10px var(--neon-cyan);
}

nav .nav-links {
    list-style: none;
    display: flex;
}

nav .nav-links li {
    margin-left: 35px;
}

nav .nav-links li a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    color: #f4f5f7;
    transition: color 0.3s ease;
}

nav .nav-links li a:hover {
    color: var(--neon-cyan);
}

nav .nav-links li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    height: 2px;
    width: 0;
    background-color: var(--neon-cyan);
    transition: width 0.3s ease;
}

nav .nav-links li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none; /* Hidden by default */
    cursor: pointer;
    font-size: 1.8rem;
    color: #fff;
}



/* --- Hero Section --- */
.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    box-shadow: 0 0 20px var(--neon-cyan);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
}

.tagline {
    font-size: 1.2rem;
    margin: 10px 0 30px;
    color: var(--text-color);
}

.hero-buttons a {
    margin: 0 10px;
}

/* --- About Section --- */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* --- Projects Section --- */
.filter-buttons {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--neon-blue);
    color: #fff;
    box-shadow: 0 0 10px var(--neon-blue);
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    /* Initially show all cards */
}

.project-card.hide {
    display: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--neon-blue);
}

.project-card img {
  width: 100%;
  height: auto; /* ✅ responsive */
  max-height: 200px; /* keep balance */
  object-fit: cover;
  border-radius: 10px;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    color: var(--neon-cyan);
}

.project-links a {
    margin-right: 15px;
    font-weight: 500;
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.skill-card {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px var(--neon-cyan);
}

.skill-card i {
    font-size: 3rem;
    color: var(--neon-cyan);
    margin-bottom: 15px;
}

/* --- Experience Section --- */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--neon-blue);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 25px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 25px;
    text-align: left;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background: var(--bg-color);
    border: 3px solid var(--neon-cyan);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even):after {
    left: -10px;
}

.timeline-item h3 {
    color: var(--neon-cyan);
}

.date {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: #aaa;
}


/* --- Blog Section Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

/* Individual blog post cards */
.blog-post {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    border-left: 3px solid var(--neon-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
     transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.blog-post:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* Hide "more text" sections by default */
.more-text {
    display: none;
}

/* --- Blog Text Styling --- */
.blog-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    font-size: 16px;
    color: white;
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Line breaks spacing */
.blog-text br {
    margin-bottom: 10px;
}
/* Responsive typography */
@media (max-width: 768px) {
    .blog-text {
        padding: 15px;
        font-size: 15px;
    }
}

/* --- Blog Section --- */
.blog-carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.blog-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.blog-post {
    background: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    border-left: 3px solid var(--neon-cyan);
    flex: 0 0 100%;
    margin: 0 10px;
    box-sizing: border-box;
    height: 300px;   /* ✅ fixed height */
    overflow: hidden; /* ✅ hides extra content */
}

/* On larger screens, show 3 cards */
@media (min-width: 1024px) {
    .blog-post {
        flex-basis: calc(33.333% - 20px);
    }
}
/* On tablet screens, show 2 cards */
@media (min-width: 768px) and (max-width: 1023px) {
    .blog-post {
        flex-basis: calc(50% - 20px);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
}

.carousel-btn.prev-btn {
    left: -20px;
}

.carousel-btn.next-btn {
    right: -20px;
}

.carousel-btn.hidden {
    display: none;
}

/* --- Blog Fullscreen Modal Styles --- */
.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fullscreen-btn {
    cursor: pointer;
    color: var(--neon-cyan);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.fullscreen-btn:hover {
    transform: scale(1.2);
}
/* --- Blog Fullscreen Modal Styles --- */
.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fullscreen-btn {
    cursor: pointer;
    color: var(--neon-cyan);
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.fullscreen-btn:hover {
    transform: scale(1.2);
}




/* Fullscreen Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 50px 20px;
}

.modal-content {
    background-color: #161b22;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 800px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease-in-out;
}

.close-btn {
    float: right;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: cyan;
}

.close-btn:hover {
    color: white;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Contact Section --- */
#contact-form {
    max-width: 600px;
    margin: 0 auto 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    background: var(--secondary-color);
    color: var(--text-color);
    font-family: var(--font-family);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}

.social-links {
    text-align: center;
}

.social-links a {
    font-size: 2rem;
    margin: 0 15px;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    background: var(--secondary-color);
}

/* Hamburger Menu Icon */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
}

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
    section {
        padding: 80px 5%;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
    .hamburger {
        display: block;
        /* Show the hamburger icon */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Start off-screen */
        width: 70%;
        height: 100vh;
        background: var(--secondary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }

    .nav-links li {
        margin: 25px 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 15px;
        text-align: left !important;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 10px;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .filter-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}



/* fix margin */
section[id] {
    scroll-margin-top: 40px;
}

/* match :hover */
.filter-btn {
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 18px;
    margin: 5px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--neon-cyan);
    /* fill like button */
    color: var(--bg-color);
    /* text flips */
    box-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan);
    transform: translateY(-3px) scale(1.05);
}

.resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 1px; /* space between icon and text */
    padding: 2px 10px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    text-decoration: none;
    border-radius: 25px;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transition: all 0.3s ease;
    cursor: pointer;
}

.resume-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}


