/* =============================================
   DESIGN TOKENS — Tech Blue Palette
   ============================================= */
:root {
    --blue-950: #050d1a;
    --blue-900: #0a1628;
    --blue-800: #0d2040;
    --blue-700: #0f3460;
    --blue-600: #1a4a8a;
    --blue-500: #1e6fb5;
    --blue-400: #2e86de;
    --blue-300: #5ba4f5;
    --blue-200: #93c5fd;
    --blue-100: #dbeafe;
    --blue-50:  #eff6ff;

    --accent:       #00d4ff;
    --accent-glow:  rgba(0, 212, 255, 0.2);
    --accent-dim:   rgba(0, 212, 255, 0.07);

    --text-primary:   #e8f4fd;
    --text-secondary: #94b8d4;
    --text-muted:     #4a7fa5;

    --surface-1: #0a1628;
    --surface-2: #0d1e38;
    --surface-3: #122844;

    --border:     rgba(46, 134, 222, 0.2);
    --border-lg:  rgba(46, 134, 222, 0.35);

    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body:    'Inter', 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--blue-950);
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--blue-200); }

/* =============================================
   NAVBAR
   ============================================= */
.site-nav {
    background: rgba(5, 13, 26, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    z-index: 1000;
}

.brand-logo {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
}

.brand-bracket {
    color: var(--accent);
}

.site-nav .nav-link {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 1rem !important;
    transition: color 0.2s;
}

.site-nav .nav-link:hover {
    color: var(--accent) !important;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--blue-500), var(--accent));
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.25s;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--blue-400), var(--accent));
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.btn-outline-custom {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-lg);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s;
}

.btn-outline-custom:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* =============================================
   HERO
   ============================================= */
.hero-section {
    position: relative;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(15, 52, 96, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        url('../images/background.png') center / cover no-repeat fixed;
    overflow: hidden;
    min-height: 100vh;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(46, 134, 222, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 134, 222, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

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

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero-headline {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-headline:focus,
.hero-headline:focus-visible {
    outline: none;
}

.hero-accent {
    background: linear-gradient(90deg, var(--blue-300), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Code block */
.hero-code-block {
    background: var(--surface-2);
    border: 1px solid var(--border-lg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-glow), var(--shadow-card);
    width: 100%;
    max-width: 420px;
}

.code-header {
    background: var(--surface-3);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.code-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.code-dot.red    { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green  { background: #28c840; }

.code-filename {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.code-content {
    margin: 0;
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-primary);
    background: transparent;
    white-space: pre;
    overflow-x: auto;
}

.c-kw  { color: var(--blue-300); }
.c-cls { color: var(--accent); }
.c-str { color: #7ec8a0; }
.c-pu  { color: var(--text-secondary); }

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    animation: bounce 2s infinite;
}

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

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar {
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.stat-item {
    padding: 2rem 1.5rem;
    text-align: center;
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-300), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =============================================
   SECTION SHARED
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* =============================================
   CAREER SECTION
   ============================================= */
.section-career {
    padding: 6rem 0;
    background: var(--blue-950);
}

.skill-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    height: 100%;
    transition: all 0.3s;
}

.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.skill-icon {
    width: 52px; height: 52px;
    background: var(--accent-dim);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.skill-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

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

.tag {
    background: rgba(46, 134, 222, 0.12);
    border: 1px solid var(--border);
    color: var(--blue-200);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 100px;
    font-family: var(--font-mono);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -2.45rem;
    top: 0.3rem;
    width: 14px; height: 14px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.4rem;
    letter-spacing: 0.04em;
}

.timeline-role {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.timeline-company {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0;
}

/* Certifications banner */
.cert-banner {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(30, 111, 181, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cert-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

.cert-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 1;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.cert-item i {
    color: var(--accent);
    font-size: 1.1rem;
}

.cert-item strong {
    color: var(--accent);
}

.cert-divider {
    width: 1px;
    height: 24px;
    background: var(--border-lg);
}

/* Contact details */
.contact-detail {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.contact-detail i {
    color: var(--accent);
    width: 18px;
}

/* =============================================
   CAREER HIGHLIGHTS
   ============================================= */
.section-highlights {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.9) 0%, rgba(13, 30, 56, 0.9) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.highlight-card {
    background: rgba(18, 40, 68, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow-card);
}

.highlight-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-dim);
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.highlight-title {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.highlight-card h5 {
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-200);
    margin: 1.2rem 0 0.5rem;
}

.highlight-card ul {
    margin: 0;
    padding-left: 1.15rem;
}

.highlight-card li {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0.4rem;
}

/* =============================================
   PERSONAL SECTION
   ============================================= */
.section-personal {
    padding: 6rem 0;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.personal-card {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s;
}

.personal-card:hover {
    border-color: var(--blue-400);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(46, 134, 222, 0.15);
}

.personal-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.personal-card h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.personal-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0;
}

/* =============================================
   NEWS SECTION
   ============================================= */
.section-news {
    padding: 6rem 0;
    background: var(--blue-950);
}

.news-source-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.news-tab {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
}

.news-tab:hover {
    border-color: var(--blue-400);
    color: var(--text-primary);
}

.news-tab.active {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    border-color: var(--blue-400);
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 111, 181, 0.4);
}

.news-loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

.news-loading p { margin-top: 1rem; }

.news-error {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.news-error i { font-size: 2rem; color: var(--text-muted); margin-bottom: 1rem; display: block; }
.news-error-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.news-fallback-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

.news-fallback-btn {
    background: var(--surface-2);
    border: 1px solid var(--border-lg);
    color: var(--blue-200);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.news-fallback-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.news-card-link {
    display: block;
    text-decoration: none;
    height: 100%;
    color: inherit;
}

.news-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.news-card:hover {
    border-color: var(--blue-400);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(46, 134, 222, 0.2);
}

.news-card-source {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-card-desc {
    color: var(--text-secondary);
    font-size: 0.87rem;
    flex: 1;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
    margin-top: auto;
}

.news-card-date { color: var(--text-muted); }
.news-card-read { color: var(--accent); font-weight: 600; }

/* =============================================
   CONTACT SECTION
   ============================================= */
.section-contact {
    padding: 6rem 0;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
}

.contact-box {
    background: linear-gradient(135deg, var(--surface-3) 0%, rgba(15, 52, 96, 0.4) 100%);
    border: 1px solid var(--border-lg);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    box-shadow: var(--shadow-glow);
}

.contact-title {
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    margin-bottom: 1rem;
}

.contact-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    background: var(--blue-900);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 2rem;
}

.footer-brand {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 0.3rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: color 0.2s;
}

.footer-link:hover { color: var(--accent); }

.footer-divider {
    border-color: var(--border);
    margin: 1.5rem 0 1rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
    .stat-item:last-child { border-bottom: none; }
    .contact-box { padding: 2rem 1.5rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn-primary-custom,
    .hero-actions .btn-outline-custom { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

.hero-side-rail {
    position: relative;
}

.hero-portrait-wrap {
    width: 100%;
    max-width: 360px;
    position: relative;
    border-radius: var(--radius-md);
    padding: 0.6rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(10, 22, 40, 0.7));
    border: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(5, 13, 26, 0.45);
}

.hero-portrait-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(to top, rgba(5, 13, 26, 0.5), rgba(5, 13, 26, 0.05));
    pointer-events: none;
}

.hero-portrait {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border-lg);
    box-shadow: var(--shadow-card);
    filter: grayscale(100%) contrast(1.08) brightness(0.92);
}

.hero-side-rail .hero-code-block {
    max-width: 360px;
}
