/* =========================================
   1. VARIABLES & SYSTEM DEFAULTS
   ========================================= */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8fafc;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --text-main: #334155;
    --text-light: #64748b;
    --text-dark: #0f172a;
    --white: #ffffff;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-subtle: #eff6ff;
    --border: #e2e8f0;
    --border-dark: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* Sections */
section {
    padding: 6rem 0;
}
.section-light { 
    background-color: var(--primary-bg); 
}
.section-gray { 
    background-color: var(--secondary-bg); 
    border-top: 1px solid var(--border); 
    border-bottom: 1px solid var(--border); 
}
.section-dark { 
    background-color: var(--dark-bg); 
    color: var(--white); 
}
.section-dark h2, 
.section-dark h3, 
.section-dark h4 { 
    color: var(--white); 
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}
.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}
.header-line {
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin: 0 auto;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 0.5rem;
    font-size: 0.95rem;
}
.btn-primary { 
    background-color: var(--accent); 
    color: var(--white); 
}
.btn-primary:hover { 
    background-color: var(--accent-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-secondary { 
    background-color: transparent; 
    color: var(--white); 
    border: 1px solid rgba(255, 255, 255, 0.3); 
}
.btn-secondary:hover { 
    background-color: rgba(255, 255, 255, 0.08); 
    border-color: var(--white);
    transform: translateY(-2px); 
}

/* =========================================
   2. STICKY NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}
nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    transition: var(--transition);
    letter-spacing: -0.03em;
}
nav.scrolled .logo { 
    color: var(--text-dark); 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.25rem 0;
    position: relative;
}
nav.scrolled .nav-links a { 
    color: var(--text-main); 
}
.nav-links a:hover, 
.nav-links a.active { 
    color: var(--accent); 
}
nav.scrolled .nav-links a.active {
    color: var(--accent);
}

.mobile-menu-icon { 
    display: none; 
    color: var(--white); 
    font-size: 1.35rem; 
    cursor: pointer; 
}
nav.scrolled .mobile-menu-icon { 
    color: var(--text-dark); 
}

/* =========================================
   3. HERO SECTION (WITH PROFILE IMAGE)
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 6rem;
    padding-bottom: 4rem;
}
.hero-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 2;
    width: 100%;
}
.hero-content {
    flex: 1;
    max-width: 720px;
}
.hero-title { 
    font-size: 3.25rem; 
    margin-bottom: 0.5rem; 
    letter-spacing: -0.03em; 
}
.hero-subtitle { 
    font-size: 1.25rem; 
    font-weight: 400; 
    color: #cbd5e1; 
    margin-bottom: 1.75rem; 
}
.highlight { 
    color: #60a5fa; 
    font-weight: 600; 
}
.hero-statement { 
    font-size: 1.1rem; 
    color: #94a3b8; 
    margin-bottom: 2.25rem; 
    line-height: 1.8; 
}
.hero-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    color: #cbd5e1;
}
.hero-contact-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hero-contact-info i {
    color: var(--accent);
}
.hero-cta { 
    display: flex; 
    gap: 1rem; 
}

/* Executive Hero Image Frame */
.hero-image-wrapper {
    flex-shrink: 0;
    position: relative;
}
.hero-image-frame {
    position: relative;
    padding: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(37, 99, 235, 0.3));
    border-radius: 12px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(37, 99, 235, 0.15);
}
.hero-profile-img {
    width: 310px;
    height: 380px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background-color: var(--dark-surface);
}

/* =========================================
   4. ABOUT SECTION
   ========================================= */
.about-content { 
    max-width: 900px; 
    margin: 0 auto; 
    text-align: center; 
}
.lead-text { 
    font-size: 1.25rem; 
    color: var(--text-dark); 
    margin-bottom: 1.5rem; 
    line-height: 1.7;
}
.about-content p { 
    margin-bottom: 1.5rem; 
    font-size: 1.05rem; 
    color: var(--text-main);
}
.about-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 3rem;
}
.badge {
    background: var(--accent-subtle);
    color: var(--accent);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}
.badge-lg { 
    font-size: 0.95rem; 
    padding: 0.65rem 1.35rem; 
}

/* =========================================
   5. CORE EXPERTISE
   ========================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.card:hover { 
    transform: translateY(-4px); 
    box-shadow: var(--shadow-lg); 
}
.expertise-card i { 
    font-size: 2.25rem; 
    color: var(--accent); 
    margin-bottom: 1.5rem; 
}
.expertise-card h3 { 
    margin-bottom: 0.85rem; 
    font-size: 1.2rem; 
}
.expertise-card p { 
    color: var(--text-light); 
    font-size: 0.95rem; 
    line-height: 1.65;
}

/* =========================================
   6. CAREER TIMELINE
   ========================================= */
