/* Design System & Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #22d3ee;
    --bg-dark: #0f172a;
    --bg-card-dark: #1e293b;
    --text-main-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    
    --bg-light: #f8fafc;
    --bg-card-light: #ffffff;
    --text-main-light: #0f172a;
    --text-muted-light: #64748b;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --bg-card: var(--bg-card-dark);
    --text-main: var(--text-main-dark);
    --text-muted: var(--text-muted-dark);
    --nav-bg: rgba(15, 23, 42, 0.8);
}

[data-theme="light"] {
    --bg: var(--bg-light);
    --bg-card: var(--bg-card-light);
    --text-main: var(--text-main-light);
    --text-muted: var(--text-muted-light);
    --nav-bg: rgba(248, 250, 252, 0.8);
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
}

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

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-btns {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Hero Section */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
    min-height: 80vh;
}

.greeting {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 2px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 1rem 0;
}

.hero-job {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.typing {
    color: var(--accent);
    font-weight: 700;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.hero-image .img-box {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* About Card */
.about-card {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.info-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--primary);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.45rem;
    width: 15px;
    height: 15px;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.progress-line {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-line span {
    display: block;
    height: 100%;
    background: var(--primary);
    width: 0;
    transition: width 1.5s ease-out;
}

.soft-skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.soft-skill-card {
    background: var(--bg-card);
    padding: 1.5rem;
    text-align: center;
    border-radius: 16px;
    transition: var(--transition);
}

.soft-skill-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* Projects */
.filter-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.project-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

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

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

.project-info {
    padding: 1.5rem;
}

.category {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
}

.tech-stack {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
}

.tech-stack span {
    font-size: 0.75rem;
    background: rgba(0,0,0,0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input, .contact-form textarea {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: var(--bg-card);
    color: var(--text-main);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-links i {
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover i { color: var(--primary); transform: scale(1.2); }

/* Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero-grid, .skills-grid, .contact-grid { grid-template-columns: 1fr; }
    .hero-image { order: -1; }
    .hero-name { font-size: 3rem; }
    .nav-menu {
        position: fixed;
        top: -100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 2rem;
        transition: 0.5s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-menu.active { top: 70px; }
    .nav-menu ul { flex-direction: column; text-align: center; }
    .hamburger { display: block; cursor: pointer; }
    .hamburger .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px;
        background: var(--text-main);
        transition: 0.3s;
    }
}