/* CSS Custom Properties for Shadcn UI-like theming */
:root {
    --radius: 0.625rem;
    --background: 0 0% 100%;
    --foreground: 0 0% 9%;
    --card: 0 0% 100%;
    --card-foreground: 0 0% 9%;
    --popover: 0 0% 100%;
    --popover-foreground: 0 0% 9%;
    --primary: 0 0% 12%;
    --primary-foreground: 0 0% 98%;
    --secondary: 0 0% 96%;
    --secondary-foreground: 0 0% 12%;
    --muted: 0 0% 96%;
    --muted-foreground: 0 0% 45%;
    --accent: 0 0% 96%;
    --accent-foreground: 0 0% 12%;
    --destructive: 0 84% 60%;
    --border: 0 0% 90%;
    --input: 0 0% 90%;
    --ring: 0 0% 64%;
}

.dark {
    --background: 0 0% 9%;
    --foreground: 0 0% 98%;
    --card: 0 0% 12%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 12%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 90%;
    --primary-foreground: 0 0% 12%;
    --secondary: 0 0% 17%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 17%;
    --muted-foreground: 0 0% 64%;
    --accent: 0 0% 17%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62% 55%;
    --border: 0 0% 20%;
    --input: 0 0% 20%;
    --ring: 0 0% 45%;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tab styles */
.tab-btn {
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab-btn.active {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.tab-btn:hover:not(.active) {
    color: hsl(var(--foreground));
}

/* Tech card hover effect */
.tech-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tech-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Project card styles */
.project-card img {
    transition: transform 0.3s ease;
}

/* Team card styles */
.team-card {
    transition: all 0.3s ease;
}

/* Scroll to top button */
#scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.open {
    display: block;
}

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 0;
    transform: translateX(-10px);
    animation: slideIn 0.3s ease forwards;
}

.mobile-nav-link:nth-child(1) { animation-delay: 0ms; }
.mobile-nav-link:nth-child(2) { animation-delay: 50ms; }
.mobile-nav-link:nth-child(3) { animation-delay: 100ms; }
.mobile-nav-link:nth-child(4) { animation-delay: 150ms; }
.mobile-nav-link:nth-child(5) { animation-delay: 200ms; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation for hero */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Modal styles */
#contact-modal {
    transition: opacity 0.2s ease;
}

#contact-modal.open {
    display: block;
}

#contact-modal .fixed.inset-0.bg-black\/50 {
    animation: fadeIn 0.2s ease;
}

#contact-modal > div:last-child > div {
    animation: scaleIn 0.2s ease;
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px hsl(var(--ring));
    border-color: hsl(var(--ring));
}

/* Selection color */
::selection {
    background-color: hsl(var(--primary) / 0.2);
    color: hsl(var(--foreground));
}

/* Smooth transitions for interactive elements */
a,
button {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Card shadows */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Focus visible styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header,
    footer,
    #scroll-to-top,
    #contact-modal {
        display: none !important;
    }

    main {
        padding-top: 0 !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* Backdrop blur support */
@supports (backdrop-filter: blur(8px)) {
    header {
        backdrop-filter: blur(8px);
    }
}

@supports not (backdrop-filter: blur(8px)) {
    header {
        background-color: hsl(var(--background)) !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: 0 0% 0%;
        --ring: 0 0% 0%;
    }
}

/* Toast notification styles (optional) */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: hsl(var(--foreground));
    color: hsl(var(--background));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background-color: hsl(142 71% 45%);
    color: white;
}

.toast.error {
    background-color: hsl(var(--destructive));
    color: white;
}
