/* ============================================
   CUSTOM STYLES FOR LUKE SANABRIA WEBSITE
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* ============================================
   FADE-IN ANIMATIONS
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Immediate fade-in for hero section */
#home .fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

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

/* ============================================
   SOCIAL LINKS
   ============================================ */

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    color: currentColor;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.7;
}

.social-link:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ============================================
   PROJECT CARDS
   ============================================ */

.project-card {
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dark .project-card:hover {
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

/* Project card buttons */
.project-card a[class*="border-2"] {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.project-card a[class*="border-2"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark .project-card a[class*="border-2"]:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* ============================================
   POST CARDS
   ============================================ */

.post-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   SKELETON LOADERS
   ============================================ */

.post-skeleton {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 220px;
}

.dark .post-skeleton {
    background: rgba(255, 255, 255, 0.02);
}

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

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

/* ============================================
   NAVIGATION
   ============================================ */

nav {
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobileMenu {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-link {
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================
   BUTTONS AND LINKS
   ============================================ */

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduced motion for users who prefer it */
@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;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile optimization */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .post-card {
        min-height: auto;
    }
}

/* Tablet and up */
@media (min-width: 769px) {
    .project-card {
        min-height: 400px;
    }
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ============================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ============================================ */

.dark body {
    background-color: #2C2C2C;
    color: #FAFAF9;
}

.dark .bg-ivory {
    background-color: #1A1A1A;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-balance {
    text-wrap: balance;
}

/* Subtle gradient overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.dark .gradient-overlay::before {
    background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    nav,
    footer,
    .social-link,
    #darkModeToggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

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