/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --primary: #2A3F74;
    --primary-dark: #1E2D5A;
    --primary-light: #3D5298;
    --accent: #FF6B6B;
    --accent-hover: #E55A5A;
    --white: #FFFFFF;
    --grey-light: #F0F2F4;
    --grey-medium: #D1D5DB;
    --grey-dark: #6B7280;
    --text-dark: #4A5363;
    --text-heading: #2A3F74;
    --shadow: 0 4px 6px rgba(42, 63, 116, 0.1);
    --shadow-lg: 0 10px 25px rgba(42, 63, 116, 0.15);
    --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg-dark: 0 10px 25px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
    --bg-body: #FFFFFF;
    --bg-section: #F0F2F4;
    --bg-card: #FFFFFF;
    --bg-nav: #FFFFFF;
    --text-body: #4A5363;
    --text-heading-color: #2A3F74;
    --border-color: #D1D5DB;
    --scrollbar-track: #F0F2F4;
    --scrollbar-thumb: #2A3F74;
    --contact-bg: #F0F2F4;
    --footer-bg: #1E2D5A;
    --timeline-line: #2A3F74;
    --timeline-dot: #FF6B6B;
    --timeline-dot-ring: #2A3F74;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #5B8DEF;
    --primary-dark: #3A6ADF;
    --primary-light: #7CB8FF;
    --accent: #FF8A8A;
    --accent-hover: #E57A7A;
    --white: #1A1A2E;
    --grey-light: #16213E;
    --grey-medium: #2A2A4A;
    --grey-dark: #A0A0B0;
    --text-dark: #C0C0D0;
    --text-heading: #E0E0F0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
    --shadow-dark: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg-dark: 0 10px 25px rgba(0, 0, 0, 0.6);
    --bg-body: #0F0F1A;
    --bg-section: #16213E;
    --bg-card: #1E1E3A;
    --bg-nav: #0F0F1A;
    --text-body: #C0C0D0;
    --text-heading-color: #E0E0F0;
    --border-color: #3A3A5A;
    --scrollbar-track: #16213E;
    --scrollbar-thumb: #5B8DEF;
    --contact-bg: #1E1E3A;
    --footer-bg: #0A0A1A;
    --timeline-line: #3A6ADF;
    --timeline-dot: #FF8A8A;
    --timeline-dot-ring: #5B8DEF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-body);
    line-height: 1.6;
    background-color: var(--bg-body);
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading-color);
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-nav);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-logo:hover {
    color: var(--accent);
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-body);
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-body);
    margin-left: 15px;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    color: var(--accent);
    background: rgba(255, 107, 107, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-body);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 100px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.typing-container {
    display: inline-block;
    position: relative;
}

.typing-text {
    display: inline;
    border-right: 3px solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-block;
    padding: 14px 35px;
    background: var(--accent);
    color: var(--white);
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 35px;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* ===========================
   About Section
   =========================== */
.about {
    padding: 100px 0;
    background: var(--bg-section);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 25px;
    color: var(--text-body);
    line-height: 1.8;
}

.languages h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.languages ul li {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-body);
}

.languages ul li i {
    color: var(--accent);
    margin-right: 10px;
    width: 20px;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.image-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(42, 63, 116, 0.3);
}

.image-placeholder i {
    font-size: 5rem;
}

.profile-photo {
    width: 320px;
    height: 380px;
    border-radius: 20px;
    object-fit: cover;
    object-position: center 0%;
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--white);
    outline: 3px solid var(--primary);
    transition: var(--transition);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(42, 63, 116, 0.3);
}

/* ===========================
   Experience Section
   =========================== */
.experience {
    padding: 100px 0;
    background: var(--bg-body);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--timeline-line);
    border-radius: 2px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--timeline-dot);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 3px var(--timeline-dot-ring);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-section);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--accent);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

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

.company {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.timeline-content ul {
    padding-left: 20px;
}

.timeline-content ul li {
    position: relative;
    padding: 5px 0;
    font-size: 0.95rem;
    color: var(--text-body);
    line-height: 1.6;
}

.timeline-content ul li::before {
    content: '▸';
    position: absolute;
    left: -20px;
    color: var(--accent);
    font-weight: bold;
}

/* ===========================
   Skills Section
   =========================== */
.skills {
    padding: 100px 0;
    background: var(--bg-section);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.skill-category {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid var(--primary);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category h3 i {
    color: var(--accent);
    font-size: 1.1rem;
}

.skill-category ul {
    padding: 0;
}

.skill-category ul li {
    padding: 8px 0;
    font-size: 0.95rem;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-category ul li:last-child {
    border-bottom: none;
}

.skill-category ul li:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Certifications */
.certifications {
    text-align: center;
}

.certifications h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 40px;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.cert-item {
    background: var(--bg-card);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 3px solid var(--accent);
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cert-item i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.cert-item h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.cert-item p {
    color: var(--grey-dark);
    font-size: 0.9rem;
}

/* ===========================
   Projects Section
   =========================== */
.projects {
    padding: 100px 0;
    background: var(--bg-body);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.project-card {
    background: var(--bg-section);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 107, 107, 0.05);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--white);
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(42, 63, 116, 0.3);
}

.project-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.project-card p {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-card ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.project-card ul li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.5;
}

.project-card ul li::before {
    content: '▸';
    color: var(--accent);
    font-weight: bold;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    padding: 100px 0;
    background: var(--bg-section);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item i {
    font-size: 1.3rem;
    color: var(--accent);
    width: 30px;
    text-align: center;
}

.contact-item span {
    font-size: 1rem;
    color: var(--text-body);
}

.contact-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--text-body);
    background: var(--bg-section);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 63, 116, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--grey-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-form button {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.contact-form button:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* ===========================
   Visitor Counter
   =========================== */
.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    opacity: 0.85;
    color: var(--white);
}

.visitor-counter i {
    color: var(--accent);
    font-size: 1rem;
}

#visitor-count {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    min-width: 30px;
    display: inline-block;
    text-align: center;
    transition: transform 0.3s ease;
}

#visitor-count.bump {
    transform: scale(1.4);
}

.visitor-label {
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ===========================
   Footer
   =========================== */
footer {
    background: var(--footer-bg);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-nav);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .image-placeholder {
        width: 200px;
        height: 200px;
    }

    .image-placeholder i {
        font-size: 3.5rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

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

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

/* ===========================
   Scroll Animations
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   Scrollbar Styling
   =========================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===========================
   Back to Top Button
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(42, 63, 116, 0.4);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.back-to-top.visible {
    display: flex;
}

/* ===========================
   Notification Toast
   =========================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--primary);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}
