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

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Header height variables for different breakpoints */
:root {
    --header-height-mobile: 80px;
    --header-height-tablet: 80px;
    --header-height-desktop: 80px;
}

/* Ensure header is properly fixed */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--header-height-mobile);
}

@media (min-width: 640px) {
    header {
        height: var(--header-height-tablet);
    }
}

@media (min-width: 1024px) {
    header {
        height: var(--header-height-desktop);
    }
}

/* Base Styles - Body spacing to prevent header overlap */
body {
    font-family: 'Inter', sans-serif;
    padding-top: var(--header-height-mobile);
}

@media (min-width: 640px) {
    body {
        padding-top: var(--header-height-tablet);
    }
}

@media (min-width: 1024px) {
    body {
        padding-top: var(--header-height-desktop);
    }
}

/* Main content container */
.main-content {
    min-height: calc(100vh - var(--header-height-mobile));
    width: 100%;
    position: relative;
}

@media (min-width: 640px) {
    .main-content {
        min-height: calc(100vh - var(--header-height-tablet));
    }
}

@media (min-width: 1024px) {
    .main-content {
        min-height: calc(100vh - var(--header-height-desktop));
    }
}

/* Additional spacing for sections that need to account for header */
.section-with-header-offset {
    padding-top: calc(var(--header-height-mobile) + 2rem);
}

@media (min-width: 640px) {
    .section-with-header-offset {
        padding-top: calc(var(--header-height-tablet) + 2rem);
    }
}

@media (min-width: 1024px) {
    .section-with-header-offset {
        padding-top: calc(var(--header-height-desktop) + 2rem);
    }
}

/* Hero section specific spacing (if needed) */
.hero-section {
    margin-top: 0;
    padding-top: 2rem;
}

/* Prevent content jump on page load */
.content-wrapper {
    opacity: 0;
    animation: fadeInContent 0.5s ease-in-out 0.1s forwards;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scroll behavior with header offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height-mobile);
}

@media (min-width: 640px) {
    html {
        scroll-padding-top: var(--header-height-tablet);
    }
}

@media (min-width: 1024px) {
    html {
        scroll-padding-top: var(--header-height-desktop);
    }
}

/* Existing Styles */
.gradient-bg {
    background: linear-gradient(135deg, #BD0569 0%, #185B18 100%);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(189, 5, 105, 0.15);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 40px rgba(189, 5, 105, 0.2);
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 0 20px rgba(189, 5, 105, 0.4); }
    to { box-shadow: 0 0 40px rgba(189, 5, 105, 0.8); }
}

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

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.tech-grid {
    background-image:
        linear-gradient(rgba(189, 5, 105, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(189, 5, 105, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.illustration {
    background: linear-gradient(145deg, #E6E9EF 0%, #f8fafc 100%);
    border-radius: 50px;
    position: relative;
}

.dark .illustration {
    background: linear-gradient(145deg, #374151 0%, #1f2937 100%);
}

.floating-element {
    animation: float 4s ease-in-out infinite;
}

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

.bounce-element {
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Dark mode toggle styles */
.dark-mode-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    border-radius: 13px;
    background: #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .dark-mode-toggle {
        width: 60px;
        height: 30px;
        border-radius: 15px;
    }
}

.dark .dark-mode-toggle {
    background: #374151;
}

.dark-mode-toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
    .dark-mode-toggle::before {
        top: 3px;
        left: 3px;
        width: 24px;
        height: 24px;
    }
}

.dark .dark-mode-toggle::before {
    transform: translateX(24px);
    background: #f9fafb;
}

@media (min-width: 640px) {
    .dark .dark-mode-toggle::before {
        transform: translateX(30px);
    }
}

/* Mobile menu styles - Let Vue transitions handle visibility */
.mobile-menu {
    background: #fff !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.dark .mobile-menu {
    background: #111827 !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    transform: scale(0.8);
    animation: modalSlideIn 0.3s ease-out forwards;
}

.dark .modal-content {
    background: #1f2937;
    color: white;
}

@keyframes modalSlideIn {
    to { transform: scale(1); }
}

.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: linear-gradient(135deg, #BD0569 0%, #185B18 100%);
    color: white;
}

.project-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
}

.project-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Additional responsive utilities */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Focus states for accessibility */
.focus\:outline-custom:focus {
    outline: 2px solid #BD0569;
    outline-offset: 2px;
}

/* Improved button animations */
.btn-hover-lift {
    transition: all 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.dark .loading-shimmer {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
