/* ============================================
   Portfolio - Custom Styles
   Minimalist Tech Portfolio
   ============================================ */

/* Custom Properties */
:root {
    --color-primary: #0f172a;
    --color-secondary: #334155;
    --color-accent: #3b82f6;
    --color-muted: #64748b;
    --color-light: #f8fafc;
    --transition-base: 0.3s ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: var(--color-accent);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Navigation */
#navbar {
    background-color: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Skill Cards Hover Effects */
#skills .group {
    transform: translateY(0);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#skills .group:hover {
    transform: translateY(-5px);
}

/* Project Cards */
#projects article {
    transform: translateY(0);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

#projects article:hover {
    transform: translateY(-8px);
}

#projects article .group-hover\:text-accent {
    color: var(--color-accent);
}

/* Timeline */
.experience-item {
    position: relative;
}

.experience-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--color-accent);
}

/* Contact Buttons */
#contact a {
    position: relative;
    overflow: hidden;
}

#contact a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

#contact a:hover::before {
    left: 100%;
}

/* Smooth Page Load */
@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body {
    animation: pageLoad 0.3s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #contact,
    footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Custom Cursor for Links */
a, button {
    cursor: pointer;
}

/* Link Underline Animation */
.animated-underline {
    position: relative;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-base);
}

.animated-underline:hover::after {
    width: 100%;
}

/* Mobile Menu Animation */
#mobile-menu {
    transition: all var(--transition-base);
}

#mobile-menu.hidden {
    display: none;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

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

/* Hero Background Animation */
#hero .absolute .blur-3xl {
    filter: blur(60px);
}

/* Button Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 70%
    );
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s;
}

.ripple:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}
