/* ============================================
   IDAN KESTENBOM - PORTFOLIO v2
   Premium dark theme — glass morphism,
   animated gradients, magnetic interactions
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #030305;
    --bg-card: rgba(255,255,255,0.025);
    --bg-card-hover: rgba(255,255,255,0.055);
    --text: #ffffff;
    --text-dim: #ffffff;
    --text-muted: #ffffff;
    --accent: #6366f1;
    --accent-2: #a855f7;
    --accent-3: #06b6d4;
    --accent-glow: rgba(99,102,241,0.25);
    --border: rgba(255,255,255,0.06);
    --border-hover: rgba(255,255,255,0.14);
    --radius: 16px;
    --radius-sm: 8px;
    --font-sans: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 72px;
    --gradient: linear-gradient(135deg, #6366f1, #a855f7, #06b6d4);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: #fff;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Animated gradient background blobs --- */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.07;
    pointer-events: none;
    z-index: 0;
    animation: blobFloat 20s ease-in-out infinite;
}

.bg-glow-1 {
    top: -200px;
    right: -200px;
    background: var(--accent);
}

.bg-glow-2 {
    bottom: 30%;
    left: -200px;
    background: var(--accent-2);
    animation-delay: -7s;
    animation-duration: 25s;
}

.bg-glow-3 {
    bottom: -100px;
    right: 20%;
    background: var(--accent-3);
    animation-delay: -14s;
    animation-duration: 30s;
}

@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -50px) scale(1.1); }
    50% { transform: translate(-20px, 30px) scale(0.9); }
    75% { transform: translate(40px, 20px) scale(1.05); }
}

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

/* --- Cursor Glow --- */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: transform;
}

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

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.scrolled {
    background: rgba(3,3,5,0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 2px;
    position: relative;
    padding: 4px 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-dim);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(3,3,5,0.98);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-link {
    font-family: var(--font-mono);
    font-size: 24px;
    letter-spacing: 6px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.mobile-link:hover { color: var(--text); }

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#particleCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-dim);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

.hero-name {
    font-size: clamp(48px, 10vw, 140px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3px;
    margin-bottom: 24px;
}

.hero-name-line {
    display: block;
}

.hero-name-outline {
    -webkit-text-stroke: 2px var(--text);
    color: transparent;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-name-outline:hover {
    color: transparent;
    -webkit-text-stroke: 0px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 40px var(--accent-glow));
}

.hero-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-bottom: 48px;
}

.hero-divider {
    margin: 0 12px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    position: relative;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 0 0 0 var(--accent-glow);
}

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

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

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 0 30px 0 rgba(99,102,241,0.15);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

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

@keyframes scroll-pulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--text-muted);
}

/* --- Section Shared --- */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 64px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -1px;
}

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

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-lead {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat { text-align: center; }

.stat-number {
    font-size: 40px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}

.stat-suffix {
    font-size: 40px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 4px;
}

/* --- Experience Timeline --- */
.timeline {
    position: relative;
    padding-left: 40px;
    margin-bottom: 64px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), var(--accent-2), var(--accent-3), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-item:first-child .timeline-dot {
    background: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-content {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-content:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(8px);
}

.timeline-content:hover::before { opacity: 1; }

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.timeline-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.timeline-org {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
}

.timeline-details {
    list-style: none;
    padding: 0;
}

.timeline-details li {
    position: relative;
    padding-left: 16px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 6px;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

/* --- Achievements --- */
.achievements { margin-top: 16px; }

.achievements-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.achievement-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(99,102,241,0.15);
}

.achievement-icon {
    color: #eab308;
    flex-shrink: 0;
    margin-top: 2px;
}

.achievement-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.achievement-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

.award-tag {
    background: rgba(234,179,8,0.15) !important;
    color: #eab308 !important;
}

/* --- Code Window --- */
.code-window {
    background: rgba(10,10,15,0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.4s ease;
    position: relative;
}

.code-window::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.code-window:hover::before { opacity: 0.6; }

.code-window:hover {
    box-shadow: 0 30px 80px -20px rgba(99,102,241,0.15);
    transform: translateY(-6px);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.code-dots { display: flex; gap: 8px; }

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

.code-title {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.code-body {
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
    position: relative;
    z-index: 1;
}

.code-body code { font-family: inherit; }

.kw { color: #ff79c6; }
.type { color: #8be9fd; }
.str { color: #f1fa8c; }

/* --- Projects Section --- */
.project-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    padding: 10px 24px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.project-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0;
}

.project-card.hidden { display: none; }

.project-card-inner {
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === New: card preview hero image === */
.card-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #14142a;
    border-bottom: 1px solid var(--border);
}
.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .card-preview img { transform: scale(1.04); }

.card-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(3,3,5,0.55) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.project-card:hover .card-preview::after { opacity: 1; }

.card-preview.gradient {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
    text-align: center;
    padding: 18px;
    position: relative;
}
.card-preview.gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%);
    pointer-events: none;
}
.card-preview-emoji {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 14px rgba(0,0,0,0.3));
}
.card-preview-mascot {
    width: 88px;
    height: auto;
    margin-bottom: 4px;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4));
}
.card-preview-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: white;
    line-height: 1;
}
.card-preview-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.78);
    text-transform: uppercase;
}

