/* CSS Variables */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-border: #e5e7eb;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1100px;
    --spacing-unit: 1rem;
}

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

/* Base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}


a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
    line-height: 1.3;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

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

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

/* Hero */
.hero {
    padding: 8rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: white;
}

.btn-outline {
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

/* About */
.about-text {
    max-width: 700px;
    margin: 0 auto;
    text-align: justify;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.location {
    text-align: center;
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 150px 20px 1fr;
    gap: 1.5rem;
    padding-bottom: 2.5rem;
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.35rem;
    z-index: 1;
}

.timeline-line::after {
    content: "";
    position: absolute;
    top: 1.25rem;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item:last-child .timeline-line::after {
    display: none;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    padding-top: 0.25rem;
    text-align: right;
}

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

.timeline-content .company {
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.timeline-content .description {
    margin-bottom: 0.75rem;
}

.highlights {
    margin: 1rem 0;
    padding-left: 1.25rem;
}

.highlights li {
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.highlights li::before {
    content: "→";
    position: absolute;
    left: -1.25rem;
    color: var(--color-primary);
}

/* Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.tag-small {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
}

.tag-expert {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tag-advanced {
    background: rgba(37, 99, 235, 0.05);
    color: var(--color-primary-dark);
}

/* Filter Input */
.filter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-bg);
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 1.5rem;
}

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

.filter-input::placeholder {
    color: var(--color-text-muted);
}

/* Project Filters */
.project-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-filters .filter-input {
    margin-bottom: 0;
}

.project-tab-group {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.tab-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.project-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-btn {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-family: var(--font-family);
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

#theme-tabs .tab-btn.active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: white;
}

#theme-tabs .tab-btn:hover {
    border-color: var(--color-text);
    color: var(--color-text);
}

/* Results count */
.results-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

/* No results */
.no-results {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem 0;
    font-size: 0.95rem;
}

/* Hidden state for filtering */
.project-card.hidden,
.project-tier.hidden,
.skill-card.hidden,
.tag.hidden,
.no-results.hidden,
.results-count.hidden {
    display: none;
}

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

.skill-card {
    padding: 1.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

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

/* Skill Tiers */
.skill-tier {
    margin-bottom: 2.5rem;
}

.skill-tier:last-child {
    margin-bottom: 0;
}

.tier-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    padding: 0.35rem 0.75rem;
    display: inline-block;
    border-radius: 4px;
}

.tier-core {
    background: rgba(37, 99, 235, 0.1);
    color: var(--color-primary);
}

.tier-production {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.tier-familiar {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-muted);
}

.skill-card-core {
    border-color: var(--color-primary);
    border-width: 2px;
}

.skill-card-core h4 {
    color: var(--color-primary);
}

.skill-card-production {
    border-color: #10b981;
}

.skill-card-production h4 {
    color: #059669;
}

.skill-card-familiar {
    background: var(--color-bg-alt);
    border-color: transparent;
}

.skill-card-familiar h4 {
    font-size: 0.85rem;
}

.skills-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.skills-grid-compact .skill-card {
    padding: 1rem;
}

.tag-muted {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.75rem;
}

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

.project-card {
    padding: 1.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

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

.project-period {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
    text-align: right;
}

.project-card > p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.project-highlights {
    margin: 1rem 0;
    padding-left: 1rem;
}

.project-highlights li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.project-highlights li::marker {
    color: var(--color-primary);
}

.project-links {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

/* Project Tiers */
.project-tier {
    margin-bottom: 3rem;
}

.project-tier:last-child {
    margin-bottom: 0;
}

.project-tier-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.85rem;
    display: inline-block;
    border-radius: 4px;
}

.tier-flagship {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(37, 99, 235, 0.05));
    color: var(--color-primary);
}

.tier-notable {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.tier-additional {
    background: rgba(107, 114, 128, 0.1);
    color: var(--color-text-muted);
}

/* Flagship Projects */
.flagship-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
}

.project-card-flagship {
    border: 2px solid var(--color-primary);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.03) 0%, var(--color-bg) 100%);
    padding: 2rem;
}

.project-card-flagship h3 {
    font-size: 1.4rem;
    color: var(--color-primary-dark);
}

/* Case Study Formatting */
.case-study {
    margin: 1.25rem 0;
    padding: 1rem;
    background: var(--color-bg-alt);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary);
}

.case-study-item {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.case-study-item:last-child {
    margin-bottom: 0;
}

.case-challenge {
    color: #b45309;
}

.case-solution {
    color: var(--color-primary-dark);
}

.case-result {
    color: #059669;
    font-weight: 500;
}

/* Compact Projects Grid */
.projects-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card-compact {
    padding: 1rem 1.25rem;
    background: var(--color-bg);
}

.project-card-compact h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.project-card-compact > p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.project-card-compact .tech-tags {
    margin-top: 0.75rem;
}

.project-card-compact .project-links {
    margin-top: 0.75rem;
}

/* Education */
.education-list {
    max-width: 600px;
    margin: 0 auto;
}

.education-item {
    text-align: center;
    margin-bottom: 2rem;
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.institution {
    color: var(--color-text-muted);
}

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

/* Certifications */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.cert-card {
    padding: 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    text-align: center;
}

.cert-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

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

.cert-card .date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Contact */
#contact {
    text-align: center;
}

.contact-intro {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.contact-icon {
    font-weight: 600;
    color: var(--color-primary);
}

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

.social-link {
    color: var(--color-text-muted);
    font-weight: 500;
}

.social-link:hover {
    color: var(--color-primary);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .timeline-item {
        grid-template-columns: 20px 1fr;
        gap: 0.75rem;
    }

    .timeline-date {
        grid-column: 2;
        padding-top: 0;
        text-align: left;
    }

    .timeline-line {
        grid-row: 1 / span 2;
    }

    .section {
        padding: 3rem 0;
    }

    .project-tab-group {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .project-card-flagship {
        padding: 1.5rem;
    }

    .project-card-flagship h3 {
        font-size: 1.2rem;
    }
}
