
:root {
    --bg: #050505;
    --bg-soft: #0d0d0d;
    --panel: #121212;
    --line: #262626;
    --line-strong: #383838;
    --text: #e8e8e8;
    --muted: #9d9d9d;
    --accent: #2fd46f;
    --accent-soft: #16281d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    background: radial-gradient(circle at 20% 0%, #141414 0%, var(--bg) 45%) fixed;
    color: var(--text);
    font-family: "Space Grotesk", sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
}

.noise-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image: radial-gradient(rgba(255, 255, 255, 0.18) 0.4px, transparent 0.4px);
    background-size: 3px 3px;
    z-index: -1;
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.terminal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
}

.header-top {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.header-top h1 {
    font-family: "JetBrains Mono", monospace;
    font-size: 2rem;
    letter-spacing: 0.03em;
}

.role {
    margin-top: 0.4rem;
    color: var(--muted);
}

.header-meta {
    text-align: right;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    color: var(--muted);
    display: grid;
    gap: 0.3rem;
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.6rem 0 0.9rem;
    border-top: 1px solid var(--line);
}

.tab-btn {
    border: 1px solid transparent;
    background: transparent;
    color: #7f7f7f;
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    padding: 0.5rem 0.8rem;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #bdbdbd;
}

.tab-btn.active {
    color: var(--accent);
    border-color: var(--line-strong);
    background: #0e0e0e;
}

.page-body {
    padding: 2.2rem 0 2.6rem;
}

.content-section {
    display: block;
    animation: reveal 0.35s ease;
    margin-bottom: 2.2rem;
}

.content-section.active-section {
    display: block;
}

@media (min-width: 901px) {
    .content-section {
        display: none;
        margin-bottom: 0;
    }

    .content-section.active-section {
        display: block;
    }
}

.section-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.88rem;
    text-transform: uppercase;
    color: #b7b7b7;
    letter-spacing: 0.14em;
    margin-bottom: 1.2rem;
}

.section-title::before {
    content: "> ";
    color: var(--accent);
}

.section-note {
    color: var(--muted);
    margin-bottom: 1.1rem;
    font-size: 0.95rem;
}

.sub-title {
    margin: 2rem 0 0.8rem;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.83rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a9a9a9;
}

.panel {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #0f0f0f, #0b0b0b);
    padding: 1.2rem;
    display: grid;
    gap: 0.8rem;
}

.panel.compact h4 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.panel p {
    color: #cbcbcb;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.6rem;
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
    font-size: 0.88rem;
}

.meta-grid span {
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.stat-card {
    border: 1px solid var(--line);
    background: #090909;
    text-align: center;
    padding: 1rem 0.8rem;
}

.stat-card i {
    color: var(--accent);
    font-size: 1rem;
}

.stat-card .value {
    font-family: "JetBrains Mono", monospace;
    font-size: 1.7rem;
    margin: 0.6rem 0 0.2rem;
    color: var(--accent);
}

.stat-card .label {
    color: var(--muted);
    font-size: 0.82rem;
}

.stat-card .sub-label {
    margin-top: 0.35rem;
    color: #7bbf96;
    font-size: 0.75rem;
    font-family: "JetBrains Mono", monospace;
}

.achievement-list {
    display: grid;
    gap: 0.65rem;
}

.line-item {
    display: grid;
    grid-template-columns: 1.2rem 1fr;
    gap: 0.8rem;
    border: 1px solid var(--line);
    background: #0a0a0a;
    padding: 0.85rem;
}

.line-item i {
    color: var(--accent);
    margin-top: 0.15rem;
}

.line-item h4 {
    font-size: 0.96rem;
    margin-bottom: 0.25rem;
}

.line-item p {
    color: var(--muted);
    font-size: 0.88rem;
}

.project-stack {
    display: grid;
    gap: 0.8rem;
}

.project-card {
    border: 1px solid var(--line);
    background: #0a0a0a;
}

.project-head {
    width: 100%;
    text-align: left;
    border: 0;
    background: #0f0f0f;
    color: inherit;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
}

.project-head h3 {
    font-family: "JetBrains Mono", monospace;
    color: var(--accent);
    font-size: 1rem;
}

.project-head p {
    color: #bdbdbd;
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

.project-meta {
    display: grid;
    text-align: right;
    gap: 0.35rem;
    color: #8f8f8f;
    font-size: 0.78rem;
    font-family: "JetBrains Mono", monospace;
}

.project-body {
    display: none;
    border-top: 1px solid var(--line);
    padding: 1rem;
    background: #080808;
}

.project-card.open .project-body {
    display: grid;
    gap: 0.8rem;
}

.project-body p {
    color: #bdbdbd;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-row span {
    border: 1px solid #2d2d2d;
    background: #121212;
    color: #9fc7af;
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
    font-family: "JetBrains Mono", monospace;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    text-decoration: none;
    color: var(--accent);
    font-size: 0.84rem;
    font-family: "JetBrains Mono", monospace;
}

.project-links a:hover {
    color: #7cf3a8;
}

.skills-layout {
    display: grid;
    gap: 0.8rem;
}

.skill-block {
    border: 1px solid var(--line);
    background: #0b0b0b;
    padding: 1rem;
}

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.7rem;
}

.skill-head h3 {
    font-size: 0.98rem;
}

.skill-head span {
    color: var(--muted);
    font-size: 0.8rem;
    font-family: "JetBrains Mono", monospace;
}

.timeline-list {
    display: grid;
    gap: 0.85rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.8rem;
    align-items: stretch;
}

.year {
    border: 1px solid var(--line);
    background: #111;
    color: #9f9f9f;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.85rem;
}

.timeline-panel {
    border: 1px solid var(--line);
    background: #0b0b0b;
    padding: 0.95rem;
}

.timeline-panel h3 {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.timeline-panel p {
    color: var(--muted);
    font-size: 0.87rem;
}

#journey .timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

#journey .timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #3a3a3a, #1e1e1e);
    transform: translateX(-50%);
}

#journey .timeline .timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.3rem;
    position: relative;
}

