:root {
    --bg-color: #ffffff;
    --text-main: #000000;
    --text-muted: #666666;
    --accent-blue: #dcf2f9; 
    --accent-dark: #5e60d8; 
    --border-color: #cccccc; 
    --font-mono: Consolas, monaco, monospace;
    --font-sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-width: 1024px;
}

a { text-decoration: none; color: inherit; }

/* ==========================================
   GLOBAL LAYOUT & STRUCTURE
   ========================================== */
.notebook-container { 
    max-width: 950px; 
    min-width: 950px;
    margin: 40px auto; 
    padding: 0 24px; 
}
.notebook-section { margin-bottom: 60px; }

.scroll-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.scroll-reveal.in-view { opacity: 1; transform: translateY(0); }

pre { margin: 0; font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.5; }
.keyword { font-weight: bold; }

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.sticky-header-container {
    position: sticky;
    top: 0;
    z-index: 1000; 
    background-color: var(--bg-color); 
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 16px 24px 12px 24px;
}

.header-left-col {
    display: flex;
    flex-direction: column;
    gap: 16px; 
}

.header-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-img {
    height: 32px; 
    width: auto;
    display: block;
}

.file-path {
    padding: 6px 16px; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    font-family: var(--font-mono); 
    font-size: 0.9rem;
}

.main-nav {
    display: flex; 
    gap: 30px; 
    padding: 0; 
    margin: 0;
    font-size: 0.85rem; 
    font-family: var(--font-mono);
}
.main-nav a:hover { text-decoration: underline; }

.header-right-col {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.share-icon { width: 24px; height: 24px; fill: var(--text-main); cursor: pointer; }

.profile-pic-link {
    display: block;
    width: 60px; 
    height: 60px; 
    border-radius: 50%;
    background-color: hsla(239, 60%, 67%, 0.15); 
    border: 2px solid var(--text-main);
    overflow: hidden; 
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================
   EXECUTION BAR
   ========================================== */
.execution-bar {
    display: flex; justify-content: space-between;
    background-color: #ebecf9; 
    color: #5e60d8; 
    padding: 8px 24px; 
    font-size: 0.85rem; 
    font-weight: bold;
    font-family: var(--font-sans); 
}

.exec-left, .exec-right { display: flex; align-items: center; }

.exec-link {
    display: flex; 
    align-items: center; 
    gap: 6px; 
    transition: opacity 0.2s;
}
.exec-link:hover { opacity: 0.7; text-decoration: none; }
.exec-icon {
    width: 14px; 
    height: 14px; 
    fill: currentColor; 
}

#run-all-btn { 
    background: none; border: none; color: inherit; 
    cursor: pointer; padding: 0; font: inherit; 
    display: flex; align-items: center; gap: 6px;
}
#run-all-btn svg { width: 14px; height: 14px; fill: currentColor; }

.divider { margin: 0 12px; color: rgba(94, 96, 216, 0.4); }

/* ==========================================
   NOTEBOOK CELLS
   ========================================== */
.markdown-cell { margin-bottom: 16px; margin-left: 60px; }
.markdown-cell .greeting { font-family: var(--font-mono); font-size: 0.9rem; margin: 0 0 4px 0; }
.markdown-cell h1 { font-size: 2rem; margin: 0 0 4px 0; font-weight: 700; }
.markdown-cell .subtitle { font-family: var(--font-mono); font-size: 0.9rem; margin: 0; }
.markdown-cell h2 { font-size: 1.4rem; margin: 0 0 4px 0; font-weight: 700; }
.section-desc { font-family: var(--font-mono); font-size: 0.85rem; margin: 0; }

.cell-row { display: flex; align-items: flex-start; gap: 16px; margin-top: 12px; }
.execution-count { 
    font-family: var(--font-mono); color: var(--text-muted); 
    font-size: 0.85rem; margin-top: 12px; min-width: 40px; text-align: right;
}

.cell-content-box {
    flex-grow: 1; border: 1px solid var(--border-color); border-radius: 4px;
    background-color: #ffffff;
}

.code-block {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid transparent; 
    transition: border-color 0.5s ease;
}
.cell-content-box.has-output .code-block { border-bottom: 1px dashed var(--border-color); }

.run-indicator { 
    margin-top: 2px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.run-indicator svg { 
    width: 14px; 
    height: 14px; 
    fill: var(--text-main); 
    transition: fill 0.2s ease;
}
.run-indicator:hover svg { fill: var(--accent-dark); }
.run-indicator .icon-running { display: none; }
.run-indicator.running .icon-play { display: none; }
.run-indicator.running .icon-running { display: block; animation: spin 1s linear infinite; }

@keyframes spin { 100% { transform: rotate(360deg); } }

.output-cell { 
    padding: 24px; display: none; opacity: 0; 
    transition: opacity 0.5s ease; 
    font-family: var(--font-sans); 
}
.output-cell.visible { display: block; opacity: 1; }
.view-more { display: block; margin-top: 20px; font-family: var(--font-mono); font-size: 0.85rem; font-weight: bold; color: var(--text-main); }

/* ==========================================
   SHARED CARD UTILITIES
   ========================================== */
.card-title {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-main);
    min-height: 2.8rem; 
    display: flex;
    align-items: flex-start;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    margin-bottom: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden; 
}
.card-img-wrapper img, .card-img-wrapper .bg-dark {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: hsla(239, 60%, 67%, 0.1); 
    pointer-events: none; 
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex-grow: 1; 
}

.card-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.card-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: auto;
}

