/* ===== RESET & VARIABLES ===== */
:root {
    --bg: #fafaf9;
    --bg-alt: #f4f4f2;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-quiet: #a0a0a0;
    --border: #e6e4e1;
    --accent: #2c2c2c;
    --card-bg: #ffffff;
    --tag-bg: #f0efed;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --transition: 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-weight: 400;
    font-size: 16px;
    overflow-x: hidden;
}

/* Restore cursor on interactive elements */
a, button, input, textarea, .project-card, .filter-tab, .toggle-switch, .toggle-label, .blog-card {
    cursor: none;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-weight: 400;
    line-height: 1.2;
}

em {
    font-family: var(--font-display);
    font-style: italic;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

a:hover {
    opacity: 0.6;
}

.highlight {
    position: relative;
    font-weight: 500;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    opacity: 0.12;
}

/* ===== NAVBAR ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 48px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.navbar.scrolled {
    border-bottom: 1px solid var(--border);
}

/* Nav overlay for mobile */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

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

.nav-links {
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    transition: color var(--transition);
}

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

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

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

/* ===== TOGGLE SWITCH ===== */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.toggle-label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--text-quiet);
    cursor: pointer;
    transition: color var(--transition);
    user-select: none;
}

.toggle-label.active {
    color: var(--text);
}

.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background var(--transition);
    padding: 0;
}

.toggle-switch:hover {
    background: #d4d2cf;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text);
    transition: transform var(--transition);
}

.toggle-switch.dev .toggle-knob {
    transform: translateX(20px);
}

/* ===== TOGGLE TOOLTIP ===== */
.toggle-switch::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--text);
    color: var(--bg);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.2px;
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.toggle-switch:hover::after,
.toggle-switch:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== CURSOR TRAIL ===== */
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}

.cursor-dot.hovering {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1.5px solid var(--text);
    opacity: 0.5;
}

.cursor-ring {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-ring.hovering {
    width: 48px;
    height: 48px;
    border-color: rgba(26, 26, 26, 0.4);
}

/* ===== ANIMATED AVATAR ===== */
.hero-avatar {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    animation: avatarFloat 4s ease-in-out infinite;
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    25% { transform: translateY(-54%) translateX(4px); }
    50% { transform: translateY(-50%) translateX(0); }
    75% { transform: translateY(-46%) translateX(-4px); }
}

.avatar-face {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #f0ebe3 0%, #e8e0d5 100%);
    border-radius: 45% 55% 50% 50% / 52% 48% 52% 48%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    transition: border-radius 0.6s ease;
}

.hero-avatar:hover .avatar-face {
    border-radius: 50% 50% 45% 55% / 48% 52% 48% 52%;
}

.avatar-eyes {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding-top: 24px;
}

.avatar-eye {
    width: 12px;
    height: 14px;
    background: var(--text);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.eye-pupil {
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 4px;
    transition: transform 0.08s ease;
}

.avatar-mouth {
    width: 20px;
    height: 8px;
    border-bottom: 2px solid var(--text);
    border-radius: 0 0 50% 50%;
    margin: 14px auto 0;
    transition: all 0.3s ease;
}

.hero-avatar:hover .avatar-mouth {
    width: 26px;
    height: 12px;
    border-bottom-width: 2.5px;
}

.avatar-blush {
    position: absolute;
    width: 14px;
    height: 8px;
    background: rgba(210, 160, 150, 0.3);
    border-radius: 50%;
    top: 42px;
}

.avatar-blush.left { left: 12px; }
.avatar-blush.right { right: 12px; }

.avatar-shadow {
    width: 70px;
    height: 10px;
    background: rgba(0,0,0,0.04);
    border-radius: 50%;
    margin: 12px auto 0;
    animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(0.85); opacity: 0.35; }
}

/* ===== FLOATING ORBIT ===== */
.floating-orbit {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    width: 0;
    height: 0;
}

.orbit-ring {
    width: 0;
    height: 0;
    animation: orbitSpin 20s linear infinite;
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.float-item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    color: var(--text-muted);
    opacity: 0;
    rotate: 0deg;
    animation: orbitCounterSpin 20s linear infinite, floatPulse 3s ease-in-out infinite, floatFadeIn 0.5s ease forwards;
    animation-delay: 0s, var(--pulse-delay, 0s), var(--fade-delay, 0s);
    transition: opacity 0.4s ease;
    will-change: transform, rotate;
}

@keyframes orbitCounterSpin {
    from { rotate: 0deg; }
    to   { rotate: -360deg; }
}

@keyframes floatPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.85); }
    50%      { transform: translate(-50%, -50%) scale(1.08); }
}

