/* ============================================
   TAHA.DEV - COMPLETE DARK THEME STYLES
   ============================================ */

:root {
    --bg-primary: #000;
    --bg-secondary: #0a0a14;
    --bg-card: rgba(20, 20, 35, 0.9);
    --text-primary: #e7e7e7;
    --text-secondary: #a7a7a7;
    --text-muted: #666;
    --accent-primary: #5300a0;
    --accent-secondary: #7f42a7;
    --border-color: rgba(160, 160, 255, 0.2);
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: auto;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

/* Background */
.image-gradient {
    position: fixed;
    top: 0;
    right: 0;
    opacity: 0.3;
    z-index: -2;
    pointer-events: none;
}

.layer-blur {
    display: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

nav {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

nav a {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

nav a:hover,
nav a.active {
    border-bottom-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-cv {
    background: var(--text-secondary);
    color: var(--bg-primary);
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cv:hover {
    background: #fff;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.2s, opacity 0.2s;
}

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

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

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

/* Main */
main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.hero-content {
    max-width: 42rem;
    margin-left: 8%;
    z-index: 10;
}

/* Tag Box */
.tag-box {
    position: relative;
    width: fit-content;
    padding: 3px;
    border-radius: 50px;
    background: linear-gradient(90deg, #656565, var(--accent-secondary), var(--accent-primary), #656565);
    background-size: 200% 100%;
    animation: gradientMove 4s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.tag {
    background-color: var(--bg-primary);
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Hero Title */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 2rem 0;
    line-height: 1.15;
    color: #fff;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 35rem;
    line-height: 1.7;
}

/* Buttons */
.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
}

.btn-outline {
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-secondary);
}

.btn-primary {
    background: var(--text-secondary);
    color: var(--bg-primary);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #fff;
}

/* 3D Robot */
.robot-3d {
    position: absolute;
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
    width: 55%;
    height: 100vh;
    max-height: 800px;
    pointer-events: auto;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, transform 0.2s;
}

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

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #fff;
}

.card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Skills */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.skill-item {
    background: var(--bg-card);
    padding: 1rem 1.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.skill-item:hover {
    border-color: var(--accent-secondary);
}

/* Experience Container */
.experience-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.experience-skills {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-card {
    background: var(--bg-card);
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s, transform 0.2s;
}

.skill-card:hover {
    border-color: var(--accent-secondary);
    transform: translateX(5px);
}

.skill-card-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.skill-card-content h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: #fff;
}

.skill-card-content p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.experience-visual {
    position: sticky;
    top: 100px;
    height: 450px;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.experience-visual spline-viewer {
    width: 100%;
    height: 100%;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
}

.contact-item:hover {
    border-color: var(--accent-secondary);
}

.contact-item-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    color: #fff;
}

.contact-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
}

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

.btn-submit {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-submit:hover {
    opacity: 0.9;
}

/* Footer */
.site-footer {
    padding: 2.5rem 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.social-link:hover {
    border-color: var(--accent-secondary);
    color: #fff;
    background: rgba(83, 0, 160, 0.2);
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Page Header */
.page-header {
    padding: 6rem 0 3rem;
    text-align: center;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.spline-about-wrapper {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.spline-about-wrapper spline-viewer {
    width: 100%;
    height: 100%;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, transform 0.2s;
}

.stat-item:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
    display: block;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-secondary);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-secondary);
    border-radius: 50%;
}

.timeline-date {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: #fff;
}

.timeline-text {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide Spline watermark */
spline-viewer::part(logo) {
    display: none !important;
}

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

@media (max-width: 1200px) {
    .robot-3d {
        width: 50%;
        right: -10%;
    }
    
    .hero-content {
        max-width: 50%;
    }
    
    .experience-container,
    .contact-container,
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .experience-visual {
        position: relative;
        top: 0;
        height: 350px;
        order: -1;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    header {
        padding: 1rem 1.5rem;
    }
    
    nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }
    
    nav.active {
        display: flex;
    }
    
    nav a {
        font-size: 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .robot-3d {
        position: relative;
        width: 100%;
        right: 0;
        top: 0;
        transform: none;
        height: 300px;
        margin-bottom: 2rem;
    }
    
    main {
        min-height: auto;
        padding-top: 1rem;
    }
    
    .hero-content {
        max-width: 100%;
        margin-left: 0;
        text-align: center;
        order: 2;
    }
    
    .tag-box {
        margin: 0 auto;
    }
    
    .buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    header {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .btn-cv {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .page-header {
        padding: 5rem 0 2rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .experience-visual,
    .spline-about-wrapper {
        height: 280px;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .btn-outline,
    .btn-primary {
        width: 100%;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item::before {
        left: -1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .skill-card {
        padding: 1rem;
    }
}
