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

:root {
    --bg-primary: #0b0e14;
    --bg-secondary: #0f1219;
    --bg-card: #141820;
    --bg-surface: #191e28;
    --border: #1e2430;
    --border-light: #262d3a;

    --text-primary: #b0b8c8;
    --text-secondary: #5c6678;
    --text-heading: #cdd4e0;
    --text-muted: #3e4758;

    --accent: #5aac9e;
    --accent-dim: rgba(90, 172, 158, 0.15);
    --accent-glow: rgba(90, 172, 158, 0.25);

    --c-backend: #c792ea;
    --c-backend-dim: rgba(199, 146, 234, 0.15);
    --c-frontend: #82aaff;
    --c-frontend-dim: rgba(130, 170, 255, 0.15);
    --c-devops: #c3e88d;
    --c-devops-dim: rgba(195, 232, 141, 0.15);
    --c-tools: #ffcb6b;
    --c-tools-dim: rgba(255, 203, 107, 0.15);
    --c-general: #f78c6c;
    --c-general-dim: rgba(247, 140, 108, 0.15);
    --c-input: #8892a4;
    --c-output: #89ddff;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

    --nav-height: 56px;
    --container-width: 1100px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--bg-surface);
    color: var(--accent);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: var(--accent-dim);
    color: var(--text-heading);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text-heading);
}

strong {
    color: var(--text-heading);
    font-weight: 500;
}

code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-surface);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--accent);
}

/* ===== Background Canvas ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== Container ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(11, 14, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.nav-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.nav-logo .prompt {
    color: var(--accent);
    margin-right: 2px;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-heading);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-secondary);
    transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* ===== Sections ===== */
section {
    position: relative;
    z-index: 1;
    padding: 100px 0;
}

.section-title {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-title .prompt {
    color: var(--accent);
    margin-right: 6px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 36px;
}

/* ===== Hero ===== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.hero-terminal {
    width: 100%;
    max-width: 640px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    animation: fadeIn 1s ease 3s both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.scroll-arrow {
    width: 1px;
    height: 24px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 0.8; transform: scaleY(1.3); }
}

/* ===== Terminal Window ===== */
.terminal-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.7;
}

.dot.red { background: #e06c75; }
.dot.yellow { background: #e5c07b; }
.dot.green { background: #98c379; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.terminal-body::-webkit-scrollbar {
    width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}

/* Hero terminal lines */
.hero-line {
    margin-bottom: 4px;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.hero-line .prompt-text {
    color: var(--accent);
}

.hero-line .command {
    color: var(--text-heading);
}

.hero-line .output {
    color: var(--text-primary);
    padding-left: 0;
}

.hero-line .output-dim {
    color: var(--text-secondary);
}

.hero-line .highlight {
    color: var(--c-backend);
}

.hero-line .typing-cursor {
    display: inline-block;
    width: 7px;
    height: 14px;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 0.8s step-end infinite;
}

/* Interactive terminal */
.interactive-terminal .terminal-body {
    min-height: 280px;
    max-height: 360px;
}

.terminal-line {
    margin-bottom: 2px;
    word-wrap: break-word;
}

.terminal-prompt-input {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.t-accent { color: var(--accent); }
.t-muted { color: var(--text-secondary); }
.t-heading { color: var(--text-heading); }
.t-backend { color: var(--c-backend); }
.t-frontend { color: var(--c-frontend); }
.t-devops { color: var(--c-devops); }
.t-tools { color: var(--c-tools); }
.t-output { color: var(--c-output); }

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px 16px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.terminal-input-line input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-heading);
    caret-color: var(--accent);
}

/* ===== About ===== */
#about {
    border-top: 1px solid var(--border);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin-top: 32px;
}

.about-text p {
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.info-card-icon {
    color: var(--accent);
    margin-bottom: 10px;
}

.info-card-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.info-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Skills / Visualizations ===== */
#skills {
    border-top: 1px solid var(--border);
}

.viz-toggle {
    display: flex;
    gap: 8px;
    margin: 24px 0;
}

.viz-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.viz-btn:hover {
    color: var(--text-heading);
    border-color: var(--border-light);
}

.viz-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.viz-btn svg {
    opacity: 0.6;
}

.viz-btn.active svg {
    opacity: 1;
}

.viz-container {
    position: relative;
    min-height: 500px;
}

.viz-panel {
    display: none;
    width: 100%;
}

.viz-panel.active {
    display: block;
}

#neural-canvas {
    width: 100%;
    height: 600px;
    display: block;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.viz-tooltip {
    position: absolute;
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-heading);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
    white-space: nowrap;
}

.viz-tooltip.visible {
    opacity: 1;
}

#graph-container {
    width: 100%;
    height: 540px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
}

#graph-container svg {
    width: 100%;
    height: 100%;
}

.viz-hint {
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.graph-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ===== Terminal Section ===== */
#terminal-section {
    border-top: 1px solid var(--border);
}

/* ===== Projects ===== */
#projects {
    border-top: 1px solid var(--border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 8px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s;
}

.project-card:hover {
    border-color: var(--border-light);
}

