/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Header styling */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.logo h1 {
    font-size: 15px;
    font-weight: 100;
    color: #111;
}

/* Navbar */
.navbar ul {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar a {
    text-decoration: none;
    font-weight: 600;
    color: #777;
    transition: 0.3s;
    font-size: 14px;
}

.navbar a:hover,
.navbar a.active {
    color: #000;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Dark mode button */
.dark-mode {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #777;
    transition: 0.3s;
}

.dark-mode:hover {
    color: #000;
}

/* ===== Home Section ===== */
.home-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 60px 5%;
    background: #fafafa;
    font-family: 'Merriweather', serif;
}

/* Left Side */
.left-content {
    width: 25%;
}

.left-content h4 {
    font-size: 14px;
    color: gray;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.left-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 30px;
}

/* Center */
.center-content {
    text-align: center;
    width: 50%;
}

.center-content h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 30px;
    color: #222;
}

.image-frame {
    border: 2px solid #ccc;
    border-radius: 50% / 35%;
    width: 300px;
    height: 400px;
    overflow: hidden;
    margin: 0 auto;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Right Side */
.right-content {
    width: 25%;
    text-align: center;
}

.info-box {
    margin-bottom: 40px;
}

.info-box h5 {
    font-size: 13px;
    color: gray;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.info-box h2 {
    font-size: 28px;
    color: #111;
    margin-top: 8px;
}

/* ===== Social Icons Section ===== */
#socials {
    text-align: center;
    padding: 30px 20px 10px 20px;
}

/* Social icon layout */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    margin-bottom: 20px;
}

/* Icon box (icon + name) */
.icon-box {
    text-align: center;
}

.icon-box i {
    font-size: 45px;
    transition: all 0.3s ease;
}

.icon-box p {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 500;
    color: #444;
}

/* Icon colors */
.linkedin {
    color: #0088cc;
}

.github {
    color: black;
}

/* Hover effects */
.icon-box:hover i {
    transform: scale(1.2);
}

/* Divider line */
.divider {
    width: 60%;
    margin: 10px auto 25px;
    border: none;
    border-top: 3px solid rgba(0, 0, 0, 0.1);
}

/* Skills heading */
#socials h2 {
    margin-top: 10px;
    font-size: 32px;
    font-weight: bold;
}

