/* --- 1. Base & Global Styles --- */
* { 
    box-sizing: border-box;
    font-family: 'Inter', sans-serif; 
}

html { scroll-behavior: smooth; }

[x-cloak] { display: none !important; }

.font-playfair { font-family: 'Playfair Display', serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

/* --- 2. Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 4px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.hide-scrollbar::-webkit-scrollbar { display: none; }

/* --- 3. Keyframes Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    50% { border-color: transparent; }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,255,255,0.1); }
    50% { box-shadow: 0 0 20px rgba(255,255,255,0.2); }
}
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes shimmer {
    0% { transform: translateX(-150%) translateY(-150%) rotate(45deg); }
    100% { transform: translateX(150%) translateY(150%) rotate(45deg); }
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 4. Animation Utility Classes --- */
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fadeInDown { animation: fadeInDown 0.6s ease-out forwards; }
.animate-fadeInLeft { animation: fadeInLeft 0.6s ease-out forwards; }
.animate-fadeInRight { animation: fadeInRight 0.6s ease-out forwards; }
.animate-slideInLeft { animation: slideInLeft 0.6s ease-out forwards; }
.animate-slideInRight { animation: slideInRight 0.6s ease-out forwards; }
.animate-slideUp { animation: slideUp 0.4s ease-out forwards; }
.animate-scaleIn { animation: scaleIn 0.5s ease-out forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-pulse-slow { animation: pulse 2s ease-in-out infinite; }
.timer-pulse { animation: pulse 1s infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* --- 5. Visual Effects & Utilities --- */
.glass {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-border {
    position: relative;
    background: linear-gradient(135deg, #333, #111);
    border-radius: inherit;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, #444, #222, #444);
    -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;
    border-radius: inherit;
}

.btn-shine {
    position: relative;
    overflow: hidden;
}
.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}
.btn-shine:hover::before { left: 100%; }

.skeleton-glow {
    position: relative;
    overflow: hidden;
    background: #171717;
}
.skeleton-glow::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 200%; height: 200%;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shimmer 1.5s infinite;
}

/* --- 6. Components (Cards, Forms, etc.) --- */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
}

.privacy-card, .skill-card, .guide-card, .contact-card {
    transition: all 0.3s ease;
}
.privacy-card:hover, .skill-card:hover, .guide-card:hover, .contact-card:hover {
    transform: translateY(-4px);
    border-color: #404040;
}

.portfolio-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.portfolio-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.code-block {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 1px solid #2a2a2a;
}

.form-input {
    transition: all 0.3s ease;
}
.form-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.1);
}

.typing-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #fff;
    animation: typing 3s steps(30) forwards, blink 0.8s infinite;
}

/* --- 7. Sections Specific Styles --- */
/* Content Section */
.content-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.content-section ul { list-style: none; padding-left: 0; }
.content-section ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #a3a3a3;
}
.content-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

/* Timeline */
.timeline-line {
    background: linear-gradient(to bottom, transparent, #333, #333, transparent);
}

/* Receipt */
.receipt-pattern {
    background-image: radial-gradient(circle, #333 1px, transparent 1px);
    background-size: 10px 10px;
}
.receipt-edge {
    background: linear-gradient(135deg, transparent 50%, #171717 50%) -24px 0/48px 48px,
                linear-gradient(-135deg, transparent 50%, #171717 50%) -24px 0/48px 48px;
    background-position: left bottom;
    background-repeat: repeat-x;
    height: 24px;
}

/* Table of Contents */
.toc-link { transition: all 0.2s ease; }
.toc-link:hover { padding-left: 1rem; color: #fff; }

.step-number { counter-increment: step; }
.step-number::before { content: counter(step); }

/* --- 8. Swiper Customization --- */
.swiper { width: 100%; aspect-ratio: 1/1; }
.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}
.swiper-pagination-bullet {
    background: #555 !important;
    opacity: 1 !important;
    width: 8px !important;
    height: 8px !important;
    transition: all 0.3s ease !important;
}
.swiper-pagination-bullet-active {
    background: #fff !important;
    width: 24px !important;
    border-radius: 4px !important;
}
.swiper-button-next, .swiper-button-prev {
    color: #fff !important;
    background: rgba(0,0,0,0.5);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 16px !important;
    font-weight: bold;
}

/* --- 9. Decorative & Media Queries --- */
.orbit { animation: rotate 20s linear infinite; }
.orbit-reverse { animation: rotate 15s linear infinite reverse; }

@media (max-width: 640px) {
    .swiper-button-next, .swiper-button-prev {
        width: 32px !important;
        height: 32px !important;
    }
    .swiper-button-next::after, .swiper-button-prev::after {
        font-size: 12px !important;
    }
}
