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

:root {
    --primary: #1e3c72;
    --primary-light: #2a5298;
    --accent: #4facfe;
    --background: #f5f5f5;
    --surface: #ffffff;
    --text: #333333;
    --muted: #666666;
    --line: #e0e0e0;
    --soft-blue: #f0f4f8;
    --award: #ffa726;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 82px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

a {
    color: var(--primary-light);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.header {
    min-height: 390px;
    display: grid;
    place-items: center;
    padding: 5rem 2rem 4rem;
    color: white;
    text-align: center;
    background:
        radial-gradient(circle at 18% 25%, rgba(79, 172, 254, 0.2), transparent 28%),
        radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.header-content {
    max-width: 880px;
}

.header h1 {
    font-size: clamp(2.5rem, 7vw, 4.6rem);
    line-height: 1.05;
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.tagline {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    opacity: 0.96;
}

.location {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #57e389;
    box-shadow: 0 0 0 4px rgba(87, 227, 137, 0.16);
}

.header-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.7rem;
}

.header-button {
    display: inline-block;
    padding: 0.75rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.header-button:hover {
    transform: translateY(-2px);
}

.header-button.primary {
    color: var(--primary);
    background: white;
}

.header-button.secondary {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.main-nav {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
}

.nav-inner {
    max-width: 1200px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: none;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.7rem;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 0.5rem 0;
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    background: var(--primary);
    border-radius: 2px;
}

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

.career-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 0 0 2rem;
}

.summary-stat {
    padding: 1.25rem 1rem;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.summary-stat strong,
.summary-stat span {
    display: block;
}

.summary-stat strong {
    color: var(--primary-light);
    font-size: 1.15rem;
}

.summary-stat span {
    margin-top: 0.25rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.section {
    margin: 2rem 0;
    padding: 2.5rem;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    color: var(--primary);
    font-size: clamp(1.65rem, 4vw, 2rem);
    border-bottom: 3px solid var(--primary-light);
}

.summary {
    color: #444;
    font-size: 1.05rem;
    line-height: 1.85;
}

.expertise-grid,
.projects-grid,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.expertise-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary-light);
}

.experience-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.experience-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.current-role {
    position: relative;
}

.current-role::before {
    content: "Current role";
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.3rem 0.65rem;
    color: #166534;
    background: #dcfce7;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.job-title {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 650;
}

.company {
    margin-top: 0.2rem;
    color: #555;
    font-size: 1.05rem;
}

.duration {
    color: var(--muted);
    font-style: italic;
    white-space: nowrap;
}

.responsibilities {
    margin: 1rem 0 0 1.5rem;
}

.responsibilities li {
    margin-bottom: 0.72rem;
    color: #444;
}

.experience-note {
    margin: -0.5rem 0 2.5rem;
    padding: 1.25rem 1.5rem;
    color: #4d5a68;
    background: var(--soft-blue);
    border-left: 4px solid var(--primary-light);
    border-radius: 0 6px 6px 0;
}

.experience-note strong {
    color: var(--primary);
}

.project-card {
    padding: 1.5rem;
    background: var(--soft-blue);
    border-radius: 7px;
    border-top: 4px solid var(--primary-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(30, 60, 114, 0.12);
}

.project-card h3 {
    margin-bottom: 0.65rem;
    color: var(--primary);
    font-size: 1.12rem;
}

.project-card p {
    color: #555;
}

.awards-grid {
    display: grid;
    gap: 1rem;
}

.award-item {
    padding: 1rem;
    background: #fff8e1;
    border-left: 4px solid var(--award);
    border-radius: 6px;
}

.tool-category {
    min-height: 150px;
    padding: 1.25rem;
    text-align: left;
    background: #f8f9fa;
    border-radius: 6px;
}

.tool-category strong,
.tool-category span {
    display: block;
}

.tool-category strong {
    margin-bottom: 0.6rem;
    color: var(--primary);
}

.tool-category span {
    color: #555;
}

.education-list {
    list-style: none;
}

.education-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px dashed var(--line);
}

.education-list li:last-child {
    border-bottom: 0;
}

.education-list time {
    color: var(--muted);
    white-space: nowrap;
}

footer {
    padding: 2.5rem 2rem;
    color: white;
    background: var(--primary);
    text-align: center;
}

.footer-inner a {
    display: inline-block;
    margin-top: 0.45rem;
    color: white;
}

.chatbot-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.chatbot-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 1.65rem;
    transition: transform 0.2s;
}

.chatbot-toggle:hover {
    transform: scale(1.08);
}

.notification-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: white;
    background: #e53935;
    border: 2px solid white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.notification-dot[hidden] {
    display: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.chatbot-window {
    position: fixed;
    right: 20px;
    bottom: 92px;
    width: min(400px, calc(100vw - 40px));
    height: min(600px, calc(100vh - 120px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.chatbot-title {
    font-weight: 650;
}

.chatbot-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: white;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-size: 1.6rem;
}

.welcome-message {
    padding: 1.1rem;
    text-align: center;
    background: var(--soft-blue);
    border-bottom: 1px solid var(--line);
}

.welcome-message[hidden] {
    display: none;
}

.welcome-message h3 {
    color: var(--primary);
    font-size: 1.05rem;
}

.welcome-message p {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.chatbot-iframe {
    width: 100%;
    flex: 1;
    border: 0;
}

@media (max-width: 900px) {
    .career-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-inner {
        min-height: 64px;
        padding: 0 1.25rem;
    }

    .nav-brand,
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.75rem 1.25rem 1rem;
        background: white;
        box-shadow: 0 8px 14px rgba(0, 0, 0, 0.12);
    }

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

    .nav-links a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 650px) {
    html {
        scroll-padding-top: 70px;
    }

    .header {
        min-height: 350px;
        padding: 4rem 1.25rem 3.25rem;
    }

    .container {
        padding: 1rem;
    }

    .section {
        margin: 1rem 0;
        padding: 1.5rem;
    }

    .career-summary {
        grid-template-columns: 1fr;
        margin-bottom: 1rem;
    }

    .job-header,
    .education-list li {
        flex-direction: column;
        gap: 0.25rem;
    }

    .duration {
        white-space: normal;
    }

    .expertise-grid,
    .projects-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .chatbot-window {
        right: 5vw;
        bottom: 90px;
        width: 90vw;
        height: 70vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
