/* ===================================
   CAP COQ - PROFESSIONAL REDESIGN
   =================================== */

:root {
    --accent: #fbbf24;
    --dark: #0f172a;
    --darker: #030712;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

p {
    line-height: 1.6;
}

/* Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 728px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 984px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1240px;
    }
}

/* Glass Card Effect */
.glass-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(251, 191, 36, 0.3);
    box-shadow: 0 25px 50px rgba(251, 191, 36, 0.1);
}

/* Lift Animation on Hover */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-12px);
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: revealIn 0.8s ease-out forwards;
}

.reveal-delayed {
    opacity: 0;
    transform: translateY(30px);
    animation: revealIn 0.8s ease-out 0.2s forwards;
}

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger Animation */
@for $i from 1 through 6 {
    .reveal:nth-child(#{$i}) {
        animation-delay: calc(0.1s * #{$i});
    }
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Float Animation for background elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-30px) translateX(20px);
    }
    66% {
        transform: translateY(30px) translateX(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: all 0.6s ease;
}

.shimmer:hover::before {
    left: 150%;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #ffffff, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.1);
    }
}

/* Mobile Menu Styles */
#mobileMenuBtn {
    cursor: pointer;
}

#mobileMenuBtn span {
    display: block;
}

#mobileMenuBtn.open span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

#mobileMenuBtn.open span:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

#mobileMenu {
    max-height: 100vh;
    overflow-y: auto;
}

#mobileMenu.open {
    transform: translateX(0);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* Navigation Bar Scroll Effect */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Button Hover Effects */
a[class*="bg-gradient-to-r"],
button[class*="bg-gradient-to-r"] {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

a[class*="bg-gradient-to-r"]::before,
button[class*="bg-gradient-to-r"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

a[class*="bg-gradient-to-r"]:hover::before,
button[class*="bg-gradient-to-r"]:hover::before {
    transform: translateX(100%);
}

/* Card Stagger Animation */
@for $i from 1 through 12 {
    .reveal:nth-child(#{$i}) {
        animation-delay: calc(0.1s * #{$i - 1});
    }
}

/* Smooth Scroll for Anchor Links */
a[href^="#"] {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes skeleton-loading {
    0% {
        background-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        background-color: rgba(255, 255, 255, 0.2);
    }
    100% {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.5rem;
}

/* Transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.8);
}

/* Print Styles */
@media print {
    nav,
    footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(to bottom, #0f172a, #030712);
        color: #f1f5f9;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1024px) {
    .glass-card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* High DPI Display Support */
@media (min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .glass-card {
        border-width: 0.5px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    button,
    a[href],
    [role="button"] {
        padding: 1rem;
    }

    .glass-card:active {
        transform: scale(0.98);
    }
}

/* Portfolio Tabs */
.portfolio-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(251, 191, 36, 0.3);
    background: transparent;
    color: #94a3b8;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-tab:hover {
    border-color: rgba(251, 191, 36, 0.6);
    color: #e2e8f0;
}

.portfolio-tab.active {
    background: #fbbf24;
    color: #0f172a;
    border-color: #fbbf24;
    box-shadow: 0 8px 16px rgba(251, 191, 36, 0.2);
}

/* Portfolio Cards Filtering */
.portfolio-card {
    opacity: 1;
    transition: all 0.3s ease;
    max-height: 100%;
}

.portfolio-card.hidden {
    display: none;
}

/* Status Badges */
.badge-live {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
    transition: all 0.3s ease;
}

.badge-live:hover {
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
    transform: scale(1.05);
}

.badge-mockup {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.1);
    transition: all 0.3s ease;
}

.badge-mockup:hover {
    border-color: rgba(251, 191, 36, 0.8);
    box-shadow: 0 8px 16px rgba(251, 191, 36, 0.2);
    transform: scale(1.05);
}

/* Project Section Headers */
.portfolio-section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.portfolio-section-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .portfolio-section-header h3 {
        font-size: 1.875rem;
    }
}

.portfolio-section-header p {
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Portfolio Section Spacing */
.portfolio-section {
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .portfolio-section {
        margin-bottom: 4rem;
    }
}

/* Social Links Hover */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.15) rotate(5deg);
}

/* Code Block Styles */
code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

pre {
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Form Styles */
input,
textarea,
select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

/* Custom Utilities */
.drop-shadow-lg {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}