/* ========== Theme ========== */
:root {
    --bg: #0b1220;
    --text: #e5e7eb;
    --text-strong: #f3f4f6;
    --muted: #9ca3af;
    --brand: #60a5fa;
    --brand-hover: #93c5fd;
    --card: #0f172a;
    --border: #1f2937;
    --radius: 10px;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f9fafb;
        --text: #1f2937;
        --text-strong: #111827;
        --muted: #6b7280;
        --brand: #2563eb;
        --brand-hover: #1d4ed8;
        --card: #ffffff;
        --border: #e5e7eb;
    }
}

/* ========== Base ========== */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    margin: 0 auto;
    padding: 0 16px;
    max-width: 1100px;
    line-height: 1.75;
    background: var(--bg);
    color: var(--text);
}

h1 {
    margin: .1rem 0;
    font-size: clamp(2rem, 2.2vw + 1.2rem, 2.8rem);
    color: var(--text-strong);
    font-weight: 600;
}

h2 {
    margin: .1rem 0 1rem;
    font-size: 1.4rem;
    color: var(--text-strong);
}

.muted {
    color: var(--muted);
}

/* ========== Header ========== */
header {
    padding: 28px 0 8px;
}

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

.profile-pic {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand);
}

.profile-text h1 {
    margin-bottom: 0;
}

.profile-text p {
    margin-top: 0;
}

/* ========== Layout ========== */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 24px;
    align-items: start;
    margin: 18px 0 32px;
}

/* ========== Sidebar / Tabs ========== */
.sidebar {
    position: sticky;
    top: 18px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* One style that works for BOTH <button.tab-link> and <a.tab-link> */
.sidebar .tab-link {
    /* reset for button while harmless for <a> */
    all: unset;
    cursor: pointer;

    display: block;
    color: var(--text);
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.sidebar .tab-link:hover {
    color: var(--brand);
    border-color: var(--brand);
}

.sidebar .tab-link.is-active {
    border-color: var(--brand);
}

.sidebar hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 10px 0;
}

/* Content area that holds panels */
.tabs {
    min-width: 0;
}

/* Panels (hide inactive) */
.tab-panel {
    display: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.tab-panel.is-active {
    display: block;
}

/* ========== Cards (resume-tight) ========== */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin: 10px 0;
}

.card h3 {
    margin: 0 0 .25rem 0;
    font-size: 1.05rem;
    color: var(--text-strong);
}

.card p em {
    display: block;
    font-style: normal;
    color: var(--muted);
    font-size: .92rem;
    margin: .05rem 0 .35rem;
}

.card ul {
    margin: .2rem 0 0 1.1rem;
    padding-left: 0;
    list-style: disc;
}

.card li {
    font-size: .97rem;
    line-height: 1.5;
    margin: .18rem 0;
}

/* Experience header spacing */
#experience h2 {
    margin: .25rem 0 .6rem;
}

/* ========== Certificate ========== */
.certificate-toggle {
    margin-top: 8px;
}

.certificate-toggle summary {
    cursor: pointer;
    color: var(--brand);
    font-size: .92rem;
    font-weight: 600;
    list-style: none;
}

.certificate-toggle summary::before {
    content: "▸ ";
}

.certificate-toggle[open] summary::before {
    content: "▾ ";
}

.certificate-toggle summary:hover {
    color: var(--brand-hover);
}

.certificate {
    max-width: 340px;
    width: 100%;
    margin-top: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ========== Footer ========== */
footer {
    margin: 36px 0 24px;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
}

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

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar .tab-link {
        flex: 1 0 auto;
        text-align: center;
    }
}

.sidebar .external {
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    display: block;
    font-weight: 600;
    color: var(--text);
}

.sidebar .external:hover {
    color: var(--brand);
    border-color: var(--brand);
}

/* Global link style (everywhere) */
a, a:link, a:visited {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color .15s ease, color .15s ease;
}
a:hover,
a:focus-visible {
  color: var(--brand-hover);
  border-bottom-color: var(--brand-hover);
  outline: none;
}