/* =====================================================
   UPGRADED PORTFOLIO CSS — Full Design System Overhaul
   Based on 01_AI_RULES + 02_DESIGN_SYSTEM + 03_LAYOUT
   + 04_COMPONENT_GUIDELINES + 05_UX_ENHANCEMENTS
   ===================================================== */

/* --- Ticker alignment fix --- */
.tsi-track {
    padding: 0 24px;
    justify-content: center !important;
    overflow: hidden;
    position: relative;
}
.tsi-inner {
    display: flex;
    gap: 0.5rem;
    justify-content: center !important;
    min-width: max-content;
    width: max-content;
    animation: ticker-rtl 18s linear infinite;
}
.tsi-track .tsi-inner.tsi-ltr {
    animation: ticker-ltr 18s linear infinite;
}
@keyframes ticker-rtl {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@keyframes ticker-ltr {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
.tsi-track::before,
.tsi-track::after {
    content: '';
    position: absolute;
    top: 0;
    width: 64px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
.tsi-track::before {
    left: 0;
    background: linear-gradient(to right, var(--bg) 40%, transparent 100%);
}
.tsi-track::after {
    right: 0;
    background: linear-gradient(to left, var(--bg) 40%, transparent 100%);
}

/* =====================
   DESIGN SYSTEM: COLORS
   ===================== */
[data-theme="dark"] {
    --bg: #070b14;
    --bg-primary: #070b14;
    --bg-secondary: #0d1220;
    --surface: #0d1220;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent2: #14b8a6;
    --accent3: #f59e0b;
    --accent-orange: #f97316;
    --text: #e2e8f0;
    --text-primary: #e2e8f0;
    --text-secondary: #64748b;
    --muted: #64748b;
    --card: rgba(59, 130, 246, 0.04);
    --input-bg: rgba(255, 255, 255, 0.05);
    --footer-bg: #050810;
    --nav-bg: rgba(7, 11, 20, 0.92);
    --glow1: rgba(59, 130, 246, .12);
    --glow2: rgba(20, 184, 166, .08);
    --glow3: rgba(245, 158, 11, .06);
    --gradient-text: linear-gradient(135deg, #3b82f6 0%, #14b8a6 50%, #f59e0b 100%);
    --gradient-btn: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-cta: linear-gradient(135deg, #2563eb, #3b82f6, #14b8a6);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --surface: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent2: #0d9488;
    --accent3: #d97706;
    --accent-orange: #f97316;
    --text: #0f172a;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --muted: #64748b;
    --card: rgba(37, 99, 235, 0.03);
    --input-bg: rgba(0, 0, 0, 0.04);
    --footer-bg: #0f172a;
    --nav-bg: rgba(248, 250, 252, 0.92);
    --glow1: rgba(37, 99, 235, .1);
    --glow2: rgba(13, 148, 136, .08);
    --glow3: rgba(217, 119, 6, .06);
    --gradient-text: linear-gradient(135deg, #2563eb 0%, #0d9488 50%, #d97706 100%);
    --gradient-btn: linear-gradient(135deg, #2563eb, #1d4ed8);
    --gradient-cta: linear-gradient(135deg, #1d4ed8, #2563eb, #0d9488);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ========================
   DESIGN SYSTEM: TYPOGRAPHY
   ======================== */
/* Scale: H1→48px, H2→36px, H3→28px, H4→22px, Body→16px, Small→14px */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
    transition: background 0.35s, color 0.35s;
    line-height: 1.6;
}

/* SKIP TO CONTENT */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 10001;
    padding: .6rem 1.2rem;
    background: var(--accent);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    transition: top .3s ease;
}
.skip-link:focus {
    top: 0;
}

/* SCROLL PROGRESS BAR */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-cta);
    z-index: 9998;
    transition: none;
}

/* ================
   CURSOR — enhanced
   ================ */
.cursor {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-ring {
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: width .3s, height .3s, border-color .3s;
    opacity: .45;
}

/* Cursor glow on hover — activated by JS adding .hovered to body */
body.cursor-hover .cursor {
    transform: scale(1.5);
    box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(59, 130, 246, 0.3);
}

body.cursor-hover .cursor-ring {
    width: 48px;
    height: 48px;
    border-color: var(--accent);
    opacity: .25;
}

/* ================================
   NAVBAR — sticky blur, hover anim
   ================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.1rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    transition: background .35s, box-shadow .35s;
}

nav.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* Hover underline animation */
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-family: 'DM Mono', monospace;
    transition: color .2s;
    position: relative;
    padding-bottom: 2px;
}

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

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

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

.nav-links a.active {
    color: var(--accent);
}

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

/* Theme Toggle */
.theme-btn {
    width: 48px;
    height: 26px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: none;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3px;
    transition: all .3s;
    flex-shrink: 0;
}

[data-theme="dark"] .theme-btn {
    background: rgba(59, 130, 246, .12);
    border-color: rgba(59, 130, 246, .3);
}

.theme-knob {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    transition: transform .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

[data-theme="light"] .theme-knob {
    transform: translateX(22px);
}

/* ===============
   CONTAINER SYSTEM
   =============== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===============
   SECTION SPACING
   =============== */
section {
    padding: 80px 4rem;
}

.section-label {
    font-family: 'DM Mono', monospace;
    font-size: .75rem;
    color: var(--accent);
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 3rem;
}

/* Accent underline on section titles */
.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--gradient-btn);
    border-radius: 2px;
    margin-top: .9rem;
}

/* Section header row with View All */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.section-header-row .section-title {
    margin-bottom: 3rem;
}

.view-all-btn {
    font-family: 'DM Mono', monospace;
    font-size: .85rem;
    color: var(--accent);
    text-decoration: none;
    padding: .5rem 1.2rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    transition: background .2s, color .2s, transform .2s;
    white-space: nowrap;
}

.view-all-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
}

/* ===========
   HERO LAYOUT
   =========== */
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* TERMINAL */
.hero-terminal {
    animation: fadeUp .6s .4s ease both;
}

.terminal-window {
    background: #0d1117;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.12),
        6px 6px 0 rgba(59, 130, 246, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.5);
    font-family: 'DM Mono', monospace;
    max-width: 100%;
}

[data-theme="light"] .terminal-window {
    background: #1a1f2e;
    box-shadow:
        0 0 0 1px rgba(37, 99, 235, 0.15),
        6px 6px 0 rgba(37, 99, 235, 0.12),
        0 30px 80px rgba(0, 0, 0, 0.12);
}

.terminal-bar {
    background: #161b27;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

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

.t-dot-r { background: #ff5f57; }
.t-dot-y { background: #febc2e; }
.t-dot-g { background: #28c840; }

.t-title {
    margin-left: .5rem;
    font-size: .78rem;
    color: #8892b0;
    letter-spacing: .03em;
}

.terminal-body {
    padding: 1.4rem 1.6rem 1.8rem;
    line-height: 1.9;
    max-height: 340px;
    overflow-y: auto;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, .25);
    border-radius: 4px;
}

.t-line {
    font-size: .85rem;
    white-space: nowrap;
    display: block;
    opacity: 0;
}

.t-response {
    white-space: normal;
    word-break: break-word;
}

.t-line.typed { opacity: 1; }

.t-kw  { color: #c792ea; }
.t-var { color: #3b82f6; }
.t-op  { color: #89ddff; }
.t-key { color: #e8edf2; }
.t-str { color: #f9c74f; }
.t-colon { color: #89ddff; }
.t-prompt { color: #14b8a6; font-size: .95rem; }
.t-cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: #3b82f6;
    vertical-align: middle;
    animation: blink .9s step-end infinite;
    margin-left: 2px;
}

/* HERO */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 4rem 5rem;
    position: relative;
    overflow: hidden;
}

/* Grid background */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, .05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

[data-theme="light"] .hero-grid-bg {
    background-image:
        linear-gradient(rgba(37, 99, 235, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, .06) 1px, transparent 1px);
}

/* Glow orbs */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, .13) 0%, transparent 70%);
    top: 10%;
    right: -100px;
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

.hero-glow2 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(20, 184, 166, .1) 0%, transparent 70%);
    bottom: 10%;
    left: -80px;
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite reverse;
}

.hero-glow3 {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(245, 158, 11, .07) 0%, transparent 70%);
    top: 55%;
    left: 35%;
    border-radius: 50%;
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.1); opacity: .7; }
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Hero badge */
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, .3);
    padding: .4rem 1rem;
    border-radius: 2rem;
    margin-bottom: 2rem;
    animation: fadeUp .6s ease both;
    background: rgba(59, 130, 246, .04);
}

.hero-tag::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

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

/* Hero name */
.hero-name {
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 800;
    line-height: .95;
    letter-spacing: -.04em;
    animation: fadeUp .6s .1s ease both;
}

.hero-name .line2 {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .2);
}

[data-theme="light"] .hero-name .line2 {
    -webkit-text-stroke: 1px rgba(0, 0, 0, .15);
}

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

.hero-name .gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    margin-top: 2rem;
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.75;
    max-width: 520px;
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    animation: fadeUp .6s .2s ease both;
}

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

/* ====================================
   BUTTONS — Design System Component
   ==================================== */

/* Primary button */
.btn-primary {
    padding: .85rem 2rem;
    background: var(--accent);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: none;
    font-size: .95rem;
    text-decoration: none;
    transition: background .25s, transform .2s, box-shadow .2s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, .35);
}

