/* ===== CSS Variables ===== */
:root {
    --navy:          #1a2c4e;
    --navy-light:    #243a66;
    --accent:        #2a52a0;
    --accent-light:  #3a6bc7;
    --text-primary:  #1a1f2e;
    --text-secondary:#4a5568;
    --text-muted:    #718096;
    --bg-main:       #f4f6fb;
    --bg-white:      #ffffff;
    --bg-light:      #eef1f8;
    --border:        #dde3ef;
    --shadow-sm: 0 1px 3px rgba(26,44,78,.07), 0 1px 2px rgba(26,44,78,.04);
    --shadow-md: 0 4px 14px rgba(26,44,78,.10), 0 2px 4px rgba(26,44,78,.05);
    --shadow-lg: 0 12px 32px rgba(26,44,78,.13), 0 4px 8px rgba(26,44,78,.06);
    --radius:    8px;
    --radius-lg: 14px;
}

/* ===== Reset / Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-main);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.25; color: var(--text-primary); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
p { margin-top: 0; }

/* ===== Navbar ===== */
.site-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: .875rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    text-decoration: none;
}

.brand-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    font-size: .8rem;
    border-radius: 7px;
    letter-spacing: .5px;
    flex-shrink: 0;
}

.brand-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-role {
    font-size: .7rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
}

.site-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: .9rem;
    padding: .4rem .9rem;
    border-radius: var(--radius);
    transition: color .15s, background .15s;
}
.site-nav .nav-link:hover { color: var(--navy); background: var(--bg-light); }

/* ===== Section utilities ===== */
.section    { padding: 5rem 0; }
.section-sm { padding: 3.5rem 0; }

.section-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .5rem;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .35rem;
}

.section-lead {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2.75rem;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 55%, #2e5bb8 100%);
    color: #fff;
    padding: 6.5rem 0 5.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    pointer-events: none;
}

.hero-eyebrow {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.1rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.18;
    margin-bottom: .85rem;
}

.hero-tagline {
    font-size: 1.15rem;
    color: rgba(255,255,255,.72);
    font-weight: 400;
    margin-bottom: .85rem;
    max-width: 520px;
}

.hero-location {
    font-size: .88rem;
    color: rgba(255,255,255,.48);
    margin-bottom: 2.25rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.hero-ctas { display: flex; gap: .875rem; flex-wrap: wrap; margin-bottom: 3.25rem; }

.btn-hero-primary {
    background: #fff;
    color: var(--navy);
    font-weight: 600;
    font-size: .9rem;
    padding: .7rem 1.6rem;
    border-radius: var(--radius);
    border: none;
    display: inline-block;
    transition: box-shadow .2s, transform .2s;
}
.btn-hero-primary:hover {
    color: var(--navy);
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    transform: translateY(-2px);
}

.btn-hero-outline {
    background: transparent;
    color: rgba(255,255,255,.88);
    font-weight: 500;
    font-size: .9rem;
    padding: .7rem 1.6rem;
    border-radius: var(--radius);
    border: 1.5px solid rgba(255,255,255,.35);
    display: inline-block;
    transition: border-color .2s, background .2s;
}
.btn-hero-outline:hover {
    color: #fff;
    border-color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.08);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,.13);
}

.stat-num {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.stat-lbl {
    font-size: .73rem;
    color: rgba(255,255,255,.48);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: .2rem;
}

/* Hero sidebar badges */
.hero-sidebar { display: flex; flex-direction: column; gap: .85rem; }

.hero-card {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    backdrop-filter: blur(6px);
    transition: background .2s;
}
.hero-card:hover { background: rgba(255,255,255,.11); }

.hero-card-icon { font-size: 1.35rem; flex-shrink: 0; margin-top: .05rem; }
.hero-card-title { display: block; font-weight: 600; color: #fff; font-size: .88rem; }
.hero-card-sub   { font-size: .75rem; color: rgba(255,255,255,.5); }

/* ===== About ===== */
.about-section { background: var(--bg-white); }

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

.about-meta {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.about-meta li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9rem;
    color: var(--text-secondary);
}
.about-meta a { color: var(--accent); }
.about-meta a:hover { color: var(--accent-light); }

.lang-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.lang-pill {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .25rem .8rem;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.lang-pill.native { border-color: var(--accent); color: var(--accent); background: rgba(42,82,160,.06); }

/* ===== Skills ===== */
.skills-section { background: var(--bg-main); }

.skill-group-title {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.skill-bar-item { margin-bottom: 1rem; }
.skill-bar-item:last-child { margin-bottom: 0; }

.skill-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .35rem;
}
.skill-bar-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}
.skill-bar-pct {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.skill-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.skill-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--navy), var(--accent-light));
    width: 0;
    transition: width 1.1s cubic-bezier(.4,0,.2,1);
}

/* skill chips for secondary skills */
.skill-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.skill-chip {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: .28rem .8rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background .15s, border-color .15s, color .15s;
}
.skill-chip:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ===== Timeline ===== */
.timeline-section { background: var(--bg-white); }

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-white);
    box-shadow: 0 0 0 2px var(--accent);
    flex-shrink: 0;
}
.timeline-item.current .timeline-dot {
    background: var(--navy);
    box-shadow: 0 0 0 2px var(--navy);
}
.timeline-item.sub .timeline-dot {
    width: 10px;
    height: 10px;
    top: 7px;
    background: var(--border);
    box-shadow: 0 0 0 2px var(--text-muted);
}

