/* =============================================
   Modern Theme Override
   Color palette:
   --bg:       #ffffff
   --bg-alt:   #f8fafc
   --text:     #0f172a
   --muted:    #64748b
   --accent:   #14b8a6
   --border:   #e2e8f0
   ============================================= */

:root {
    --bg:      #ffffff;
    --bg-alt:  #f8fafc;
    --text:    #0f172a;
    --muted:   #64748b;
    --accent:  #14b8a6;
    --border:  #e2e8f0;
}

/* ---- Base ---- */
body {
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

p {
    color: var(--text);
    line-height: 1.75;
    font-size: 16px;
}

a {
    color: var(--accent);
}

a:hover {
    color: #0d9488;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    text-transform: none;
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

@media (min-width: 768px) {
    h2 { font-size: 2.25rem; }
}

/* ---- Section divider ---- */
hr.star-primary {
    border: 0;
    border-top: 2px solid var(--border);
    max-width: 60px;
    margin: 16px auto 28px;
}
hr.star-primary:after { display: none; }
hr.star-light {
    border: 0;
    border-top: 2px solid rgba(255,255,255,0.2);
    max-width: 60px;
    margin: 16px auto 28px;
}
hr.star-light:after { display: none; }

/* ---- Navbar ---- */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
    padding: 0 1rem;
}

.navbar-brand {
    color: var(--text) !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    height: auto;
    padding: 14px 0;
}

.navbar-brand:hover { color: var(--accent) !important; }

.nav-item > .nav-link {
    color: var(--muted) !important;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    padding: 14px 12px !important;
    transition: color 0.2s;
}

.nav-item > .nav-link:hover {
    color: var(--accent) !important;
}

.navbar-toggler {
    border-color: var(--border);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(15,23,42,0.7)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---- Header ---- */
header {
    background: var(--bg);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-align: left;
}

header .container {
    padding-top: 80px;
    padding-bottom: 56px;
}

@media (min-width: 768px) {
    header .container {
        padding-top: 100px;
        padding-bottom: 72px;
    }
}

/* Profile photo */
.profile-photo {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
    .profile-photo {
        width: 180px;
        height: 180px;
    }
}

/* Header text */
.header-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .header-name { font-size: 2.75rem; }
}

.header-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}

.header-email {
    font-size: 0.9rem;
    color: var(--muted);
}

.header-email a {
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s;
}

.header-email a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ---- Sections ---- */
section {
    padding: 72px 0;
}

section#why-matters {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

section#portfolio {
    background: var(--bg);
}

section.pb-section,
section.cv-section {
    background: var(--bg-alt);
    color: var(--text);
    border-top: 1px solid var(--border);
}

section.pb-section a,
section.cv-section a {
    color: var(--accent);
    text-decoration: underline;
}

/* ---- Publication ---- */
.publication {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.publication:hover {
    background: var(--bg-alt);
    border-left-color: var(--accent);
}

.pub-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.pub-number {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    min-width: 28px;
}

.pub-year {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
}

.pub-body {
    margin-bottom: 4px;
}

.pub-conf {
    font-size: 0.85em;
    color: var(--muted);
}

.pub-link {
    font-size: 11px;
    color: var(--accent);
    margin-left: 6px;
    white-space: nowrap;
}

.pub-link:hover {
    color: #0d9488;
}

.pub-footer {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pub-me-author {
    font-weight: 700;
    font-style: italic;
    color: var(--accent);
}

/* Venue badges */
.venue-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 7px;
    border-radius: 4px;
    white-space: nowrap;
}

/* venue-top / venue-a / venue-b removed — colors now set via inline style from DB */

/* Pub tag badges */
.pub-tag-badge {
    font-size: 10px !important;
    font-weight: 600;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    background: #e8f8f5 !important;
    color: #14b8a6 !important;
    border: 1px solid #14b8a6 !important;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pub-tag-badge:hover {
    background: #14b8a6 !important;
    color: #fff !important;
}

/* ---- Project cards ---- */
.project-card {
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08) !important;
}

