/* =============================================
   WEBCENTRUMMEDIA - Custom CSS
   Doplnkové štýly pre Tailwind
   ============================================= */

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ---- Hero Section ---- */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #0f172a 0%,
        #0e1e3e 30%,
        #0f2352 60%,
        #0f172a 100%
    );
    background-size: 300% 300%;
    animation: hero-bg-move 12s ease infinite;
}

@keyframes hero-bg-move {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.grid-overlay {
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ---- Floating animations ---- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-20px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50%       { transform: translateY(-15px) rotate(5deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite;
}

/* ---- Gradient text animation ---- */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 300% 300%;
    animation: gradient-shift 6s ease infinite;
}

/* ---- Typing cursor ---- */
.typing-cursor {
    display: inline-block;
    animation: blink 0.8s step-end infinite;
}

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

/* ---- Scroll dot animation ---- */
.scroll-dot {
    animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%   { transform: translateY(0);    opacity: 1; }
    100% { transform: translateY(18px); opacity: 0; }
}

/* ---- Scroll chevrons ---- */
.scroll-chevron {
    animation: chevron-fade 1.4s ease-in-out infinite;
}

@keyframes chevron-fade {
    0%, 100% { opacity: 0.2; transform: translateY(-2px); }
    50%       { opacity: 1;   transform: translateY(2px);  }
}

/* ---- Spin slow ---- */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ---- Pulse slow ---- */
@keyframes pulse-slow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.2); }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* ---- Stats section dots ---- */
.stats-dots {
    background-image: radial-gradient(circle, rgba(37, 99, 235, 0.3) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* ---- Lines decoration ---- */
.lines-decoration {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 40px,
        rgba(37, 99, 235, 0.05) 40px,
        rgba(37, 99, 235, 0.05) 41px
    );
}

/* ---- Skill bar ---- */
.skill-bar {
    transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-shimmer {
    animation: skill-shimmer-move 2.5s ease-in-out infinite 1.5s;
}

@keyframes skill-shimmer-move {
    0%   { left: -2rem; opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}

/* ---- Project card image transition ---- */
.project-card {
    transition: opacity 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

/* ---- Line clamp ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Glassmorphism ---- */
.glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ---- Glow effects ---- */
.glow-blue {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.15), 0 0 60px rgba(37, 99, 235, 0.05);
}

.glow-blue-strong {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4), 0 0 60px rgba(37, 99, 235, 0.2);
}

/* ---- Shimmer button ---- */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transform: skewX(-20deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { left: -100%; }
    50%, 100% { left: 160%; }
}

/* ---- Gradient border card ---- */
.gradient-border {
    position: relative;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.4), rgba(6, 182, 212, 0.2), rgba(37, 99, 235, 0));
    -webkit-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;
    pointer-events: none;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ---- Tilt card ---- */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* ---- Noise texture overlay ---- */
.hero-noise::after {
    content: '';
    position: absolute;
    inset: 0;
    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)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.4;
}

/* ---- Marquee ---- */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---- Underline hover effect for nav ---- */
.nav-link-underline {
    position: relative;
}

.nav-link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 99px;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link-underline:hover::after {
    width: 100%;
    left: 0;
}

/* ---- Section number decoration ---- */
.section-number {
    font-size: 8rem;
    font-weight: 900;
    color: rgba(37, 99, 235, 0.04);
    position: absolute;
    top: -1rem;
    right: 2rem;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

/* ---- Button hover lift ---- */
.btn-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-lift:hover {
    transform: translateY(-2px);
}

/* ---- Section separator ---- */
.section-separator {
    background: linear-gradient(to right, transparent, rgba(37, 99, 235, 0.4), transparent);
    height: 1px;
    width: 100%;
}

/* ---- Input focus ring ---- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ---- Autofill override ---- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #334155 inset !important;
    box-shadow: 0 0 0 1000px #334155 inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
    border-color: #475569 !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* ---- Select arrow ---- */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px !important;
}

/* ---- AOS custom durations ---- */
[data-aos] {
    pointer-events: none;
}
[data-aos].aos-animate {
    pointer-events: auto;
}

/* ---- Smooth hover transitions ---- */
a, button {
    transition-property: color, background-color, border-color, box-shadow, transform, opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Mobile touch improvements ---- */
@media (max-width: 768px) {
    .hero-gradient {
        background-size: 200% 200%;
    }

    .grid-overlay {
        background-size: 40px 40px;
    }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-float-slow,
    .animate-spin-slow,
    .animate-pulse-slow,
    .animate-gradient,
    .hero-gradient,
    .scroll-dot,
    .typing-cursor {
        animation: none !important;
    }

    .skill-bar {
        transition: none !important;
    }
}
