/* Unscripted Space - Custom Styles */

*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Header */
#site-header {
    background: transparent;
    transition: all 0.5s ease;
}

#site-header.scrolled {
    background: rgba(80, 66, 58, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#site-header.scrolled .hamburger-line-1,
#site-header.scrolled .hamburger-line-2,
#site-header.scrolled .hamburger-line-3 {
    background-color: rgba(255, 255, 255, 0.9);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    width: 24px;
}

.hamburger.active .hamburger-line-1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active .hamburger-line-2 {
    opacity: 0;
}

.hamburger.active .hamburger-line-3 {
    width: 6px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Animations */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s ease forwards;
}

.hero-reveal:nth-child(2) { animation-delay: 0.15s; }
.hero-reveal:nth-child(3) { animation-delay: 0.3s; }
.hero-reveal:nth-child(4) { animation-delay: 0.45s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

::-webkit-scrollbar-track {
    background: #f9f5ed;
}

::-webkit-scrollbar-thumb {
    background: #c7b8a5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0886d;
}

/* Selection */
::selection {
    background-color: rgba(150, 162, 125, 0.3);
    color: #3d4533;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #7a8862;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(122, 136, 98, 0.1);
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

/* Blog post content */
.prose h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: #3d4533;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose p {
    color: #5f4e44;
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.prose img {
    border-radius: 1rem;
    margin: 2rem 0;
}

.prose blockquote {
    border-left: 2px solid #b3bda0;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #725d50;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
