/* ============================
   RESET & VARIABLES
   ============================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:          #0f172a;
    --bg2:         #1e293b;
    --border:      #334155;
    --border-dim:  rgba(51, 65, 85, 0.6);
    --text:        #f1f5f9;
    --text-2:      #cbd5e1;
    --muted:       #94a3b8;
    --accent:      #38bdf8;
    --accent-dim:  rgba(56, 189, 248, 0.12);
    --accent-glow: rgba(56, 189, 248, 0.25);
    --indigo:      #818cf8;
    --gold:        #fbbf24;
    --nav-h:       64px;
    --radius:      14px;
    --max-w:       1100px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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


/* ============================
   NAVBAR
   ============================ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(13, 20, 36, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}
#navbar.scrolled {
    border-bottom-color: var(--border-dim);
    background: rgba(13, 20, 36, 0.92);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-link {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); background: var(--accent-dim); }


/* ============================
   PAGE WRAPPER
   ============================ */
.page {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 72px) 40px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================
   PAGE 1 — HERO (index.html)
   ============================ */
.page-hero {
    background:
        radial-gradient(ellipse 60% 50% at 80% 40%, rgba(56,189,248,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 10% 80%, rgba(129,140,248,0.05) 0%, transparent 60%),
        var(--bg);
}

.hero-grid {
    max-width: var(--max-w);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 72px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.775rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid rgba(56,189,248,0.2);
    letter-spacing: 0.025em;
    margin-bottom: 22px;
}

.hero-name {
    font-size: clamp(2.8rem, 5.5vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 22px;
}
.hero-name .accent { color: var(--accent); }

.hero-bio {
    color: var(--text-2);
    font-size: 0.96rem;
    line-height: 1.8;
    margin-bottom: 28px;
    max-width: 540px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.825rem;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.contact-item svg { flex-shrink: 0; }
.contact-item:hover {
    color: var(--accent);
    border-color: rgba(56,189,248,0.35);
    background: var(--accent-dim);
}

.skills-section { display: flex; flex-direction: column; gap: 10px; }

.skill-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.skill-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    min-width: 60px;
    padding-top: 4px;
    flex-shrink: 0;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
    font-size: 0.775rem;
    font-weight: 500;
    padding: 3px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    cursor: default;
}
.tag:hover {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: rgba(56,189,248,0.3);
}
.tag.sm { font-size: 0.7rem; padding: 2px 8px; }

/* Photo */
.hero-photo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}
.photo-frame {
    width: 360px;
    height: 460px;
    border-radius: 22px;
    padding: 3px;
    background: linear-gradient(145deg, var(--accent) 0%, var(--indigo) 50%, var(--gold) 100%);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 80px rgba(56,189,248,0.08);
    transition: box-shadow 0.4s;
}
.photo-frame:hover {
    box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 120px rgba(56,189,248,0.14);
}
.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 20px;
    display: block;
}


/* ============================
   PAGE 2 — EXPERIENCE (experience.html)
   ============================ */
.page-exp {
    background:
        radial-gradient(ellipse 50% 40% at 5% 60%, rgba(129,140,248,0.04) 0%, transparent 60%),
        var(--bg);
    align-items: flex-start;
}

.section-wrap {
    max-width: var(--max-w);
    width: 100%;
}

.section-heading {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 48px;
    color: var(--text);
}
.section-heading::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--indigo));
    border-radius: 2px;
    margin-top: 12px;
}
.section-heading.centered { text-align: center; }
.section-heading.centered::after { margin: 12px auto 0; }

.col-heading {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-dim);
}

/* Experience cards with image */
.exp-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--bg2);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.exp-card:hover {
    border-color: rgba(56,189,248,0.28);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.exp-img-wrap {
    overflow: hidden;
    position: relative;
    min-height: 200px;
}

.exp-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.exp-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.exp-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.exp-company {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 2px;
}

.exp-location-date {
    text-align: right;
    flex-shrink: 0;
}
.exp-loc { display: block; font-size: 0.775rem; color: var(--muted); }
.exp-date { display: block; font-size: 0.775rem; color: var(--muted); margin-top: 1px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }

.exp-summary {
    font-size: 0.885rem;
    color: var(--text-2);
    line-height: 1.72;
}

/* Project card */
.proj-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: var(--bg2);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.proj-card:hover {
    border-color: rgba(56,189,248,0.28);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}
.exp-card:hover .exp-img, .proj-card:hover .exp-img { transform: scale(1.04); }

.proj-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.proj-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 2px;
}
.proj-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    transition: text-decoration 0.1s;
}
.proj-link:hover { text-decoration: underline; }


/* ============================
   PAGE 3 — RESUME (resume.html)
   ============================ */
.page-resume {
    background:
        radial-gradient(ellipse 50% 50% at 70% 30%, rgba(251,191,36,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(56,189,248,0.04) 0%, transparent 60%),
        var(--bg);
    flex-direction: column;
}

.resume-wrap {
    max-width: 860px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.resume-sub {
    color: var(--muted);
    font-size: 1rem;
    margin-top: 6px;
    margin-bottom: 36px;
    text-align: center;
}

.resume-btns {
    display: flex;
    gap: 14px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 30px;
    border-radius: 10px;
    font-size: 0.935rem;
    font-weight: 600;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--accent); color: #0a1628; }
.btn-primary:hover {
    background: #7dd3fc;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

.resume-preview {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border-dim);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.resume-preview iframe {
    width: 100%;
    height: 740px;
    border: none;
    display: block;
}


/* ============================
   SHARED FOOTER NAV HINT
   ============================ */
.page-nav-hint {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s, transform 0.2s;
}
.dot.active {
    background: var(--accent);
    transform: scale(1.3);
}


/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }
    .hero-photo-wrap { order: -1; }
    .photo-frame { width: 200px; height: 260px; }

    .exp-card, .proj-card {
        grid-template-columns: 1fr;
    }
    .exp-img-wrap { height: 200px; }
    .exp-img { height: 200px; }

    .page { padding: calc(var(--nav-h) + 48px) 24px 60px; }
    .nav-inner { padding: 0 24px; }
}

@media (max-width: 640px) {
    .skill-group { flex-direction: column; gap: 8px; }
    .skill-label { min-width: unset; padding-top: 0; }
    .exp-meta-row { flex-direction: column; gap: 4px; }
    .exp-location-date { text-align: left; }
    .resume-preview iframe { height: 520px; }
    .section-heading { font-size: 1.7rem; }
    .nav-link { padding: 6px 10px; font-size: 0.82rem; }
}
