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

/* ── Variables ────────────────────────────────────────────────── */
:root {
    --primary:    #667eea;
    --primary-dk: #5a6fd6;
    --secondary:  #764ba2;
    --grad:       linear-gradient(135deg, #667eea, #764ba2);

    --text:       #1a202c;
    --text-body:  #4a5568;
    --text-muted: #718096;

    --bg:         #f8fafc;
    --card:       #ffffff;
    --border:     #e2e8f0;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.07);
    --shadow-pri: 0 4px 15px rgba(102,126,234,0.35);

    --radius-sm:  6px;
    --radius:     12px;
    --radius-lg:  16px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-body);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Header ───────────────────────────────────────────────────── */
.header {
    background: var(--grad);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(102,126,234,0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo-link {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.logo-link:hover { opacity: 0.82; }

/* ── Navigation ───────────────────────────────────────────────── */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.15rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
    font-size: 0.88rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
}

/* Dropdown */
.nav-item-dropdown { position: relative; }

.nav-dropdown-trigger {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.2s, color 0.2s;
}
.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active {
    color: #fff;
    background: rgba(255,255,255,0.18);
}

.dropdown-caret {
    font-size: 0.68rem;
    transition: transform 0.2s;
}
.nav-item-dropdown.open .dropdown-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    list-style: none;
    padding: 0.35rem;
    min-width: 165px;
    z-index: 1000;
    border: 1px solid var(--border);
}
.nav-item-dropdown.open .nav-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.18s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.nav-dropdown-item {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.nav-dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}

/* ── Layout ───────────────────────────────────────────────────── */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.page {
    display: none;
    animation: fadeIn 0.38s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: var(--shadow-pri);
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text-body);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero-wrap {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 2.5rem 0 3rem;
}

.hero-content { flex: 1; }

.hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.hero-name {
    font-size: 3.75rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.06;
    letter-spacing: -0.04em;
    margin-bottom: 1.25rem;
}

.hero-tagline {
    font-size: 1.08rem;
    color: var(--text-body);
    line-height: 1.75;
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-photo-wrap {
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: var(--grad);
    opacity: 0.1;
    z-index: 0;
}

.profile-photo {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 30px rgba(102,126,234,0.22);
    position: relative;
    z-index: 1;
}

/* Stats Row */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding-top: 2.5rem;
    border-top: 1.5px solid var(--border);
}

.stat-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.1);
}

.stat-number {
    display: block;
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.77rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.45;
}

/* ── Page Content Card ────────────────────────────────────────── */
.page-content {
    background: var(--card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.page-content h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.page-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--grad);
}

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline {
    position: relative;
    padding: 0.5rem 0;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    border-radius: 4px;
}

.timeline-item {
    position: relative;
    padding-left: 52px;
    margin-bottom: 2.5rem;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: 0;
    top: 3px;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 3px solid var(--card);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--border);
}

.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.timeline-content .company {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.timeline-content .date {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.85rem;
}
.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.timeline-content li {
    padding-left: 1.1rem;
    position: relative;
    color: var(--text-body);
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
    line-height: 1.6;
}
.timeline-content li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 1.3rem;
    line-height: 1.3;
    font-weight: 700;
}

/* ── Career Tab Switcher ──────────────────────────────────────── */
.career-tab-switcher {
    display: inline-flex;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 2rem;
    gap: 2px;
}

.career-tab {
    padding: 0.5rem 1.3rem;
    border: none;
    border-radius: 5px;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    transition: all 0.2s;
}
.career-tab.active {
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}
.career-tab:not(.active):hover { color: var(--text); }

.career-panel { display: none; }
.career-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ── Resume Viewer ────────────────────────────────────────────── */
.resume-viewer {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.resume-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #3d3f42;
    padding: 0.7rem 1.25rem;
    gap: 1rem;
}

