/* Custom CSS for Tom Svensson's Personal Website */

/* Root Variables */
:root {
    --primary-color: #333333;
    --secondary-color: #666666;
    --success-color: #333333;
    --dark-color: #333333;
    --light-color: #ffffff;
    --gradient-primary: #ffffff;
    --gradient-secondary: #ffffff;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-heavy: 0 3px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background-color: #ffffff;
}

html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-image {
    position: relative;
    z-index: 2;
    animation: fadeInRight 1s ease-out 0.6s both;
}

.profile-circle {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-light);
}

.profile-circle i {
    color: var(--primary-color) !important;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-down {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-decoration: none;
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-stat h3 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.about-stat p {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Skills Section */
.skill-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.skill-card:hover {
    box-shadow: var(--shadow-medium);
}

.skill-icon {
    margin-bottom: 1.5rem;
}

.skill-icon i {
    font-size: 3rem;
}

.skill-card h5 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.skill-card p {
    color: var(--secondary-color);
    margin: 0;
}

/* Portfolio Section */
.portfolio-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portfolio-card:hover {
    box-shadow: var(--shadow-medium);
}

.portfolio-image {
    background: #f8f9fa;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--primary-color);
}

.portfolio-content {
    padding: 2rem;
}

.portfolio-content h5 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.portfolio-content p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.portfolio-tags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

/* Contact Section */
.contact-item {
    text-align: center;
    padding: 2rem 1rem;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-item h5 {
    margin: 1rem 0 0.5rem 0;
    color: var(--primary-color);
}

.contact-item p {
    color: var(--secondary-color);
    margin: 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-control {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
    padding: 0.75rem 1rem;
}

.contact-form .form-control::placeholder {
    color: var(--secondary-color);
}

.contact-form .form-control:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(51, 51, 51, 0.1);
    color: var(--primary-color);
}

/* Footer */
.social-links a {
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #555555;
    border-color: #555555;
    box-shadow: var(--shadow-medium);
}

.btn-outline-light:hover {
    background: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .profile-circle {
        width: 200px;
        height: 200px;
    }
    
    .profile-circle i {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-stat h3 {
        font-size: 2rem;
    }
    
    .skill-card,
    .portfolio-card {
        margin-bottom: 2rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .profile-circle {
        width: 150px;
        height: 150px;
    }
    
    .profile-circle i {
        font-size: 3rem;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
