/* --- Variables & Reset --- */
:root {
    --primary-color: #2563eb; /* Blue */
    --secondary-color: #1e293b; /* Dark Slate */
    --text-color: #334155;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --transition: all 0.3s ease;
    --hero-gradient-end: #e0e7ff;
}

body.dark-mode {
    --secondary-color: #f8fafc;
    --text-color: #cbd5e1;
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --white: #1e293b;
    --hero-gradient-end: #334155;
    --primary-color: #60a5fa; /* Lighter blue for better contrast on dark */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation --- */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.logo span {
    color: var(--primary-color);
}

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

.nav-links a {
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

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

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--hero-gradient-end) 100%);
    padding-top: 70px; /* Offset for fixed navbar */
}

.subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 10px;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* --- General Section Styles --- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- About & Skills --- */
.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.skills {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: #e2e8f0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

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

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

.card-content {
    padding: 20px;
}

.card-content h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.card-links {
    margin-top: 15px;
}

.card-links a {
    margin-right: 15px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Contact Form --- */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    border-color: transparent;
}

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

.social-links {
    margin-top: 15px;
}

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

.social-links a:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--white);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%); /* Hidden by default */
        transition: var(--transition);
    }

    .nav-links.active {
        transform: translateY(0);
    }
}
