/* --- Global Variables & Themes --- */
:root[data-theme="light"] {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --card-bg: #ffffff;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #e5e7eb;
    --secondary-text: #4b5563;
    --border-color: #e5e7eb;
}

:root[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: #1e293b;
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #334155;
    --secondary-text: #94a3b8;
    --border-color: #334155;
}

/* --- Base Setup --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

section {
    padding: 80px 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.hero-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    color: var(--secondary-text);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

.hero-image .img-box {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- About Section --- */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    color: var(--secondary-text);
}

/* --- Education (Timeline) --- */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-left: 3px solid var(--primary-color);
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: -41.5px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content p {
    color: var(--secondary-text);
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.skill-card i {
    font-size: 2.5rem;
}

/* Brand Icon Colors */
.style-html { color: #e34c26; }
.style-css { color: #264de4; }
.style-js { color: #f0db4f; }
.style-php { color: #777bb4; }
.style-db { color: #00758f; }
.style-dj { color: #092e20; }
.style-java { color: #f89820; }

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.project-info p {
    color: var(--secondary-text);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tags span {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Contact Form --- */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.contact-form .btn {
    width: 100%;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 30px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* --- Responsive Media Queries --- */
@media (max-width: 968px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-content p {
        margin: 0 auto 30px;
    }
    .hero-btns {
        justify-content: center;
    }
    .nav-links {
        display: none; /* Simplification for pure CSS/minimal JS layout */
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 5%;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .contact-form {
        padding: 20px;
    }
}