.float-item.code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.5px;
    color: var(--text);
}

@keyframes floatFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.3); rotate: 0deg; }
    to   { opacity: 0.45; transform: translate(-50%, -50%) scale(0.85); rotate: 0deg; }
}

.float-item:hover {
    opacity: 0.75 !important;
    transform: translate(-50%, -50%) scale(1.3) !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 48px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.hero-greeting,
.hero-name,
.hero-role,
.hero-tagline,
.hero-cta {
    position: relative;
    z-index: 2;
}

.hero-greeting {
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 88px);
    font-weight: 400;
    letter-spacing: -1px;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero-role {
    font-size: 18px;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-bottom: 32px;
    transition: all var(--transition);
    opacity: 0;
    animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero-tagline {
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.45s forwards;
}

.hero-tagline em {
    color: var(--text);
}

#roleDescriptor {
    transition: opacity 0.3s ease;
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

.btn-large {
    font-size: 16px;
    padding: 18px 40px;
}

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

/* ===== SECTIONS ===== */
.section {
    padding: 120px 48px 80px;
}

.section-container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 64px;
    position: relative;
}

.section-number {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-quiet);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

/* ===== FEATURED BANNER ===== */
.featured-banner {
    width: 100%;
    background: linear-gradient(135deg, #f5f0e8 0%, #faf7f0 50%, #f5f0e8 100%);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    text-align: center;
    position: fixed;
    top: 0;
    z-index: 98;
}

.featured-banner-link {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.3s ease;
    letter-spacing: 0.2px;
    padding: 0 16px;
    line-height: 1.5;
}

.featured-banner-link:hover {
    color: var(--text);
    opacity: 1;
}

.featured-banner-text strong {
    font-weight: 600;
    color: var(--text);
}

.featured-banner-cta {
    font-weight: 600;
    color: #3d7a5c;
    font-size: 16px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.featured-banner-link:hover .featured-banner-cta {
    color: #2a5a40;
    transform: translateX(3px);
}

/* Push navbar below banner */
.navbar {
    top: 42px;
}

/* ===== ABOUT ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* ===== TECH STACK ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--tag-bg);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    border-radius: 20px;
    color: var(--text-muted);
    transition: all var(--transition);
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

.tech-tag:nth-child(1) { animation-delay: 0s; }
.tech-tag:nth-child(2) { animation-delay: 0.05s; }
.tech-tag:nth-child(3) { animation-delay: 0.1s; }
.tech-tag:nth-child(4) { animation-delay: 0.15s; }
.tech-tag:nth-child(5) { animation-delay: 0.2s; }
.tech-tag:nth-child(6) { animation-delay: 0.25s; }
.tech-tag:nth-child(7) { animation-delay: 0.3s; }
.tech-tag:nth-child(8) { animation-delay: 0.35s; }
.tech-tag:nth-child(9) { animation-delay: 0.4s; }
.tech-tag:nth-child(10) { animation-delay: 0.45s; }

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.7s; opacity: 1; transform: translateY(0); }

/* ===== PROJECT CARD — VINTAGE PARCHMENT ===== */
.project-card {
    display: block;
    background: transparent;
    border: none;
    padding: 32px;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    opacity: 0;
    position: relative;
    overflow: visible;
    animation: fadeUp 0.5s ease forwards;
}

/* Torn parchment background layer — filter applied here only */
.project-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    z-index: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(180, 160, 120, 0.03) 2px,
            rgba(180, 160, 120, 0.03) 4px
        ),
        radial-gradient(ellipse at 15% 80%, rgba(200, 170, 120, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(180, 150, 100, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #f7f1e5 0%, #f2e9d7 50%, #efe5d0 100%);
    border: 1px solid #c8bda0;
    border-radius: 4px;
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
    pointer-events: none;
}

/* Hover glow layer */
.project-card::after {
    content: '';
    position: absolute;
    inset: -3px;
    z-index: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(180, 140, 80, 0.07) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: 4px;
}

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

/* Content stays sharp — no filter */
.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-3px) rotate(0.2deg);
}

.project-card:hover::before {
    border-color: #b8a882;
}

.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.3s; }

/* Each card's ::before gets a unique torn-paper filter — only the border/background distorts */
.project-card:nth-child(3n+1)::before {
    filter: url(#tornPaper);
}
.project-card:nth-child(3n+2)::before {
    filter: url(#tornPaper2);
}
.project-card:nth-child(3n+3)::before {
    filter: url(#tornPaper3);
}

.project-card-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--bg-alt) 0%, #ece8e3 100%);
    border-radius: 4px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-quiet);
    font-size: 13px;
    letter-spacing: 0.5px;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card-thumb {
    transform: scale(1.02);
}

/* ===== LIVE DEPLOYED PRODUCT BADGE ===== */
.project-live {
    position: relative;
}

.project-live::before {
    border-color: #7eb8a0 !important;
    box-shadow: 0 0 0 1px rgba(126, 184, 160, 0.25), 0 4px 24px rgba(126, 184, 160, 0.08);
}

.project-live:hover::before {
    border-color: #5ea88a !important;
    box-shadow: 0 0 0 1px rgba(94, 168, 138, 0.35), 0 8px 32px rgba(126, 184, 160, 0.15);
}

.project-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #5ea88a 0%, #3d7a5c 100%);
    border: 1px solid #3d7a5c;
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 10px;
    animation: livePulse 2.5s ease-in-out infinite;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(61, 122, 92, 0.25);
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(61, 122, 92, 0.25); }
    60% { box-shadow: 0 2px 16px rgba(61, 122, 92, 0.45), 0 0 0 4px rgba(126, 184, 160, 0); }
}

