﻿:root {
    --bg: #070a10;
    --bg2: #0c1018;
    --surface: #101520;
    --surface2: #161c2a;
    --border: #1c2438;
    --border-bright: #2a3a58;
    --text: #c8d6e8;
    --muted: #4e6278;
    --accent: #22d3ee;
    --accent-dim: rgba(34, 211, 238, 0.08);
    --accent-glow: rgba(34, 211, 238, 0.18);
    --green: #4ade80;
    --purple: #a78bfa;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
}

#grid-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px min(5vw, 60px);
    background: rgba(7, 10, 16, 0.88);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.brand {
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--text);
}

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

.topbar-links {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.topbar-links a {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 160ms;
}

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

.btn {
    text-decoration: none;
    font-family: "JetBrains Mono", monospace;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 6px;
    padding: 9px 18px;
    border: 1px solid transparent;
    transition: all 160ms ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #070a10;
    border-color: var(--accent);
    box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 32px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--border-bright);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border-color: var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-bright);
}

.btn-accent {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    padding: 7px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: all 160ms;
}

.btn-accent:hover { background: var(--accent-dim); }

.hero,
.section,
footer {
    position: relative;
    z-index: 1;
    width: min(1100px, 92%);
    margin: 0 auto;
}

.hero { padding: 56px 0 40px; }

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
    align-items: start;
}

.hero-terminal {
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow), 0 0 0 1px rgba(34,211,238,0.04);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 11px 18px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

.terminal-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: 8px;
}

.terminal-body { padding: 28px 32px 32px; }

.terminal-line {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.92rem;
    color: var(--accent);
    margin: 14px 0 4px;
}

.terminal-line:first-child { margin-top: 0; }

.prompt {
    color: var(--green);
    margin-right: 8px;
    font-weight: 700;
}

.terminal-output {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.88rem;
    color: var(--text);
    margin: 0 0 0 20px;
    white-space: pre-wrap;
    line-height: 1.7;
}

.terminal-output.green { color: var(--green); }

.cursor {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.hero-cta {
    margin-top: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-card {
    background: var(--surface);
    border: 1px solid var(--border-bright);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 100%;
}

.profile-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: block;
}

.profile-fallback {
    display: none;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #0f1624, #101f35);
    color: var(--accent);
    font-family: "JetBrains Mono", monospace;
    font-size: 2rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
}

.profile-card.no-image .profile-image { display: none; }

.profile-card.no-image .profile-fallback { display: flex; }

.profile-caption {
    margin: 10px 0 2px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.profile-highlights {
    margin-top: 18px;
    display: grid;
    gap: 10px;
    text-align: left;
}

.profile-highlight {
    padding: 12px 12px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(34, 211, 238, 0.03));
}

.profile-highlight-label {
    display: block;
    margin-bottom: 6px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-transform: uppercase;
}

.profile-highlight strong {
    display: block;
    color: #e8f0f8;
    font-size: 0.84rem;
    line-height: 1.5;
    font-weight: 600;
}

.section {
    padding: 52px 0;
    border-top: 1px solid var(--border);
    scroll-margin-top: 92px;
}

.eyebrow {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin: 0 0 10px;
}

h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin: 0 0 32px;
    color: #e8f0f8;
    line-height: 1.2;
}

h3 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.metric-item {
    min-height: 152px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--border-bright);
    border-radius: 12px;
    background: var(--surface);
}

.metric-num {
    font-family: "JetBrains Mono", monospace;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 700;
    color: var(--accent);
}

.metric-desc {
    font-size: 0.83rem;
    color: var(--muted);
    line-height: 1.5;
}

.metric-divider { display: none; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
}

.skill-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    transition: border-color 200ms;
}

.skill-group:hover { border-color: var(--border-bright); }

.skill-group-featured {
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 0 28px rgba(34, 211, 238, 0.05);
}

.skill-group-title {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 18px;
}

.skill-bar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: var(--text);
}

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

.bar {
    height: 5px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    border-radius: 99px;
    transition: width 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill.animate { width: var(--w); }

.stack-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stack-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 200ms;
}

.stack-row:hover { border-color: var(--border-bright); }

