:root {
    --primary-black: #0f172a;
    --secondary-black: #111827;
    --surface: rgba(30, 41, 59, 0.72);
    --surface-strong: rgba(15, 23, 42, 0.92);
    --accent-pink: #38bdf8;
    --accent-blue: #818cf8;
    --accent-green: #22c55e;
    --accent-gold: #facc15;
    --text-white: #f8fafc;
    --text-gray: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(226, 232, 240, 0.14);
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.36);
    --gradient: linear-gradient(135deg, var(--accent-pink), var(--accent-blue));
    --radius: 8px;
    --header-height: 76px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    min-width: 320px;
    background: var(--primary-black);
    color: var(--text-white);
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 16% 18%, rgba(129, 140, 248, 0.19), transparent 30%),
        radial-gradient(circle at 84% 70%, rgba(56, 189, 248, 0.17), transparent 34%),
        linear-gradient(180deg, #0f172a 0%, #111827 47%, #0f172a 100%);
}

body.menu-open {
    overflow: hidden;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

img {
    max-width: 100%;
    display: block;
}

strong {
    color: var(--text-white);
}

:focus-visible {
    outline: 3px solid var(--accent-pink);
    outline-offset: 4px;
    border-radius: 6px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    transform: translateY(-160%);
    padding: 10px 14px;
    background: var(--accent-pink);
    color: #06111f;
    border-radius: var(--radius);
    font-weight: 800;
}

.skip-link:focus {
    transform: translateY(0);
}

#particles-js {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.7;
}

.container {
    width: min(100% - 40px, 1200px);
    margin: 0 auto;
}

.section {
    padding: 104px 0;
    position: relative;
}

.section-title {
    width: fit-content;
    position: relative;
    margin-bottom: 44px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -14px;
    width: 76px;
    height: 5px;
    border-radius: 999px;
    background: var(--gradient);
}

.section-intro {
    max-width: 780px;
    margin: -20px 0 38px;
    color: var(--text-gray);
    font-size: 1.08rem;
}

.section-kicker,
.eyebrow {
    color: var(--accent-pink);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.9rem;
    letter-spacing: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 13px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-white);
    font-weight: 700;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(56, 189, 248, 0.18);
}

.btn-primary {
    border-color: transparent;
    background: var(--gradient);
    color: #07111f;
}

.btn-secondary {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.12);
}

.btn-ghost {
    border-color: rgba(129, 140, 248, 0.42);
    background: rgba(129, 140, 248, 0.08);
}

header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.78);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

header.sticky {
    background: rgba(15, 23, 42, 0.92);
    border-color: var(--border);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.32);
}

.header-content {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.logo span,
.footer-logo span,
.hero h1 span,
.stat-card strong,
.achievement-icon i,
.leadership-icon i {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav ul,
.footer-nav ul {
    display: flex;
    align-items: center;
    gap: 23px;
    list-style: none;
}

nav a,
.footer-nav a {
    position: relative;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.98rem;
    transition: color 0.25s ease;
}

nav a::after,
.footer-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.25s ease;
}

nav a:hover,
.footer-nav a:hover {
    color: var(--text-white);
}

nav a:hover::after,
.footer-nav a:hover::after {
    width: 100%;
}

.menu-toggle,
.close-menu {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    font-size: 1.4rem;
}

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(2, 6, 23, 0.66);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hero {
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 48px) 0 60px;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    max-width: 920px;
    margin: 12px 0 18px;
    font-size: clamp(3rem, 8vw, 5.8rem);
    line-height: 0.98;
    font-weight: 800;
}

.hero-summary {
    max-width: 920px;
    color: var(--text-gray);
    font-size: clamp(1.05rem, 2vw, 1.34rem);
    line-height: 1.75;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 34px 0 24px;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.social-icons a:hover {
    transform: translateY(-4px);
    border-color: transparent;
    background: var(--gradient);
    color: #07111f;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 44px;
}

.stat-card {
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.65));
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.2);
}

.stat-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(1.55rem, 3vw, 2.4rem);
    line-height: 1;
    font-weight: 800;
}