.pill { 
    padding: 4px 12px; 
    border-radius: 12px; 
    font-size: 0.7rem; 
    font-weight: bold; 
    color: white; 
    text-transform: uppercase;
    font-family: var(--font-sans); 
    line-height: 1.1; 
    display: inline-block; 
}
.pill.project { background-color: #5e60d8; }
.pill.research { background-color: #27aea5; }
.pill.credentials { background-color: #5e60d8; }
.pill.recognition { background-color: #27aea5; } 
.pill.volunteering { background-color: #2b2c60; }
.pill.participation { background-color: #17645f; } 

.arrow { 
    display: inline-flex; 
    align-items: center; 
}
.arrow-icon { 
    width: 18px; 
    height: 18px; 
    fill: currentColor; 
    transition: transform 0.2s ease;
}

.works-grid, .achievements-grid, .creative-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; 
}

.work-card, .achieve-card, .creative-card { 
    display: flex; 
    flex-direction: column; 
    height: 100%;
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    padding: 16px; 
}

.bg-dark { background-color: #0b1115; }

/* ==========================================
   STATS SECTION (HOME PAGE)
   ========================================== */
.stats-chart-container { 
    display: flex; justify-content: space-around; align-items: flex-end; 
    height: 200px; margin-top: 20px; border: 1px solid var(--border-color); 
    overflow: visible; background-image: repeating-linear-gradient(0deg, transparent, transparent 39px, var(--border-color) 40px);
    padding-bottom: 40px; position: relative;
}
.stat-col { display: flex; flex-direction: column; align-items: center; width: 60px; position: relative; height: 100%; justify-content: flex-end; }
.bar { width: 100%; background-color: var(--accent-dark); height: 0; transition: height 1s cubic-bezier(0.1, 0.8, 0.2, 1); display: flex; justify-content: center; align-items: flex-end; padding-bottom: 4px; }
.stat-val { color: white; font-weight: bold; font-family: var(--font-sans); font-size: 0.9rem; }
.stat-label { position: absolute; bottom: -30px; font-family: var(--font-sans); font-size: 0.8rem; text-align: center; white-space: nowrap; color: var(--text-main); }
.curiosity-bar { position: relative; z-index: 2; }

/* ==========================================
   SKILLS SECTION (HOME PAGE)
   ========================================== */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; text-align: center; }
.skill-spider { display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.9rem; border: 1px solid var(--border-color); border-radius: 12px; padding: 24px 16px; }
.skill-spider canvas { width: 100% !important; height: auto !important; max-height: 260px; }

/* ==========================================
   WORKS PAGE (FULL LIST)
   ========================================== */
.work-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px dashed var(--border-color);
}
.work-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.work-list-item:first-child { padding-top: 0; }

.work-list-content {
    flex-grow: 1;
    padding-right: 40px;
}

.work-list-title {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    margin: 0 0 12px 0;
    color: var(--text-main);
}

.work-list-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 16px 0;
}

.work-year {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-weight: bold;
    margin-right: 4px;
}

.work-list-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.work-list-tags {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.work-list-visuals {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: opacity 0.2s ease;
    cursor: pointer;
}
.work-list-visuals:hover { opacity: 0.8; }

.work-list-img-wrapper {
    position: relative;
    width: 140px;
    height: 90px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    flex-shrink: 0; 
}

.work-list-img-wrapper img, .work-list-img-wrapper .bg-dark {
    width: 100%; height: 100%; object-fit: cover; display: block;
}

.work-list-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: hsla(239, 60%, 67%, 0.1); 
    pointer-events: none; 
}

/* ==========================================
   EXPERIENCE PAGE (TIMELINE)
   ========================================== */
.timeline-container { padding: 5px 0; margin-left: 30px; }
.timeline-item { margin-bottom: 16px; display: flex; position: relative; } 
.time-date { width: 170px; flex-shrink: 0; text-align: right; padding-right: 32px; font-family: var(--font-mono); font-size: 0.85rem; font-weight: bold; margin-top: 2px;}
.time-content { flex-grow: 1; padding-left: 32px; }

.timeline-item::before { display: none; }

.timeline-item::after { 
    content: ''; 
    position: absolute; 
    left: 170px; 
    top: 10px; 
    bottom: -24px; 
    border-left: 1.5px dotted var(--accent-dark); 
    z-index: 1; 
}
.timeline-item:last-child::after { display: none !important; }

.timeline-item.org-node::before {
    content: ''; position: absolute; left: 171px; top: 5px; width: 14px; height: 14px;
    background: var(--accent-dark); border-radius: 50%; z-index: 2; display: block;
    transform: translateX(-50%);
}

.timeline-item.role-node::before {
    content: ''; position: absolute; left: 171px; top: 8px; width: 9px; height: 9px;
    background: var(--accent-dark); border-radius: 50%; z-index: 2; display: block;
    transform: translateX(-50%);
}

.org-title {
    font-family: var(--font-sans); 
    font-size: 1.0rem; font-weight: bold; color: var(--text-main);
    margin-bottom: 4px;
}
.role-title {
    font-family: var(--font-mono); 
    font-size: 0.9rem; font-weight: bold; color: var(--text-main);
    margin-bottom: 2px;
}
.role-desc {
    font-family: var(--font-sans); 
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.5;
}

.role-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 6px; margin-top: 2px;
}
.role-title-full {
    font-family: var(--font-mono); 
    font-size: 0.9rem; font-weight: bold; color: var(--text-main);
}
.role-desc-full {
    font-family: var(--font-sans); 
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 6px;
}

.pill.education { background-color: #5e60d8; }
.pill.internship { background-color: #27aea5; }
.pill.volunteer { background-color: #2b2c60; } 
.pill.employment { background-color: #17645f; }

.exp-meta-org {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px; 
}
.exp-meta-loc {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 4px; 
}

.exp-bullets, .exp-desc {
    margin: 0;
    font-family: var(--font-sans); 
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.exp-bullets {
    padding-left: 18px;
}
.exp-bullets li {
    margin-bottom: 2px; 
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-links-row { display: flex; justify-content: space-around; align-items: center; font-family: var(--font-mono); font-size: 0.95rem; font-weight: bold; color: var(--text-main); padding: 10px 0; }

.contact-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: color 0.2s ease; 
}
.contact-item svg { 
    width: 20px; 
    height: 20px; 
    fill: currentColor; 
}
.contact-item:hover { color: var(--accent-dark); text-decoration: none; }

/* ==========================================
   CARDS, HOVERS & MODAL POPUP
   ========================================== */
.work-card, .achieve-card, .creative-card { 
    transition: transform 0.2s ease, box-shadow 0.2s ease; 
}

.achieve-card, .creative-card {
    cursor: pointer;
}

.work-card:hover, .achieve-card:hover, .creative-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.1); 
}

.date-bracket { 
    color: var(--accent-dark); 
    font-family: var(--font-mono); 
    font-weight: bold; 
    margin-right: 4px; 
}

.modal-overlay {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.85); 
    align-items: center; justify-content: center; 
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { 
    display: flex; opacity: 1; 
}
.modal-content { 
    max-width: 90%; max-height: 90%; 
    border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); 
}
.modal-close { 
    position: absolute; top: 20px; right: 30px; 
    font-size: 2.5rem; color: white; cursor: pointer; 
    font-family: var(--font-sans); font-weight: bold;
}
.modal-close:hover { color: var(--accent-dark); }