@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600&display=swap');

body {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
}

.navbar {
    width: 100%;
    height: 42px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}

.nav-left { display: flex; align-items: center; }
.nav-right { display: flex; gap: 10px; align-items: center; }

.theme-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.theme-btn.active { color: var(--accent); }

#sidebarToggleBtn {
    border: 1px solid var(--sidebar-border);
    background: var(--sidebar-bg);
    color: var(--text);
    width: 32px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.sidebar {
    width: 230px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 42px;
    padding: 18px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 998;
}

.sidebar.open { transform: translateX(0); }

.sidebar a {
    display: block;
    color: var(--text);
    text-decoration: none;
    margin: 6px 0;
    font-size: 13px;
    transition: color 0.2s ease;
}

.sidebar a.active {
    color: var(--accent);
    font-weight: bold;
}

.content-wrapper {
    padding: 100px 56px 32px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#intro-terminal.hide { opacity: 0; }

.typing {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 1.2px;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--text);
    width: 0;
    opacity: 0;
    margin: 0;
    transform: translateY(2px);
}

.typing.active {
    animation: typing 2.5s steps(30, end) forwards, blink 0.7s infinite;
    opacity: 1;
}

@keyframes typing {
    from { width: 0; }
    to { width: 480px; }
}

@media (max-width: 1000px) {
    .typing {
        font-size: 28px;
        white-space: normal;
        width: auto !important;
        border-right: none;
        animation: none;
        opacity: 1;
    }
}

    @keyframes typing-mobile {
        from { width: 0; }
        to { width: 100%; }
    }
}

@keyframes blink { 50% { border-color: transparent; } }

.code-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
}

.code-editor {
    position: relative;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
}

.highlight-layer {
    pointer-events: none;
    color: var(--text);
    white-space: pre-wrap;
}

.input-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: transparent;
    caret-color: var(--accent);
    white-space: pre-wrap;
    outline: none;
}

.input-layer:focus {
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    50% { caret-color: transparent; }
}

.token.keyword { color: var(--code-keyword); }
.token.string { color: var(--code-string); }
.token.class-name { color: var(--code-class); }
.token.method { color: var(--code-method); }
.token.annotation { color: var(--code-annotation); font-weight: 600; }
.token.comment { color: var(--code-comment); font-style: italic; opacity: 0.75; }
.token.control { color: var(--code-control); font-weight: 600; }

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre;
    overflow-x: auto;
}
@media (max-width: 1200px) {
    .code-block {
        display: none;
    }
}
@media (max-width: 1200px) {
    .footer-code {
        display: none;
    }
}

#intro-terminal {
    position: fixed;
    color: var(--muted);
    white-space: pre-line;
    max-height: 600px;
    font-size: 12px;
    overflow: hidden;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 120px);
    max-width: 1100px;
    pointer-events: none;
    background: transparent;
    opacity: 1;
    transition: transform 0.01s ease, opacity 0.01s ease, max-height 0.01s ease;
}

#intro-terminal.hide {
    max-height: 0;
    opacity: 0;
    margin: 0;
    transform: translateX(-50%) translateY(-18px);
}

.section {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--sidebar-border);
    scroll-margin-top: 80px;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    margin-top: 32px;
    margin-bottom: 12px;
    font-size: 22px;
    color: var(--accent);
}

.section ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.section:last-of-type { border-bottom: none; }

@media (max-width: 1000px) {
    .content-wrapper { padding: 80px 18px 32px; }
    #intro-terminal { width: 100%; top: 56px; }
    .sidebar { width: 200px; }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.skills-column h2 {
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--accent);
}

.skills-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-column li {
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
}

@media (max-width: 1000px) {
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.profile-header {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 40px 0 32px;
}

@media (max-width: 1000px) {
    .profile-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 10px rgba(0,0,0,0.15);
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.profile-photo:hover {
    box-shadow: 0 0 14px var(--accent);
    transition: box-shadow 0.3s ease;
}

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

.name-and-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

@media (max-width: 1000px) {
    .name-and-icons {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
        padding-top: 8px;
    }
}


.social-icons {
    display: flex;
    gap: 14px;
}

.social-icons img {
    height: 26px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.social-icons img:hover {
    opacity: 1;
    transform: scale(1.1);
}

.github-light { display: none; }
.github-dark { display: inline; }

body[data-theme="dark"] .github-dark,
body[data-theme="powershell"] .github-dark {
    display: none;
}

body[data-theme="dark"] .github-light,
body[data-theme="powershell"] .github-light {
    display: inline;
}