@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #dc2626;
    color: white;
}

html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
    caret-color: transparent;
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #fca5a5;
    border-radius: 10px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #991b1b;
}
::-webkit-scrollbar-thumb:hover {
    background: #ef4444;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInScale {
    from { opacity: 0; transform: scale(0.93) translateY(24px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.18; transform: scale(1); }
    50%       { opacity: 0.32; transform: scale(1.08); }
}
@keyframes borderFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shimmer {
    0%   { left: -150%; }
    100% { left: 150%; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50%       { transform: translateY(-14px) rotate(1deg); }
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-6px); }
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.animate-fade-in-left {
    animation: fadeInLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.animate-fade-in-right {
    animation: fadeInRight 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}
.animate-slide-in-scale {
    animation: slideInScale 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.glow-blob {
    animation: glowPulse 6s ease-in-out infinite;
}

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

.tech-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    border-radius: 1.5rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: default;
}
.dark .tech-card {
    background: #0f172a;
    border-color: #1e293b;
    box-shadow: inset 0 1px 0 0 rgba(255,255,255,0.05);
}

.tech-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.14) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: none;
    pointer-events: none;
}
.tech-card:hover::after {
    animation: shimmer 0.7s ease forwards;
}

.tech-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(220,38,38,0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}
.dark .tech-card::before {
    background: radial-gradient(circle at top right, rgba(220,38,38,0.12), transparent 60%);
}
.tech-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(220,38,38,0.25);
    box-shadow: 0 24px 40px -8px rgba(220,38,38,0.12), 0 0 0 1px rgba(220,38,38,0.08);
}
.tech-card:hover::before {
    opacity: 1;
}

.btn-grad {
    position: relative;
    z-index: 0;
}
.btn-grad::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #b91c1c, #ef4444, #fca5a5, #b91c1c);
    background-size: 300% 300%;
    animation: borderFlow 4s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-grad:hover::before {
    opacity: 1;
}

.perspective-1000 { perspective: 1000px; }

*:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 3px;
}

@keyframes fillBar {
    from { width: 0%; }
    to   { width: var(--w); }
}

.skill-fill {
    width: 0%;
    animation: fillBar 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-play-state: paused;
}

.skill-bar-item.in-view .skill-fill {
    animation-play-state: running;
}

.skill-bar-item:nth-child(1)  .skill-fill { animation-delay: 0.05s; }
.skill-bar-item:nth-child(2)  .skill-fill { animation-delay: 0.10s; }
.skill-bar-item:nth-child(3)  .skill-fill { animation-delay: 0.15s; }
.skill-bar-item:nth-child(4)  .skill-fill { animation-delay: 0.20s; }
.skill-bar-item:nth-child(5)  .skill-fill { animation-delay: 0.25s; }
.skill-bar-item:nth-child(6)  .skill-fill { animation-delay: 0.30s; }
.skill-bar-item:nth-child(7)  .skill-fill { animation-delay: 0.35s; }
.skill-bar-item:nth-child(8)  .skill-fill { animation-delay: 0.40s; }
.skill-bar-item:nth-child(9)  .skill-fill { animation-delay: 0.45s; }
.skill-bar-item:nth-child(10) .skill-fill { animation-delay: 0.50s; }

#projects a {
    transition: all 0.3s ease !important;
}