/* General Styling */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
header {
    background: #222;
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

/* Navigation */
nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: all 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #FFB433;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: #FFB433;
    transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

#theme-toggle {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background: white;
    color: #222;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 50px auto;
    text-align: left;
    gap: 30px;
}

.about-text {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.about-photo img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #333;
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}


.about-photo img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

/* Projects */
.project-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.project-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.project-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0px 12px 35px rgba(0, 0, 0, 0.2);
}

.project-card:hover .project-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.project-card:hover .tech-tag {
    background: #FFB433 !important;
    color: white !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.project-image-placeholder {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, #80CBC4, #B4EBE6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.project-icon {
    font-size: 48px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tech-tag {
    background: #FBF8EF;
    color: #2c3e50;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #80CBC4;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.project-link {
    color: #80CBC4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #FFB433;
}

/* Dark mode project styling */
body.dark-mode .project-card {
    background: #1e1e1e !important;
    color: #e8eaed !important;
}

body.dark-mode .project-image-placeholder {
    background: linear-gradient(135deg, #2d2d2d, #404040) !important;
}

body.dark-mode .tech-tag {
    background: #2a1a4a !important;
    color: #FFCC00 !important;
    border-color: #B13BFF !important;
}

body.dark-mode .project-link {
    color: #B13BFF !important;
}

body.dark-mode .project-link:hover {
    color: #FFCC00 !important;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #FFB433;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(255, 180, 51, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: #e6a329;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 180, 51, 0.4);
}

.back-to-top-icon {
    display: block;
    line-height: 1;
}

/* Dark mode back to top */
body.dark-mode .back-to-top-btn {
    background: #FFCC00 !important;
    color: #471396 !important;
}

body.dark-mode .back-to-top-btn:hover {
    background: #B13BFF !important;
    color: white !important;
}

section {
    padding: 50px;
}

.workshop-item {
    background: white;
    padding: 20px;
    margin: 10px 0;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.project img {
    width: 200px;
    height: auto;
}

form input, form textarea {
    display: block;
    width: 80%;
    margin: 10px auto;
    padding: 10px;
}

button {
    background: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
}


/* Dark/Light Mode */
body.light-mode {
    background: #FBF8EF !important;
    color: #2c3e50 !important;
}

body.light-mode header {
    background: #80CBC4 !important;
    color: white !important;
}

body.light-mode .project-card {
    background: #B4EBE6 !important;
    color: #2c3e50 !important;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .skill-bar {
    background: #B4EBE6 !important;
}

body.light-mode .workshop-item {
    background: #B4EBE6 !important;
    color: #2c3e50 !important;
}

body.light-mode form input,
body.light-mode form textarea {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border: 1px solid #80CBC4 !important;
}

body.light-mode button {
    background: #FFB433 !important;
    color: white !important;
}

body.light-mode .about-photo img {
    border-color: #80CBC4 !important;
}

body.dark-mode {
    background: #471396 !important;
    color: #ffffff !important;
}

body.dark-mode header {
    background: #2a1a4a !important;
    color: #ffffff !important;
}

body.dark-mode .project-card {
    background: #3a1f5a !important;
    color: #ffffff !important;
    box-shadow: 0px 4px 6px rgba(255, 204, 0, 0.1) !important;
}

body.dark-mode .skill-bar {
    background: #2a1a4a !important;
}

body.dark-mode .workshop-item {
    background: #3a1f5a !important;
    color: #ffffff !important;
}

body.dark-mode form input,
body.dark-mode form textarea {
    background: #3a1f5a !important;
    color: #ffffff !important;
    border: 1px solid #B13BFF !important;
}

body.dark-mode button {
    background: #FFCC00 !important;
    color: #471396 !important;
}

body.dark-mode .about-photo img {
    border-color: #FFCC00 !important;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FFB433;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 180, 51, 0.3);
}

.social-link:hover {
    background: #e6a329;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 180, 51, 0.4);
}

.social-icon {
    font-size: 18px;
}

/* Dark mode social links */
body.dark-mode .social-link {
    background: #FFCC00 !important;
    color: #471396 !important;
}

body.dark-mode .social-link:hover {
    background: #B13BFF !important;
    color: white !important;
}

/* Contact Section */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

#contact-form input,
#contact-form textarea {
    display: block;
    width: 100%;
    margin: 15px 0;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #80CBC4;
}

#contact-form textarea {
    height: 120px;
    resize: vertical;
}

#submit-btn {
    background: #FFB433;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#submit-btn:hover {
    background: #e6a329;
    transform: translateY(-2px);
}

#submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#success-message {
    text-align: center;
    color: #27ae60;
    font-weight: bold;
    margin-top: 20px;
}

/* Dark mode contact styling */
body.dark-mode #contact-form input,
body.dark-mode #contact-form textarea {
    background: #1e1e1e !important;
    color: #e8eaed !important;
    border-color: #404040 !important;
}

body.dark-mode #contact-form input:focus,
body.dark-mode #contact-form textarea:focus {
    border-color: #80CBC4 !important;
}

body.dark-mode #submit-btn {
    background: #FFB433 !important;
    color: white !important;
}

body.dark-mode #submit-btn:hover {
    background: #e6a329 !important;
}

/* Fun Animations */
h1 {
    transition: color 0.3s ease-in-out;
}

.skill-container {
  max-width: 500px;
  margin: 40px auto;
  font-family: sans-serif;
}

.skill-label {
  margin: 10px 0 4px;
  font-weight: bold;
}

.skill-bar {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  border-radius: 10px;
  animation: none; 
}

@keyframes fillBar {
  to {
    width: var(--level);
  }
}

.typing-container {
  font-size: 1.5rem;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #4e54c8;
  width: fit-content;
}

.typing-text {
  display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Mobile layout */
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin: 30px auto;
    }
    
    .about-photo img {
        width: 200px;
        height: 200px;
        order: -1; /* Move photo to top on mobile */
    }
    
    .typing-container {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
    }
    
    /* Header adjustments */
    header {
        padding: 15px;
    }
    
    nav ul li {
        margin: 0 8px;
    }
    
    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    /* Project grid */
    .project-grid {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Contact form */
    #contact-form {
        padding: 15px;
    }
    
    /* Section padding */
    section {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    /* Small mobile */
    .about-photo img {
        width: 180px;
        height: 180px;
    }
    
    .typing-container {
        font-size: 1rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Navigation */
    nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    nav ul li {
        margin: 0 5px;
    }
    
    nav ul li a {
        font-size: 14px;
    }
}
