/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: var(--bg);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
}

:root[data-theme='light'] {
    --bg: #f9f9f9;
    --text: #222;
    --accent: #007bff;
    --card-bg: #fff;
    --nav-bg: #ffffffee;
    --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme='dark'] {
    --bg: #121212;
    --text: #eee;
    --accent: #1e90ff;
    --card-bg: #1f1f1f;
    --nav-bg: #1f1f1fee;
    --shadow: rgba(255, 255, 255, 0.05);
}

/* Container */
.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--card-bg);
    color: var(--text);
    border: none;
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow);
}
.theme-toggle i {
    display: none;
}
[data-theme='light'] .fa-sun {
    display: inline;
}
[data-theme='dark'] .fa-moon {
    display: inline;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px var(--shadow);
    z-index: 999;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}
.logo span {
    color: var(--text);
}
.nav-links {
    display: flex;
    gap: 1.5rem;
}
.nav-links li {
    list-style: none;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: var(--accent);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--card-bg);
    padding: 1rem 2rem;
    border-radius: 0 0 0 8px;
    box-shadow: 0 4px 8px var(--shadow);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
}
.animated-text {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}
.animated-text span {
    color: var(--accent);
}
.tagline {
    font-size: 1.2rem;
    color: var(--text);
}
.social-icons {
    margin: 1.5rem 0;
}
.social-icons a {
    color: var(--text);
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s;
}
.social-icons a:hover {
    color: var(--accent);
}
.cta-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.cta-btn {
    padding: 0.7rem 1.5rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}
.cta-btn.secondary {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}
.cta-btn:hover {
    background: #006be1;
}

/* Skills Section */
.skills {
    padding: 4rem 0;
}
.skills h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.skill-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow);
}
.skill-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}
.skill-progress {
    background: #ccc;
    height: 8px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 0.5rem;
}
.progress-bar {
    background: var(--accent);
    height: 100%;
    width: 0;
    border-radius: 5px;
}

/* Projects Section */
.projects {
    padding: 4rem 0;
}
.projects h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.project-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px var(--shadow);
}
.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.project-info {
    padding: 1rem;
}
.project-tags {
    margin: 0.5rem 0;
}
.project-tags span {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    margin-right: 5px;
    border-radius: 5px;
    font-size: 0.8rem;
}
.project-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: bold;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
}
.contact h2 {
    text-align: center;
    margin-bottom: 2rem;
}
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}
form {
    flex: 1;
    min-width: 300px;
}
.form-group {
    margin-bottom: 1rem;
}
input, textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: var(--card-bg);
    color: var(--text);
    resize: none;
}
textarea {
    height: 150px;
}
button[type="submit"] {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    position: relative;
}
.loading-dots {
    display: none;
    gap: 5px;
}
.loading-dots .dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}
.loading-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}
.loading-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Contact Info */
.contact-info {
    flex: 1;
    min-width: 280px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.info-item i {
    font-size: 1.2rem;
    color: var(--accent);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
    }
    .hamburger {
        display: flex;
    }
    .cta-container {
        flex-direction: column;
        align-items: center;
    }
    .contact-wrapper {
        flex-direction: column;
    }
}
