/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #e5e7eb;
    background-color: #0f172a;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #f8fafc;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    color: #94a3b8;
    margin-bottom: 1rem;
}

.highlight {
    color: #06b6d4; /* Акцент — бирюзовый */
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(6, 182, 212, 0.2);
    z-index: -1;
    border-radius: 2px;
}

/* === Layout & Spacing === */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-subtitle {
    color: #94a3b8;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === Navbar === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-kicad {
    color: #06b6d4;
    font-family: 'JetBrains Mono', monospace;
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: #06b6d4;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #06b6d4;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: #06b6d4;
    color: white;
}

.btn-primary:hover {
    background-color: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(6, 182, 212, 0.25);
}

.btn-outline {
    background: transparent;
    color: #06b6d4;
    border: 1px solid #06b6d4;
}

.btn-outline:hover {
    background-color: rgba(6, 182, 212, 0.1);
    transform: translateY(-2px);
    color: #fff;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 1.75rem;
    font-size: 1.125rem;
}

/* === Hero Section === */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(6, 182, 212, 0.1);
    z-index: 0;
}

.hero::before {
    top: 20%;
    right: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    transform: rotate(15deg);
    opacity: 0.3;
}

.hero::after {
    bottom: 10%;
    left: 10%;
    width: 120px;
    height: 120px;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: #f8fafc;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* === Projects Section === */
.projects-section {
    background-color: #141b30;
    padding: 6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.25rem;
    color: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.loading,
.error,
.no-projects {
    text-align: center;
    padding: 3rem;
    color: #64748b;
    font-size: 1.1rem;
}

.error-details {
    color: #f87171;
    font-size: 0.9rem;
}

.project-card {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s forwards;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card-inner {
    padding: 1.5rem;
    position: relative;
}

.project-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    color: #06b6d4;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
    color: #e0f2fe;
}

.project-description {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.project-language {
    font-weight: 500;
    color: #e0f2fe;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.project-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background-color: #334155;
    color: #e0f2fe;
    text-decoration: none;
    font-weight: 500;
    border-top: 1px solid #1e293b;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.project-link:hover {
    background-color: #06b6d4;
    color: white;
}

/* === Philosophy Section === */
.philosophy-section {
    background-color: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.philosophy-item {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.philosophy-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(6, 182, 212, 0.1);
}

.philosophy-icon {
    font-size: 2rem;
    color: #06b6d4;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.philosophy-title {
    font-size: 1.25rem;
    color: #e0f2fe;
}

.philosophy-description {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* === Contact Section === */
.contact-section {
    background: linear-gradient(to bottom, #0c1427, #0f172a);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: #f8fafc;
}

.contact-description {
    color: #94a3b8;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e0f2fe;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #1e293b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-link:hover {
    background: #06b6d4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.2);
}

.contact-cta {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-cta h3 {
    color: #f8fafc;
    margin-bottom: 0.75rem;
}

.contact-cta p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

/* === Footer === */
footer {
    padding: 3rem 0;
    background-color: #0a0f1f;
    color: #64748b;
    text-align: center;
}

.footer-content {
    position: relative;
}

.footer-line {
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    height: 1px;
    background: #334155;
}

.footer-text {
    font-size: 0.95rem;
    opacity: 0.7;
}

.heart {
    color: #f87171;
    animation: pulse 1.5s infinite;
    margin: 0 0.1em;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* === Animations === */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #141b30;
        padding: 1rem 2rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-top: 1px solid #334155;
        z-index: 100;
    }

    .nav-list.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .contact-cta {
        order: -1;
    }

    .contact-links {
        align-items: center;
    }
}