.stat-card span:last-child {
    display: block;
    color: var(--text-gray);
    font-size: 0.92rem;
    line-height: 1.35;
}

.scroll-down {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 0.86rem;
}

.scroll-down i {
    animation: bounce 1.8s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.about,
.achievements,
footer {
    background: rgba(17, 24, 39, 0.78);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) 1.2fr;
    gap: 62px;
    align-items: center;
}

.about-img {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-img::before {
    content: '';
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: var(--radius);
    pointer-events: none;
}

.about-img img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.about-text h3 {
    margin: 10px 0 20px;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15;
}

.about-text p {
    margin-bottom: 18px;
    color: var(--text-gray);
    font-size: 1.06rem;
}

.about-focus {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.about-focus span,
.skill-pill,
.project-tags span,
.metric-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.08);
    color: #dbeafe;
    font-size: 0.9rem;
    font-weight: 600;
}

.timeline {
    position: relative;
    max-width: 1060px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-blue), transparent);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 42px 48px;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    top: 24px;
    width: 20px;
    height: 20px;
    border: 4px solid var(--primary-black);
    border-radius: 999px;
    background: var(--accent-pink);
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0.14);
    z-index: 2;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content,
.project-case,
.skill-category,
.achievement-card,
.leadership-card,
.contact-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(16px);
}

.timeline-content {
    padding: 24px;
}

.timeline-img {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.timeline-date,
.project-badge,
.achievement-card span,
.leadership-card span {
    display: inline-flex;
    width: fit-content;
    color: var(--accent-pink);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    line-height: 1.4;
}

.timeline-content h3 {
    margin: 10px 0;
    font-size: 1.28rem;
    line-height: 1.3;
}

.timeline-content p {
    color: var(--text-gray);
}

.timeline-note {
    margin-top: 12px;
    color: #dbeafe !important;
    font-weight: 600;
}

.projects {
    overflow: hidden;
}

.projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 140, 248, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    position: relative;
    z-index: 1;
}

.project-case {
    display: block;
    padding: 24px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    min-height: 100%;
    border-color: rgba(226, 232, 240, 0.1);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48)),
        var(--surface);
}

.project-copy {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    height: 100%;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.project-featured {
    grid-column: 1 / -1;
    padding: 32px;
    border-color: rgba(56, 189, 248, 0.38);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.17), transparent 34%),
        linear-gradient(315deg, rgba(255, 42, 109, 0.12), transparent 30%),
        var(--surface);
}

.project-featured .project-copy {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 30px;
}

.project-heading h3 {
    margin: 10px 0 12px;
    font-size: clamp(1.35rem, 2vw, 1.72rem);
    line-height: 1.18;
}

.project-featured .project-heading h3 {
    font-size: clamp(1.85rem, 3vw, 2.45rem);
}

.project-lede {
    color: var(--text-gray);
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.58;
}

.project-featured .project-lede {
    font-size: 1.06rem;
}

.case-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 0;
}

.project-featured .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-grid div {
    min-height: 0;
    padding: 13px 14px;
    border: 1px solid rgba(226, 232, 240, 0.09);
    border-radius: var(--radius);
    background: rgba(2, 6, 23, 0.26);
}

.case-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-pink);
}

.case-grid span {
    display: block;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.metric-row,
.project-tags,
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.metric-row span {
    border-color: rgba(34, 197, 94, 0.38);
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 800;
}

.project-tags span {
    min-height: 30px;
    padding: 6px 10px;
    border-color: rgba(56, 189, 248, 0.16);
    background: rgba(56, 189, 248, 0.07);
    color: #cbd5e1;
    font-size: 0.8rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid rgba(56, 189, 248, 0.36);
    border-radius: var(--radius);
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-white);
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.project-link:not(.unavailable):hover {
    transform: translateY(-3px);
    border-color: transparent;
    background: var(--gradient);
    color: #07111f;
}

.project-link.unavailable {
    cursor: not-allowed;
    color: var(--text-muted);
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
}

.project-visual {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: var(--radius);
    background: var(--surface-strong);
}

.project-visual img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-case:hover .project-visual img {
    transform: scale(1.035);
}

.project-visual figcaption {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text-gray);
    font-size: 0.78rem;
    backdrop-filter: blur(10px);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.skill-category {
    position: relative;
    overflow: hidden;
    padding: 22px;
    min-height: 100%;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.45)),
        var(--surface);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-category.core {
    border-color: rgba(56, 189, 248, 0.3);
    background:
        linear-gradient(135deg, rgba(56, 189, 248, 0.11), transparent 46%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.5)),
        var(--surface);
}

