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

body {
    font-family: 'League Spartan', sans-serif;
    background-image: url('Images/backgrounds/background3.JPG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #050505;
    color: #1a1a1a;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

.homepage {
    text-align: center;
    padding: 2rem;
}

.brand-name {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: -15px;
    color: #ffffff;
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.brand-name-gradient {
    color: #def7ff;
}

.brand-name-sam {
    color: #ffffff;
}

.links {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    opacity: 0;
    position: relative;
    transform-origin: top;
    will-change: transform, opacity;
    animation: slideOutFromUnder 0.9s ease-out forwards;
    animation-delay: 0.9s;
}

.link {
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
    position: relative;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.link:hover {
    opacity: 0.6;
}

.link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

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

.social-footer {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    opacity: 0;
    will-change: transform, opacity;
    animation: slideUpFromBottom 0.9s ease-out forwards;
    animation-delay: 0.9s;
    z-index: 15;
}

.social-link {
    color: #ffffff;
    transition: transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 640px) {
    .social-footer {
        gap: 0.4rem;
    }
    .social-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 2rem;
        padding-bottom: 2rem;
        background-attachment: scroll;
        display: block;
        min-height: 100vh;
        height: 100%;
        background-position: 45% center;
        background-size: cover;
    }

    .homepage {
        padding: 0 1.25rem 2.5rem;
        padding-top: calc(20vh + 1rem);
        margin-top: 0;
        width: 100%;
    }

    .links {
        gap: 1.5rem;
        margin-top: -1.25rem;
        justify-content: center;
    }

    .brand-name {
        margin-top: 0.35rem;
        display: block;
        text-align: center;
        margin-bottom: 0.4rem;
    }

}

.brand-name {
    opacity: 0;
    animation: pixelateIn 1s ease forwards;
    animation-delay: 0s;
}

@keyframes pixelateIn {
    0% {
        opacity: 0;
        filter: blur(20px) contrast(1.5);
        transform: scale(0.95);
    }
    60% {
        opacity: 0.8;
        filter: blur(6px) contrast(2);
    }
    100% {
        opacity: 1;
        filter: none;
        transform: scale(1);
    }
}

@keyframes slideOutFromUnder {
    from {
        opacity: 0;
        transform: translateY(-40px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: none;
    }
}

@keyframes slideUpFromBottom {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(40px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        filter: none;
    }
}

/* Page styles */
.page {
    max-width: 1200px;
    padding: 2rem 2rem 3rem;
    text-align: center;
    width: 100%;
    position: relative;
}

.page--embed {
    max-width: none;
    padding: 2rem 20px 3rem;
}

.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.8rem;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.back-link:hover {
    opacity: 0.7;
}

.page-title {
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    margin-top: 0;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.page-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #e6f2ff;
    margin-top: -0.25rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0.65rem 1.2rem;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    transition: background 0.3s ease, border 0.3s ease;
}

.page-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.page-content {
    font-size: 1.1rem;
    color: #f4f4f4;
    line-height: 1.8;
}

.form-embed-full {
    margin-top: 2rem;
    width: 100%;
}

.form-embed-body {
    width: 100%;
}

.upload-instructions {
    margin-top: 2rem;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.upload-instructions ol {
    margin: 0.5rem 0 0 1.1rem;
    padding: 0;
}

.upload-instructions li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.portfolio-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .back-link {
        top: 1rem;
        left: 1rem;
    }
    
    .page-title {
        margin-top: 3rem;
    }
}