/* Outline button */
.btn-outline {
    padding: .9rem 2.2rem;
    background: transparent;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: none;
    font-size: .9rem;
    text-decoration: none;
    transition: border-color .2s, color .2s, transform .2s;
    display: inline-block;
}

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

/* CV / Secondary button */
.btn-cv {
    padding: .85rem 2rem;
    background: var(--card);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: none;
    font-size: .95rem;
    text-decoration: none;
    transition: all .25s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

[data-theme="light"] .btn-cv { border-color: rgba(0, 0, 0, .12); }

.btn-cv:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, .15);
}

/* Hero socials */
.hero-socials {
    display: flex;
    gap: .75rem;
    margin-top: 1.8rem;
}

.hero-social {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    cursor: none;
    transition: all .25s ease;
    opacity: .55;
    border-radius: 6px;
}

.hero-social:hover {
    opacity: 1;
    color: var(--accent);
    transform: translateY(-3px);
}

.hero-social svg {
    width: 22px;
    height: 22px;
}

/* Hero scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    animation: fadeUp .6s .5s ease both;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%  { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

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

/* ============
   ABOUT SECTION
   ============ */
#about {
    background: var(--surface);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text p {
    color: var(--muted);
    line-height: 1.8;
    font-family: 'DM Mono', monospace;
    font-weight: 300;
    font-size: .92rem;
    margin-bottom: 1.2rem;
}