.tl-meta {
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .2rem;
}
.tl-company {
    font-size: .83rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: .15rem;
}
.tl-role {
    font-size: 1.025rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .4rem;
}
.tl-sub-role {
    font-size: .95rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: .3rem;
}
.tl-desc {
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.6;
    margin-bottom: 0;
}
.tl-bullets {
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.65;
    padding-left: 1.1rem;
    margin: .35rem 0 0;
}
.tl-bullets li { margin-bottom: .2rem; }

.tl-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.tl-tag {
    font-size: .72rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(42,82,160,.07);
    border: 1px solid rgba(42,82,160,.18);
    padding: .18rem .6rem;
    border-radius: 12px;
}

/* nested sub-role group */
.tl-sub-group {
    margin-top: 1.25rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ===== Certifications ===== */
.cert-section { background: var(--bg-main); }

.cert-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.35rem;
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .15s;
    height: 100%;
}
.cert-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.cert-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: .1rem; }
.cert-name { font-size: .88rem; font-weight: 600; color: var(--navy); margin-bottom: .15rem; }
.cert-issuer { font-size: .75rem; color: var(--text-muted); }

/* ===== Education ===== */
.edu-section { background: var(--bg-white); }

.edu-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.6rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
    height: 100%;
}
.edu-card:hover { box-shadow: var(--shadow-md); }

.edu-degree  { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: .2rem; }
.edu-school  { font-size: .88rem; color: var(--accent); font-weight: 500; margin-bottom: .15rem; }
.edu-period  { font-size: .8rem; color: var(--text-muted); }
.edu-field   { font-size: .8rem; color: var(--text-secondary); margin-top: .25rem; }

/* ===== Projects page ===== */
.page-hero {
    background: linear-gradient(140deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    padding: 4.25rem 0 3.75rem;
}
.page-hero h1 { color: #fff; font-size: 2.25rem; margin-bottom: .5rem; }
.page-hero p  { color: rgba(255,255,255,.62); font-size: 1.025rem; margin: 0; }
.page-hero .section-label { color: rgba(255,255,255,.45); }

.project-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.pc-header {
    padding: 1.4rem 1.5rem 1.1rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: .9rem;
}
.pc-icon  { font-size: 2rem; flex-shrink: 0; }
.pc-type  { font-size: .7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.pc-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin: 0; }

.pc-body {
    padding: 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.pc-company {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.pc-desc {
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: .9rem;
}
.pc-impact {
    background: rgba(42,82,160,.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .55rem .9rem;
    font-size: .81rem;
    color: var(--text-secondary);
    margin-bottom: .9rem;
}
.pc-impact strong { color: var(--navy); }
.pc-tech { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; }
.pc-tech-tag {
    font-size: .73rem;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: .2rem .6rem;
    border-radius: 12px;
}

/* ===== Contact page ===== */
.contact-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.9rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.contact-info-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: .2rem; }
.ci-sub { color: var(--text-muted); font-size: .85rem; margin-bottom: 1.25rem; }

.ci-item {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--border);
}
.ci-item:first-of-type { padding-top: 0; }
.ci-item:last-of-type  { border-bottom: none; padding-bottom: 0; }

.ci-icon {
    font-size: 1.15rem;
    width: 38px;
    height: 38px;
    background: var(--bg-light);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ci-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: .15rem; }
.ci-value { font-size: .9rem; font-weight: 500; color: var(--text-primary); }
.ci-value a { color: var(--accent); }

.contact-form-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.9rem;
    box-shadow: var(--shadow-sm);
}
.contact-form-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin-bottom: .2rem; }

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: .35rem;
}
.form-control {
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .65rem .9rem;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42,82,160,.1);
    outline: none;
}

.btn-submit {
    background: var(--navy);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    padding: .75rem 2rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    transition: background .2s, box-shadow .2s, transform .15s;
}
.btn-submit:hover { background: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.alert-ok  { background:#f0faf5; border:1px solid #b7e4cc; color:#1a5c38; border-radius:var(--radius); padding:1rem 1.25rem; font-size:.88rem; font-weight:500; }
.alert-err { background:#fff5f5; border:1px solid #fdb8b8; color:#9b2525; border-radius:var(--radius); padding:1rem 1.25rem; font-size:.88rem; font-weight:500; }

/* ===== Footer ===== */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.5);
    padding: 1.75rem 0;
    font-size: .83rem;
}
.footer-link { color: rgba(255,255,255,.62); transition: color .15s; }
.footer-link:hover { color: #fff; }
.footer-sep { margin: 0 .55rem; color: rgba(255,255,255,.25); }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .hero-sidebar { display: none; }
}
@media (max-width: 767px) {
    .hero { padding: 4rem 0 3rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-ctas { flex-direction: column; }
    .section { padding: 3.25rem 0; }
    .section-title { font-size: 1.55rem; }
    .timeline { padding-left: 1.5rem; }
    .timeline::before { left: 5px; }
    .timeline-dot { left: -1.5rem; width: 13px; height: 13px; }
    .timeline-item.sub .timeline-dot { width: 9px; height: 9px; }
}