.project-header {
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.tag-backend {
    color: var(--c-backend);
    background: var(--c-backend-dim);
    border-color: rgba(199, 146, 234, 0.2);
}

.tag-frontend {
    color: var(--c-frontend);
    background: var(--c-frontend-dim);
    border-color: rgba(130, 170, 255, 0.2);
}

.tag-devops {
    color: var(--c-devops);
    background: var(--c-devops-dim);
    border-color: rgba(195, 232, 141, 0.2);
}

.tag-tools {
    color: var(--c-tools);
    background: var(--c-tools-dim);
    border-color: rgba(255, 203, 107, 0.2);
}

.tag-general {
    color: var(--c-general);
    background: var(--c-general-dim);
    border-color: rgba(247, 140, 108, 0.2);
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.project-details {
    list-style: none;
    margin-bottom: 16px;
}

.project-details li {
    position: relative;
    padding-left: 16px;
    font-size: 0.82rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.5;
}

.project-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.project-links {
    display: flex;
    gap: 12px;
}

.project-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.project-badges a {
    display: inline-flex;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.project-badges a:hover {
    opacity: 1;
}

.project-badges img {
    height: 20px;
    border-radius: 3px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: all 0.2s;
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.project-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border-style: dashed;
}

.placeholder-content {
    text-align: center;
    color: var(--text-muted);
}

.placeholder-content svg {
    margin-bottom: 8px;
    opacity: 0.4;
}

.placeholder-content p {
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* ===== Experience ===== */
#experience {
    border-top: 1px solid var(--border);
}

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
}

.exp-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
}

.exp-card:hover {
    border-color: var(--border-light);
}

.exp-card.exp-current {
    border-left: 2px solid var(--accent);
}

.exp-period {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 2px;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.exp-duration {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.exp-role {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.exp-company {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.exp-desc {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.exp-placeholder-text {
    color: var(--text-muted);
    font-style: italic;
}


/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

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

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .exp-card {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .exp-period {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .skills-fallback-group {
        flex-direction: column;
        gap: 8px;
    }

    .skills-fallback-label {
        min-width: unset;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

@media (max-width: 640px) {
    :root {
        --nav-height: 50px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(11, 14, 20, 0.95);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 16px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 1.1rem;
    }

    #neural-canvas,
    #graph-container {
        height: 450px;
    }

    .viz-toggle {
        flex-wrap: wrap;
    }

    .terminal-body {
        font-size: 0.75rem;
    }

    .terminal-input-line {
        font-size: 0.75rem;
    }

    .terminal-input-line input {
        font-size: 0.75rem;
    }

    .contact-links-grid {
        grid-template-columns: 1fr;
    }

    .edu-card {
        flex-direction: column;
        gap: 12px;
    }

    .about-identity {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* ===== About Identity (avatar + name) ===== */
.about-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-initials {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.about-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.about-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ===== Skills Fallback ===== */
.skills-fallback {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.skills-fallback-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.skills-fallback-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    min-width: 90px;
    padding-top: 4px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.skills-fallback-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ===== Education Section ===== */
#education {
    border-top: 1px solid var(--border);
}

.edu-tabs {
    display: flex;
    gap: 2px;
    margin: 20px 0 24px;
    border-bottom: 1px solid var(--border);
}

.edu-tab {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.edu-tab:hover {
    color: var(--text-heading);
}

.edu-tab.active {
    color: var(--accent);
}

.edu-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 1px 1px 0 0;
}

.edu-panel {
    display: none;
}

.edu-panel.active {
    display: block;
}

.edu-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 8px;
}

.edu-icon {
    color: var(--accent);
    padding-top: 3px;
    flex-shrink: 0;
    opacity: 0.8;
}

.edu-content {
    flex: 1;
}

.edu-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.edu-degree {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-heading);
}

.edu-year {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    white-space: nowrap;
    flex-shrink: 0;
}

.edu-school {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edu-department {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.edu-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cert-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    text-align: center;
    gap: 10px;
    color: var(--text-muted);
}

.cert-placeholder svg {
    opacity: 0.4;
    margin-bottom: 4px;
}

.cert-placeholder p {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cert-placeholder-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    max-width: 360px;
}

/* ===== Contact Section ===== */
#contact {
    border-top: 1px solid var(--border);
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 32px;
    align-items: start;
}

.contact-heading {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.contact-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    padding: 10px 16px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent-dim);
    transition: all 0.2s;
}

.contact-email-link:hover {
    background: rgba(90, 172, 158, 0.25);
    color: var(--text-heading);
}

.contact-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
    color: var(--text-primary);
    text-decoration: none;
}

.contact-card:hover {
    border-color: var(--border-light);
    background: var(--bg-surface);
    color: var(--text-heading);
    transform: translateY(-2px);
}

.contact-card-icon {
    color: var(--accent);
    opacity: 0.8;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.contact-card:hover .contact-card-icon {
    opacity: 1;
}

.contact-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-card-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-card-value {
    font-size: 0.85rem;
    color: var(--text-heading);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Footer (simplified) ===== */
footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
    position: relative;
    z-index: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.footer-bottom p {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ===== D3 Graph Styles ===== */
.graph-node {
    cursor: grab;
}

.graph-node:active {
    cursor: grabbing;
}

.graph-node circle {
    transition: filter 0.2s;
}

.graph-node.dimmed circle {
    opacity: 0.15;
}

.graph-node.dimmed text {
    opacity: 0.1;
}

.graph-link {
    stroke-opacity: 0.2;
    transition: stroke-opacity 0.2s;
}

.graph-link.dimmed {
    stroke-opacity: 0.03;
}

.graph-link.highlighted {
    stroke-opacity: 0.5;
}

.graph-node-label {
    font-family: var(--font-mono);
    fill: var(--text-primary);
    pointer-events: none;
    text-anchor: middle;
}