.timeline-subtitle { 
    text-align: center; 
    font-size: 0.825rem; 
    font-weight: 600; 
    color: var(--text-light); 
    letter-spacing: 1px; 
    margin-top: 1.25rem; 
}
.timeline-subtitle i { 
    font-size: 0.75rem; 
    margin: 0 0.5rem; 
    color: var(--border); 
}
.timeline { 
    position: relative; 
    max-width: 900px; 
    margin: 4rem auto 0; 
    padding-left: 2.5rem; 
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border);
}
.timeline-item { 
    position: relative; 
    margin-bottom: 2.5rem; 
}
.timeline-item:last-child { 
    margin-bottom: 0; 
}
.timeline-dot {
    position: absolute;
    left: -2.85rem;
    top: 1.75rem;
    width: 0.85rem;
    height: 0.85rem;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--primary-bg);
}
.timeline-content { 
    padding: 2rem; 
}
.timeline-date { 
    color: var(--accent); 
    font-weight: 600; 
    font-size: 0.875rem; 
    margin-bottom: 0.5rem; 
}
.timeline-content h3 { 
    font-size: 1.2rem; 
    margin-bottom: 0.25rem; 
}
.timeline-content h4 { 
    font-size: 0.95rem; 
    color: var(--text-light); 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
}
.timeline-content .location { 
    font-size: 0.85rem; 
    color: #94a3b8; 
    margin-bottom: 1rem; 
}
.timeline-content ul { 
    padding-left: 1.25rem; 
    color: var(--text-main); 
    font-size: 0.95rem; 
}
.timeline-content li { 
    margin-bottom: 0.4rem; 
}

/* =========================================
   7. ENTERPRISE ARCHITECTURE
   ========================================= */
.enterprise-architecture {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 900px;
    margin: 0 auto;
}
.arch-layer {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 100%;
    padding: 1.25rem;
    text-align: center;
    border-radius: 6px;
}
.arch-layer h4 { 
    font-size: 1.15rem; 
    font-weight: 500; 
    letter-spacing: 0.5px; 
}
.arch-arrow { 
    font-size: 1.25rem; 
    color: #475569; 
}
.arch-core { 
    width: 100%; 
    border: 1px dashed rgba(255, 255, 255, 0.18); 
    padding: 2rem; 
    border-radius: 8px; 
    background: rgba(255, 255, 255, 0.01);
}
.system-nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.sys-node {
    background: var(--white);
    color: var(--dark-bg);
    padding: 0.9rem;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.9rem;
}
.integration-bar {
    background: var(--accent);
    color: var(--white);
    padding: 0.9rem;
    text-align: center;
    font-weight: 600;
    border-radius: 4px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* =========================================
   8. SKILLS SECTION
   ========================================= */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}
.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.skill-category h3 i { 
    color: var(--accent); 
}
.skill-tags { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.65rem; 
}
.skill-tags span {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.skill-tags span:hover { 
    border-color: var(--accent); 
    color: var(--accent);
}

/* =========================================
   9. PHILOSOPHY SECTION
   ========================================= */
.philosophy-quote {
    max-width: 820px;
    margin: 0 auto 3.5rem;
    text-align: center;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.8;
}
.philosophy-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    text-align: center;
}
.pillar-icon {
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--accent);
    box-shadow: var(--shadow);
}
.pillar h3 { 
    margin-bottom: 0.75rem; 
    font-size: 1.2rem; 
}
.pillar p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* =========================================
   10. EDUCATION SECTION
   ========================================= */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.edu-card {
    background: var(--white);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.edu-icon { 
    font-size: 2rem; 
    color: var(--border); 
    position: absolute; 
    right: 1.5rem; 
    top: 1.5rem; 
    opacity: 0.5; 
}
.edu-card h3 { 
    font-size: 1.1rem; 
    margin-bottom: 0.5rem; 
    padding-right: 2rem; 
}
.edu-card .major { 
    color: var(--text-main); 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
    font-size: 0.9rem; 
}
.edu-card .school { 
    color: var(--text-light); 
    font-size: 0.85rem; 
    margin-bottom: 1rem; 
}
.edu-card .status { 
    margin-top: 0.5rem; 
}

/* =========================================
   11. HIGHLIGHTS SECTION
   ========================================= */
.highlights-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    max-width: 1000px;
    margin: 0 auto;
}
.highlight-item {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    color: var(--text-dark);
}

/* =========================================
   12. CONTACT & FOOTER
   ========================================= */
