/* ===== Base & Utilities ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #283928;
    color: #faf9f6;
}

/* ===== Sidebar Navigation ===== */
.sidebar {
    width: 192px;
    background: #faf9f6;
    border-right: 1px solid #e3ebe0;
    z-index: 50;
}

.nav-link {
    display: block;
    padding: 10px 0;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #557450;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 1px;
    background: #283928;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #283928;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 16px;
}

/* ===== Mobile Menu ===== */
.mobile-link {
    text-decoration: none;
    color: #283928;
    transition: opacity 0.3s ease;
}

.mobile-link:hover {
    opacity: 0.6;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: #283928;
    color: #faf9f6;
    padding: 14px 28px;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #283928;
    transition: all 0.4s ease;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background: transparent;
    color: #283928;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #283928;
    padding: 14px 28px;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #9db896;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    background: #283928;
    border-color: #283928;
    color: #faf9f6;
}

/* ===== Social Icons ===== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dcd6c7;
    border-radius: 50%;
    color: #283928;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #283928;
    border-color: #283928;
    color: #faf9f6;
}

/* ===== Scroll Indicator ===== */
.scroll-line {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #9db896;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ===== Section Padding ===== */
.section-padding {
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 768px) {
    .section-padding {
        padding-left: 64px;
        padding-right: 64px;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-left: 96px;
        padding-right: 96px;
    }
}

/* ===== Reveal Animations ===== */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ===== Hero Reveal ===== */
.reveal-up {
    animation: revealUp 0.8s ease forwards;
    animation-delay: var(--delay, 0s);
    opacity: 0;
}

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

/* ===== Menu Toggle (mobile) ===== */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Form Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #557450;
}

/* ===== Smooth image loading ===== */
img {
    opacity: 1;
    transition: opacity 0.5s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 767px) {
    .sidebar {
        width: 100%;
        height: 64px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        border-right: none;
        border-bottom: 1px solid #e3ebe0;
    }
    
    .sidebar > div:first-child a {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .sidebar > div:first-child .font-serif {
        font-size: 18px;
    }
    
    .sidebar > div:first-child > div {
        display: none;
    }
    
    .sidebar > div:first-child p {
        display: none;
    }
    
    main {
        margin-left: 0 !important;
    }
}
