@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --primary: #0f172a;
    --accent: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
    margin: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    position: relative;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: all 0.3s ease;
}

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

header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-nav span.user-greeting {
    margin-right: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    line-height: 1;
}

.btn-github {
    background-color: #24292e;
    color: white !important;
}

.btn-github:hover {
    background-color: #1b1f23;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.3);
}

.btn-yandex {
    background-color: #ffcc00 !important;
    color: #000000 !important;
    border: 1px solid #f2c200 !important;
    padding: 10px 24px !important;
    font-size: 1rem !important;
}

.btn-yandex:hover {
    background-color: #f2c200 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3) !important;
}

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

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

/* Hero Section */
.hero-section {
    min-height: 70vh;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    align-items: center;
    gap: 60px;
    padding-top: 40px;
    position: relative;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.hero-title .highlight {
    color: var(--accent);
    display: block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 48px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.social-btn {
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.social-btn.email {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.3);
}

.social-btn.email:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.4);
}

.social-btn.telegram, .social-btn.github {
    background: white;
    color: var(--primary);
    border: 1px solid var(--border);
}

.social-btn.telegram:hover, .social-btn.github:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Hero Image */
.hero-image-wrapper {
    position: relative;
    max-width: 360px;
    margin-left: auto;
    z-index: 1;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.2;
}

.hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
    background-color: var(--card-bg);
}

/* Content Layout */
.content-layout {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-bottom: 80px;
    align-items: start;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-header {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Projects */
.projects-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    width: 100%;
}

.project-card {
    background: var(--card-bg);
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 160px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: auto;
}

.project-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--text-muted);
}

.project-icon {
    font-size: 1.25rem;
    opacity: 0.5;
    transition: 0.3s;
}

.project-card:hover .project-icon {
    opacity: 1;
    transform: translate(3px, -3px);
}

.project-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.2;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Comments Section */
.comments-section {
    width: 100%;
}

.modern-form {
    background: white;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 48px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group textarea {
    width: 100%;
    border: 1px solid transparent;
    padding: 8px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    background: transparent;
    line-height: 1.5;
    min-height: 60px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.send-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 99px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.send-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.auth-prompt {
    text-align: center;
    padding: 32px;
    background: var(--accent-soft);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-md);
    margin-bottom: 48px;
    color: var(--text-main);
}

.comments-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-bubble {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.comment-bubble:hover {
    box-shadow: var(--shadow);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding-top: 60px;
        min-height: auto;
        margin-bottom: 80px;
        gap: 60px;
    }

    .hero-content {
        order: 2;
        text-align: center;
    }

    .hero-image-wrapper {
        order: 1;
        max-width: 280px;
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .content-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .comments-section {
        position: static;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 24px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    header {
        position: relative;
        padding: 20px 0;
    }
}