.about-text p em {
    color: var(--accent);
    font-style: normal;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* === CARDS — Core Pattern === */
.card,
.stat-card,
.project-card,
.blog-card,
.cert-card,
.journey-card {
    background: var(--bg-secondary, var(--card));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all .3s ease;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: border-color .3s, transform .3s, box-shadow .3s;
    backdrop-filter: blur(8px);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
}

/* Per-card color accents */
.stat-card:nth-child(1):hover { border-color: var(--accent); }
.stat-card:nth-child(2):hover { border-color: var(--accent2); }
.stat-card:nth-child(3):hover { border-color: var(--accent3); }
.stat-card:nth-child(4):hover { border-color: var(--accent); }

.stat-card:nth-child(1) .stat-num { color: var(--accent); }
.stat-card:nth-child(2) .stat-num { color: var(--accent2); }
.stat-card:nth-child(3) .stat-num { color: var(--accent3); }
.stat-card:nth-child(4) .stat-num { color: var(--accent); }

.stat-num {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -.04em;
}

.stat-label {
    font-size: 14px;
    color: var(--muted);
    margin-top: .3rem;
    font-family: 'DM Mono', monospace;
}

/* ===============
   JOURNEY SECTION
   =============== */
#journey {
    padding: 80px 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.journey-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2rem;
}

.journey-card {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color .3s, box-shadow .3s, transform .3s;
    cursor: pointer;
}

.journey-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgba(59, 130, 246, .12);
    transform: translateY(-2px);
}

.journey-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: rgba(59, 130, 246, .1);
    color: var(--accent);
}

.journey-card-text { flex: 1; }

.journey-card-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .25rem;
}

.journey-card-desc {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.4;
}

.journey-card-arrow {
    color: var(--muted);
    opacity: 0;
    transition: opacity .3s, transform .3s;
}

.journey-card:hover .journey-card-arrow {
    opacity: 1;
    transform: translateX(4px);
    color: var(--accent);
}

/* ==============
   SKILLS SECTION
   ============== */
#skills {
    background: var(--bg);
}

.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.skill-cat-title {
    font-size: 14px;
    font-family: 'DM Mono', monospace;
    color: var(--muted);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    padding-left: .75rem;
    border-left: 2px solid var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* Skill tags — pill shape */
.skill-tag {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--card);
    transition: all .25s;
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, .12);
    background: rgba(59, 130, 246, .06);
}

/* Color variant hover for skill tags */
.skill-tags-cyan .skill-tag:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    box-shadow: 0 4px 12px rgba(20, 184, 166, .12);
    background: rgba(20, 184, 166, .06);
}

.skill-tags-amber .skill-tag:hover {
    border-color: var(--accent3);
    color: var(--accent3);
    box-shadow: 0 4px 12px rgba(245, 158, 11, .12);
    background: rgba(245, 158, 11, .06);
}

/* ===============
   PROJECTS SECTION
   =============== */
#projects {
    background: var(--surface);
}

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

.project-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .3s, transform .3s, box-shadow .3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
}

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

.project-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, .07) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
}

/* Per-card color variants */
.project-card:nth-child(2):hover { border-color: var(--accent2); }
.project-card:nth-child(3):hover { border-color: var(--accent3); }

.project-card:nth-child(2) .project-icon  { background: rgba(20, 184, 166, .1); }
.project-card:nth-child(3) .project-icon  { background: rgba(245, 158, 11, .1); }
.project-card:nth-child(4) .project-icon  { background: rgba(37, 99, 235, .1); }

.project-card:nth-child(2) .project-card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, .07) 0%, transparent 60%);
}
.project-card:nth-child(3) .project-card-glow {
    background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, .07) 0%, transparent 60%);
}

.project-header {
    padding: 2rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-icon {
    width: 46px;
    height: 46px;
    background: rgba(59, 130, 246, .1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

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

.project-links a {
    text-decoration: none;
    font-size: .8rem;
    font-family: 'DM Mono', monospace;
    transition: color .2s, background .2s;
    padding: .3rem .7rem;
    border-radius: 6px;
}

.project-links a:first-child {
    color: var(--accent2);
    border: 1px solid var(--accent2);
}

.project-links a:first-child:hover {
    background: var(--accent2);
    color: var(--bg);
}

.project-links a:last-child {
    color: var(--accent);
    border: 1px solid var(--accent);
}

.project-links a:last-child:hover {
    background: var(--accent);
    color: var(--bg);
}

.project-body {
    padding: 0 2rem 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: .6rem;
}

.project-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    font-family: 'DM Mono', monospace;
    font-weight: 300;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.2rem;
}

.stack-pill {
    font-size: .72rem;
    font-family: 'DM Mono', monospace;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, .08);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, .18);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: auto;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: rgba(255, 100, 100, .1);
    border: 1px solid rgba(255, 100, 100, .15);
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    color: #f87171;
    align-self: flex-end;
}

.project-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f87171;
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.85); }
}

