/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 50%, transparent 100%);
    transition: background 0.4s ease;
}

.nav-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-logo span {
    color: var(--accent);
    transition: color 0.4s ease;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    color: var(--text-dim);
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent);
    transition: width 0.3s ease, background-color 0.4s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

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

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-lighter);
    padding: 6px 8px;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color 0.4s ease;
}

.theme-toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.theme-toggle-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-dim);
    transition: stroke 0.3s ease;
}

.theme-toggle-icon.active svg {
    stroke: var(--accent);
}

.theme-toggle-track {
    width: 32px;
    height: 18px;
    background-color: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background-color 0.4s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: var(--accent);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.4s ease;
}

[data-theme="light"] .theme-toggle-thumb {
    transform: translateX(14px);
}

@media (max-width: 768px) {
    .nav {
        padding: 16px 24px;
    }

    .nav-links {
        display: none;
    }
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.section-header-text {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    white-space: nowrap;
    transition: color 0.4s ease;
}

.section-header-line {
    flex: 1;
    height: 1px;
    background-color: var(--border);
    transition: background-color 0.4s ease;
}

/* ========================================
   BUTTONS
   ======================================== */
.magnetic-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background-color: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, border-color 0.4s ease, transform 0.15s ease;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--accent);
    transition: height 0.3s ease, background-color 0.4s ease;
    z-index: -1;
}

.magnetic-btn:hover {
    color: var(--bg);
}

.magnetic-btn:hover::before {
    height: 100%;
}

.magnetic-btn .arrow {
    transition: transform 0.3s ease;
}

.magnetic-btn:hover .arrow {
    transform: translateX(4px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background-color: var(--accent);
    color: var(--bg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease, color 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-dim);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    padding: 24px;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.4s ease, box-shadow 0.3s ease;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.card-glow:hover {
    box-shadow: 0 0 30px var(--accent-dim);
}

/* ========================================
   TAGS
   ======================================== */
.tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    background-color: var(--bg-lighter);
    padding: 4px 12px;
    border-radius: 4px;
    transition: color 0.4s ease, background-color 0.4s ease;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========================================
   SOCIAL LINKS
   ======================================== */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.social-link {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, background-color 0.4s ease;
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--text-dim);
    transition: fill 0.3s ease;
}

.social-link:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.social-link:hover svg {
    fill: var(--accent);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 48px 0;
    text-align: center;
    border-top: 1px solid var(--border);
    transition: border-color 0.4s ease;
}

.footer-decoration {
    font-size: 12px;
    color: var(--text-dimmer);
    margin-bottom: 16px;
    transition: color 0.4s ease;
}

.footer-text {
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.4s ease;
}

.footer-text .heart {
    color: var(--accent);
    transition: color 0.4s ease;
}

/* ========================================
   BACK LINK
   ======================================== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 32px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent);
}

.back-link .arrow {
    transition: transform 0.3s ease;
}

.back-link:hover .arrow {
    transform: translateX(-4px);
}
