/* Custom Styles for Portfolio Website */
/* Nicklas Haken - Fachinformatiker Portfolio */

/* ===========================
   CSS Variables
   =========================== */
:root {
    /* Background Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --bg-tertiary: #262626;

    /* Text Colors */
    --text-primary: #fafafa;
    --text-secondary: #e5e5e5;
    --text-muted: #a3a3a3;

    /* Accent Colors */
    --accent: #404040;
    --accent-hover: #525252;
    --border: #262626;

    /* Status Colors */
    --success: #22c55e;
    --warning: #eab308;
    --info: #3b82f6;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===========================
   Animations
   =========================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Fade In Up Animation (for sections) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Bounce Animation for Scroll Indicator */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* ===========================
   Navigation Styles
   =========================== */
nav {
    transition: background-color 0.3s ease;
}

nav a {
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* ===========================
   Hero Section
   =========================== */
#hero {
    position: relative;
}

#hero .container {
    position: relative;
    z-index: 1;
}

/* Portrait Image Styles */
#hero img,
#hero #portrait-placeholder {
    transition: transform 0.3s ease;
}

#hero img:hover,
#hero #portrait-placeholder:hover {
    transform: scale(1.05);
}

/* Scroll Indicator - Responsive Positioning */
#hero .animate-bounce {
    z-index: 10;
}

/* Ensure scroll indicator is visible on small screens */
@media (max-height: 700px) {
    #hero .animate-bounce {
        bottom: 1rem !important;
    }
}

/* Hide scroll indicator on very small screens if needed */
@media (max-height: 500px) {
    #hero .animate-bounce {
        display: none;
    }
}

/* ===========================
   Project Cards
   =========================== */
.project-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

/* ===========================
   Skills Section
   =========================== */
#skills .bg-bg-secondary {
    transition: border-color 0.3s ease, transform 0.3s ease;
}

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

/* ===========================
   Timeline Styles
   =========================== */
#experience .relative {
    position: relative;
}

/* Clean timeline without dots - minimalist design */
#experience .border-l-2 {
    padding-left: 0;
}

/* ===========================
   Contact Cards
   =========================== */
#contact a {
    transition: all 0.3s ease;
}

#contact a:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===========================
   Utility Classes
   =========================== */

/* Smooth Transitions */
.transition-smooth {
    transition: all 0.3s ease-in-out;
}

/* Glass Effect */
.glass-effect {
    background: rgba(23, 23, 23, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 768px) {
    /* Adjust hero text size on mobile */
    #hero h1 {
        font-size: 2.5rem;
    }

    #hero h2 {
        font-size: 1.5rem;
    }

    /* Stack project cards on mobile */
    .project-card {
        margin-bottom: 1.5rem;
    }
}

/* ===========================
   Accessibility
   =========================== */

/* Focus Styles for Keyboard Navigation */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Reduce 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;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    nav,
    #hero .scroll-indicator,
    footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

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

/* ===========================
   Loading State (Optional)
   =========================== */
.loading {
    opacity: 0;
    pointer-events: none;
}

.loaded {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* ===========================
   Custom Scrollbar
   =========================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 6px;
}

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

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
}
