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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding-top: 70px;
}

/* Navigation Bar */
nav {
    background-color: #1f1f1f;
    padding: 15px 0;
    position: fixed;   /* stays at the top */
    top: 0;
    left: 0;
    width: 100%;       /* span full width */
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    transition: background-color 0.3s;
    display: block;
}

nav ul li a:hover {
    background-color: #333;
    border-radius: 5px;
}

nav a.active {
    color: white;
    border-bottom: 3px solid #03dac6;
}

@media (max-width: 768px) {
  nav a.active {
    border-bottom: none;      
    background: #00acc1;       
    color: white;               
    border-radius: 5px;
    display: inline-block;
    padding: 5px 10px;
  }
}

/* Hamburger button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 25px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(5px);
}
/* Nav menu default */
.nav-menu ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(to right, #1f1f1f, #2c2c2c);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 2.8em);
    margin-bottom: 10px;
}

.hero h4 {
    font-weight: 400;
    font-size: clamp(1rem, 3vw, 1.2em);
}

/* Social Links Styling inside Hero Section */
.hero .social-links {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(15px, 4vw, 30px);
    flex-wrap: wrap;
}

.hero .social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.hero .social-links a:hover {
    background-color: #03dac6;
    transform: scale(1.1);
    color: white;
}

/* About Me Section */
.about-me {
    padding: clamp(40px, 8vw, 60px) clamp(20px, 4vw, 40px);
    background: #1e1e1e;
    margin: 20px auto;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.05);
    width: 95%;
}

.about-me-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-me-content {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 5vw, 30px);
    align-items: center;
    justify-content: center;
}

/* CTA Section Specific Styles */
#cta .about-me-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: auto;
}

#cta .section-title {
    text-align: center;
    margin-bottom: 2px;
}

#cta .introduction {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3px auto;
}

.profile-image {
    flex: 1 1 200px;
    text-align: center;
    min-width: 200px;
}

.profile-photo {
    width: clamp(150px, 25vw, 200px);
    height: clamp(150px, 25vw, 200px);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
}

.about-me-text {
    flex: 2 1 350px;
    min-width: 280px;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2em);
    margin-bottom: 10px;
    color: #03dac6;
}

.professional-headline {
    font-size: clamp(1.1rem, 3vw, 1.3em);
    color: #00acc1;
    margin-bottom: 15px;
}

.introduction {
    font-size: clamp(0.9rem, 2.5vw, 1em);
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.6;
}

.skills-list h4 {
    font-size: clamp(1rem, 2.5vw, 1.1em);
    color: #ffffff;
    margin-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: clamp(8px, 2vw, 10px);
    padding: 0;
}

.skill-tags li {
    background: #333;
    color: #fff;
    padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 12px);
    border-radius: 20px;
    font-size: clamp(0.8rem, 2vw, 0.9em);
}

/* CTA */
.cta-section {
    margin-top: 20px;
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
    background-color: #03dac6;
    color: #121212;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: bold;
}

.cta-button:hover {
    background-color: #018786;
    color: white;
}

/* Education Section */
#education {
    padding: clamp(4rem, 8vw, 4rem) clamp(1rem, 4vw, 2rem);
    background-color: #121212;
}

#education h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: #03dac6;
    margin-bottom: clamp(2rem, 5vw, 2.5rem);
}

.education-entry {
    background-color: #1e1e1e;
    color: #e0e0e0;
    margin-bottom: 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-left: 5px solid #03dac6;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.education-entry h3 {
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: #00acc1;
    margin-bottom: 1rem;
}

.education-entry p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: #ccc;
}

.education-entry p strong {
    color: #ffffff;
}

/* Projects Section */
.projects-section {
    padding: 50px 20px;
    background-color: #121212;
    color: #fff;
}

.projects-section h2 {
    text-align: center;
    font-size: 36px;
    color: #03dac6;
    margin-bottom: 40px;
}

