/* ========================================
   KEEN.ENGINEER - Portfolio Styles
   ======================================== */

/* CSS Variables */
:root {
    /* Colors - Dark theme with warm accent */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #1c1c1f;
    --bg-card-hover: #242428;
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-primary: #f59e0b;
    --accent-secondary: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.15);
    
    --border-color: #27272a;
    --border-light: #3f3f46;
    
    /* Code colors */
    --code-keyword: #c084fc;
    --code-string: #4ade80;
    --code-variable: #60a5fa;
    --code-property: #fbbf24;
    
    /* Typography */
    --font-display: 'Syne', sans-serif;
    --font-mono: 'Source Code Pro', monospace;
    
    /* Spacing */
    --nav-height: 72px;
    --section-padding: 120px;
    --container-width: 1280px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: var(--container-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.logo-bracket {
    color: var(--accent-primary);
}

.logo-dot {
    color: var(--accent-secondary);
}

.nav-search {
    flex: 1;
    max-width: 320px;
    position: relative;
    display: none;
}

@media (min-width: 1024px) {
    .nav-search {
        display: block;
    }
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 16px 0 44px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: var(--transition-fast);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-login svg {
    width: 18px;
    height: 18px;
}

.nav-login:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    gap: 8px;
}

.mobile-link {
    padding: 16px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.mobile-login {
    margin-top: 16px;
    padding: 16px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    padding: calc(var(--nav-height) + 48px) 24px 48px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
        padding: var(--nav-height) 48px;
    }
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -200px;
    opacity: 0.15;
}

.gradient-orb-2 {
    width: 400px;
    height: 400px;
    background: #8b5cf6;
    bottom: -100px;
    left: -100px;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .hero-content {
        margin: 0;
        padding-left: 48px;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease backwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.title-line {
    display: block;
    animation: fadeInUp 0.6s ease backwards;
}

.title-line:nth-child(1) { animation-delay: 0.1s; }
.title-line:nth-child(2) { animation-delay: 0.2s; }
.title-line:nth-child(3) { animation-delay: 0.3s; }

.title-accent {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.5s backwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    animation: fadeInUp 0.6s ease 0.6s backwards;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Visual - Code Window */
.hero-visual {
    position: relative;
    display: none;
    animation: fadeIn 1s ease 0.3s backwards;
}

@media (min-width: 1024px) {
    .hero-visual {
        display: block;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 24px 48px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.window-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.window-title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.window-content {
    padding: 24px;
    overflow-x: auto;
}

.window-content pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.code-keyword { color: var(--code-keyword); }
.code-string { color: var(--code-string); }
.code-variable { color: var(--code-variable); }
.code-property { color: var(--code-property); }

/* ========================================
   Section Styles
   ======================================== */
.section-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--accent-glow);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-subtitle {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ========================================
   Skills Section
   ======================================== */
.skills-section {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skill-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition-normal);
}

.skill-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.skill-card-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

@media (min-width: 1024px) {
    .skill-card-featured {
        grid-column: span 2;
    }
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 12px;
    margin-bottom: 20px;
}

.skill-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.skill-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.skill-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========================================
   Projects Section
   ======================================== */
.projects-section {
    padding: var(--section-padding) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.project-card-large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .project-card-large {
        grid-template-columns: 1fr 1fr;
    }
}

.project-image {
    aspect-ratio: 16 / 10;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
}

.project-placeholder svg {
    width: 100%;
    height: 100%;
}

.project-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.project-tag {
    padding: 4px 10px;
    background: var(--accent-glow);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.project-stack span::before {
    content: "•";
    margin-right: 12px;
    color: var(--accent-primary);
}

.project-stack span:first-child::before {
    display: none;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    transition: var(--transition-fast);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

.project-link:hover {
    color: var(--accent-secondary);
}

.project-card-coming {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.project-card-coming .project-content {
    text-align: center;
}

.coming-soon-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: start;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }
}

.about-content .section-tag {
    margin-bottom: 12px;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 24px;
}

.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-links {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.social-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.about-education {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.education-card {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.education-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 12px;
}

.education-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.education-content {
    flex: 1;
}

.education-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.education-degree {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.education-school {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.education-honors {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: var(--accent-glow);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    padding: var(--section-padding) 0;
    text-align: center;
}

.contact-content {
    max-width: 560px;
    margin: 0 auto;
}

.contact-content .section-title {
    margin-bottom: 16px;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.contact-email {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 32px;
    transition: var(--transition-fast);
}

.contact-email:hover {
    color: var(--accent-secondary);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.contact-social {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.contact-social svg {
    width: 22px;
    height: 22px;
}

.contact-social:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 48px 24px;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   Utility Classes
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: var(--nav-height);
}

/* Selection styling */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   Login Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* Modal Decorations */
.modal-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.decoration-circle-1 {
    width: 200px;
    height: 200px;
    background: var(--accent-primary);
    opacity: 0.1;
    top: -100px;
    right: -100px;
}

.decoration-circle-2 {
    width: 150px;
    height: 150px;
    background: #8b5cf6;
    opacity: 0.08;
    bottom: -75px;
    left: -75px;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

/* Modal Header */
.modal-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.modal-logo {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Styles */
.modal-form {
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input:focus + .input-icon,
.form-input:focus ~ .input-icon {
    color: var(--accent-primary);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.success {
    border-color: #22c55e;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.active .eye-open {
    display: none;
}

.password-toggle.active .eye-closed {
    display: block;
}

/* Form Error */
.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #ef4444;
    min-height: 18px;
}

/* Form Alert */
.form-alert {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
    animation: shake 0.5s ease;
}

.form-alert.show {
    display: flex;
}

.form-alert.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.form-alert.success .alert-icon {
    color: #22c55e;
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #ef4444;
}

.alert-message {
    font-size: 0.875rem;
    color: var(--text-primary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.checkbox-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 2px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-fast);
}

.checkbox-wrapper input:checked + .checkbox-custom {
    border-color: var(--accent-primary);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--accent-primary);
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--accent-secondary);
}

/* Submit Button */
.btn-full {
    width: 100%;
    justify-content: center;
    height: 52px;
    position: relative;
}

.btn-text {
    transition: opacity 0.2s ease;
}

.btn-loader {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    opacity: 0;
    animation: spin 0.8s linear infinite;
}

.btn-full.loading .btn-text {
    opacity: 0;
}

.btn-full.loading .btn-loader {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Footer */
.modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.modal-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.signup-link {
    color: var(--accent-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: var(--accent-secondary);
}

/* Responsive Modal */
@media (max-width: 480px) {
    .modal {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

