/**
 * Portfolio — Custom styles
 * Theme variables, utilities, and components (Tailwind CDN handles utility classes)
 */

/* ---------------------------------------------------------------------------
   Theme: CSS custom properties (light + dark)
   --------------------------------------------------------------------------- */
:root,
.light {
    --background: 40 20% 97%;
    --foreground: 220 14% 10%;
    --card: 40 15% 94%;
    --card-foreground: 220 14% 10%;
    --primary: 25 95% 50%;
    --primary-foreground: 40 20% 97%;
    --secondary: 40 10% 90%;
    --secondary-foreground: 220 14% 10%;
    --muted: 40 10% 88%;
    --muted-foreground: 220 10% 40%;
    --border: 40 10% 85%;
    --input: 40 10% 85%;
    --ring: 25 95% 50%;
    --radius: 1rem;
}

.dark {
    --background: 220 14% 6%;
    --foreground: 40 20% 92%;
    --card: 220 12% 10%;
    --card-foreground: 40 20% 92%;
    --primary: 35 100% 62%;
    --primary-foreground: 220 14% 6%;
    --secondary: 220 10% 16%;
    --secondary-foreground: 40 20% 92%;
    --muted: 220 10% 14%;
    --muted-foreground: 220 10% 50%;
    --border: 220 10% 18%;
    --input: 220 10% 18%;
    --ring: 35 100% 62%;
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: "Space Grotesk", sans-serif;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: "Instrument Serif", serif;
}

/* ---------------------------------------------------------------------------
   Utilities
   --------------------------------------------------------------------------- */
.text-gradient {
    background-image: linear-gradient(135deg, hsl(var(--primary)), hsl(35 80% 75%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------------------------------------------------------------------------
   Components
   --------------------------------------------------------------------------- */
.bento-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.5s;
}

.bento-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    box-shadow: 0 0 40px -10px hsl(var(--primary) / 0.15);
}

.glass {
    backdrop-filter: blur(20px);
    background: hsl(var(--card) / 0.6);
}

/* Navbar: glass effect when scrolled */
#main-nav.nav-scrolled {
    backdrop-filter: blur(20px);
    background: hsl(var(--card) / 0.6);
    border-bottom: 1px solid hsl(var(--border));
}

/* ---------------------------------------------------------------------------
   Animations
   --------------------------------------------------------------------------- */
@keyframes arrow-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

.animate-arrow-bounce {
    animation: arrow-bounce 2s ease-in-out infinite;
}

/* Skip to content (a11y + SEO) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.sr-only:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border-radius: 0.25rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}