/* Main Project */
.project-entry {
    background-color: #1e1e1e;
    padding: 20px;
    border-left: 5px solid #03dac6;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
    transition: transform 0.2s, border-color 0.3s;
}

.project-entry:hover {
    transform: translateY(-5px);
    border-color: #00ffe0;
}

.project-entry h3 {
    font-size: 22px;
    color: #00acc1;
    margin-bottom: 10px;
}

.project-entry p {
    font-size: 15px;
    line-height: 1.6;
    color: #ccc;
}

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

/* Mini Projects */
.mini-projects {
    margin-top: 3rem;
    background-color: #1e1e1e;
    padding: 20px;
    border-left: 5px solid #03dac6;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.mini-projects h3 {
    color: #03dac6;
    font-size: 22px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Mini Projects Grid */
.mini-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Each Mini Project */
.mini-project {
    background-color: #222;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.mini-project:hover {
    transform: translateY(-5px);
    background-color: #292929;
}

.mini-project h4 {
    color: #bb86fc;
    margin-bottom: 8px;
    font-size: 18px;
}

.mini-project p {
    color: #ddd;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Project Links */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-links a {
    color: #03dac6;
    background-color: #292929;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

.project-links a:hover {
    background-color: #03dac6;
    color: #000;
}

/* Project Images - UPDATED */
.project-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 3rem;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Hide the icon when image is present */
.project-image:has(img)::before {
    display: none !important;
}

.project-entry:hover .project-image img {
    transform: scale(1.05);
}

/* Mini Project Images - UPDATED */
.mini-project-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
    background: linear-gradient(135deg, #2563eb, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
}

.mini-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* Hide the icon when image is present */
.mini-project-image:has(img)::before {
    display: none !important;
}

.mini-project:hover .mini-project-image img {
    transform: scale(1.05);
}

/* Icon backgrounds for projects without images - UPDATED */
.project-image:not(:has(img))::before {
    content: '🤖';
}

.project-image.portfolio-icon:not(:has(img))::before {
    content: '💼';
}

.mini-project-image.calculator-icon:not(:has(img))::before {
    content: '🧮';
}

.mini-project-image.game-icon:not(:has(img))::before {
    content: '🎮';
}

.mini-project-image.chatbot-icon:not(:has(img))::before {
    content: '🤖';
}

/* Project tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.project-tag {
    background: rgba(3, 218, 198, 0.1);
    color: #03dac6;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(3, 218, 198, 0.2);
}

/* Placeholder styles - UPDATED */
.project-image.placeholder:not(:has(img)) {
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.project-image.placeholder:not(:has(img))::before {
    content: 'Project Image \A Click to view demo';
    white-space: pre;
    text-align: center;
    font-size: 1rem;
}

.mini-project-image.placeholder:not(:has(img)) {
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}

.mini-project-image.placeholder:not(:has(img))::before {
    content: 'Project Preview';
    font-size: 0.9rem;
}
/* Skills Section */
.skills-section {
  padding: 50px 20px;
  background-color: #121212;
  color: #ffffff;
}

.skills-section h2 {
  text-align: center;
  color: #00ffe0;
  font-size: 36px;
  margin-bottom: 40px;
}

.skills-section h3 {
  color: #00ffe0;
  font-size: 24px;
  margin: 30px 0 20px;
}

/* Skill Cards */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.soft-skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.skill-card {
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.skill-card:hover {
  transform: translateY(-5px);
  background-color: #222222;
}

/* Achievements */
.achievements-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.achievement-card {
  background-color: #1e1e1e;
  border-left: 5px solid #00ffe0;
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s, border-color 0.2s;
}

.achievement-card:hover {
  transform: translateY(-5px);
  border-color: #ff9f1a;
}

.achievement-card h4 {
  color: #00ffe0;
  margin-bottom: 10px;
  font-size: 18px;
}

.achievement-card p {
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 10px;
}

.achievement-card .cert-link {
  color: #ff9f1a;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.achievement-card .cert-link:hover {
  color: #00ffe0;
}

/* Contact Section */
#contact {
    padding: clamp(12.9rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem);
    text-align: center;
    background-color: #121212;
}

#contact h2 {
    color: #03dac6;
    font-size: clamp(1.3rem, 4vw, 1.5rem);
    margin: clamp(0.5rem, 2vw, 1rem) 0;
}

.contact-info {
    display: inline-block;
    padding: clamp(0.5rem, 2vw, 1rem) clamp(0.5rem, 2vw, 1rem);
}

.contact-info a {
    color: #03dac6;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    max-width: min(500px, 90%);
    margin: 0 auto;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: clamp(8px, 2vw, 10px);
    border-radius: 6px;
    border: 1px solid #333;
    background-color: #1e1e1e;
    color: #e0e0e0;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #03dac6;
}

.contact-form button {
    background-color: #03dac6;
    color: #121212;
    padding: clamp(8px, 2vw, 10px) clamp(16px, 4vw, 20px);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.contact-form button:hover {
    background-color: #018786;
}

.success-message {
    margin-top: 15px;
    color: #03dac6;
    text-align: center;
    font-size: clamp(0.9rem, 2.3vw, 1rem);
}

/* Footer Section */
footer {
    background-color: #333;
    color: #fff;
    padding: clamp(1rem, 2vw, 1rem) clamp(1rem, 3vw, 1rem);
    text-align: center;
    font-size: clamp(0.9rem, 2.3vw, 1rem);
}

.footer-credit {
    margin-bottom: 0.5rem;
}

.footer-credit p {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    margin: 0;
    color: #ccc;
}

.footer-top a {
    text-decoration: none;
    color: #4CAF50;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    display: inline-block;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.footer-top a:hover {
    color: #fff;
}

/* Back to Top Button */
.footer-top {
    position: fixed;
    bottom: clamp(15px, 3vw, 20px);
    right: clamp(15px, 3vw, 20px);
    z-index: 1000;
}

.back-to-top {
    display: block;
    width: clamp(35px, 8vw, 45px);
    height: clamp(35px, 8vw, 45px);
    background-color: #018786;
    color: #121212;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    text-align: center;
    line-height: clamp(35px, 8vw, 45px);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.back-to-top:hover {
    background-color: #03dac6;
    transform: translateY(-3px);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {

    /* Show hamburger */
    .nav-toggle {
        display: block;
    }

    /* Hide menu by default */
    .nav-menu {
        display: none;
        background: #1f1f1f;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .nav-menu ul {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }

    .nav-menu ul li {
        margin: 0.3rem 0;
        text-align: center;
    }

    /* When open, show menu */
    .nav-menu.open {
        display: block;
    }

    /* Animate hamburger to X */
    .nav-toggle.open .hamburger {
        background: transparent;
    }

    .nav-toggle.open .hamburger::before {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.open .hamburger::after {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* About me layout adjustments for mobile */
    .about-me-content {
        flex-direction: column;
        text-align: center;
    }

    .about-me-text {
        text-align: left;
    }

    /* Skills grid for mobile */
    .skills-grid {
        grid-template-columns: 1fr;
    }

    /* Contact form full width on mobile */
    .contact-form {
        max-width: 95%;
    }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .about-me {
        width: 90%;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .project-links {
        justify-content: flex-start;
    }
}

/* Large desktop adjustments */
@media (min-width: 1200px) {

    .about-me,
    .education-entry,
    .projects-container,
    .skills-grid,
    .achievement-card {
        max-width: 1200px;
    }

    .hero {
        padding: 80px 40px;
    }

    .hero h1 {
        font-size: 3.2em;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .profile-photo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {

    .nav-toggle,
    .back-to-top,
    .contact-form {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero,
    .about-me,
    .education-entry,
    .project-entry,
    .skill-card,
    .achievement-card {
        background: white;
        color: black;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}