.skill-category:hover,
.achievement-card:hover,
.leadership-card:hover,
.contact-item:hover,
.timeline-content:hover,
.project-case:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.36);
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.32);
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 1.04rem;
    line-height: 1.25;
}

.skill-category h3 i {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 42, 109, 0.12);
    color: var(--accent-pink);
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-color: rgba(226, 232, 240, 0.14);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-gray);
    font-size: 0.82rem;
    line-height: 1.25;
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.skill-pill:hover,
.skill-pill.highlighted {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.34);
    background: rgba(56, 189, 248, 0.12);
    color: var(--text-white);
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.achievement-card {
    min-height: 270px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.achievement-card.featured {
    grid-column: span 2;
}

.achievement-card img,
.leadership-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.achievement-icon,
.leadership-icon {
    width: 100%;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--border);
}

.achievement-card div:not(.achievement-icon),
.leadership-card div:not(.leadership-icon) {
    padding: 22px;
}

.achievement-card h3,
.leadership-card h3 {
    margin: 8px 0 10px;
    font-size: 1.22rem;
    line-height: 1.28;
}

.achievement-card p,
.leadership-card p {
    color: var(--text-gray);
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    justify-content: center;
}

.leadership-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    justify-content: center;
}

.contact-item {
    min-height: 160px;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-item i {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--gradient);
    color: #07111f;
    font-size: 1.2rem;
}

.contact-item h3 {
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-gray);
    font-size: 0.86rem;
    white-space: nowrap;
}

footer {
    padding: 56px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    text-align: center;
}

