@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

/* Define CSS Variables for Light Theme */
:root {
    --background-color: #f4f4f9;
    --text-color: #b74b4b;
    --header-background: #b74b4b;
    --header-text-color: #fff;
    --button-background: #b74b4b;
    --button-text-color: #fff;
    --button-hover-background: #b74b4b;
}

/* Dark Theme Variables */
body.dark-theme {
    --background-color: #b74b4b;
    --text-color: #f4f4f9;
    --header-background: #333;
    --header-text-color: #f4f4f9;
    --button-background: #444;
    --button-text-color: #f4f4f9;
    --button-hover-background: #b74b4b;
}

/* Responsive font sizing */
html {
    font-size: 62.5%; /* Base 10px at 100% browser size */
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    html {
        font-size: 55%; /* Smaller font size on tablets */
    }
}

@media (max-width: 480px) {
    html {
        font-size: 50%; /* Even smaller font size on phones */
    }
}

/* Apply Variables */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Header Styling */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--header-background);
    color: var(--header-text-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--header-text-color);
    text-decoration: none;
    margin-right: auto;
    cursor: pointer;
    transition: 0.5s ease;
}

header .logo:hover {
    transform: scale(1.1);
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2.4rem;
    color: var(--header-text-color);
    cursor: pointer;
    z-index: 1001;
}

/* Navigation */
header nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--header-text-color);
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

nav a.active {
    font-weight: bold;
    text-decoration: underline;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 30rem;
        height: 100vh;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 8rem;
        background-color: var(--header-background);
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    header nav.active {
        right: 0;
    }

    nav a {
        display: block;
        margin: 1.5rem 0;
        font-size: 1.8rem;
        width: 100%;
        text-align: center;
    }
}

/* Section Styling */
section {
    padding: 3rem 2rem;
    margin: 2rem auto;
    max-width: 120rem;
    background: #fff;
    border-radius: 0.8rem;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    section {
        padding: 2rem 1.5rem;
        margin: 1.5rem 1rem;
    }
}

/* Home Section */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: black;
    padding: 5rem 2rem;
}

.home .home-content h1 {
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.3;
}

span {
    color: #b74b4b;
}

.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
}

.home-img {
    border-radius: 50%;
}

.home-img img {
    position: relative;
    width: 32vw;
    max-width: 40rem;
    border-radius: 50%;
    box-shadow: 0 0 2.5rem rgba(183, 75, 75, 0.3);
    cursor: pointer;
    transition: 0.2s linear;
}

.home-img img:hover {
    transform: scale(1.05);
}

@media (max-width: 995px) {
    .home {
        flex-direction: column-reverse;
        text-align: center;
        gap: 4rem;
        padding: 3rem 2rem;
    }
    
    .home .home-content h1 {
        font-size: 4.5rem;
    }
    
    .home .home-content h3 {
        font-size: 3rem;
    }
    
    .home-img img {
        width: 60vw;
        margin: 0 auto;
    }
    
    .typing-text {
        font-size: 2.8rem;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .home .home-content h1 {
        font-size: 3.5rem;
    }
    
    .home .home-content h3 {
        font-size: 2.5rem;
    }
    
    .home-img img {
        width: 80vw;
    }
    
    .typing-text {
        font-size: 2.2rem;
    }
}

/* Social Icons */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 3rem 0;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid #b74b4b;
    font-size: 2rem;
    border-radius: 50%;
    transition: 0.3s ease;
    color: #b74b4b;
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: #b74b4b;
    box-shadow: 0 0 2.5rem rgba(183, 75, 75, 0.5);
}

@media (max-width: 768px) {
    .social-icons {
        justify-content: center;
    }
    
    .social-icons a {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.8rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--button-background);
    color: var(--button-text-color);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 2rem;
}

.btn:hover {
    background-color: var(--button-hover-background);
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .btn {
        padding: 0.8rem 1.6rem;
        font-size: 1.4rem;
    }
}

/* Typing Text Animation */
.typing-text {
    font-size: 3.4rem;
    font-weight: 600;
    min-width: 28rem;
}

.typing-text span {
    position: relative;
    color: #b74b4b;
}

.typing-text span::before {
    content: "Software Developer";
    color: inherit;
}

/* Contact Form */
.contact-form {
    max-width: 60rem;
    margin: 2rem auto;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 0.8rem;
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2.4rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.4rem;
    font-size: 1.4rem;
}

.contact-form button {
    padding: 1rem;
    background: #b74b4b;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    font-size: 1.6rem;
    transition: background 0.3s ease;
}

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

@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
        margin: 1.5rem;
    }
    
    .contact-form h2 {
        font-size: 2rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 0.8rem;
        font-size: 1.3rem;
    }
}

/* Social Links */
.social-links {
    text-align: center;
    margin: 3rem 0;
}

.social-links h2 {
    margin-bottom: 2rem;
    color: #333;
    font-size: 2.4rem;
}

@media (max-width: 768px) {
    .social-links h2 {
        font-size: 2rem;
    }
}

/* Map */
.map {
    text-align: center;
    margin: 3rem 0;
}

.map iframe {
    width: 100%;
    max-width: 60rem;
    height: 45rem;
    border: none;
    border-radius: 0.8rem;
}

@media (max-width: 768px) {
    .map iframe {
        height: 30rem;
    }
}

/* Button Styles */
button {
    padding: 1rem 2rem;
    background-color: var(--button-background);
    color: var(--button-text-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.6rem;
}

button:hover {
    background-color: var(--button-hover-background);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    button {
        padding: 0.8rem 1.6rem;
        font-size: 1.4rem;
    }
}
