/* ── Design Tokens ────────────────────────────────── */
:root {
    --bg: #0a0f14;
    --bg-2: #0d1117;
    --bg-3: #111820;
    --panel: rgba(12, 20, 28, 0.92);
    --panel-strong: rgba(16, 24, 32, 0.95);
    --line: rgba(99, 240, 255, 0.12);
    --line-soft: rgba(99, 240, 255, 0.07);
    --text: #e0e6eb;
    --muted: #8b9da7;
    --muted-2: #546a76;
    --cyan: #4ee1c0;
    --cyan-bright: #63f0ff;
    --green: #6cf1c3;
    --shadow: rgba(0, 0, 0, 0.42);
}

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

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Fira Code", "JetBrains Mono", Consolas, "Courier New", monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--line-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

img {
    display: block;
    max-width: 100%;
}

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

button {
    font: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ---------- Sticky Nav / Terminal Topbar ---------- */
.terminal-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 15, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.8rem;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 48px;
    width: 100%;
    position: relative;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.8rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-toggle:hover {
    background: transparent;
    opacity: 0.8;
}

.nav-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 10px;
    background: var(--cyan);
}

.prompt-icon {
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.85rem;
}

.prompt-user {
    color: var(--text);
}

.prompt-symbol {
    color: var(--cyan);
}

.terminal-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.terminal-nav a {
    color: var(--muted);
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.terminal-nav a:hover {
    color: var(--cyan);
}

.clone-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(78, 225, 192, 0.08);
    border: 1px solid rgba(78, 225, 192, 0.5);
    color: var(--cyan);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.clone-btn:hover {
    background: rgba(78, 225, 192, 0.15);
    border-color: var(--cyan);
}

.clone-btn i {
    font-size: 0.85rem;
}

/* ---------- Main Content ---------- */
.terminal-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px 40px;
}

section[id],
.info-section,
.profile-section,
.contact-section {
    scroll-margin-top: 88px;
}

/* ---------- Profile Section ---------- */
.profile-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0 40px;
}

.profile-copy h1 {
    font-family: "Space Mono", "Montserrat", sans-serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.05em;
    color: #f0f4f8;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(99, 240, 255, 0.15);
}

.profile-copy h1 span {
    color: var(--cyan);
    font-family: "Space Mono", "Montserrat", sans-serif;
    font-weight: 700;
    text-shadow: 0 0 4px rgba(78, 225, 192, 0.45), 0 0 10px rgba(78, 225, 192, 0.25), 0 0 18px rgba(78, 225, 192, 0.12);
}

.status-line {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-line .dot {
    width: 8px;
    height: 8px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--cyan);
}

.subtitle {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.profile-copy p {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 480px;
}

.profile-actions {
    display: flex;
    gap: 12px;
}

.profile-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.primary-action {
    background: rgba(78, 225, 192, 0.15);
    color: var(--cyan);
    border: 1px solid var(--cyan);
}

.primary-action:hover {
    background: rgba(78, 225, 192, 0.25);
}

.secondary-action {
    background: transparent;
    color: var(--cyan);
    border: 1px solid rgba(78, 225, 192, 0.3);
}

.secondary-action:hover {
    background: rgba(78, 225, 192, 0.1);
    border-color: var(--cyan);
}

.profile-visual {
    width: min(100%, 680px);
    margin-left: auto;
    margin-right: 0;
    border: 1px solid rgba(105, 255, 205, 0.35);
    border-radius: 0;
    background: #171d22;
    overflow: hidden;
    box-shadow: none;
    padding: 0 12px 0 12px;
}

.visual-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin: 0 -12px;
    background: rgba(10, 16, 20, 0.95);
    border-bottom: 1px solid rgba(105, 255, 205, 0.35);
    min-height: 42px;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.window-dot.red {
    background: #ff5f56;
}

.window-dot.yellow {
    background: #ffbd2e;
}

.window-dot.green {
    background: #27c93f;
}

.file-name {
    margin-left: 10px;
    font-size: 0.72rem;
    color: rgba(220, 241, 245, 0.9);
    letter-spacing: 0.02em;
}

.profile-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background: transparent;
    border: 0;
    margin: 0;
}

/* ---------- Section Common ---------- */
.info-section {
    padding: 48px 0 24px;
    border-top: 1px solid var(--line-soft);
}

.info-section:first-child {
    border-top: none;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 24px;
}

