/* ===================================================
   STRATEGIC RESUME — Midnight / Teal Theme
   =================================================== */

/* --- Design Tokens --- */
:root {
    --bg:           #0d1117;
    --bg-card:      #161b22;
    --bg-elevated:  #1c2129;
    --border:       #30363d;
    --text:         #c9d1d9;
    --text-muted:   #8b949e;
    --heading:      #e6edf3;
    --accent:       #00bcd4;
    --accent-dim:   rgba(0, 188, 212, .15);
    --accent-glow:  rgba(0, 188, 212, .35);
    --accent-alt:   #007AFF;
    --success:      #3fb950;
    --warn:         #d29922;
    --error:        #f85149;
    --radius:       10px;
    --font:         'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition:   .25s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width:100%; display:block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #4dd0e1; }
strong { color: var(--heading); font-weight: 600; }

/* --- Scrollbar (Chromium) --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ==========  SYNAPSE REACTIVE ELEMENT  ========== */
.synapse {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: .35;
    transition: opacity var(--transition), transform var(--transition);
    pointer-events: none;
}
.synapse.active { opacity: 1; transform: scale(1.15); }
.synapse.error .synapse-core { fill: var(--error); }
.synapse.error .synapse-ring { stroke: var(--error); }

.synapse-svg { overflow: visible; }
.synapse-core { fill: var(--accent); transition: fill .15s; }
.synapse-ring { stroke: var(--accent); opacity: .4; transition: stroke .15s, opacity .3s; }
.synapse.active .synapse-ring { opacity: 1; animation: synapse-pulse 1.6s ease-in-out infinite; }
.synapse-dendrite { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: .25; transition: opacity .15s; }
.synapse.active .synapse-dendrite { opacity: 1; animation: dendrite-glow 1.2s ease-in-out infinite alternate; }

.synapse-label {
    font-size: .7rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .3s, transform .3s;
}
.synapse.active .synapse-label { opacity: 1; transform: translateX(0); }

@keyframes synapse-pulse {
    0%,100% { r: 10; opacity: .4; }
    50%     { r: 13; opacity: .8; }
}
@keyframes dendrite-glow {
    from { opacity: .3; }
    to   { opacity: 1; }
}

/* ==========  NAVIGATION  ========== */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: rgba(13,17,23,.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 800;
    transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.4); }
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.nav-brand {
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: 3px;
    color: var(--heading);
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}
.nav-links a {
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .5px;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 2px;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active-link { color: var(--heading); }
.nav-links a:hover::after, .nav-links a.active-link::after { width: 100%; }

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: var(--transition);
}

/* ==========  HERO  ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.parallax-bg {
    position: absolute;
    inset: -60px;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0,188,212,.08) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(0,122,255,.06) 0%, transparent 60%);
    z-index: 0;
}
.hero-content { position: relative; z-index: 1; padding: 0 24px; max-width: 740px; }

.hero-tagline {
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.hero-name {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    color: var(--heading);
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto 36px;
}

/* Hero KPI strip */
.hero-metrics {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
}
.hero-metric { text-align: center; }
.hero-metric-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading);
}
.hero-metric-label {
    font-size: .72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Buttons */
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 26px;
    font-family: var(--font);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .5px;
    border-radius: 6px;
    transition: all var(--transition);
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #0d1117;
    border: none;
}
.btn-primary:hover { background: #26c6da; color: #0d1117; transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-glow); }
.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-dim); transform: translateY(-1px); }

/* ==========  FADE-UP ANIMATION (L1)  ========== */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease-out, transform .6s ease-out;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .35s; }
.delay-4 { transition-delay: .5s; }

/* ==========  TWO-COLUMN LAYOUT  ========== */
.layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    align-items: start;
}
.col-side { position: sticky; top: 72px; }

/* ==========  SECTIONS (shared)  ========== */
.section {
    padding: 56px 0 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s ease-out, transform .5s ease-out;
}
.section.in-view { opacity: 1; transform: translateY(0); }
.section-full { max-width: 1200px; margin: 0 auto; padding: 56px 24px 48px; }

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--heading);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 10px;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 36px; height: 3px;
    background: var(--accent);
    border-radius: 2px;
}
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

/* About */
.about-text { color: var(--text-muted); font-size: .95rem; max-width: 620px; }

