/* =============================================
   Design Tokens
   ============================================= */
:root {
    --bg: #ffffff;
    --bg-2: #f9fafb;
    --bg-3: #f3f4f6;
    --border: #e5e7eb;
    --border-2: #d1d5db;
    --text-1: #111827;
    --text-2: #6b7280;
    --text-3: #9ca3af;
    /* Primary */
    --accent: #4f46e5;
    --accent-bg: #eef2ff;
    --accent-hover: #4338ca;
    /* AI / Purple */
    --ai: #7c3aed;
    --ai-bg: #f5f3ff;
    /* Cyan */
    --cyan: #0891b2;
    --cyan-bg: #ecfeff;
    /* Emerald */
    --emerald: #059669;
    --emerald-bg: #ecfdf5;
    /* Rose */
    --rose: #e11d48;
    --rose-bg: #fff1f2;
    /* Amber */
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --radius: 12px;
    --radius-s: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

/* =============================================
   Navbar
   ============================================= */
.navbar {
    position: fixed;
    top: 0; width: 100%; z-index: 100;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07); }

.nav-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 0 2rem; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
    font-size: 1.4rem; font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--ai));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none; letter-spacing: -0.5px;
}

.nav-links { list-style: none; display: flex; gap: 2px; }
.nav-links a {
    display: block; padding: 0.4rem 0.8rem;
    font-size: 0.875rem; font-weight: 500;
    color: var(--text-2); text-decoration: none;
    border-radius: var(--radius-s);
    transition: all 0.18s ease;
}
.nav-links a:hover { color: var(--text-1); background: var(--bg-3); }

.nav-cta {
    padding: 0.45rem 1.1rem;
    background: var(--accent); color: white;
    border: none; border-radius: var(--radius-s);
    font-size: 0.85rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: all 0.2s;
}
.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79,70,229,0.3);
}

/* =============================================
   Layout
   ============================================= */
.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

.section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.sec-title {
    font-size: 1.6rem; font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.sec-title::before {
    content: '';
    display: block; width: 4px; height: 1.5rem;
    background: linear-gradient(180deg, var(--accent), var(--ai));
    border-radius: 2px;
    flex-shrink: 0;
}

.sub-title {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-1); margin-bottom: 1.25rem;
}

/* =============================================
   Hero
   ============================================= */
.hero-section {
    padding: 4.5rem 0 2.5rem;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 25%, #ecfeff 60%, #f9fafb 100%);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; top: -80px; right: -80px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute; bottom: -60px; left: 30%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(8,145,178,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-layout {
    display: flex; gap: 2.5rem; align-items: flex-start;
}

.hero-avatar {
    flex-shrink: 0;
    width: 110px; height: 130px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    align-self: flex-start;
    margin-top: 1.5rem;
}

.hero-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: var(--accent-bg); color: var(--accent);
    border-radius: 20px; font-size: 0.78rem; font-weight: 600;
    margin-bottom: 0.75rem;
}
.badge-dot {
    width: 6px; height: 6px;
    background: #10b981; border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16,185,129,0.3);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(16,185,129,0.3); }
    50% { box-shadow: 0 0 0 5px rgba(16,185,129,0.1); }
}

.hero-name {
    font-size: 3.2rem; font-weight: 800;
    letter-spacing: -2px; line-height: 1.08;
    margin-bottom: 0.4rem;
}

.hero-sub {
    font-size: 1.05rem; color: var(--accent);
    font-weight: 600; margin-bottom: 0.9rem;
}

.hero-desc {
    font-size: 0.95rem; color: var(--text-2);
    line-height: 1.65; margin-bottom: 1.1rem;
    max-width: 560px;
}

.hero-tags {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.htag {
    padding: 0.28rem 0.7rem;
    background: var(--bg-3); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 6px; font-size: 0.78rem; font-weight: 500;
    transition: all 0.2s;
}
.htag:hover { background: var(--accent-bg); color: var(--accent); border-color: rgba(79,70,229,0.3); }

.contact-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }

