html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f4f8;
    /* Light blue-gray background */
}

section[id] {
    scroll-margin-top: 5rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
}

#snapshot {
    background: #EAF7FB;
}

#career-timeline {
    background: #F8FAFC;
}

#competencies {
    background: #ECFEFF;
}

#ai-lifecycle {
    background: #F0F9FF;
}

#education {
    background: #FFFBEB;
}

#academia {
    background: #F0FDF4;
}

.dark #snapshot {
    background: #102A36;
}

.dark #career-timeline {
    background: #111827;
}

.dark #competencies {
    background: #0D2B35;
}

.dark #ai-lifecycle {
    background: #102A43;
}

.dark #education {
    background: #2A2718;
}

.dark #academia {
    background: #11291F;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    align-items: center;
    gap: 3rem;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content {
    max-width: 720px;
}

.eyebrow {
    margin-bottom: 0.75rem;
    color: #0077B6;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.hero-photo-frame {
    width: min(100%, 280px);
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 0.5rem;
    border: 1px solid #90E0EF;
    border-radius: 1.5rem;
    background: linear-gradient(145deg, #CAF0F8, #fff);
    box-shadow: 0 18px 40px rgba(0, 95, 128, 0.16);
    transform: rotate(2deg);
}

.hero-photo-frame .profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 1.1rem;
    transform: rotate(-2deg);
}

.hero-caption {
    margin: 1rem auto 0;
    color: #64748B;
    font-size: 0.8rem;
    line-height: 1.5;
}

.hero-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.hero-focus span {
    border: 1px solid #ADE8F4;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    background: rgba(224, 247, 250, 0.7);
    color: #023E8A;
    font-size: 0.8rem;
    font-weight: 600;
}

.dark .hero-photo-frame {
    border-color: #155E75;
    background: linear-gradient(145deg, #164E63, #1F2937);
}

.dark .hero-focus span {
    border-color: #155E75;
    background: rgba(8, 47, 73, 0.7);
    color: #BAE6FD;
}

.dark .hero-caption {
    color: #94A3B8;
}

.text-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 0.25rem;
    color: #0077B6;
    font-weight: 600;
}

.cookie-consent {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(680px, calc(100% - 2rem));
    padding: 1rem 1.25rem;
    border: 1px solid #90E0EF;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 30px rgba(3, 4, 94, 0.18);
}

.cookie-consent h2 {
    color: #023E8A;
    font-size: 0.95rem;
    font-weight: 700;
}

.cookie-consent p {
    margin-top: 0.25rem;
    color: #475569;
    font-size: 0.8rem;
    line-height: 1.5;
}

.cookie-consent a {
    display: inline-block;
    margin-top: 0.35rem;
    color: #0077B6;
    font-size: 0.75rem;
    font-weight: 600;
}

.cookie-consent__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.5rem;
}

.cookie-consent__actions .primary-cta,
.cookie-consent__actions .secondary-cta {
    padding: 0.55rem 0.8rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.dark .cookie-consent {
    border-color: #155E75;
    background: rgba(17, 24, 39, 0.97);
}

.dark .cookie-consent h2 {
    color: #BAE6FD;
}

.dark .cookie-consent p {
    color: #CBD5E1;
}

.skip-link {
    position: fixed;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    background: #03045E;
    color: #fff;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.primary-cta,
.secondary-cta {
    display: inline-block;
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.primary-cta {
    background: #0077B6;
    color: #fff;
}

.primary-cta:hover,
.primary-cta:focus-visible {
    background: #005f80;
    transform: translateY(-1px);
}

.secondary-cta {
    border: 2px solid #0077B6;
    color: #0077B6;
}

.secondary-cta:hover,
.secondary-cta:focus-visible {
    background: #E0F7FA;
    transform: translateY(-1px);
}

:focus-visible {
    outline: 3px solid #F9C74F;
    outline-offset: 3px;
}

.material-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.experience-grid,
.capability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.experience-card,
.capability-card {
    border: 1px solid #D1E9F0;
    border-radius: 0.75rem;
    background: #F8FCFD;
    padding: 1.25rem;
}

.experience-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.experience-card h4,
.capability-card h3 {
    color: #023E8A;
    font-size: 1.05rem;
    font-weight: 700;
}

.experience-card strong {
    flex-shrink: 0;
    color: #0077B6;
    font-size: 0.9rem;
    text-align: right;
}

.experience-card__eyebrow,
.capability-number {
    color: #0096C7;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.certification-card {
    border: 1px solid #D1E9F0;
    border-radius: 0.75rem;
    padding: 1.1rem;
    background: #F8FCFD;
    text-align: left;
}

.certification-card h5 {
    color: #023E8A;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
}

.certification-card p {
    margin-top: 0.3rem;
    color: #64748B;
    font-size: 0.8rem;
}

.certification-card a {
    display: inline-block;
    margin-top: 0.75rem;
    color: #0077B6;
    font-size: 0.8rem;
    font-weight: 700;
}

.certification-card a:hover {
    color: #005f80;
    text-decoration: underline;
}

.dark .certification-card {
    border-color: #155E75;
    background: #172B3A;
}

.dark .certification-card h5 {
    color: #BAE6FD;
}

.dark .certification-card p {
    color: #CBD5E1;
}

.experience-card__org {
    margin-top: 0.25rem;
    color: #64748B;
    font-size: 0.8rem;
}

.capability-card p {
    margin-top: 0.6rem;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
}

.capability-number {
    display: block;
    margin-bottom: 0.75rem;
}

.dark .experience-card,
.dark .capability-card {
    border-color: #155E75;
    background: #172B3A;
}

.dark .experience-card h4,
.dark .capability-card h3 {
    color: #BAE6FD;
}

.dark .experience-card__org,
.dark .capability-card p {
    color: #CBD5E1;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #0077B6;
    border: 3px solid #CAF0F8;
}

.timeline-line {
    position: absolute;
    left: -21px;
    top: 20px;
    width: 2px;
    height: calc(100% - 20px);
    background-color: #0077B6;
}

.flowchart-box {
    background-color: white;
    border: 1px solid #ADE8F4;
    color: #03045E;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 120px;
}

.flowchart-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.flowchart-arrow {
    font-size: 1.5rem;
    color: #0077B6;
    margin: 0.5rem 0;
    text-align: center;
}

#sticky-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#sticky-nav a {
    color: #0077B6;
    transition: color 0.3s ease;
}

#sticky-nav nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

#sticky-nav nav::-webkit-scrollbar {
    display: none;
}

#sticky-nav a:hover,
#sticky-nav a.active {
    color: #00B4D8;
    font-weight: 600;
}

#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #0077B6;
    color: white;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, opacity 0.3s;
}

#backToTopBtn:hover {
    background-color: #005f80;
}

.section-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.section-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .section-animate {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

.profile-picture {
    width: 200px;
    height: 200px;
    object-fit: cover;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    #sticky-nav nav {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-content .flex,
    .hero-focus {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-photo-frame {
        width: min(65vw, 280px);
    }

    .experience-grid,
    .capability-grid,
    .certification-grid {
        grid-template-columns: 1fr;
    }

    .experience-card {
        flex-direction: column;
    }

    .experience-card strong {
        text-align: left;
    }

    .cookie-consent {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-consent__actions {
        justify-content: flex-end;
    }
}