.project-live .project-card-badge {
    color: var(--text);
}

/* ===== BUTTON ENHANCED EFFECTS ===== */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.btn-primary {
    position: relative;
    overflow: hidden;
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    opacity: 1;
    background: transparent;
    color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary:hover {
    opacity: 1;
    border-color: var(--text);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ===== TECH TAG HOVER ===== */
.tech-tag {
    display: inline-block;
    padding: 8px 16px;
    background: var(--tag-bg);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    border-radius: 20px;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
    opacity: 1;
    cursor: default;
}

.tech-tag:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== BLOG CARD ENHANCED ===== */
.blog-card {
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.25,0.1,0.25,1);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--text);
    transform: scaleY(0);
    transition: transform 0.35s cubic-bezier(0.25,0.1,0.25,1);
}

.blog-card:hover {
    padding-left: 16px;
}

.blog-card:hover::before {
    transform: scaleY(1);
}

/* ===== NAV LINK ENHANCED ===== */
.nav-links a {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.35s cubic-bezier(0.25,0.1,0.25,1);
}

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

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

/* ===== TOGGLE ENHANCED ===== */
.toggle-switch {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--border);
    border: none;
    cursor: pointer;
    position: relative;
    transition: background 0.35s cubic-bezier(0.25,0.1,0.25,1);
    padding: 0;
}

.toggle-switch:hover {
    background: #d4d2cf;
}

.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-switch.dev .toggle-knob {
    transform: translateX(20px);
}

/* ===== FILTER TABS ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* ===== FILTER TAB ENHANCED ===== */
.filter-tab {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
}

.filter-tab:hover {
    color: var(--text);
    background: var(--bg-alt);
    transform: translateY(-1px);
}

.filter-tab.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.filter-tab:active {
    transform: scale(0.96);
}

/* ===== CONTACT LINK ENHANCED ===== */
.contact-link {
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    position: relative;
    transition: color 0.3s ease;
}

.contact-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.3s ease;
}

.contact-link:hover {
    opacity: 1;
    color: var(--text);
}

.contact-link:hover::after {
    width: 100%;
}

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 9998;
    pointer-events: none;
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-transition.active {
    transform: scaleY(1);
    transform-origin: top;
}

/* ===== PROJECT GRID ===== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.project-card-thumb {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #e8ddc8 0%, #dfd2b8 100%);
    border: 1px solid rgba(180, 160, 120, 0.3);
    border-radius: 2px 6px 2px 5px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9b8c70;
    font-size: 13px;
    letter-spacing: 0.5px;
    overflow: hidden;
}

.project-card-thumb .thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
    color: #a89878;
    background: linear-gradient(135deg, #e8ddc8 0%, #dfd2b8 100%);
}

.project-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.4s ease;
}

.project-card:hover .project-card-img {
    transform: scale(1.04);
}

.project-card-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #8b7650;
    background: rgba(190, 170, 130, 0.15);
    border: 1px dashed rgba(160, 140, 100, 0.4);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
}

.project-card h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    color: #3a3224;
    font-family: var(--font-display);
}

.project-card p {
    font-size: 14px;
    color: #6b5e48;
    line-height: 1.6;
}

/* Hidden project cards (show more) */
.project-hidden {
    display: none;
}