.contact-btn {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    background: white; border: 1.5px solid var(--border);
    border-radius: var(--radius-s);
    font-size: 0.865rem; font-weight: 500;
    color: var(--text-1); cursor: pointer; font-family: inherit;
    transition: all 0.2s;
}
.contact-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.contact-btn.revealed {
    border-color: #10b981; color: #065f46;
    background: #f0fdf4; font-weight: 600;
}
.contact-btn i { font-size: 0.8rem; color: var(--text-2); }
.contact-btn.revealed i { color: #10b981; }

.social-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.slink {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.38rem 0.8rem;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-s);
    color: var(--text-2); font-size: 0.78rem; font-weight: 500;
    text-decoration: none; transition: all 0.2s;
}
.slink:hover {
    background: var(--text-1); color: white;
    border-color: var(--text-1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.slink i { font-size: 0.8rem; }

/* =============================================
   Education
   ============================================= */
.edu-card {
    display: grid; grid-template-columns: auto 1fr;
    gap: 2rem; padding: 1.5rem;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); transition: box-shadow 0.25s;
}
.edu-card:hover { box-shadow: var(--shadow-lg); }

.edu-left { display: flex; align-items: flex-start; gap: 1rem; }

.edu-logo {
    flex-shrink: 0; width: 50px; height: 50px;
    background: linear-gradient(135deg, #1a56db, #0e9f6e);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 800; color: white; letter-spacing: -0.5px;
}

.edu-school { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.2rem; }
.edu-degree { font-size: 0.875rem; color: var(--text-2); margin-bottom: 0.25rem; }
.edu-date { font-size: 0.8rem; color: var(--accent); font-weight: 600; }

.edu-right { display: flex; flex-direction: column; gap: 0.7rem; }

.edu-item {
    display: flex; align-items: flex-start; gap: 0.6rem;
    font-size: 0.875rem; color: var(--text-2);
}
.edu-item i { color: var(--accent); margin-top: 3px; flex-shrink: 0; width: 16px; }

/* =============================================
   Competencies
   ============================================= */
.comp-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem; margin-bottom: 1.25rem;
}

.comp-card {
    padding: 1.25rem;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all 0.25s;
}
.comp-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
    transform: translateY(-2px);
}

.comp-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; margin-bottom: 0.7rem;
}
.comp-card:nth-child(1) .comp-icon { background: var(--accent-bg);  color: var(--accent); }
.comp-card:nth-child(2) .comp-icon { background: var(--cyan-bg);    color: var(--cyan); }
.comp-card:nth-child(3) .comp-icon { background: var(--rose-bg);    color: var(--rose); }
.comp-card:nth-child(4) .comp-icon { background: var(--emerald-bg); color: var(--emerald); }

.comp-card:nth-child(1):hover { border-color: var(--accent);   box-shadow: 0 0 0 3px var(--accent-bg); }
.comp-card:nth-child(2):hover { border-color: var(--cyan);     box-shadow: 0 0 0 3px var(--cyan-bg); }
.comp-card:nth-child(3):hover { border-color: var(--rose);     box-shadow: 0 0 0 3px var(--rose-bg); }
.comp-card:nth-child(4):hover { border-color: var(--emerald);  box-shadow: 0 0 0 3px var(--emerald-bg); }

.comp-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.comp-card p { font-size: 0.83rem; color: var(--text-2); line-height: 1.6; }

/* Tech Stack */
.tech-wrap { margin-top: 1.25rem; }

.tech-groups { display: flex; flex-direction: column; gap: 0.5rem; }

.tech-row { display: flex; align-items: flex-start; gap: 1rem; }

.tg-label {
    flex-shrink: 0; width: 130px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--text-3); text-transform: uppercase;
    letter-spacing: 0.06em; padding-top: 0.35rem;
}

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