/* ==========  TIMELINE  ========== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 7px;
    width: 2px;
    background: var(--border);
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .45s ease-out, transform .45s ease-out;
}
.timeline-item.in-view { opacity: 1; transform: translateY(0); }
.timeline-marker {
    position: absolute;
    left: -28px; top: 4px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: background var(--transition), box-shadow var(--transition);
}
.timeline-item.in-view .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}
.timeline-date {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 2px;
}
.timeline-company {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.timeline-achievements {
    list-style: none;
    padding: 0;
}
.timeline-achievements li {
    position: relative;
    padding-left: 16px;
    font-size: .88rem;
    color: var(--text);
    margin-bottom: 6px;
}
.timeline-achievements li::before {
    content: '';
    position: absolute;
    left: 0; top: 9px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* ==========  PROJECT GRID  ========== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,188,212,.1);
}
.project-icon {
    color: var(--accent);
    margin-bottom: 14px;
}
.project-card h3 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 8px;
}
.project-card p {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tags span {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .5px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--accent-dim);
    color: var(--accent);
}

/* ==========  RENDER LAB (LIGHTWEIGHT 3D)  ========== */
.render-lab-card {
    background: linear-gradient(160deg, rgba(22, 27, 34, 0.95), rgba(12, 18, 24, 0.95));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02), 0 10px 24px rgba(0,0,0,0.28);
}

#render-canvas {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: radial-gradient(circle at 20% 20%, rgba(0,188,212,0.08), rgba(0,0,0,0));
}

/* ==========  SKILL SECTION  ========== */
.skill-chart {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
#skill-canvas { display: block; }

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.badge {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition), color var(--transition);
}
.badge::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0%;
    background: var(--accent-dim);
    transition: width .8s ease-out;
    z-index: 0;
}
.badge.animated::before { width: var(--bar-width, 0%); }
.badge.animated { border-color: var(--accent); color: var(--heading); }
.badge > * { position: relative; z-index: 1; }

/* ==========  HOSTING CARD  ========== */
.hosting-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.hosting-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: scan-line 4s linear infinite;
}
@keyframes scan-line {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hosting-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--heading);
}
.status-dot-live {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: dot-pulse 2s ease-in-out infinite;
}
.status-dot-live.warn { background: var(--warn); }
.status-dot-live.error { background: var(--error); }

@keyframes dot-pulse {
    0%,100% { opacity: 1; }
    50%     { opacity: .4; }
}

.hosting-specs { margin: 0; }
.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(48,54,61,.6);
    font-size: .78rem;
}
.spec-row dt { color: var(--text-muted); font-weight: 500; }
.spec-row dd { color: var(--heading); font-weight: 600; text-align: right; }

.hosting-note {
    margin-top: 14px;
    font-size: .68rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========  EDUCATION & CERTS  ========== */
.edu-item h3 { font-size: .9rem; font-weight: 600; color: var(--heading); }
.edu-item p  { font-size: .82rem; color: var(--text-muted); }

.cert-list {
    list-style: none;
    padding: 0;
}
.cert-list li {
    font-size: .82rem;
    color: var(--text);
    padding: 6px 0;
    border-bottom: 1px solid rgba(48,54,61,.4);
}

/* ==========  CREDENTIALS (living resume)  ========== */
.credential-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.credential-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.credential-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,188,212,.1);
}
.credential-card h3 {
    font-size: .92rem;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 6px;
}
.credential-meta {
    font-size: .78rem;
    color: var(--accent);
    letter-spacing: .4px;
    margin-bottom: 10px;
}
.credential-note {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.credential-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
}
.credential-link:hover { color: #4dd0e1; }

.section-note {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--text-muted);
}
.snapshot-text { font-size: .82rem; color: var(--text-muted); }

.project-card h3 a { color: var(--heading); }
.project-card h3 a:hover { color: var(--accent); }

/* ==========  CONTACT  ========== */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.contact-link svg { color: var(--accent); }
.contact-link:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--heading);
    transform: translateY(-2px);
}

/* ==========  FOOTER  ========== */
.footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    color: var(--text-muted);
}
.footer-status { display: flex; align-items: center; gap: 8px; }

/* ==========  RESPONSIVE  ========== */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .col-side {
        position: static;
    }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 56px; left: 0; right: 0;
        background: rgba(13,17,23,.97);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-toggle { display: flex; }
    .hero-metrics { gap: 24px; }
    .hero-metric-value { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .hero-metrics { flex-direction: column; gap: 16px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .project-grid { grid-template-columns: 1fr; }
    .contact-links { flex-direction: column; align-items: center; }
}

/* ==========  PERFORMANCE HINTS  ========== */
.synapse,
.fade-up,
.section,
.timeline-item,
.parallax-bg {
    will-change: transform, opacity;
}
.hosting-card::before {
    will-change: transform;
}