.copyright {
    color: var(--text-muted);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--gradient);
    color: #07111f;
    box-shadow: 0 16px 34px rgba(2, 6, 23, 0.28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.stat-card,
.timeline-content,
.project-case,
.skill-category,
.achievement-card,
.leadership-card,
.contact-item {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.js .stat-card,
.js .timeline-content,
.js .project-case,
.js .skill-category,
.js .achievement-card,
.js .leadership-card,
.js .contact-item {
    opacity: 1;
    transform: translateY(18px);
}

.js .stat-card.is-visible,
.js .timeline-content.is-visible,
.js .project-case.is-visible,
.js .skill-category.is-visible,
.js .achievement-card.is-visible,
.js .leadership-card.is-visible,
.js .contact-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1180px) {
    nav ul {
        gap: 16px;
    }

    nav a {
        font-size: 0.92rem;
    }

    .skills-container,
    .achievement-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leadership-grid,
    .contact-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .menu-toggle,
    .close-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    nav {
        position: fixed;
        top: 0;
        right: -330px;
        z-index: 1001;
        width: min(330px, 86vw);
        height: 100svh;
        padding: 82px 24px 28px;
        background: var(--surface-strong);
        border-left: 1px solid var(--border);
        box-shadow: -20px 0 70px rgba(2, 6, 23, 0.35);
        transition: right 0.3s ease;
    }

    nav.active {
        right: 0;
    }

    .close-menu {
        position: absolute;
        top: 18px;
        right: 18px;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    nav a {
        display: block;
        padding: 12px 0;
        font-size: 1.08rem;
    }

    nav a::after {
        bottom: 4px;
    }

    .about-content,
    .project-featured .project-copy {
        grid-template-columns: 1fr;
    }

    .project-featured .project-copy {
        gap: 32px;
    }

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

    .timeline::after {
        left: 18px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        left: 0;
        width: 100%;
        padding: 0 0 36px 58px;
    }

    .timeline-item:nth-child(odd)::after,
    .timeline-item:nth-child(even)::after {
        left: 8px;
        right: auto;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 28px, 1200px);
    }

    .section {
        padding: 78px 0;
    }

    .hero {
        padding-top: calc(var(--header-height) + 34px);
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-strip,
    .skills-container,
    .achievement-grid,
    .leadership-grid,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .achievement-card.featured {
        grid-column: span 1;
    }

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

    .project-featured .case-grid {
        grid-template-columns: 1fr;
    }

    .project-case {
        padding: 18px;
    }

    .project-featured {
        padding: 20px;
    }

    .project-visual img {
        min-height: 280px;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 460px) {
    .logo,
    .footer-logo {
        font-size: 1.35rem;
    }

    .hero h1 {
        font-size: clamp(2.55rem, 16vw, 3.3rem);
    }

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

    .stat-card {
        min-height: 112px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        padding-left: 48px;
    }

    .timeline-content,
    .skill-category {
        padding: 18px;
    }

    .chatbot {
        right: 14px;
        bottom: 78px;
    }

    .chat-suggestions {
        grid-template-columns: 1fr;
    }

    .chat-suggestions button {
        min-height: 48px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 9px 11px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.hero h1 span::after {
    content: '|';
    animation: blink 1s infinite;
    color: #38bdf8;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Certificate Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background-color: rgba(2, 6, 23, 0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    max-width: min(90%, 900px);
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: 0;
    color: var(--text-white);
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #38bdf8;
}

#modal-caption {
    position: absolute;
    bottom: 30px;
    color: var(--text-gray);
    font-weight: 600;
    text-align: center;
}

.achievement-card img {
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.achievement-card img:hover {
    transform: scale(1.02);
}

/* Ask Omar's AI Chatbot */
.chatbot {
    position: fixed;
    right: 24px;
    bottom: 86px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
}

.chatbot-toggle,
.chatbot-close,
.chatbot-form button,
.chat-suggestions button {
    font-family: inherit;
}

.chatbot-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    background: var(--gradient);
    color: #07111f;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
    cursor: pointer;
}

.chatbot-panel {
    width: min(380px, calc(100vw - 32px));
    height: 520px;
    max-height: calc(100svh - 128px);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.chatbot.chatbot-open .chatbot-panel {
    display: flex;
}

.chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.chatbot-header span {
    display: block;
    color: var(--text-white);
    font-weight: 800;
}

.chatbot-header small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.chatbot-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-white);
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 12px 16px 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.45) rgba(15, 23, 42, 0.25);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.25);
    border-radius: 999px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.45);
    border-radius: 999px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.68);
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 88%;
}

.chat-message.user {
    align-self: flex-end;
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-bubble {
    padding: 11px 13px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--border);
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat-bubble p {
    margin: 0;
}

.chat-bubble p + p,
.chat-bubble p + .chat-list,
.chat-list + p {
    margin-top: 8px;
}

.chat-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

.chat-list li + li {
    margin-top: 7px;
}

.chat-message.user .chat-bubble {
    background: var(--gradient);
    color: #07111f;
    border-color: transparent;
    font-weight: 700;
}

.chat-sources {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.chat-sources a {
    color: #38bdf8;
    text-decoration: none;
}

.chat-suggestions {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
}

.chat-suggestions button {
    min-height: 74px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 12px;
    padding: 10px 8px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    color: var(--text-gray);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chat-suggestions button:hover,
.chat-suggestions button:focus-visible {
    border-color: rgba(56, 189, 248, 0.58);
    background: rgba(15, 23, 42, 0.92);
    transform: translateY(-1px);
    outline: 0;
}

.chat-suggestions i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: #38bdf8;
    font-size: 0.82rem;
}

.chat-suggestions span {
    display: block;
    max-width: 100%;
}

.chatbot-form {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--border);
}

.chatbot-form input {
    min-width: 0;
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 14px;
    background: rgba(2, 6, 23, 0.65);
    color: var(--text-white);
    outline: 0;
}

.chatbot-form input:focus {
    border-color: #38bdf8;
}

.chatbot-form button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 0;
    border-radius: 999px;
    background: var(--gradient);
    color: #07111f;
    cursor: pointer;
}

/* Force Resala logo to fit container height instead of stretching width */
.leadership-card img[src*="resala"] {
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