.contact-wrapper { 
    text-align: center; 
    max-width: 720px; 
    margin: 0 auto; 
}
.contact-subhead { 
    font-size: 1.1rem; 
    color: #cbd5e1; 
    margin: 1.25rem 0 2.5rem; 
    line-height: 1.7;
}
.contact-details { 
    margin-bottom: 2.5rem; 
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem; 
    border-radius: 8px; 
}
.contact-details p { 
    margin-bottom: 0.65rem; 
    font-size: 1.05rem; 
}
.contact-details i {
    color: var(--accent);
    margin-right: 0.5rem;
}
.contact-actions { 
    display: flex; 
    justify-content: center; 
    gap: 1rem; 
    margin-bottom: 2.5rem; 
}
.social-links { 
    display: flex; 
    justify-content: center; 
    gap: 1.5rem; 
}
.social-links a { 
    color: var(--white); 
    font-size: 1.4rem; 
    transition: var(--transition); 
    opacity: 0.7; 
}
.social-links a:hover { 
    opacity: 1; 
    color: var(--accent); 
}

footer {
    background: #020617;
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-role { 
    color: #94a3b8; 
    font-size: 0.875rem; 
    margin: 0.5rem 0 1.25rem; 
}
.copyright { 
    color: #64748b; 
    font-size: 0.8rem; 
}

/* =========================================
   13. ANIMATIONS & ACCESSIBILITY
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Inline SVG icon sizing and spinner animation */
.inline-icon {
    width: 1.25em;
    height: 1.25em;
    vertical-align: middle;
    display: inline-block;
}
.inline-icon.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

.edu-icon .inline-icon { width: 2rem; height: 2rem; color: var(--border); position: absolute; right: 1.5rem; top: 1.5rem; opacity: 0.5; }

/* Print styles: A4 friendly layout */
@page { size: A4; margin: 10mm; }

@media print {
    /* General cleanup */
    body { background: #fff !important; color: #111 !important; }
    nav, .mobile-menu-icon, .nav-links, footer, .social-links, .btn, .hero-cta { display: none !important; }
    .container { padding-left: 8px !important; padding-right: 8px !important; }
    /* Compact spacing */
    header, section { padding: 8px 6px !important; }
    h1 { font-size: 20pt; margin: 6px 0 !important; }
    h2 { font-size: 14pt; margin: 6px 0 !important; }
    h3 { font-size: 11pt; margin: 4px 0 !important; }
    p, li { font-size: 10pt !important; line-height: 1.15 !important; }

    /* Make profile image small and inline */
    .hero-image-wrapper, .hero-image-frame { float: right !important; margin-left: 8px !important; }
    .hero-profile-img { width: 110px !important; height: 110px !important; object-fit: cover !important; border-radius: 8px !important; }

    /* Ensure cards and timeline fit on page */
    .grid-cards, .skills-container, .education-grid, .highlights-grid { display: block !important; }
    .card { box-shadow: none !important; margin: 6px 0 !important; }

    /* Remove backgrounds that waste ink */
    .section-dark, .section-gray { background: transparent !important; }
}

@media (prefers-reduced-motion: reduce) {
    * { 
        animation-duration: 0.01ms !important; 
        animation-iteration-count: 1 !important; 
        transition-duration: 0.01ms !important; 
        scroll-behavior: auto !important; 
    }
    .fade-in-up { 
        opacity: 1; 
        transform: none; 
    }
}

/* =========================================
   14. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.75rem; }
    .hero-container { gap: 2.5rem; }
    .hero-profile-img { width: 260px; height: 320px; }
    .nav-links { gap: 1.25rem; }
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 2.5rem;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-profile-img {
        width: 220px;
        height: 220px;
        border-radius: 50%;
    }
    .hero-image-frame {
        border-radius: 50%;
    }
    .hero-contact-info, .hero-cta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 0;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { 
        display: flex; 
    }
    .nav-links a { 
        color: var(--text-dark); 
        padding: 1rem 2rem; 
        display: block; 
        border-bottom: 1px solid var(--border); 
    }
    .mobile-menu-icon { 
        display: block; 
    }
    
    nav { 
        background: var(--white); 
        padding: 1rem 0; 
        box-shadow: var(--shadow-sm);
    }
    .logo, .mobile-menu-icon { 
        color: var(--text-dark); 
    }

    .hero {
        padding-top: 6rem;
        min-height: auto;
    }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1.15rem; }
    .hero-contact-info { flex-direction: column; gap: 0.65rem; }
    .hero-cta { flex-direction: column; }
    
    .timeline { padding-left: 1.75rem; margin-top: 2.5rem; }
    .timeline-dot { left: -2.25rem; }
    .timeline-content { padding: 1.5rem; }
    
    .timeline-subtitle { display: flex; flex-direction: column; gap: 0.4rem; }
    .timeline-subtitle i { transform: rotate(90deg); margin: 0 auto; }
}

@media (max-width: 430px) {
    .container { padding: 0 1.25rem; }
    .hero-title { font-size: 1.85rem; }
    .section-header h2 { font-size: 1.75rem; }
    .contact-actions { flex-direction: column; }
    .grid-cards, .skills-container, .education-grid {
        grid-template-columns: 1fr;
    }

    /* Hide large hero image on very small phones to reduce layout noise */
    .hero-image-wrapper { display: none; }
}