.counter {
    font-size: 0.8rem;
    color: var(--cyan);
    font-weight: 500;
}

.section-head h2 {
    font-size: 2rem;
    letter-spacing: -0.04em;
    color: var(--text);
    font-weight: 700;
    line-height: 1;
}

.cursor-blink {
    color: var(--text);
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.section-detail {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--muted-2);
}

/* ---------- About Section ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 28px;
    align-items: start;
}

.about-copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.75;
}

.comment-slash {
    color: var(--cyan);
    font-weight: 600;
}

.system-info {
    border: 1px solid var(--line);
    background: var(--bg-3);
    border-radius: 4px;
    padding: 14px 16px;
}

.info-label {
    color: var(--cyan);
    font-size: 0.7rem;
    margin-bottom: 14px;
    opacity: 0.8;
}

.json-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 0.72rem;
    border-bottom: 1px solid var(--line-soft);
}

.json-item:last-child {
    border-bottom: none;
}

.json-item span:first-child {
    color: var(--muted);
}

.json-value {
    color: var(--text);
    text-align: right;
}

.json-value.status-val {
    color: var(--cyan);
}

/* ------------- Projects Section ---------- */
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 0.8rem;
}

.prompt-inline {
    color: var(--cyan);
    font-size: 0.8rem;
}

.filter-btn {
    border: 1px solid rgba(78, 225, 192, 0.35);
    background: transparent;
    color: var(--cyan);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.72rem;
    transition: background 0.2s, border-color 0.2s;
}

.filter-btn:hover {
    background: rgba(78, 225, 192, 0.08);
}

.filter-btn.active {
    background: rgba(78, 225, 192, 0.18);
    border-color: var(--cyan);
}

.count {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 0.7rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.project-card {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);
    background: rgba(17, 32, 36, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25), 0 0 14px rgba(78, 225, 192, 0.12);
}

.project-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 0.65rem;
    color: var(--muted-2);
    margin-bottom: 10px;
}

.version {
    background: rgba(78, 225, 192, 0.08);
    border: 1px solid var(--line);
    padding: 1px 6px;
    border-radius: 3px;
    color: var(--muted);
    font-size: 0.62rem;
}

.project-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-title i {
    color: var(--cyan);
    font-size: 0.8rem;
}

.project-card p {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.6;
    margin-bottom: 14px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tech-tags span {
    border: 1px solid var(--line);
    background: rgba(78, 225, 192, 0.04);
    color: var(--cyan);
    border-radius: 3px;
    padding: 2px 7px;
    font-size: 0.62rem;
}

.project-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
    color: var(--cyan);
    font-size: 0.68rem;
}

.project-footer span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.project-footer span:hover {
    opacity: 0.7;
}

.project-footer i {
    font-size: 0.7rem;
}

/* ---------- Skills Section ---------- */
.skills-panel {
    border: 1px solid var(--line);
    background: var(--bg-3);
    border-radius: 4px;
    overflow: hidden;
}

.skills-head,
.skill-row {
    display: grid;
    grid-template-columns: 40px 100px 1fr 1.6fr 60px;
    gap: 10px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 0.72rem;
}

.skills-head {
    color: var(--muted-2);
    font-size: 0.68rem;
    text-transform: lowercase;
    background: rgba(78, 225, 192, 0.02);
}

.skill-row {
    color: var(--text);
    transition: background 0.2s;
}

.skill-row:hover {
    background: rgba(78, 225, 192, 0.04);
}

.skill-row:last-child {
    border-bottom: none;
}

.skill-row span:first-child {
    color: var(--muted-2);
    font-size: 0.68rem;
}

.cat-frontend,
.cat-backend,
.cat-embedded,
.cat-tools {
    font-weight: 500;
}

.cat-frontend {
    color: var(--cyan);
}

.cat-backend {
    color: var(--cyan);
}

.cat-embedded {
    color: var(--cyan);
}

.cat-tools {
    color: var(--cyan);
}

/* Skill bar — segmented block style */
.bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 14px;
    position: relative;
}

.bar i {
    display: inline-flex;
    height: 10px;
    background: repeating-linear-gradient(90deg,
            var(--cyan) 0px,
            var(--cyan) 6px,
            transparent 6px,
            transparent 9px);
    border-radius: 1px;
    font-style: normal;
    box-shadow: 0 0 6px rgba(78, 225, 192, 0.35);
}