/* Show more */
.show-more-wrap {
    display: none;
    justify-content: center;
    margin-top: 2.5rem;
}

.show-more-btn {
    padding: .7rem 2rem;
    background: var(--card);
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-weight: 600;
    font-size: .85rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: none;
    transition: all .25s ease;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    letter-spacing: .02em;
    text-decoration: none;
}

.show-more-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, .12);
}

.show-more-btn.no-more {
    opacity: .5;
    pointer-events: none;
}

.projects-grid .project-card.hidden-card,
.blog-grid .blog-card.hidden-card {
    display: none;
}

.projects-grid .project-card.hidden-card.show {
    display: flex;
}

.blog-grid .blog-card.hidden-card.show {
    display: block;
}

/* =============
   BLOG SECTION
   ============= */
#blog {
    background: var(--bg);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color .3s, transform .3s, box-shadow .3s;
}

.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

/* Per-card color variants */
.blog-card:nth-child(1):hover { border-color: var(--accent); }
.blog-card:nth-child(2):hover { border-color: var(--accent2); }
.blog-card:nth-child(3):hover { border-color: var(--accent3); }

.blog-img {
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-img-bg { position: absolute; inset: 0; }

.bg-1 { background: linear-gradient(135deg, #0b1e3d, #1e3a8a, #1e4a6d); }
.bg-2 { background: linear-gradient(135deg, #0c1a2e, #164e63, #0f766e); }
.bg-3 { background: linear-gradient(135deg, #1c1917, #78350f, #92400e); }

.blog-emoji-big {
    font-size: 3rem;
    position: relative;
    z-index: 2;
}

.blog-cat {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    font-size: .68rem;
    font-family: 'DM Mono', monospace;
    padding: .2rem .65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, .3);
    backdrop-filter: blur(4px);
}

.blog-body {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    color: var(--muted);
    margin-bottom: .7rem;
}

.blog-dot {
    width: 3px;
    height: 3px;
    background: var(--muted);
    border-radius: 50%;
}

.blog-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: .5rem;
}

.blog-excerpt {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    font-family: 'DM Mono', monospace;
    font-weight: 300;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: 1rem;
    color: var(--accent);
    font-size: .8rem;
    font-family: 'DM Mono', monospace;
    text-decoration: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease, gap .2s;
}

.blog-card:hover .read-more {
    opacity: 1;
    transform: translateY(0);
}

.read-more:hover { gap: .6rem; }

/* ================
   CONTACT SECTION
   ================ */
#contact {
    background: var(--surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-title {
    margin-bottom: 1rem;
}

.contact-sub {
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: .88rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--muted);
    font-family: 'DM Mono', monospace;
    font-size: .85rem;
}

.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-item strong { color: var(--text); }

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: .8rem;
    font-family: 'DM Mono', monospace;
    transition: all .2s;
    background: var(--card);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

/* Social color variants */
.social-link:nth-child(1):hover { border-color: var(--accent); color: var(--accent); }
.social-link:nth-child(2):hover { border-color: var(--accent2); color: var(--accent2); }
.social-link:nth-child(3):hover { border-color: var(--accent3); color: var(--accent3); }
.social-link:nth-child(4):hover { border-color: var(--accent); color: var(--accent); }

/* === FORM === */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.fg {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.fg label {
    font-size: .75rem;
    font-family: 'DM Mono', monospace;
    color: var(--muted);
    letter-spacing: .05em;
    text-transform: uppercase;
}

.fg input,
.fg textarea {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .85rem 1rem;
    color: var(--text);
    font-family: 'DM Mono', monospace;
    font-size: .88rem;
    outline: none;
    resize: vertical;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.fg input:focus,
.fg textarea:focus {
    border-color: var(--accent);
    background: rgba(59, 130, 246, .04);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.fg textarea { min-height: 130px; }

/* Form button */
.form-btn {
    padding: .95rem;
    background: var(--gradient-btn);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    border: none;
    border-radius: 12px;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59, 130, 246, .35);
    filter: brightness(1.1);
}

.form-btn:disabled { opacity: .6; }

.form-toast {
    padding: .85rem 1rem;
    border-radius: 8px;
    font-family: 'DM Mono', monospace;
    font-size: .85rem;
    display: none;
    margin-top: .3rem;
}

.toast-ok {
    background: rgba(59, 130, 246, .1);
    border: 1px solid rgba(59, 130, 246, .3);
    color: var(--accent);
}

.toast-err {
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #ef4444;
}

/* ======
   FOOTER
   ====== */
footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
}

.footer-cta-wrap {
    padding: 0 2.5rem;
    transform: translateY(-50%);
}

.footer-cta {
    background: var(--gradient-cta);
    border-radius: 16px;
    padding: 2rem 2.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 8px 48px rgba(37, 99, 235, .3);
}

.footer-cta-text h3 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.footer-cta-text p {
    color: rgba(255, 255, 255, .75);
    font-size: .95rem;
    margin-top: .35rem;
}

.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
    padding: .7rem 1.6rem;
    background: #fff;
    color: #2563eb;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.footer-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
}

.footer-grid {
    padding: 3rem 4rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-cta-wrap + .footer-grid { padding-top: 0; }

.footer-brand { display: flex; flex-direction: column; }

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: #fff;
    display: block;
    margin-bottom: .75rem;
}

.footer-logo span { color: var(--accent); }

.footer-brand p {
    color: #64748b;
    font-family: 'DM Mono', monospace;
    font-size: .82rem;
    line-height: 1.7;
    max-width: 220px;
}

.fc h4 {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-family: 'DM Mono', monospace;
    margin-bottom: 1.2rem;
    color: var(--accent);
}

.fc ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.fc ul a {
    color: #64748b;
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: .84rem;
    transition: color .2s;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.fc ul a::before {
    content: '→';
    font-size: .72rem;
    color: var(--accent);
}

.fc ul a:hover { color: #fff; }

.footer-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-family: 'DM Mono', monospace;
    font-size: .82rem;
    color: #22c55e;
    margin-bottom: .9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.footer-info {
    font-family: 'DM Mono', monospace;
    font-size: .8rem;
    color: #64748b;
    line-height: 2;
}

.footer-info strong { color: #94a3b8; }

.footer-bottom {
    padding: 1.4rem 4rem 4.5rem;
    border-top: 1px solid rgba(255, 255, 255, .05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    color: #475569;
}

.footer-copy strong { color: #94a3b8; }

.footer-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.footer-links a {
    color: #475569;
    text-decoration: none;
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    transition: color .2s;
}

.footer-links a:hover { color: #94a3b8; }

.top-btn {
    padding: .45rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    color: #64748b;
    background: transparent;
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    cursor: none;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}

.top-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ====================
   SECTION REVEAL (UX)
   ==================== */
.reveal,
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible,
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   FLOATING BOTTOM NAV
   ===================== */
.bottom-nav {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 99;
    display: flex;
    align-items: center;
    gap: .15rem;
    padding: .35rem;
    background: rgba(7, 11, 20, .94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50px;
    opacity: 0;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1), opacity .5s ease;
    pointer-events: none;
}

.bottom-nav.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

[data-theme="light"] .bottom-nav {
    background: rgba(15, 23, 42, .92);
    border-color: rgba(255, 255, 255, .1);
}

.bnav-link {
    position: relative;
    padding: .5rem 1.15rem;
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .45);
    text-decoration: none;
    border-radius: 50px;
    transition: color .3s ease;
    white-space: nowrap;
    cursor: none;
    z-index: 2;
}

.bnav-link:hover { color: rgba(255, 255, 255, .8); }
.bnav-link.active { color: #fff; }

.bnav-indicator {
    position: absolute;
    top: .35rem;
    left: 0;
    height: calc(100% - .7rem);
    background: rgba(59, 130, 246, .15);
    border-radius: 50px;
    transition: left .35s cubic-bezier(.4, 0, .2, 1), width .35s cubic-bezier(.4, 0, .2, 1);
    z-index: 1;
    pointer-events: none;
}

[data-theme="light"] .bnav-indicator {
    background: rgba(255, 255, 255, .15);
}

/* Animated nav link gradient hover */
.nav-links a:hover {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ======
   LOADER
   ====== */
.loader-wrap {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: transform .8s cubic-bezier(.77, 0, .18, 1), opacity .6s ease;
}

.loader-wrap.done {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.loader-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: .5rem;
}

.loader-brackets {
    font-family: 'DM Mono', monospace;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 80px;
    opacity: 0;
    animation: bracketDraw .6s .3s ease forwards;
}

.loader-brackets span { color: var(--accent); }

@keyframes bracketDraw {
    0%   { opacity: 0; transform: scale(.5); letter-spacing: .5em; }
    100% { opacity: 1; transform: scale(1); letter-spacing: .05em; }
}

.loader-orbit {
    position: absolute;
    inset: -12px;
    animation: loaderSpin 1.8s linear infinite;
}

.loader-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.loader-dot:nth-child(1) {
    top: 0; left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}
.loader-dot:nth-child(2) {
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    background: var(--accent2);
    box-shadow: 0 0 12px var(--accent2);
}
.loader-dot:nth-child(3) {
    top: 50%; left: 0;
    transform: translateY(-50%);
    background: var(--accent3);
    box-shadow: 0 0 12px var(--accent3);
}

@keyframes loaderSpin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-bar-track {
    width: 120px;
    height: 3px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0;
    background: var(--gradient-cta);
    border-radius: 3px;
    animation: loaderFill 1.6s .2s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes loaderFill {
    0%   { width: 0; }
    100% { width: 100%; }
}

body.loading { overflow: hidden; }

/* ============
   CARD TILT
   ============ */
.tilt-card {
    transition: transform .35s ease, box-shadow .35s ease;
    transform-style: preserve-3d;
}

/* ====================
   CERTIFICATIONS/BADGES
   ==================== */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}

.cert-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.6rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s;
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.cert-card:nth-child(2):hover { border-color: var(--accent2); }
.cert-card:nth-child(3):hover { border-color: var(--accent3); }
.cert-card:nth-child(4):hover { border-color: var(--accent-orange); }

.cert-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(59, 130, 246, .08);
}

.cert-card:nth-child(2) .cert-icon { background: rgba(20, 184, 166, .08); }
.cert-card:nth-child(3) .cert-icon { background: rgba(245, 158, 11, .08); }
.cert-card:nth-child(4) .cert-icon { background: rgba(249, 115, 22, .08); }

.cert-info { flex: 1; }

.cert-title {
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .25rem;
}

.cert-issuer {
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    color: var(--muted);
    margin-bottom: .4rem;
}

.cert-date {
    font-family: 'DM Mono', monospace;
    font-size: .65rem;
    color: var(--accent);
}

.cert-card:nth-child(2) .cert-date { color: var(--accent2); }
.cert-card:nth-child(3) .cert-date { color: var(--accent3); }
.cert-card:nth-child(4) .cert-date { color: var(--accent-orange); }

.cert-link {
    font-family: 'DM Mono', monospace;
    font-size: .7rem;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .4rem;
    transition: opacity .2s;
}

.cert-link:hover { opacity: .7; }

/* ===================
   EXPERIENCE TIMELINE
   =================== */
.timeline {
    position: relative;
    margin-top: 2.5rem;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.3rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), rgba(59, 130, 246, .1));
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    padding-left: 1.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2.05rem;
    top: .25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--accent);
    z-index: 2;
}

.timeline-item:nth-child(2) .timeline-dot {
    background: var(--accent2);
    box-shadow: 0 0 0 2px var(--accent2);
}
.timeline-item:nth-child(3) .timeline-dot {
    background: var(--accent3);
    box-shadow: 0 0 0 2px var(--accent3);
}

.timeline-date {
    font-family: 'DM Mono', monospace;
    font-size: .72rem;
    color: var(--accent);
    margin-bottom: .35rem;
}

.timeline-item:nth-child(2) .timeline-date { color: var(--accent2); }
.timeline-item:nth-child(3) .timeline-date { color: var(--accent3); }

.timeline-role {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .2rem;
}

.timeline-company {
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: .5rem;
}

.timeline-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--muted);
}

/* ======================
   PROJECT FILTER DROPDOWN
   ====================== */
.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.filter-wrap { position: relative; }

.filter-toggle {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    font-family: 'DM Mono', monospace;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: none;
    transition: all .25s ease;
}

.filter-toggle:hover,
.filter-toggle.open {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-toggle svg { width: 14px; height: 14px; }

.filter-dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .5rem;
    min-width: 160px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .3);
    opacity: 0;
    transform: translateY(-8px) scale(.96);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 20;
}

.filter-dropdown.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.filter-option {
    display: block;
    width: 100%;
    padding: .5rem .85rem;
    font-family: 'DM Mono', monospace;
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: none;
    text-align: left;
    transition: all .2s ease;
}

.filter-option:hover {
    background: rgba(59, 130, 246, .08);
    color: var(--accent);
}

.filter-option.active {
    background: var(--gradient-btn);
    color: #fff;
}

[data-theme="light"] .filter-dropdown {
    box-shadow: 0 12px 40px rgba(0, 0, 0, .1);
}

/* ====================
   TERMINAL EASTER EGG
   ==================== */
.t-input {
    background: transparent;
    border: none;
    outline: none;
    color: #14b8a6;
    font-family: 'DM Mono', monospace;
    font-size: inherit;
    width: 140px;
    caret-color: #14b8a6;
    cursor: none;
}

.t-response {
    opacity: 0;
    animation: fadeInLine .3s ease forwards;
}

@keyframes fadeInLine {
    to { opacity: 1; }
}

/* ==========================================
   RESPONSIVE — Large Desktop (1400px+)
   ========================================== */
@media (min-width: 1400px) {
    nav         { padding: 1.2rem 6rem; }
    section     { padding: 96px 6rem; }
    #hero       { padding: 9rem 6rem 6rem; }
    #journey    { padding: 80px 6rem; }
    .footer-grid        { padding: 0 6rem 3rem; }
    .footer-bottom      { padding: 1.4rem 6rem; }
    .footer-cta-wrap    { padding: 0 4rem; }
}

/* =========================================
   RESPONSIVE — Laptop/Small Desktop (1200px)
   ========================================= */
@media (max-width: 1200px) {
    nav     { padding: 1.2rem 2.5rem; }
    section { padding: 64px 2.5rem; }
    #hero   { padding: 8rem 2.5rem 5rem; }
    #journey { padding: 64px 2.5rem; }

    .hero-name { font-size: clamp(3rem, 7vw, 5.5rem); }

    .about-grid { gap: 3rem; }

    .footer-grid    { padding: 3rem 2.5rem; gap: 2rem; }
    .footer-cta-wrap + .footer-grid { padding-top: 0; }
    .footer-bottom  { padding: 1.4rem 2.5rem; }
    .footer-cta-wrap { padding: 0 2rem; }
}

/* ============================
   RESPONSIVE — Tablet (900px)
   ============================ */
@media (max-width: 900px) {
    nav { padding: 1.2rem 1.5rem; }
    .nav-links    { display: none; }
    .hero-terminal { display: none; }
    .hero-scroll  { display: none; }
    .socials      { display: none; }

    section  { padding: 4rem 1.5rem; }
    #hero    { padding: 7rem 1.5rem 4rem; min-height: auto; }
    #journey { padding: 4rem 1.5rem; }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-name  { font-size: clamp(2.8rem, 10vw, 4.5rem); }
    .hero-desc  { max-width: 100%; }

    .about-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }

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

    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .blog-grid     { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .certs-grid    { grid-template-columns: 1fr 1fr; }

    #contact { padding-bottom: 5rem; }

    .footer-cta-wrap {
        padding: 0 1rem;
        transform: translateY(-30%);
    }
    .footer-cta {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: .8rem;
    }
    .footer-cta-text p { font-size: .85rem; }
    .footer-cta-btn    { font-size: .9rem; padding: .6rem 1.4rem; }

    .view-all-btn { font-size: .8rem; padding: .45rem 1rem; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        padding: 2.5rem 1.5rem;
        gap: 2rem;
    }
    .footer-cta-wrap + .footer-grid { padding-top: 0; }
    .footer-brand  { grid-column: 1 / -1; }
    .fc:last-child { grid-column: 1 / -1; }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.2rem 1.5rem 4.5rem;
    }

    .form-row    { grid-template-columns: 1fr; }
    .form-btn    { margin-top: .5rem; }

    .section-title { font-size: clamp(1.8rem, 5vw, 2.5rem); }
    .stat-num      { font-size: 2rem; }

    .timeline      { padding-left: 1.5rem; }
    .timeline::before { left: -0.2rem; }
}

/* ============================
   RESPONSIVE — Mobile (480px)
   ============================ */
@media (max-width: 480px) {
    nav { padding: .8rem 1rem; }

    .nav-logo { font-size: 1rem; }

    .theme-btn  { width: 42px; height: 24px; }
    .theme-knob { width: 18px; height: 18px; font-size: 10px; }
    [data-theme="light"] .theme-knob { transform: translateX(18px); }

    section  { padding: 2.5rem 1rem; }
    #hero    { padding: 5rem 1rem 2.5rem; min-height: auto; }
    #journey { padding: 3rem 1rem; }

    .hero-inner  { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-name   { font-size: clamp(2rem, 11vw, 3rem); }
    .hero-desc   { font-size: .82rem; line-height: 1.6; max-width: 100%; }
    .hero-tag    { font-size: .65rem; padding: .3rem .7rem; margin-bottom: 1.2rem; }

    .hero-cta {
        flex-direction: row;
        gap: .5rem;
        margin-top: 2rem;
    }

    .hero-cta .btn-primary,
    .hero-cta .btn-cv {
        flex: 0 1 auto;
        text-align: center;
        padding: .5rem 1rem;
        font-size: .72rem;
        gap: .3rem;
        border-radius: 8px;
    }

    .hero-cta .btn-primary svg,
    .hero-cta .btn-cv svg { width: 12px; height: 12px; }

    .hero-socials { margin-top: 1rem; gap: .5rem; }
    .hero-social  { width: 24px; height: 24px; }
    .hero-social svg { width: 18px; height: 18px; }

    /* About */
    #about { padding: 2.5rem 1rem; }
    .about-grid   { grid-template-columns: 1fr; gap: 2rem; }
    .about-text p { font-size: .82rem; line-height: 1.7; }
    .about-stats  { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .stat-card    { padding: 1rem; }
    .stat-num     { font-size: 1.6rem; }
    .stat-label   { font-size: .68rem; }

    /* Skills */
    .skills-container  { gap: 1.5rem; }
    .skill-cat-title   { font-size: .85rem; margin-bottom: .5rem; }
    .skill-tags        { gap: .4rem; }
    .skill-tag         { padding: .35rem .75rem; font-size: .72rem; }

    /* Projects */
    .projects-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .project-card  { border-radius: 12px; }
    .project-header { padding: 1.2rem 1.2rem .6rem; }
    .project-icon   { width: 38px; height: 38px; font-size: 1.1rem; }
    .project-links a { font-size: .72rem; }
    .project-body   { padding: .4rem 1.2rem 1.4rem; }
    .project-title  { font-size: 1rem; }
    .project-desc   { font-size: .78rem; }
    .project-stack  { gap: .4rem; margin-top: 1rem; }
    .stack-pill     { font-size: .65rem; padding: .2rem .55rem; }
    .project-status { font-size: .6rem; padding: .25rem .6rem; margin-top: 1rem; }

    /* Blog */
    .blog-grid     { grid-template-columns: 1fr; gap: 1rem; }
    .blog-img      { height: 130px; }
    .blog-emoji-big { font-size: 2.5rem; }
    .blog-cat      { font-size: .65rem; padding: .25rem .6rem; }
    .blog-body     { padding: 1rem 1.2rem 1.2rem; }
    .blog-meta     { font-size: .65rem; gap: .5rem; }
    .blog-title    { font-size: .95rem; }
    .blog-excerpt  { font-size: .78rem; line-height: 1.55; }
    .read-more     { font-size: .72rem; margin-top: .75rem; }

    /* Contact */
    .contact-grid  { grid-template-columns: 1fr; gap: 2rem; }
    .contact-sub   { font-size: .8rem; margin-bottom: 1.2rem; }
    .contact-details { gap: .75rem; margin-bottom: 1.2rem; }
    .contact-item  { font-size: .78rem; gap: .5rem; }
    .contact-icon  { width: 32px; height: 32px; font-size: .9rem; }
    #contact       { padding-bottom: 3.5rem; }

    .form-row      { grid-template-columns: 1fr; gap: .75rem; }
    .fg label      { font-size: .68rem; }
    .fg input,
    .fg textarea   { padding: .7rem .85rem; font-size: .82rem; border-radius: 8px; }
    .fg textarea   { min-height: 100px; }
    .form-btn      { padding: .8rem; font-size: .85rem; border-radius: 10px; margin-top: .3rem; }
    .form-toast    { font-size: .78rem; padding: .7rem .85rem; }

    /* Footer */
    footer { margin-top: 2rem; }
    .footer-cta-wrap {
        padding: 0 .75rem;
        transform: translateY(-25%);
    }
    .footer-cta {
        padding: 1.2rem 1rem;
        border-radius: 12px;
        flex-direction: column;
        text-align: center;
        gap: .8rem;
    }
    .footer-cta-text h3 { font-size: clamp(1.1rem, 5vw, 1.6rem); }
    .footer-cta-text p  { font-size: .78rem; }
    .footer-cta-btn     { font-size: .82rem; padding: .55rem 1.2rem; }

    .section-title  { font-size: clamp(1.4rem, 7vw, 1.8rem); margin-bottom: 1.5rem; }
    .section-label  { font-size: .65rem; margin-bottom: .5rem; }
    .section-title::after { height: 2px; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        padding: 1.5rem 1rem;
        gap: 1.2rem;
    }
    .footer-cta-wrap + .footer-grid { padding-top: 0; }

    .section-header-row { align-items: center; }
    .view-all-btn   { font-size: .72rem; padding: .4rem .8rem; }

    .footer-brand  { grid-column: 1 / -1; }
    .footer-brand p { font-size: .75rem; max-width: 100%; }
    .fc:last-child { grid-column: 1 / -1; }
    .fc h4         { font-size: .65rem; margin-bottom: .8rem; }
    .fc ul         { gap: .5rem; }
    .fc ul a       { font-size: .78rem; }

    .footer-status { font-size: .75rem; }
    .footer-info   { font-size: .72rem; }
    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1rem 4rem;
        gap: .75rem;
    }
    .footer-copy   { font-size: .7rem; }
    .footer-actions { gap: .75rem; }
    .footer-links  { gap: .75rem; }
    .footer-links a { font-size: .72rem; }
    .top-btn       { padding: .35rem .8rem; font-size: .7rem; }
    .footer-logo   { font-size: 1.1rem; }

    .socials       { gap: .4rem; flex-wrap: wrap; }
    .social-link   { padding: .35rem .6rem; font-size: .68rem; }

    .terminal-body { padding: 1rem 1.2rem 1.4rem; }
    .t-line        { font-size: .75rem; }
    .t-title       { font-size: .68rem; }

    /* Mobile: show only first card (index page) */
    #projects .projects-grid .project-card:nth-child(n+2) { display: none; }
    #projects .projects-grid.expanded .project-card:nth-child(n+2) { display: flex; }
    #blog .blog-grid .blog-card:nth-child(n+2) { display: none; }
    #blog .blog-grid.expanded .blog-card:nth-child(n+2) { display: block; }

    /* projects.html & blogs.html: JS manages visibility via .mobile-hidden */
    #allProjects .projects-grid .project-card.mobile-hidden { display: none; }
    #allBlogs .blog-grid .blog-card.mobile-hidden { display: none; }

    .show-more-btn {
        padding: .5rem 1.2rem;
        font-size: .72rem;
        border-radius: 10px;
    }
    .show-more-wrap { display: flex; margin-top: 1.5rem; }

    /* Floating nav – mobile */
    .bottom-nav {
        gap: .08rem;
        padding: .25rem;
        bottom: .85rem;
        width: auto;
        max-width: calc(100vw - 2rem);
    }
    .bnav-link {
        padding: .35rem .55rem;
        font-size: .58rem;
    }
    .bnav-indicator {
        top: .28rem;
        height: calc(100% - .56rem);
    }

    /* Certs */
    .certs-grid     { grid-template-columns: 1fr; gap: 1rem; }
    .cert-card      { padding: 1.2rem; }
    .cert-icon      { width: 40px; height: 40px; font-size: 1.2rem; }
    .cert-title     { font-size: .84rem; }

    /* Timeline */
    .timeline          { padding-left: 1.2rem; }
    .timeline::before  { left: -0.05rem; }
    .timeline-item     { padding-left: 1.2rem; }
    .timeline-dot      { left: -1.55rem; width: 10px; height: 10px; }
    .timeline-role     { font-size: .92rem; }
    .timeline-desc     { font-size: .78rem; }

    /* Filter */
    .filter-toggle  { font-size: .68rem; padding: .35rem .7rem; }
    .filter-dropdown { min-width: 140px; }
    .filter-option  { font-size: .68rem; padding: .4rem .7rem; }

    /* Journey */
    .journey-card   { padding: 1.2rem 1rem; gap: 1rem; }
    .journey-card-icon { width: 40px; height: 40px; min-width: 40px; }
    .journey-card-title { font-size: 1rem; }
    .journey-card-desc  { font-size: .82rem; }
}

/* Touch devices — hide custom cursor */
@media (hover: none) and (pointer: coarse) {
    body { cursor: auto; }

    .cursor,
    .cursor-ring { display: none; }

    a, button, .blog-card, .project-card, .stat-card,
    .skill-tag, .theme-btn, .form-btn, .btn-primary,
    .btn-outline, .social-link, .top-btn,
    .show-more-btn, .filter-toggle, .filter-option,
    .journey-card { cursor: pointer; }
}