.card-body {
    padding: 22px 24px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.project-card:hover .project-card-inner {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}

/* Animated gradient border on hover */
.project-card-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.project-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.accent-blue { background: linear-gradient(90deg, #6366f1, #818cf8); }
.accent-green { background: linear-gradient(90deg, #22c55e, #4ade80); }
.accent-purple { background: linear-gradient(90deg, #a855f7, #c084fc); }
.accent-orange { background: linear-gradient(90deg, #f97316, #fb923c); }
.accent-teal { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.accent-red { background: linear-gradient(90deg, #ef4444, #f87171); }
.accent-cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.accent-yellow { background: linear-gradient(90deg, #eab308, #facc15); }
.accent-pink { background: linear-gradient(90deg, #ec4899, #f472b6); }

.project-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(99,102,241,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-icon {
    background: rgba(99,102,241,0.2);
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 8px 20px -8px var(--accent-glow);
}

.project-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(99,102,241,0.1);
}

.project-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.project-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.project-card:hover .project-tech span {
    border-color: var(--border-hover);
    color: var(--text-dim);
}

/* --- Skills Section --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.skill-category {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-category:hover::before { opacity: 0.5; }

.skill-category:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -20px rgba(99,102,241,0.1);
}

.skill-category-title {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    text-transform: uppercase;
}

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

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dim);
    transition: all 0.3s ease;
}

.skill-item:hover {
    color: var(--text);
    transform: translateX(4px);
}

.skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.skill-item:hover .skill-dot {
    box-shadow: 0 0 8px var(--accent-glow);
    transform: scale(1.4);
}

/* --- Connect Section --- */
.connect-content { text-align: center; }

.connect-lead {
    font-size: 20px;
    color: var(--text-dim);
    max-width: 500px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.connect-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.connect-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-dim);
    position: relative;
    overflow: hidden;
}

.connect-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.connect-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -20px rgba(99,102,241,0.2);
    color: var(--text);
}

.connect-card svg {
    color: var(--accent);
    transition: all 0.3s ease;
}

.connect-card:hover svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.connect-card-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.connect-card-value {
    font-size: 14px;
    font-weight: 500;
}

/* --- Footer --- */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-name {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.footer-year {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Hero entrance animations --- */
.hero-content .hero-badge {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}
.hero-content .hero-name {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}
.hero-content .hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}
.hero-content .hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}
.scroll-indicator {
    opacity: 0;
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.4s forwards;
}

@keyframes heroFadeIn {
    to { opacity: 1; transform: translateY(0); }
}

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

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 48px; }
    .achievements-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav { padding: 0 24px; }
    .hero-name { letter-spacing: -1px; }
    .hero-name-outline { -webkit-text-stroke-width: 1px; }
    .hero-subtitle { letter-spacing: 1px; }
    .hero-divider { display: none; }
    .hero-subtitle { display: flex; flex-direction: column; gap: 4px; }
    .project-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .connect-links { grid-template-columns: 1fr; }
    .section { padding: 80px 0; }
    .about-stats { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .stat-number, .stat-suffix { font-size: 28px; }
    .scroll-indicator { display: none; }
    .bg-glow { display: none; }
}

@media (max-width: 480px) {
    .project-filters { gap: 8px; }
    .filter-btn { padding: 8px 16px; font-size: 11px; }
}

/* --- Make project cards clickable --- */
a.project-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

a.project-card-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: var(--radius);
}

.project-cta {
    margin-top: auto;
    padding-top: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
    border-top: 1px solid var(--border);
    margin-top: 18px;
}

.project-cta .arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--accent);
}

.project-card-link:hover .project-cta {
    color: var(--text);
}

.project-card-link:hover .project-cta .arrow {
    transform: translateX(6px);
    color: var(--accent-2);
}