.tt {
    padding: 0.28rem 0.65rem;
    background: var(--bg-3); color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 6px; font-size: 0.78rem; font-weight: 500;
    transition: all 0.18s;
}
.tt:hover { background: var(--accent-bg); color: var(--accent); border-color: rgba(79,70,229,0.3); }
.tt.primary { background: var(--accent-bg); color: var(--accent); border-color: rgba(79,70,229,0.25); font-weight: 600; }
.tt.ai { background: var(--ai-bg); color: var(--ai); border-color: rgba(124,58,237,0.25); font-weight: 600; }
/* Tech row label colors */
.tech-row:nth-child(1) .tg-label { color: var(--accent); }
.tech-row:nth-child(2) .tg-label { color: var(--cyan); }
.tech-row:nth-child(3) .tg-label { color: var(--ai); }
.tech-row:nth-child(4) .tg-label { color: var(--emerald); }
.tech-row:nth-child(5) .tg-label { color: var(--rose); }

/* =============================================
   Timeline (Experience)
   ============================================= */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
    content: '';
    position: absolute; left: 0; top: 10px; bottom: 10px;
    width: 1px; background: var(--border);
}

.tl-item { position: relative; margin-bottom: 1rem; }

/* Per-company color theming */
.tl-item:nth-child(1) .tl-dot { background: var(--accent);  box-shadow: 0 0 0 2px var(--accent); }
.tl-item:nth-child(2) .tl-dot { background: var(--rose);    box-shadow: 0 0 0 2px var(--rose); }
.tl-item:nth-child(3) .tl-dot { background: var(--emerald); box-shadow: 0 0 0 2px var(--emerald); }

