:root {
    /* Dark Theme (Default) */
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --secondary: #7c3aed;
    --accent: #38bdf8;
    --glass: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(30, 41, 59, 0.5);
    --header-bg: rgba(15, 23, 42, 0.8);
    --btn-border: var(--accent);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #475569;
    --primary: #3b82f6;
    --secondary: #8b5cf6;
    --accent: #0ea5e9;
    --glass: rgba(0, 0, 0, 0.05);
    --card-bg: #ffffff;
    --header-bg: rgba(248, 250, 252, 0.8);
    --btn-border: var(--primary);
}

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

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

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.fade-in { animation: fadeIn 0.8s ease-out forwards; }
.fade-in-delay { animation: fadeIn 0.8s ease-out 0.3s forwards; opacity: 0; }

/* Header & Nav */
header {
    padding: 1rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    transition: background 0.4s;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    border-radius: 8px;
}

.logo span {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

.theme-btn {
    background: var(--glass);
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.theme-btn:hover {
    background: var(--accent);
    color: white;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--text-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.hero-image {
    position: absolute;
    right: 5%;
    width: 40%;
    height: 60%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gradient-sphere {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), var(--secondary));
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}

/* Projects Section */
.projects {
    padding: 100px 10%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass);
    border-radius: 20px;
    overflow: hidden;
    transition: 0.4s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
}

.details-btn {
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--btn-border);
    color: var(--accent);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.details-btn:hover {
    background: var(--accent);
    color: white;
}

/* Contact Section */
.contact {
    padding: 100px 10%;
}

.contact-container {
    display: flex;
    justify-content: center;
}

.contact-info {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    width: 100%;
    max-width: 1000px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--glass);
    padding: 1.5rem;
    border-radius: 15px;
    transition: transform 0.3s;
}

.info-item:hover {
    transform: scale(1.02);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 5vh auto;
    padding: 3rem;
    border: 1px solid var(--accent);
    width: 95%;
    max-width: 700px;
    border-radius: 30px;
    position: relative;
    animation: modalSlide 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-content ul {
    margin-top: 10px;
}

.modal-content li {
    padding: 8px;
    background: var(--glass);
    border-radius: 10px;
    transition: 0.3s;
}

.modal-content li:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: translateX(5px);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 2rem;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid var(--glass);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-image { display: none; }
    nav ul { gap: 1rem; }
}
