:root {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --primary: #8b5cf6;
    /* Violet */
    --accent: #38bdf8;
    /* Cyan */
    --success: #10b981;
    /* Emerald */
    --border: #334155;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 1px;
}

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

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

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.nav-links a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--text) !important;
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: rgba(56, 189, 248, 0.1);
}

/* Hero */
.hero {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    object-fit: cover;
    transition: 0.3s;
}

.profile-img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.6);
    border-color: var(--accent);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.hero .highlight {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    border-left: 4px solid var(--primary);
    padding-left: 20px;
}

.hero-btns {
    display: flex;
    gap: 15px;
}

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

.bg-light {
    background-color: rgba(30, 41, 59, 0.5);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    text-align: center;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
    box-shadow: 0 0 10px var(--primary);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    /* Balanced 2x2 layout */
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.skill-card:hover::before {
    transform: translateX(100%);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.skill-card h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.25rem;
}

.skill-card p {
    color: var(--text-muted);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.project-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.4rem;
}

.project-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tags {
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.2);
    text-transform: uppercase;
}

.link-arrow {
    margin-top: auto;
    color: var(--accent);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.link-arrow:hover {
    gap: 12px;
    text-shadow: 0 0 10px var(--accent);
}

/* Timeline (Experience) */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--bg);
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 5px;
}

.timeline-content .company {
    font-style: italic;
    color: var(--text-muted);
    display: block;
    margin-bottom: 15px;
}

.timeline-content ul {
    list-style-type: none;
}

.timeline-content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.timeline-content li::before {
    content: '>';
    color: var(--primary);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-family: monospace;
}

/* Education Grid */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
}

.edu-column h3 {
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.edu-item h4 {
    font-size: 1.2rem;
    color: var(--text);
}

.edu-item p {
    color: var(--text-muted);
}

.cert-list li {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
    color: var(--text-muted);
    list-style: none;
}

.cert-list li::before {
    content: '✓';
    color: var(--success);
    position: absolute;
    left: 0;
    top: 2px;
}

.cert-list a {
    color: var(--text);
    border-bottom: 1px dashed var(--border);
}

.cert-list a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 80px 0 40px;
    background: #0f172a;
    border-top: 1px solid var(--border);
}

.footer h2 {
    color: var(--text);
    margin-bottom: 10px;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.email-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.email-link:hover {
    color: #fff;
    text-shadow: 0 0 20px var(--accent);
}

.social-links a {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin: 0 15px;
    transition: 0.3s;
}

.social-links a:hover {
    color: var(--primary);
    transform: scale(1.2);
    text-shadow: 0 0 15px var(--primary);
}

.copyright {
    font-size: 0.9rem;
    color: var(--border);
    margin-top: 50px;
}

@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        /* Puts image above text on mobile */
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .bio {
        margin: 0 auto 30px;
        padding-left: 0;
        border-left: none;
        border-top: 4px solid var(--primary);
        padding-top: 20px;
    }

    .hero-btns {
        justify-content: center;
    }

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

    .nav-links {
        display: none;
    }

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