/* Highlighted projects: subtle teal outline + glow */
.project-item[data-highlight="1"] .project-card {
    border-color: rgba(20, 184, 166, 0.45) !important;
    box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.12),
                0 2px 10px rgba(20, 184, 166, 0.10);
}
.project-item[data-highlight="1"] .project-card:hover {
    border-color: rgba(20, 184, 166, 0.7) !important;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.22),
                0 8px 24px rgba(20, 184, 166, 0.16) !important;
}

.project-tile-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

/* ---- Why This Matters cards ---- */
.why-card {
    border-radius: 10px !important;
    border: 1px solid var(--border) !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.why-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(20,184,166,0.18) !important;
}
.why-card-emoji {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 10px;
    user-select: none;
}
.why-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 8px;
}
.why-card-desc {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 0;
}
.why-card-desc strong {
    color: var(--text);
    font-weight: 600;
}
.why-card-link {
    color: var(--accent);
    font-size: 13px;
    text-decoration: none;
}
.why-card-link:hover {
    color: #0d9488;
    text-decoration: underline;
}

/* ---- Tag filter ---- */
.tag-filter-btn {
    background: var(--bg);
    color: var(--accent);
    border: 1px solid var(--accent) !important;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 14px;
    transition: all 0.18s;
}

.tag-filter-btn:hover,
.tag-filter-btn.active {
    background: var(--accent) !important;
    color: #fff !important;
}

/* ---- Footer ---- */
footer .footer-above {
    background-color: #0f172a;
    padding-top: 48px;
    color: #94a3b8;
}

footer h3 {
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

footer p {
    color: #94a3b8;
}

footer .footer-below {
    background-color: #080f1d;
    padding: 20px 0;
    font-size: 13px;
    color: #64748b;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
}

footer a:hover { color: #fff; }

/* ---- Publication section labels ---- */
.pub-section-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

/* ---- CV section ---- */
#cv ul li {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.8;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    section { padding: 52px 0; }
    header .container { padding-top: 76px; padding-bottom: 40px; }
    .header-name { font-size: 1.8rem; }
}

/* ---- Recent Updates ---- */
#updates {
    padding: 40px 0 32px;
    background: var(--bg);
}
.updates-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2em;
}
.updates-section-divider {
    border: none;
    border-top: 2px solid var(--accent);
    width: 36px;
    margin: 0 0 1.2em;
}
.updates-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.updates-list li {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.65;
}
.updates-list li:last-child { border-bottom: none; }
.update-date {
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    font-size: 12px;
    min-width: 68px;
    padding-top: 2px;
}

/* ---- Community & Service ---- */
#community {
    background: var(--bg-alt);
    padding: 48px 0 40px;
    border-top: 1px solid var(--border);
    overflow: hidden;
}
.community-card {
    transition: transform 0.18s, box-shadow 0.18s;
    border: 1px solid var(--border) !important;
    border-radius: 10px;
    overflow: hidden;
    word-break: break-word;
}
.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(20,184,166,0.15) !important;
}
.community-card .card-body {
    padding: 20px 20px 12px;
}
.community-card .card-footer {
    padding: 0 20px 16px;
    background: transparent;
    border: none;
}
.community-card .card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 8px;
    word-break: break-word;
}
.community-card .card-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
    word-break: break-word;
}
.visit-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 5px;
    background: var(--accent);
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
}
.visit-btn:hover {
    background: #0d9488;
    color: #fff !important;
    text-decoration: none;
}
.update-read-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-left: 6px;
    text-decoration: none;
    white-space: nowrap;
}
.update-read-more:hover { text-decoration: underline; color: #0d9488; }
.update-all-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.update-all-link:hover { text-decoration: underline; color: #0d9488; }

/* ── Project expand / others buttons ── */
.project-expand-btn,
.project-others-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted, #64748b);
    background: transparent;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    padding: 4px 16px;
    transition: all 0.18s;
    cursor: pointer;
}
.project-expand-btn:hover,
.project-others-btn:hover {
    border-color: var(--accent, #18bc9c);
    color: var(--accent, #18bc9c);
    background: transparent;
}