.viewer-filename {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.viewer-btn {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.25);
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
    cursor: pointer;
    background: none;
}
.viewer-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.viewer-btn-primary {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
}
.viewer-btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.resume-viewer-stage {
    background: #525659;
    padding: 2rem 3rem 2.5rem;
}

.resume-canvas-wrapper { width: 100%; }

#resume-canvas {
    width: 100%;
    display: block;
    box-shadow: 0 6px 25px rgba(0,0,0,0.45);
}

.resume-loading {
    text-align: center;
    padding: 3rem;
    color: rgba(255,255,255,0.65);
    font-size: 0.92rem;
}

/* ── Project Cards ────────────────────────────────────────────── */
.projects-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(102,126,234,0.12);
    transform: translateY(-4px);
}

.project-accent {
    height: 4px;
    width: 100%;
    flex-shrink: 0;
}
.accent-primary { background: var(--grad); }
.accent-teal    { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.accent-amber   { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.project-body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.project-company {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.84rem;
    margin-bottom: 0.15rem;
}

.project-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.9rem;
}

.project-description {
    color: var(--text-body);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 1rem;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.project-tech span {
    background: #f0f3ff;
    color: var(--primary-dk);
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
    font-size: 0.74rem;
    font-weight: 600;
}

.project-links {
    margin-bottom: 0.5rem;
}

.project-link {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.project-link:hover {
    color: var(--primary-dk);
}

.project-highlight {
    color: var(--text-muted);
    font-size: 0.81rem;
    font-weight: 500;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
    line-height: 1.5;
}

/* ── Skills ───────────────────────────────────────────────────── */
.skills-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category h3 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.85rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-tag {
    background: var(--card);
    color: var(--text-body);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 500;
    border: 1.5px solid var(--border);
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    cursor: default;
}
.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f0f3ff;
}

/* ── About ────────────────────────────────────────────────────── */
.about-intro p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 1.1rem;
}
.about-intro p:last-child { margin-bottom: 0; }

.about-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1.5px solid var(--border);
}

.about-facts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fact-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.fact-label {
    font-size: 0.69rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.fact-value {
    font-size: 0.88rem;
    color: var(--text-body);
    font-weight: 500;
    line-height: 1.5;
}

.fact-value a {
    color: var(--primary);
    text-decoration: none;
}
.fact-value a:hover { text-decoration: underline; }

.about-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-body);
    margin-bottom: 1.25rem;
}
.about-body p:last-child { margin-bottom: 0; }

/* ── Contact ──────────────────────────────────────────────────── */
.contact-intro {
    color: var(--text-body);
    margin-bottom: 1.75rem;
    font-size: 1rem;
    line-height: 1.7;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 270px;
    gap: 3rem;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
    background: #fff;
}
.form-group textarea { min-height: 130px; }

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.contact-link-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(102,126,234,0.1);
    transform: translateX(3px);
}

.contact-link-icon {
    width: 38px;
    height: 38px;
    background: var(--grad);
    color: #fff;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-link-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.contact-link-value {
    font-size: 0.82rem;
    color: var(--text-body);
    font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
    background: var(--grad);
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-name {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-copy {
    color: rgba(255,255,255,0.45);
    font-size: 0.78rem;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 960px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .about-facts {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .fact-item { min-width: 180px; }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 0.85rem 0;
        gap: 0.5rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.15rem;
    }

    .hero-wrap {
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        gap: 2rem;
    }

    .hero-name { font-size: 2.75rem; }
    .hero-tagline { max-width: 100%; }
    .hero-cta { justify-content: center; }
    .hero-photo-wrap { order: -1; }

    .profile-photo {
        width: 160px;
        height: 160px;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .page-content { padding: 2rem 1.25rem; }
    .main-content { padding: 2rem 1rem; }

    .resume-viewer-stage { padding: 1.25rem; }
    .resume-viewer-toolbar { flex-wrap: wrap; gap: 0.5rem; }

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

    .footer-links {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }
}