/* Show more button */
.show-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.show-more-btn {
    display: inline-block;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.35s ease;
}

/* ===== BLOGS ===== */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
}

.blog-card {
    padding: 36px 0;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.blog-card:hover {
    padding-left: 12px;
}

.blog-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.blog-date {
    font-size: 12px;
    color: var(--text-quiet);
    letter-spacing: 0.5px;
}

.blog-tag {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    background: var(--tag-bg);
    border-radius: 12px;
    color: var(--text-muted);
}

.blog-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.blog-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: var(--text);
}

/* ===== CONTACT ===== */
.contact-content {
    text-align: center;
}

.contact-intro {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.contact-link {
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.contact-divider {
    color: var(--border);
    user-select: none;
}

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

.footer p {
    font-size: 13px;
    color: var(--text-quiet);
}

.footer-quiet {
    margin-top: 4px;
    font-size: 12px;
}

/* ===== RESPONSIVE ===== */

/* Hamburger menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Large Desktop (>1400px) ── */
@media (min-width: 1400px) {
    .hero {
        max-width: 1200px;
    }
    .section-container {
        max-width: 1200px;
    }
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .blog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0 32px;
    }
}

/* ── Tablet Landscape (769px–1024px) ── */
@media (max-width: 1024px) {
    .navbar {
        padding: 22px 32px;
    }

    .hero {
        padding: 0 32px;
    }

    .hero-name {
        font-size: clamp(40px, 7vw, 72px);
    }

    .hero-tagline {
        font-size: 18px;
    }

    .hero-avatar {
        right: 4%;
        z-index: 0;
    }

    .avatar-face {
        width: 72px;
        height: 72px;
    }

    .avatar-eyes {
        gap: 14px;
        padding-top: 20px;
    }

    .avatar-eye {
        width: 10px;
        height: 12px;
    }

    .eye-pupil {
        width: 4px;
        height: 4px;
        top: 2px;
        left: 3px;
    }

    .avatar-mouth {
        width: 16px;
        height: 6px;
        margin: 10px auto 0;
    }

    .avatar-blush {
        width: 10px;
        height: 6px;
        top: 34px;
    }

    .avatar-blush.left { left: 8px; }
    .avatar-blush.right { right: 8px; }

    /* Floating orbit: smaller on tablet */
    .float-item {
        font-size: 32px;
    }
    .float-item.code {
        font-size: 28px;
    }

    .section {
        padding: 100px 32px 64px;
    }

    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .blog-list {
        grid-template-columns: 1fr 1fr;
        gap: 0 24px;
    }

    .contact-intro {
        font-size: 16px;
    }
}

/* ── Tablet Portrait / Small Laptop (≤768px) ── */
@media (max-width: 768px) {
    .navbar {
        padding: 16px 20px;
    }

    .featured-banner {
        padding: 10px 12px;
    }

    .featured-banner-link {
        font-size: 13px;
    }

    .featured-banner-cta {
        font-size: 13px;
        white-space: nowrap;
    }

    .navbar {
        top: 56px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 56px;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 28px;
        box-shadow: -4px 0 24px rgba(0,0,0,0.06);
        transition: right 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
        z-index: 100;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 16px;
    }

    .toggle-container {
        gap: 6px;
    }

    .toggle-label {
        font-size: 11px;
    }

    .hero {
        padding: 0 20px;
        min-height: 90vh;
    }

    .hero-greeting {
        font-size: 14px;
    }

    .hero-name {
        font-size: clamp(36px, 10vw, 60px);
    }

    .hero-role {
        font-size: 16px;
    }

    .hero-tagline {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .hero-avatar {
        right: 4%;
        top: 22%;
        transform: translateY(-50%) scale(0.6);
        z-index: 0;
        opacity: 0.5;
        animation: none;
    }

    /* Floating orbit: scale down and position top-right on mobile */
    .floating-orbit {
        left: 72% !important;
        top: 25% !important;
    }

    .float-item {
        font-size: 26px;
    }

    .float-item.code {
        font-size: 22px;
    }

    .orbit-ring {
        transform: scale(0.7);
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }

    .btn-primary,
    .btn-secondary {
        text-align: center;
    }

    .section {
        padding: 72px 20px 48px;
    }

    .section-title {
        font-size: clamp(28px, 5vw, 40px);
        margin-bottom: 40px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-text p {
        font-size: 15px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card {
        padding: 24px;
    }

    .project-card-thumb {
        height: 140px;
    }

    .project-card h3 {
        font-size: 18px;
    }

    .blog-list {
        grid-template-columns: 1fr;
    }

    .blog-card {
        padding: 28px 0;
    }

    .blog-title {
        font-size: 18px;
    }

    .contact-intro {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .contact-links {
        margin-top: 32px;
        gap: 10px;
    }

    .btn-large {
        font-size: 14px;
        padding: 14px 28px;
    }
}

/* ── Mobile (≤480px) ── */
@media (max-width: 480px) {
    .navbar {
        padding: 14px 14px;
    }

    .featured-banner {
        padding: 10px 10px;
    }

    .featured-banner-link {
        font-size: 12px;
    }

    .featured-banner-cta {
        font-size: 12px;
        white-space: nowrap;
    }

    .navbar {
        top: 60px;
    }

    .nav-links {
        top: 60px;
    }

    .logo {
        font-size: 18px;
    }

    .toggle-label {
        font-size: 10px;
        letter-spacing: 0.4px;
    }

    .toggle-switch {
        width: 36px;
        height: 20px;
        border-radius: 10px;
    }

    .toggle-knob {
        width: 14px;
        height: 14px;
        top: 2.5px;
        left: 2.5px;
    }

    .toggle-switch.dev .toggle-knob {
        transform: translateX(16px);
    }

    .hero {
        padding: 0 14px;
        min-height: 85vh;
    }

    .hero-greeting {
        font-size: 13px;
    }

    .hero-name {
        font-size: clamp(30px, 11vw, 48px);
    }

    .hero-role {
        font-size: 15px;
    }

    .hero-tagline {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .hero-avatar {
        right: 18%;
        top: 20%;
        transform: scale(0.42);
        z-index: 0;
        opacity: 0.4;
        animation: none;
        visibility: hidden;
    }

    /* Floating orbit: top-right, even smaller */
    .floating-orbit {
        left: 71% !important;
        top: 35% !important;
    }

    .float-item {
        font-size: 22px;
    }

    .float-item.code {
        font-size: 18px;
    }

    .orbit-ring {
        transform: scale(0.55);
    }

    .hero-cta {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        font-size: 13px;
        padding: 12px 24px;
    }

    .section {
        padding: 56px 14px 40px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .section-number {
        font-size: 11px;
    }

    .about-text p {
        font-size: 14px;
        line-height: 1.7;
    }

    .tech-tag {
        padding: 6px 12px;
        font-size: 11px;
    }

    .filter-tabs {
        gap: 4px;
        flex-wrap: wrap;
    }

    .filter-tab {
        padding: 7px 14px;
        font-size: 11px;
    }

    .project-card {
        padding: 20px;
    }

    .project-card-thumb {
        height: 120px;
        margin-bottom: 16px;
    }

    .project-card-thumb .thumb-placeholder {
        font-size: 11px;
    }

    .project-card h3 {
        font-size: 16px;
    }

    .project-card p {
        font-size: 13px;
    }

    .project-card-badge {
        font-size: 10px;
    }

    .blog-card {
        padding: 24px 0;
    }

    .blog-title {
        font-size: 16px;
    }

    .blog-excerpt {
        font-size: 13px;
    }

    .contact-intro {
        font-size: 14px;
    }

    .contact-links {
        flex-direction: column;
        gap: 12px;
    }

    .contact-divider {
        display: none;
    }

    .contact-link {
        font-size: 13px;
    }

    .btn-large {
        font-size: 13px;
        padding: 12px 24px;
    }

    .footer {
        padding: 32px 16px;
    }

    .footer p {
        font-size: 12px;
    }
}

/* ── Tiny Mobile (≤360px) ── */
@media (max-width: 360px) {
    .navbar {
        padding: 12px 10px;
    }

    .toggle-container {
        gap: 3px;
    }

    .toggle-label {
        font-size: 9px;
    }

    .hero-name {
        font-size: 26px;
    }

    .hero-tagline {
        font-size: 13px;
    }

    .hero-avatar {
        display: none;
    }

    .floating-orbit {
        left: 65% !important;
        top: 28% !important;
    }

    .float-item {
        font-size: 18px;
    }

    .float-item.code {
        font-size: 15px;
    }

    .orbit-ring {
        transform: scale(0.45);
    }

    .project-card-thumb {
        height: 100px;
    }

    .section-title {
        font-size: 22px;
    }
}

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

    .cursor-trail {
        display: none;
    }

    a, button, input, textarea, .project-card, .filter-tab, .toggle-switch, .toggle-label, .blog-card {
        cursor: pointer;
    }
}
