/* 
    Khaled Tarchi AI Portfolio CSS 
    Design: Dark premium theme, elegant, glassmorphism, responsive.
*/

:root {
    /* Colors */
    --bg-main: #06070a;
    --bg-secondary: #0d1117;
    --bg-card: rgba(22, 27, 34, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #00e5ff; /* Electric Cyan */
    --accent-glow: rgba(0, 229, 255, 0.15);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Typography */
h1, h2, h3, h4, .brand {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw + 1rem, 2.5rem);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 10%, #00e5ff 50%, #7b2cbf 90%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.accent {
    color: var(--accent);
}

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

/* Layout classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 2rem);
}

.section-padding {
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header.center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.divider {
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    margin-top: 1rem;
    border-radius: 2px;
}

.section-desc {
    color: var(--text-secondary);
    margin-top: 1.5rem;
    font-size: 1.1rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    font-family: var(--font-heading);
}

.btn-primary {
    background-color: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 30px rgba(0, 229, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background-color: rgba(255,255,255,0.02);
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(6, 7, 10, 0.8);
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand span {
    color: var(--accent);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-secondary);
    z-index: 1001;
    padding: 5rem 2rem;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    border-left: 1px solid var(--border-subtle);
}

.mobile-nav.active {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-link {
    display: block;
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw + 1rem, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/5;
    background-color: var(--bg-card);
}

.hero-wrapper {
    border: 1px solid var(--border-subtle);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
}

.bw-img {
    filter: grayscale(100%) contrast(1.1);
}

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

.mindset-blocks {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mindset-block {
    display: flex;
    gap: 1.5rem;
}

.block-icon {
    flex-shrink: 0;
    color: var(--accent);
    width: 32px;
    height: 32px;
    padding: 6px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 8px;
}

.mindset-block h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.mindset-block p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Research Vision */
.interests-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.interest-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1rem;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition-smooth);
}

.interest-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: rgba(22, 27, 34, 0.8);
}

.interest-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.vision-box {
    background: linear-gradient(180deg, rgba(22,27,34,0.6) 0%, rgba(6,7,10,0) 100%);
    border: 1px solid var(--border-subtle);
    border-top-color: var(--accent);
    padding: 3rem;
    border-radius: 20px;
    position: relative;
}

.vision-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #fff;
}

.vision-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
    max-width: 900px;
    margin: 0 auto;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #fff;
}

.skill-category h3 i {
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.skill-tag i {
    font-size: 1.2rem;
}

/* Certifications Section */
.certs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateX(10px);
    background: rgba(22, 27, 34, 0.8);
    box-shadow: -5px 5px 20px rgba(0, 229, 255, 0.1);
}

.cert-icon {
    font-size: 2rem;
    color: var(--accent);
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.cert-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: #fff;
    font-family: var(--font-body);
}

.cert-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 229, 255, 0.15), 0 0 20px rgba(0, 229, 255, 0.1) inset;
    background: rgba(22, 27, 34, 0.85);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-icon {
    color: var(--accent);
    width: 28px;
    height: 28px;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-stack span {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-weight: 600;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.project-content p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--bg-secondary);
}

footer h3 {
    margin-bottom: 0.5rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links svg,
.social-links i {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}/* Background Orbs */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    filter: blur(100px);
    opacity: 0.4;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
    will-change: transform;
}

.orb-1 { width: 500px; height: 500px; background: rgba(0, 229, 255, 0.15); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: rgba(123, 44, 191, 0.15); bottom: -10%; right: -5%; animation-duration: 25s; }
.orb-3 { width: 300px; height: 300px; background: rgba(58, 12, 163, 0.15); top: 40%; left: 50%; transform: translateX(-50%); animation-duration: 30s; }

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

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text { order: 2; }
    .hero-visual { order: 1; max-width: 500px; margin: 0 auto; }
    .hero-actions { justify-content: center; }
    .hero .subtitle { margin: 0 auto 2rem; }
    
    .about-grid { grid-template-columns: 1fr; }
    .about-visual { max-width: 500px; margin: 0 auto; }
    
    .interests-grid { grid-template-columns: repeat(2, 1fr); }
    .certs-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .skills-container { grid-template-columns: 1fr; }
}