.sub-heading {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ===== Skills Section ===== */
#skills {
    text-align: center;
    padding: 50px 20px;
    background: #fafafa;
    font-family: 'Merriweather', serif;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.skill {
    background: #fff;
    border-radius: 20px;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.skill i {
    font-size: 40px;
    color: black;
    margin-bottom: 10px;
}

.skill p {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.projects-section {
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.projects-section h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.projects-section p {
    color: gray;
    margin-bottom: 40px;
}

.carousel {
    width: 80%;
    margin: auto;
    overflow: hidden;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.project {
    min-width: 50%;
    padding: 20px;
    box-sizing: border-box;
}

.project img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project .tag {
    color: gray;
    margin-top: 10px;
    font-size: 0.9rem;
}

.project h3 {
    font-size: 1.5rem;
    margin-top: 5px;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #333;
    transition: 0.3s;
    z-index: 10;
}

.arrow:hover {
    color: black;
}

.left { left: 60px; }
.right { right: 60px; }

.dots {
    margin-top: 20px;
}

.dot {
    height: 10px;
    width: 10px;
    background: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #333;
}

.contact-section {
    padding: 80px 20px;
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.subtitle {
    color: gray;
    margin-bottom: 40px;
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-left, .contact-right {
    width: 400px;
    text-align: left;
}

.contact-left h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.contact-left p {
    margin: 15px 0;
    line-height: 1.6;
    color: #333;
}

.join-link {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.join-link:hover {
    color: #0077ff;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-top: 15px;
    font-weight: 500;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #aaa;
    border-radius: 30px;
    font-size: 1rem;
    margin-top: 5px;
    outline: none;
    transition: 0.3s;
}

.contact-form textarea {
    resize: none;
    height: 120px;
    border-radius: 20px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #0077ff;
}

.send-btn {
    margin-top: 25px;
    padding: 10px 25px;
    font-size: 1rem;
    border: none;
    background: #000;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: 0.3s;
    align-self: flex-start;
}

.send-btn:hover {
    background: #0077ff;
}

footer {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
}

footer h1 {
    font-size: 2em;
    font-weight: 700;
    margin: 10px 0 5px 0;
    letter-spacing: 1px;
}

footer p {
    color: #555;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-links a {
    text-decoration: none;
    font-weight: 600;
    color: #222;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #555;
}

.footer-social-icons {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 30px;
}

.footer-social-icons a {
    text-decoration: none;
    color: #999;
    display: flex;
    align-items: center;
    font-size: 1.1em;
    gap: 10px;
    transition: 0.3s;
}

.footer-social-icons a:hover {
    color: #000;
}

.footer-social-icons i {
    font-size: 1.6em;
}

.copyright {
    color: #777;
    font-size: 0.9em;
}

/* ===== DARK MODE ===== */
body.dark-mode {
    background-color: #0e0e0e;
    color: #f5f5f5;
}

/* Navbar + Header */
body.dark-mode .header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}
body.dark-mode .navbar a {
    color: #ccc;
}
body.dark-mode .navbar a.active,
body.dark-mode .navbar a:hover {
    color: #fff;
}

/* Home Section */
body.dark-mode .home-section {
    background: #111;
}
body.dark-mode .center-content h1,
body.dark-mode .left-content p,
body.dark-mode .info-box h2,
body.dark-mode .info-box h5 {
    color: #f5f5f5;
}

/* Skills */
body.dark-mode #skills {
    background: #111;
}
body.dark-mode .skill {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}
body.dark-mode .skill i {
    color: #f5f5f5;
}
body.dark-mode .skill p {
    color: #ddd;
}

/* Projects */
body.dark-mode .projects-section {
    background: #0f0f0f;
}
body.dark-mode .project h3 {
    color: #fff;
}
body.dark-mode .project .tag {
    color: #aaa;
}

/* Contact Section */
body.dark-mode .contact-section {
    background: #111;
}
body.dark-mode .contact-left p,
body.dark-mode .contact-form label {
    color: #eee;
}
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
}
body.dark-mode .send-btn {
    background: #0077ff;
}
body.dark-mode .send-btn:hover {
    background: #005fcc;
}

/* Footer */
body.dark-mode footer {
    background-color: #111;
}
body.dark-mode footer h1,
body.dark-mode footer p,
body.dark-mode footer a,
body.dark-mode .copyright {
    color: #eee;
}
body.dark-mode .footer-links a:hover {
    color: #0077ff;
}

/* Social icons */
body.dark-mode .footer-social-icons a {
    color: #ccc;
}
body.dark-mode .footer-social-icons a:hover {
    color: #fff;
}

/* Toggle button style */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    color: #333;
    transition: 0.3s;
}
body.dark-mode .dark-mode-toggle {
    color: #f5f5f5;
}

/* ===== Fix: Dark mode text color ===== */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode span,
body.dark-mode a,
body.dark-mode label {
    color: #ffffff !important;
}

/* Section Titles (like Skills, Projects, Contact) */
body.dark-mode .section-title,
body.dark-mode .section-heading,
body.dark-mode .contact-title,
body.dark-mode .skills-title,
body.dark-mode .projects-title {
    color: #ffffff !important;
}

/* Paragraphs or secondary text */
body.dark-mode .section-subtitle,
body.dark-mode .small-text,
body.dark-mode .info-text {
    color: #dddddd !important;
}

/* For link hover (visible on dark) */
body.dark-mode a:hover {
    color: #00aaff !important;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .header {
        padding: 15px 60px;
    }
    
    .home-section {
        padding: 60px 80px;
    }
}

/* Tablets and small laptops (768px to 1024px) */
@media (max-width: 1024px) {
    .home-section {
        flex-direction: column;
        padding: 40px 20px;
    }
    
    .left-content, .center-content, .right-content {
        width: 100%;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .right-content {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
    }
    
    .info-box {
        margin: 0 15px 30px;
        min-width: 150px;
    }
    
    .contact-container {
        flex-direction: column;
        align-items: center;
    }
    
    .carousel {
        width: 90%;
    }
    
    .project {
        min-width: 50%;
    }
    
    .arrow {
        position: absolute;
        top: 50%;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .navbar {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }
    
    .navbar.active {
        max-height: 300px;
        margin-top: 15px;
    }
    
    .navbar ul {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .center-content h1 {
        font-size: 28px;
    }
    
    .image-frame {
        width: 250px;
        height: 350px;
    }
    
    .skills-container {
        gap: 20px;
    }
    
    .skill {
        width: 100px;
        height: 100px;
    }
    
    .arrow {
        font-size: 2rem;
    }
    
    .left { left: 20px; }
    .right { right: 20px; }
    
    .contact-left, .contact-right {
        width: 100%;
        max-width: 400px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-social-icons {
        flex-direction: column;
        gap: 20px;
    }
}

/* Mobile phones (576px and below) */
@media (max-width: 576px) {
    .logo h1 {
        font-size: 16px;
    }
    
    .center-content h1 {
        font-size: 24px;
    }
    
    .image-frame {
        width: 200px;
        height: 280px;
    }
    
    .social-icons {
        gap: 30px;
    }
    
    .icon-box i {
        font-size: 35px;
    }
    
    .skills-container {
        gap: 15px;
    }
    
    .skill {
        width: 90px;
        height: 90px;
    }
    
    .skill i {
        font-size: 30px;
    }
    
    .project {
        min-width: 100%;
    }
    
    .carousel {
        width: 95%;
    }
    
    .arrow {
        font-size: 1.8rem;
    }
    
    .left { left: 10px; }
    .right { right: 10px; }
    
    .projects-section h2,
    .contact-section h2,
    #socials h2 {
        font-size: 2rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
    }
}

/* Small mobile phones (400px and below) */
@media (max-width: 400px) {
    .center-content h1 {
        font-size: 20px;
    }
    
    .image-frame {
        width: 180px;
        height: 240px;
    }
    
    .info-box h2 {
        font-size: 24px;
    }
    
    .skill {
        width: 80px;
        height: 80px;
    }
    
    .skill i {
        font-size: 25px;
    }
    
    .skill p {
        font-size: 13px;
    }
}