/* ============================================
   Code LBK — Portfolio Styles
   ============================================ */

:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #161618;
    --bg-card-hover: #1c1c1f;
    --accent: #00e5a0;
    --accent-dim: #00e5a020;
    --accent-mid: #00e5a050;
    --text-primary: #f0f0f2;
    --text-secondary: #8a8a95;
    --text-muted: #55555f;
    --border: #222228;
    --border-hover: #333340;
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 16px;
    --radius-sm: 10px;
}

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

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-display);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 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(--accent);
}

/* Grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: .025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ============ NAV ============ */
.nav-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.4s ease;
    background: transparent;
}

.nav-main.scrolled {
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-logo span {
    color: var(--text-muted);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

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

/* Language switch */
.lang-switch {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.lang-switch a {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.lang-switch a.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.lang-switch a:hover:not(.active) {
    color: var(--text-primary);
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 5em;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.25;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    top: 10%;
    right: -10%;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-30px, 20px) scale(1.05);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease both;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s 0.1s ease both;
}

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

.hero-title .outline {
    -webkit-text-stroke: 1.5px var(--text-muted);
    color: transparent;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    font-weight: 300;
    animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeInUp 0.8s 0.3s ease both;
}

.hero-stat-num {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s 0.4s ease both;
}

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

/* ============ BUTTONS ============ */
.btn-accent {
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-accent:hover {
    background: #00ffb2;
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-dim);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ============ SECTIONS ============ */
.section {
    padding: 8rem 0;
    position: relative;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    line-height: 1.7;
    font-weight: 300;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.bgrnd-secondary {
    background: var(--bg-secondary);
}

/* ============ TERMINAL ============ */
.terminal-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 720px;
    margin: 0 auto;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.r {
    background: #ff5f57;
}

.terminal-dot.y {
    background: #febc2e;
}

.terminal-dot.g {
    background: #28c840;
}

.terminal-bar-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 8px;
}

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

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

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

.terminal-line .cmd {
    color: var(--text-primary);
}

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

.terminal-line .error {
    color: #ff5f57;
}

.terminal-line .highlight {
    color: #febc2e;
}

.terminal-line .info {
    color: #61afef;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-input-line .prompt {
    color: var(--accent);
    white-space: pre;
}

#terminalInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    caret-color: var(--accent);
}

.terminal-hint {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    padding: 10px;
    border-top: 1px solid var(--border);
}

/* ============ PROJECTS ============ */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    display: inline-block;
}

.project-tag.accent {
    border-color: var(--accent-mid);
    color: var(--accent);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    flex: 1;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.2rem;
    transition: gap 0.3s;
}

.project-link:hover {
    gap: 10px;
    color: var(--accent);
}

.project-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
    line-height: 1.6;
}

.project-sub a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.project-sub a:hover {
    color: var(--accent);
}

/* ============ SERVICES ============ */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: all 0.4s;
    height: 100%;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
}

/* ============ TIMELINE ============ */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 3rem;
    border-left: 1px solid var(--border);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg-primary);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline-company {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.timeline-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.timeline-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-loc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============ TECH PILLS ============ */
.tech-pill {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 4px;
    transition: all 0.3s;
}

.tech-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ============ CONTACT ============ */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.contact-card i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.contact-card a:hover {
    color: var(--accent);
}

.contact-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

/* ============ FOOTER ============ */
.site-footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.site-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============ ANIMATIONS ============ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============ MOBILE ============ */
.mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 6px 10px;
    font-size: 1.2rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .nav-links {
        display: none !important;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links.show {
        display: flex !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 11, 0.95);
        backdrop-filter: blur(20px);
        padding: 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-num {
        font-size: 1.8rem;
    }
}

/* ============ SOCIAL ICONS ============ */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

/* ============ CURSOR GLOW ============ */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}
