:root {
    --primary-color: #0f172a;
    --secondary-color: #1e293b;
    --accent-color: #3b82f6;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-gradient);
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav ul li {
    margin: 0 0.5rem;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.resume-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.resume-btn:hover {
    background: #2563eb;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%233b82f6" stop-opacity="0.1"/><stop offset="100%" stop-color="%230f172a" stop-opacity="0"/></radialGradient></defs><rect width="1000" height="1000" fill="url(%23a)"/></svg>') no-repeat center/cover;
}

#hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

#hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 600px;
    animation: fadeInUp 1s ease 0.2s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
    min-width: 150px;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.download-btn {
    min-width: auto;
    padding: 10px 20px;
    margin-top: 1rem;
}

/* Sections */
section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 3rem;
    color: var(--accent-color);
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin: 1rem auto;
}

/* About */
#about {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin: 2rem auto;
}

#about p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-card {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card i {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.skill-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: rgba(15, 23, 42, 0.8);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--secondary-color);
}

.project-card-content {
    padding: 1.5rem;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Experience, Education, Certifications */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    right: -10px;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
    right: auto;
}

.timeline-content {
    background: rgba(15, 23, 42, 0.8);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: relative;
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.timeline-content .date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.cert-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    display: block;
}

.cert-btn:hover {
    background: #2563eb;
}

/* Contact */
#contact {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--border-radius);
    text-align: center;
    padding: 3rem 1rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item i {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.contact-item p {
    font-size: 1rem;
}

/* Modal for Certificates */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    animation: fadeIn 0.3s;
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    object-fit: contain;
    padding-top: 50px;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Resume Modal Specific */
.resume-modal-content {
    position: relative;
    width: 90%;
    height: 70%;
    max-width: 900px;
    max-height: 80vh;
    margin: 50px auto;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

#resumeIframe {
    border: none;
    display: block;
}

.modal-actions {
    text-align: center;
    padding: 1rem;
    background: var(--secondary-color);
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: var(--accent-color);
}

/* Experience Section Styles */
.experience-card {
    background: rgba(255, 255, 255, 0.05); /* Subtle glass effect */
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease;
}

.experience-card:hover {
    transform: translateY(-5px);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.exp-role h3 {
    font-size: 1.5rem;
    margin: 0;
    color: #fff;
}

.badge {
    background: var(--accent-color);
    color: #000;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 5px;
}

.exp-meta {
    text-align: right;
}

.exp-meta span {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
}

.company {
    font-weight: bold;
    color: var(--accent-color) !important;
}

.exp-bullets {
    list-style: none;
    padding: 0;
}

.exp-bullets li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: #ddd;
    line-height: 1.6;
}

/* Custom bullet point using your accent color */
.exp-bullets li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

/* --- MODERN RESPONSIVE OVERHAUL --- */

@media (max-width: 1024px) {
    nav ul {
        gap: 0.8rem;
    }
    nav ul li a {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.5rem 0;
        background: rgba(15, 23, 42, 0.98);
        border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    }

    nav ul {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 0.5rem 1rem;
        max-width: 500px;
        margin: 0 auto;
    }

    nav ul li {
        margin: 0;
    }

    nav ul li a {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 4px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    nav ul li a::after {
        display: none;
    }

    .resume-btn {
        grid-column: span 4;
        justify-content: center;
        width: 100%;
        margin-top: 5px;
        padding: 12px;
        font-weight: 600;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
    }

    #hero {
        padding-top: 140px; 
    }

    section {
        padding: 3rem 1.5rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        margin-left: 40px;
        padding-right: 1.5rem;
    }

    .timeline-item::before {
        left: 10px !important;
        right: auto !important;
    }

    .exp-header {
        flex-direction: column;
    }

    .exp-meta {
        text-align: left;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    nav ul {
        grid-template-columns: repeat(3, 1fr);
    }

    .resume-btn {
        grid-column: span 3;
    }

    #hero h1 {
        font-size: 2.2rem;
    }

    #hero {
        padding-top: 180px;
    }

    .skill-card, .project-card-content, .timeline-content {
        padding: 1.2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--secondary-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
