@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    scroll-behavior: smooth;
    margin: 0; /* remove default body margins to avoid white edges */
}

/* Prevent horizontal scroll and right-side gap */
html, body {
    overflow-x: hidden;
}

/* Prevent layout shift when vertical scrollbar appears/disappears */
html {
    scrollbar-gutter: stable; /* reserve space for scrollbar to prevent layout shift */
    background-color: #0f172a; /* match page background to avoid white stripe */
}
body {
    overflow-y: auto; /* avoid forcing double-reservation and extra gutter */
}

.hero-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.card-gradient {
    background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #38bdf8;
    transition: width 0.3s ease;
}

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

.project-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.skill-badge {
    transition: all 0.3s ease;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.skill-badge:hover {
    transform: scale(1.05);
    background-color: #38bdf8;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Final state for JS-driven IO animation */
.animate-fade-in {
    opacity: 1;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

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

.section {
    min-height: 100vh;
    padding-top: 80px;
    padding-bottom: 80px;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(45deg, #38bdf8, #7c3aed);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    animation: blob 15s infinite linear;
}

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