#journey .timeline .timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

#journey .timeline-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 3px #0b0b0b, 0 0 0 5px #2e2e2e;
}

#journey .timeline-content {
    width: 45%;
    border: 1px solid var(--line);
    background: #0b0b0b;
    padding: 1rem;
    position: relative;
}

#journey .timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 6%;
}

#journey .timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 6%;
}

#journey .timeline-content::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 8px solid transparent;
    transform: translateY(-50%);
}

#journey .timeline-item:nth-child(odd) .timeline-content::before {
    right: -16px;
    border-left-color: #252525;
}

#journey .timeline-item:nth-child(even) .timeline-content::before {
    left: -16px;
    border-right-color: #252525;
}

#journey .timeline-content h3 {
    color: var(--accent);
    font-size: 0.86rem;
    font-family: "JetBrains Mono", monospace;
    margin-bottom: 0.4rem;
}

#journey .timeline-content h4 {
    color: #e5e5e5;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}

#journey .timeline-content p {
    color: #a8a8a8;
    font-size: 0.88rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.contact-tile {
    border: 1px solid var(--line);
    background: #0b0b0b;
    padding: 0.9rem;
    text-decoration: none;
    color: inherit;
    display: grid;
    gap: 0.3rem;
}

.contact-tile span {
    color: var(--muted);
    font-size: 0.76rem;
    font-family: "JetBrains Mono", monospace;
    text-transform: uppercase;
}

.contact-tile strong {
    color: var(--text);
    font-size: 0.95rem;
}

.contact-tile:hover {
    border-color: #3a3a3a;
}

.form-panel h3 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.contact-form {
    display: grid;
    gap: 0.8rem;
}

.contact-form label {
    display: grid;
    gap: 0.3rem;
    color: #a9a9a9;
    font-size: 0.83rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #090909;
    color: var(--text);
    padding: 0.72rem 0.75rem;
    font-family: "JetBrains Mono", monospace;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 1px solid #2b2b2b;
    border-color: #464646;
}

.submit-btn {
    justify-self: start;
    border: 1px solid #2a603f;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.62rem 1rem;
    cursor: pointer;
    font-family: "JetBrains Mono", monospace;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: #1c3526;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 1.5rem;
    padding: 1.2rem 0 1.8rem;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.site-footer p {
    color: #767676;
    font-size: 0.82rem;
    font-family: "JetBrains Mono", monospace;
}

.footer-links {
    display: flex;
    gap: 0.9rem;
}

.footer-links a {
    color: #9b9b9b;
    font-size: 1.1rem;
}

.footer-links a:hover {
    color: var(--accent);
}

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

@media (max-width: 900px) {
    .tab-nav {
        display: none;
    }

    .header-top {
        flex-direction: column;
    }

    .header-meta {
        text-align: left;
    }

    .project-head {
        flex-direction: column;
    }

    .project-meta {
        text-align: left;
    }

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

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

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .year {
        justify-content: flex-start;
    }

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

    #journey .timeline::before {
        left: 18px;
        transform: none;
    }

    #journey .timeline .timeline-item,
    #journey .timeline .timeline-item:nth-child(odd) {
        flex-direction: row;
    }

    #journey .timeline-marker {
        left: 18px;
        transform: none;
    }

    #journey .timeline-content {
        width: calc(100% - 44px);
        margin-left: 44px !important;
        margin-right: 0 !important;
    }

    #journey .timeline-content::before {
        left: -16px !important;
        right: auto !important;
        border-right-color: #252525 !important;
        border-left-color: transparent !important;
    }
}

@media (max-width: 640px) {
    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .tab-nav {
        gap: 0.45rem;
    }

    .tab-btn {
        font-size: 0.77rem;
        padding: 0.45rem 0.65rem;
    }

}