:root {
    --primary-color: #000;
    --secondary-color: #fff;
    --accent-color: #4a90e2; /* A nice blue for links/buttons */
    --text-color: #333;
    --bg-color: #fff;
    --bg-alt-color: #f5f5f5;
    --border-color: #ddd;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --primary-color: #fff;
    --secondary-color: #121212;
    --accent-color: #64b5f6;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --bg-alt-color: #1e1e1e;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
}

.nav-links a.active {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Theme Toggle */
.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 20px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../images/home.jpg') no-repeat center center/cover;
    position: relative;
    color: #fff;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero .social-links a {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 10px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: #fff;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);}
    40% {transform: translateY(-20px) translateX(-50%);}
    60% {transform: translateY(-10px) translateX(-50%);}
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 30px;
    margin-right: 15px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--accent-color);
    color: #fff;
}

/* Skills Section */
.skills-bg {
    background-color: var(--bg-alt-color);
}

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

.skill-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 15px;
}

.skill-card ul {
    text-align: left;
    display: inline-block;
}

.skill-card li {
    margin-bottom: 10px;
}

/* Projects Section */
.filters {
    text-align: center;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-color);
    transition: color 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    color: var(--accent-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    position: relative;
    group: project-card;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    position: relative;
    overflow: hidden;
}

.project-img img {
    transition: transform 0.5s;
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #fff;
    padding: 10px 20px;
    border-radius: 30px;
}

.project-link:hover {
    background: #fff;
    color: #000;
}

/* Blog Section */
.blog-card {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.blog-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-info {
    padding: 20px;
}

.blog-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.blog-meta {
    font-size: 0.9rem;
    color: #777;
    margin-top: 15px;
    display: block;
}

.view-all-btn {
    text-align: center;
    margin-top: 40px;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.contact-item {
    padding: 30px;
    background: var(--bg-alt-color);
    border-radius: 10px;
    transition: transform 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

/* Footer */
footer {
    background: var(--primary-color);
    color: var(--secondary-color);
    text-align: center;
    padding: 40px 0;
}

.footer-social {
    margin-bottom: 20px;
}

.footer-social a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin: 0 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: var(--text-color);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s;
    }

    .nav-links.active {
        left: 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}
