/* 
    Design System for Elchin Nagiyev's Portfolio
    Elegant, Modern, High-Impact
*/

:root {
    --bg-color: #05070a;
    --surface-color: rgba(255, 255, 255, 0.03);
    --surface-glass: rgba(10, 15, 25, 0.85);
    --primary-color: #64ffda;
    --accent-color: #4CAC9D;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: rgba(240, 246, 252, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

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

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 140px 0 100px;
    /* More top padding */
    scroll-margin-top: 80px;
    /* Offset for sticky header */
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

section.revealed,
#projects {
    opacity: 1;
    transform: translateY(0);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition-smooth);
    backdrop-filter: blur(0px);
}

header.scrolled {
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0;
    opacity: 1;
    transform: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: radial-gradient(circle at 70% 30%, rgba(100, 255, 218, 0.05) 0%, transparent 50%);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: brightness(0.7);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(100, 255, 218, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

h1.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

h1.hero-title span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item h3 {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-item p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* Glass Cards */
.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 255, 218, 0.3);
    transform: translateY(-5px);
}

/* Skills Grid (Bento Box) */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.archive-item .skill-tag {
    color: var(--primary-color);
    background: rgba(100, 255, 218, 0.05);
    border-color: rgba(100, 255, 218, 0.2);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: calc(1rem - 4px);
    top: 0.5rem;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-content .date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    margin-bottom: 0.25rem;
}

.timeline-content .company {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Project Cards */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card .project-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Archive Search */
.archive-controls {
    margin-top: 4rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input {
    flex-grow: 1;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    color: #fff;
    font-family: inherit;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    /* Brighter default background */
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-secondary);
    margin-right: .1rem;
    margin-bottom: .5rem;
    /* Balanced color */
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
}

.filter-btn.active {
    background: rgba(100, 255, 218, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.1);
}

#archive-list {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.archive-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-smooth);
}

.archive-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.archive-info {
    flex-grow: 1;
}

.archive-title-year {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.archive-name {
    font-size: 1rem;
    color: var(--text-primary);
}

.archive-year {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
}

.archive-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.archive-meta {
    text-align: right;
    min-width: 140px;
}

/* Recommendations Slider */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.recommendation-card {
    position: relative;
    padding-top: 3.5rem;
    display: flex;
    flex-direction: column;
}

.recommendation-card i {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    font-size: 2rem;
    color: rgba(100, 255, 218, 0.2);
}

.recommendation-card blockquote {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
}

.author-info h4 {
    font-size: 0.9rem;
}

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

/* Footer */
footer {
    padding: 50px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-socials a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

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

.copyright {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        justify-content: space-between;
        width: 100%;
        padding: 0 1.5rem; /* Ensure some spacing */
    }

    .mobile-menu-toggle {
        display: block;
        order: 2; /* Push to right */
        z-index: 1001; /* Above overlay */
    }

    .logo {
        order: 1;
        z-index: 1001; /* Above overlay */
    }

    h1.hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%; /* Full width for solid feel */
        height: 100vh;
        background: #0a0a0a; /* Non-transparent solid background */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: var(--transition-smooth);
        z-index: 1000;
        display: flex;
    }

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

    .nav-links a {
        font-size: 1.5rem;
    }

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

    #archive-list {
        grid-template-columns: 1fr;
    }

    .archive-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .archive-meta {
        text-align: left;
        min-width: auto;
    }

    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}

body.no-scroll {
    overflow: hidden;
}