.stack-row-featured {
    border-color: rgba(34, 211, 238, 0.35);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.05), rgba(16, 21, 32, 1));
}

.stack-label {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    color: var(--accent);
    white-space: nowrap;
    min-width: 90px;
    padding-top: 4px;
    letter-spacing: 0.06em;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.badges span {
    border: 1px solid var(--border-bright);
    background: var(--surface2);
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 0.82rem;
    color: var(--text);
    font-weight: 500;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 200ms, box-shadow 200ms;
}

.project-card:hover {
    border-color: var(--border-bright);
    box-shadow: 0 0 30px rgba(34,211,238,0.06);
}

.project-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.project-num {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-start;
    align-items: center;
}

.project-link-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 9px;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.1);
    text-decoration: none;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
}

.project-title-link {
    color: #e8f0f8;
    text-decoration: none;
}

.project-title-link:hover {
    color: var(--accent);
}

.tag {
    background: var(--accent-dim);
    border: 1px solid rgba(34,211,238,0.22);
    color: var(--accent);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: "JetBrains Mono", monospace;
}

.project-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #e8f0f8;
    min-height: 2.5em;
}

.project-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.65;
    flex: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    color: var(--accent);
    background: var(--accent-dim);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    text-decoration: none;
    transition: border-color 160ms, background-color 160ms;
}

.project-link:hover {
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.14);
}

.project-link-prominent {
    margin-top: 2px;
    margin-bottom: 8px;
    border-color: var(--accent);
    background: rgba(34, 211, 238, 0.18);
    font-weight: 700;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.repo-callout {
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.05), rgba(16, 21, 32, 1));
    padding: 32px;
}

.repo-callout h2 {
    margin-bottom: 14px;
}

.repo-callout-text {
    max-width: 74ch;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

.timeline-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    padding: 26px 28px;
    transition: border-color 200ms;
}

.timeline-item:hover {
    border-color: var(--border-bright);
    border-left-color: var(--accent);
}

.timeline-period {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.story-intro {
    margin: 0 0 24px;
    max-width: 78ch;
    color: var(--muted);
    font-size: 0.95rem;
}

.story-note {
    margin: -14px 0 24px;
    max-width: 78ch;
    color: #90a7c3;
    font-size: 0.84rem;
    font-family: "JetBrains Mono", monospace;
}

.chapter-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 4px;
    padding: 3px 8px;
    background: var(--accent-dim);
}

.timeline-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.timeline-role {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: #e8f0f8;
}

.timeline-company {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.8rem;
    color: var(--accent);
}

.timeline-detail {
    margin: 0 0 14px;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.timeline-detail li { margin-bottom: 4px; }

.timeline-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.timeline-stack span {
    font-family: "JetBrains Mono", monospace;
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 8px;
}

.contact {
    text-align: center;
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.contact h2 {
    max-width: 26ch;
    margin: 12px auto 10px;
}

.contact p {
    color: var(--muted);
    max-width: 60ch;
    margin: 0 auto 32px;
    font-size: 0.95rem;
}

.contact-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

footer {
    padding: 24px 0 40px;
    color: var(--muted);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.78rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

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

.hero { animation: fadeUp 600ms ease both; }
.section { animation: fadeUp 600ms ease both; }
.section:nth-of-type(1) { animation-delay: 80ms; }
.section:nth-of-type(2) { animation-delay: 140ms; }
.section:nth-of-type(3) { animation-delay: 190ms; }
.section:nth-of-type(4) { animation-delay: 240ms; }
.section:nth-of-type(5) { animation-delay: 290ms; }
.section:nth-of-type(6) { animation-delay: 340ms; }

@media (max-width: 860px) {
    .hero-layout { grid-template-columns: 1fr; }
    .profile-card {
        width: min(320px, 100%);
        justify-self: center;
    }
    .metrics-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 620px) {
    .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
    .topbar-links { gap: 14px; }
    .terminal-body { padding: 18px 18px 22px; }
    .hero { padding: 32px 0 28px; }
    .stack-row { flex-direction: column; gap: 10px; }
    .stack-label { min-width: unset; }
    .btn { font-size: 0.78rem; padding: 8px 14px; }
    h2 { font-size: 1.4rem; }
}
