/* 
  KARZEL - Premium Portfolio Design System
  Deep Violet & Elegant Portfolio
*/

:root {
    --bg-dark: #07070a;
    --bg-card: rgba(15, 15, 22, 0.75);
    --accent: #7c3aed; /* Deep Purple */
    --accent-glow: rgba(124, 58, 237, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.04);
    --glass-blur: blur(20px);
    --card-radius: 24px; /* More rounded */
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Blobs */
.bg-blobs {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden;
}
.blob {
    position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(120px); border-radius: 50%; opacity: 0.35; animation: float 25s infinite alternate;
}
.blob-1 { top: -20%; right: -10%; }
.blob-2 { bottom: -20%; left: -10%; animation-delay: -5s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Typography */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* Glassmorphism */
.glass { background: var(--bg-card); backdrop-filter: var(--glass-blur); border: 1px solid var(--border); }

/* Navigation */
.navbar {
    position: fixed; top: 25px; left: 50%; transform: translateX(-50%);
    min-width: 380px; padding: 0 20px; border-radius: 100px; z-index: 1000;
    display: flex; align-items: center; gap: 30px; transition: var(--transition);
    height: 64px; /* Fixed slim height */
}
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--text-secondary); font-size: 0.95rem; font-weight: 500; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

.nav-logo img {
    height: 40px; width: 40px; border-radius: 50%;
    border: 2px solid var(--accent); object-fit: cover;
}

/* Sliding Lang Switch */
.lang-switch {
    display: flex; position: relative; background: rgba(255, 255, 255, 0.08); 
    padding: 0; border-radius: 20px; width: 120px; height: 32px; cursor: pointer;
    align-items: center; justify-content: center;
}
.lang-slider {
    position: absolute; top: 3px; left: 3px; width: 36px; height: 26px;
    background: var(--accent); border-radius: 15px; 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1;
}
.lang-switch.en .lang-slider { transform: translateX(39px); }
.lang-switch.ru .lang-slider { transform: translateX(78px); }
.lang-switch span {
    flex: 1; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); 
    z-index: 2; transition: var(--transition); line-height: 32px;
}

/* Hero Section */
.hero { padding: 180px 20px 100px; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-logo { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--accent); margin-bottom: 25px; box-shadow: 0 0 40px var(--accent-glow); }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); margin-bottom: 15px; line-height: 1.15; }
.hero p { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 35px; max-width: 650px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn { padding: 12px 25px; border-radius: 12px; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; text-decoration: none; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { box-shadow: 0 10px 25px var(--accent-glow); transform: translateY(-3px); }
.btn-outline { background: rgba(255, 255, 255, 0.03); color: white; border: 1px solid var(--border); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); }

/* Common Sections */
section { padding: 100px 20px; max-width: 1200px; margin: 0 auto; }
.section-tag { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; margin-bottom: 10px; display: block; text-align: center; }
.section-title { font-size: 2.2rem; text-align: center; margin-bottom: 60px; }

/* Portfolio Details */
.portfolio-category-title {
    font-size: 1rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 40px; display: block; border-bottom: 1px solid var(--border); padding-bottom: 10px;
    text-align: center;
}

/* Grids */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

/* Global Card Styling */
.card { 
    padding: 40px; border-radius: var(--card-radius); transition: var(--transition); cursor: default; 
    border: 1px solid var(--border);
}

/* Project Cards Special Styling */
.project-card { position: relative; overflow: hidden; padding: 0 !important; }
.project-card:hover, .card:hover { transform: translateY(-8px); border-color: rgba(124, 58, 237, 0.2); }

.project-image {
    height: 160px; background: rgba(124, 58, 237, 0.03); display: flex; align-items: center; justify-content: center; position: relative;
    border-bottom: 1px solid var(--border); overflow: hidden;
}
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-image i { font-size: 2.5rem; color: var(--accent); opacity: 0.3; transition: var(--transition); position: absolute; }
.project-card:hover .project-image i { opacity: 1; transform: scale(1.1); }

.project-content { padding: 25px 30px 30px; }
.tech-badge {
    background: rgba(124, 58, 237, 0.1); color: var(--accent); padding: 4px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 600; margin-bottom: 12px; display: inline-block;
}
.project-rating { color: #fbbf24; font-size: 0.8rem; margin-top: 8px; }
.project-actions { display: flex; gap: 10px; margin-top: 25px; }

/* Opinion Slider - Visible 3 desktop */
.carousel-viewport { overflow: hidden; max-width: 1200px; margin: 0 auto; position: relative; }
.carousel-track { display: flex; gap: 20px; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.carousel-card { 
    min-width: calc(33.333% - 13.33px); flex-shrink: 0; padding: 30px; border-radius: var(--card-radius); border: 1px solid var(--border);
}

.carousel-controls { display: flex; justify-content: center; gap: 20px; margin-top: 40px; }
.carousel-arrow {
    width: 45px; height: 45px; border-radius: 50%; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
    color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition);
}
.carousel-arrow:hover { background: var(--accent); color: white; }

/* Modals */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(15px); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-content { width: 100%; max-width: 600px; border-radius: 24px; position: relative; padding: 40px; box-shadow: 0 30px 60px rgba(0,0,0,0.5); border: 1px solid var(--border); }
.close-btn { position: absolute; top: 25px; right: 25px; font-size: 1.5rem; color: var(--text-secondary); cursor: pointer; transition: 0.2s; }
.close-btn:hover { color: #fff; }

.form-group { margin-bottom: 25px; display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.form-group input, .form-group textarea {
    width: 100%; padding: 14px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
    color: #fff; font-family: inherit; font-size: 0.95rem; transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; background: rgba(255, 255, 255, 0.06); border-color: var(--accent);
}

/* Star Rating in Modal */
.star-input-group { display: flex; flex-direction: row-reverse; justify-content: center; gap: 10px; margin-bottom: 30px; }
.star-input-group input { display: none; }
.star-input-group label { font-size: 2.5rem; color: rgba(255, 255, 255, 0.1); cursor: pointer; transition: 0.2s; }
.star-input-group label:hover, .star-input-group label:hover ~ label, .star-input-group input:checked ~ label {
    color: #fbbf24;
}

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(25px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Footer */
footer { padding: 80px 20px 40px; text-align: center; border-top: 1px solid var(--border); }
.footer-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 30px; }
.footer-links a { color: var(--text-secondary); font-size: 1.4rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 1024px) {
    .carousel-card { min-width: calc(50% - 10px); }
}
@media (max-width: 768px) {
    .carousel-card { min-width: 100%; }
    .navbar { min-width: auto; width: 95%; bottom: 20px; top: auto; height: 50px; padding: 0 15px; }
    .nav-links { display: none; }
    .hero h1 { font-size: 3rem; }
    .nav-logo img { width: 32px; height: 32px; }
}