.tl-dot {
    position: absolute; left: -2rem; top: 1.75rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.tl-card {
    padding: 1.35rem 1.5rem;
    background: var(--bg-2); border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: var(--radius); transition: all 0.25s;
}
.tl-item:nth-child(1) .tl-card { border-left-color: var(--accent); }
.tl-item:nth-child(2) .tl-card { border-left-color: var(--rose); }
.tl-item:nth-child(3) .tl-card { border-left-color: var(--emerald); }

.tl-item:nth-child(1) .tl-card:hover { box-shadow: 0 4px 20px rgba(79,70,229,0.12); }
.tl-item:nth-child(2) .tl-card:hover { box-shadow: 0 4px 20px rgba(225,29,72,0.12); }
.tl-item:nth-child(3) .tl-card:hover { box-shadow: 0 4px 20px rgba(5,150,105,0.12); }

/* Per-company badge colors */
.tl-item:nth-child(1) .co-badge { background: var(--accent-bg);  color: var(--accent); }
.tl-item:nth-child(2) .co-badge { background: var(--rose-bg);    color: var(--rose); }
.tl-item:nth-child(3) .co-badge { background: var(--emerald-bg); color: var(--emerald); }

.tl-item:nth-child(1) .tl-period { background: var(--accent-bg);  color: var(--accent); }
.tl-item:nth-child(2) .tl-period { background: var(--rose-bg);    color: var(--rose); }
.tl-item:nth-child(3) .tl-period { background: var(--emerald-bg); color: var(--emerald); }

.tl-item:nth-child(1) .tl-list li::before { background: var(--accent); }
.tl-item:nth-child(2) .tl-list li::before { background: var(--rose); }
.tl-item:nth-child(3) .tl-list li::before { background: var(--emerald); }

.tl-header {
    display: flex; align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tl-company { display: flex; align-items: center; gap: 0.6rem; }

.co-name { font-size: 1.1rem; font-weight: 700; }

.co-badge {
    padding: 0.18rem 0.6rem;
    background: var(--accent-bg); color: var(--accent);
    border-radius: 5px; font-size: 0.73rem; font-weight: 600;
}

.tl-period {
    font-size: 0.8rem; font-weight: 600; color: var(--accent);
    background: var(--accent-bg); padding: 0.22rem 0.6rem; border-radius: 5px;
}

.tl-role { font-size: 0.875rem; color: var(--text-2); margin-bottom: 0.75rem; line-height: 1.6; }

.tl-list { list-style: none; margin-bottom: 1rem; }

.tl-list li {
    font-size: 0.84rem; color: var(--text-2);
    padding: 0.35rem 0 0.35rem 1rem;
    border-bottom: 1px solid var(--border);
    position: relative; line-height: 1.6;
}
.tl-list li:last-child { border-bottom: none; }
.tl-list li::before {
    content: '';
    position: absolute; left: 0; top: 52%;
    transform: translateY(-50%);
    width: 4px; height: 4px;
    background: var(--accent); border-radius: 50%;
}
.tl-list li strong { color: var(--text-1); }

.tl-honor {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.38rem 0.85rem;
    background: #fef3c7; color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 6px; font-size: 0.78rem; font-weight: 600;
}
.tl-honor i { color: #d97706; }

/* =============================================
   Projects
   ============================================= */
.proj-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.proj-card {
    padding: 1.25rem;
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    transition: all 0.25s;
}
.proj-card:hover {
    border-color: var(--border-2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.proj-header {
    display: flex; align-items: flex-start; gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.proj-icon {
    width: 36px; height: 36px;
    border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}
.c-ai     { background: #f5f3ff; color: #7c3aed; }
.c-red    { background: #fff1f2; color: #e11d48; }
.c-green  { background: #f0fdf4; color: #059669; }
.c-orange { background: #fff7ed; color: #ea580c; }
.c-blue   { background: #eff6ff; color: #2563eb; }
.c-purple { background: #fdf4ff; color: #a21caf; }

.proj-header h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.15rem; }

.proj-co {
    font-size: 0.73rem; font-weight: 600;
    color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em;
}

.proj-desc { font-size: 0.835rem; color: var(--text-2); line-height: 1.6; margin-bottom: 0.6rem; flex-grow: 1; }

.proj-pts { list-style: none; margin-bottom: 1rem; }
.proj-pts li {
    font-size: 0.8rem; color: var(--text-2);
    padding: 0.2rem 0 0.2rem 1rem;
    position: relative; line-height: 1.55;
}
.proj-pts li::before {
    content: '→'; position: absolute; left: 0;
    color: var(--accent); font-size: 0.72rem; line-height: 1.8;
}

.proj-tags {
    display: flex; flex-wrap: wrap; gap: 0.3rem;
    margin-top: auto; padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.proj-tags span {
    padding: 0.2rem 0.5rem;
    background: var(--bg-3); color: var(--text-3);
    border-radius: 4px; font-size: 0.73rem; font-weight: 500;
}

/* =============================================
   Self Evaluation
   ============================================= */
.eval-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.eval-card {
    padding: 1.25rem;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); transition: all 0.25s;
}
.eval-card:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

.eval-icon {
    width: 34px; height: 34px;
    background: var(--accent-bg); color: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.875rem; margin-bottom: 0.7rem;
}

.eval-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.4rem; }
.eval-card p { font-size: 0.835rem; color: var(--text-2); line-height: 1.65; }

/* =============================================
   Footer
   ============================================= */
.footer {
    padding: 3rem 0;
    background: var(--bg-2); border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex; flex-direction: column;
    align-items: center; gap: 0.45rem; text-align: center;
}

.footer-logo { font-size: 1.4rem; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }
.footer-inner p { font-size: 0.875rem; color: var(--text-2); }
.footer-inner a { color: var(--accent); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
.footer-copy { font-size: 0.78rem !important; color: var(--text-3) !important; }

/* =============================================
   Animations
   ============================================= */
.reveal-section { opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal-section.visible { opacity: 1; transform: translateY(0); }

.proj-card, .comp-card, .eval-card, .tl-card, .edu-card {
    opacity: 0; transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.25s, box-shadow 0.25s;
}
.proj-card.visible, .comp-card.visible, .eval-card.visible, .tl-card.visible, .edu-card.visible {
    opacity: 1; transform: translateY(0);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
    .comp-grid { grid-template-columns: 1fr 1fr; }
    .proj-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-layout { flex-direction: column; gap: 1.5rem; }
    .hero-name { font-size: 2.4rem; }
    .edu-card { grid-template-columns: 1fr; gap: 1.5rem; }
    .comp-grid { grid-template-columns: 1fr; }
    .eval-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .tech-row { flex-direction: column; gap: 0.5rem; }
    .tg-label { width: auto; }
}
