/* ========================================
   KLEM - Portfolio CSS
   ======================================== */

/* CSS Variables */
:root {
    /* Colors - Light Theme */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-bg: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 50%, #faf5ff 100%);
    --gradient-text: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    /* Spacing */
    --section-padding: 120px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Z-index layers */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --accent: #22d3ee;
    --accent-dark: #06b6d4;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    
    --border: #334155;
    --border-light: #1e293b;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========================================
   BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--gradient-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   LOADER
   ======================================== */

.loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: pulse 1.5s ease infinite;
}

.loader-bracket {
    color: var(--primary);
}

.loader-name {
    color: var(--text-primary);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.98); }
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

/* ========================================
   SCROLL PROGRESS
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: var(--z-fixed);
    transition: width 0.1s linear;
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.theme-toggle {
    position: fixed;
    top: 100px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-fixed);
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
    transition: var(--transition-base);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

/* ========================================
   NAVIGATION
   ======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    transition: var(--transition-base);
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-logo .logo-bracket {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-base);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.btn-full {
    width: 100%;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.hero-gradient:nth-child(1) {
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.hero-gradient:nth-child(2) {
    background: var(--accent);
    bottom: -200px;
    left: -200px;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-particles {
    position: absolute;
    inset: 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease forwards;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: blink 2s ease infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease 0.1s forwards;
    opacity: 0;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.3s forwards;
    opacity: 0;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.4s forwards;
    opacity: 0;
}

.hero-social {
    display: flex;
    justify-content: center;
    gap: 16px;
    animation: fadeInUp 0.6s ease 0.5s forwards;
    opacity: 0;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

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

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 0.6s ease 0.6s forwards;
    opacity: 0;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-tertiary);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: var(--text-tertiary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease infinite;
}

@keyframes scroll {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(16px); opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SECTION STYLES
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-primary);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
}

.about-image-border {
    position: absolute;
    inset: -10px;
    border: 3px solid var(--primary);
    border-radius: var(--radius-xl);
    transform: rotate(6deg);
    z-index: -1;
}

.about-decoration {
    position: absolute;
    top: -30px;
    right: -30px;
    z-index: -1;
}

.deco-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.2;
    animation: float 10s ease-in-out infinite;
}

.deco-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: radial-gradient(var(--primary) 2px, transparent 2px);
    background-size: 10px 10px;
    opacity: 0.5;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-text strong {
    color: var(--text-primary);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 32px 0;
}

.feature {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition-base);
}

.feature:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.feature-text h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
}

/* ========================================
   SKILLS SECTION
   ======================================== */

.skills {
    padding: var(--section-padding) 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.skill-category {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition-base);
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.skill-icon {
    font-size: 2rem;
}

.skill-category-header h3 {
    font-size: 1.25rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.skill-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.skill-level {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.skill-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 1s ease;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 28px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.tech-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.tech-item img {
    width: 40px;
    height: 40px;
    filter: grayscale(0);
    transition: var(--transition-base);
}

.tech-item:hover img {
    filter: grayscale(0);
    transform: scale(1.1);
}

.tech-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========================================
   PROJECTS SECTION
   ======================================== */

.projects {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition-base);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    transition: var(--transition-base);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link,
.project-github {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    transition: var(--transition-base);
    transform: translateY(20px);
}

.project-card:hover .project-link,
.project-card:hover .project-github {
    transform: translateY(0);
}

.project-link:hover,
.project-github:hover {
    background: var(--primary);
    color: white;
}

.project-link svg,
.project-github svg {
    width: 24px;
    height: 24px;
}

.project-content {
    padding: 28px;
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

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

.project-tech span {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    padding: var(--section-padding) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

a.contact-method:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

.method-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.method-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.method-content {
    display: flex;
    flex-direction: column;
}

.method-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.method-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 280px;
}

.footer-logo {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo .logo-bracket {
    color: var(--primary);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ========================================
   BACK TO TOP
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-base);
    z-index: var(--z-fixed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --section-padding: 100px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .about-image {
        order: -1;
        display: flex;
        justify-content: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 24px;
        gap: 8px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 16px;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .theme-toggle {
        top: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-stack {
        gap: 16px;
    }
    
    .tech-item {
        padding: 16px 20px;
    }
    
    .tech-item img {
        width: 32px;
        height: 32px;
    }
    
    .contact-form {
        padding: 24px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-brand p {
        max-width: none;
    }
    
    .footer-links ul {
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-content {
        padding: 40px 16px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .about-image-placeholder {
        font-size: 5rem;
    }
    
    .skill-category {
        padding: 24px;
    }
    
    .project-content {
        padding: 20px;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-wheel {
        animation: none;
    }
}