.bar em {
    color: var(--cyan);
    font-style: normal;
    font-size: 0.65rem;
    opacity: 0.7;
    white-space: nowrap;
}

.skill-row span:last-child {
    text-align: right;
    color: var(--muted-2);
    font-size: 0.68rem;
}

.footnote {
    margin-top: 14px;
    color: var(--muted-2);
    font-size: 0.68rem;
}

/* ---------- Education Section ---------- */
.edu-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.log-label {
    color: var(--muted-2);
    font-size: 0.72rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.log-label i {
    color: var(--cyan);
    font-size: 0.7rem;
}

.edu-entry {
    display: flex;
    gap: 12px;
    padding-left: 2px;
}

.edu-bullet {
    position: relative;
    width: 14px;
    flex-shrink: 0;
}

.edu-bullet::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px rgba(78, 225, 192, 0.5);
}

.edu-bullet::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 18px;
    width: 2px;
    height: calc(100% - 18px);
    background: rgba(78, 225, 192, 0.25);
}

.edu-entry:last-child .edu-bullet::after {
    display: none;
}

.edu-content {
    flex: 1;
    border-left: 1px solid var(--line-soft);
    padding-left: 14px;
}

.edu-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
}

.edu-year {
    color: var(--cyan);
    font-size: 0.68rem;
}

.edu-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.edu-main img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 50%;
    background: transparent;
    border: none;
}

.edu-main h3 {
    color: var(--text);
    font-size: 0.92rem;
    margin-bottom: 1px;
    font-weight: 600;
}

.edu-main p {
    color: var(--muted);
    font-size: 0.68rem;
}

.edu-content ul {
    list-style: none;
    padding-left: 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.6;
}

.edu-content ul li::before {
    content: "›";
    display: inline-block;
    margin-right: 6px;
    color: var(--cyan);
    font-weight: 600;
}

/* ---------- Organizations ---------- */
.org-block {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 14px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.org-block:hover {
    transform: translateY(-3px);
    border-color: var(--cyan);  
    background: rgba(17, 32, 36, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25), 0 0 14px rgba(78, 225, 192, 0.12);
}

.org-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.org-header img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    border: none;
}

.org-header h3 {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text);
    font-weight: 500;
}

.org-role-row {
    display: grid;
    grid-template-columns: 14px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid var(--line-soft);
    font-size: 0.72rem;
}

.org-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(78, 225, 192, 0.45);
}

.org-role {
    color: var(--text);
    font-size: 0.78rem;
}

.org-year {
    color: var(--muted-2);
    font-size: 0.68rem;
    text-align: right;
}

/* ---------- Contact Section ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: start;
}

.contact-copy {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.75;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-size: 0.78rem;
    transition: border-color 0.2s, background 0.2s;
}

.contact-item:hover {
    border-color: rgba(78, 225, 192, 0.35);
    background: rgba(78, 225, 192, 0.04);
}

.contact-item i {
    color: var(--cyan);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* ---------- Copyright Footer ---------- */
footer {
    text-align: center;
    padding: 24px 0;
    color: #71717a; /* Subtle muted gray */
    font-size: 0.875rem; /* Slightly smaller text */
    font-family: inherit;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-section,
    .about-grid,
    .edu-layout,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .terminal-topbar {
        padding: 0;
    }

    .topbar-inner {
        padding: 10px 16px;
        min-height: 48px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        height: auto;
        align-items: center;
    }

    .terminal-prompt {
        grid-column: 1;
    }

    .clone-btn {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        grid-column: 2;
        justify-self: end;
        order: 2;
    }

    .terminal-nav {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
        background: rgba(10, 15, 20, 0.98);
        border: 1px solid var(--line-soft);
        border-radius: 8px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
        z-index: 30;
    }

    .terminal-nav.is-open {
        display: flex;
    }

    .terminal-nav a {
        width: 100%;
        padding: 2px 0;
    }

    .terminal-body {
        padding: 0 16px 32px;
    }

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

    .skills-head {
        display: none;
    }

    .skill-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px 10px;
    }

    .skill-row span:nth-child(3),
    .skill-row span:nth-child(4),
    .skill-row span:nth-child(5) {
        grid-column: 1 / -1;
    }

    .org-role-row {
        grid-template-columns: 14px 1fr;
    }

    .org-year {
        grid-column: 2;
        text-align: left;
    }
}