/* ============ ОБЩИЕ ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-dark: #2d5016;
    --green: #4a7c3a;
    --green-light: #7fb069;
    --green-pale: #d4e8c4;
    --green-bg: #f4faf0;
    --cream: #fefef9;
    --text: #2a3a1f;
    --shadow: 0 4px 20px rgba(74, 124, 58, 0.15);
    --shadow-hover: 0 8px 30px rgba(74, 124, 58, 0.3);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Trebuchet MS', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f4faf0 0%, #e8f5e0 50%, #dff0d4 100%);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============ ФОНОВЫЕ ЛИСТЬЯ ============ */
.leaf-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.leaf {
    position: absolute;
    font-size: 2rem;
    opacity: 0.35;
    animation: floatLeaf linear infinite;
}

.leaf-1 { top: 10%; left: 5%; animation-duration: 18s; }
.leaf-2 { top: 40%; left: 90%; animation-duration: 22s; animation-delay: -5s; }
.leaf-3 { top: 70%; left: 15%; animation-duration: 20s; animation-delay: -10s; }
.leaf-4 { top: 20%; left: 75%; animation-duration: 25s; animation-delay: -3s; }
.leaf-5 { top: 85%; left: 55%; animation-duration: 19s; animation-delay: -7s; }

@keyframes floatLeaf {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(30px, -40px) rotate(90deg); }
    50%  { transform: translate(-20px, 30px) rotate(180deg); }
    75%  { transform: translate(40px, 20px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ============ HERO ============ */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: radial-gradient(ellipse at top, rgba(127, 176, 105, 0.25), transparent 70%);
}

.hero-content {
    animation: fadeInUp 1.2s ease-out;
    max-width: 800px;
}

.avatar {
    font-size: 6rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: sway 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(74, 124, 58, 0.4));
}

@keyframes sway {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(8deg); }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--green-dark);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(127, 176, 105, 0.3);
}

.nickname {
    font-size: 1.2rem;
    color: var(--green);
    margin-bottom: 0.8rem;
}

.nickname span {
    background: linear-gradient(90deg, var(--green), var(--green-light));
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(74, 124, 58, 0.3);
}

.tagline {
    font-size: 1.1rem;
    color: var(--green-dark);
    margin-bottom: 2rem;
    opacity: 0.85;
}

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

/* ============ КНОПКИ ============ */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: white;
    box-shadow: 0 4px 15px rgba(74, 124, 58, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: white;
    color: var(--green-dark);
    border-color: var(--green-light);
    box-shadow: 0 4px 15px rgba(74, 124, 58, 0.15);
}

.btn-secondary:hover {
    background: var(--green-pale);
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-hover);
}

/* ============ СЕКЦИИ ============ */
.section {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: var(--green-dark);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 4px;
    background: linear-gradient(90deg, var(--green-light), var(--green), var(--green-light));
    border-radius: 4px;
}

/* ============ КАРТОЧКИ ============ */
.card {
    background: var(--cream);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 6px solid var(--green-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-out both;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.about-card p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.about-card p:last-child { margin-bottom: 0; }

/* ============ ИНТЕРЕСЫ ============ */
.interests {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.interest-card {
    background: var(--cream);
    border-radius: 16px;
    padding: 1.5rem 0.8rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: default;
}

.interest-card:hover {
    transform: translateY(-6px) rotate(-2deg);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #ffffff, var(--green-pale));
}

.interest-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.interest-card:hover .interest-icon {
    transform: scale(1.2) rotate(10deg);
}

.interest-card h3 {
    font-size: 1rem;
    color: var(--green-dark);
    font-weight: 600;
}

/* ============ ПРОЕКТЫ ============ */
.project-card {
    border-left-color: var(--green);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed var(--green-pale);
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--green-dark);
}

.project-badge {
    background: var(--green-pale);
    color: var(--green-dark);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-card p {
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.4rem 0 0.4rem 1.8rem;
    position: relative;
}

.feature-list li::before {
    content: '🌿';
    position: absolute;
    left: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

.project-links {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* ============ КОНТАКТЫ ============ */
.contacts-card {
    text-align: center;
    border-left-color: var(--green);
}

.contacts-card p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.email-link {
    display: inline-block;
    font-size: 1.2rem;
    color: var(--green-dark);
    text-decoration: none;
    font-weight: 700;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    background: var(--green-pale);
    transition: all 0.3s ease;
    word-break: break-all;
}

.email-link:hover {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* ============ ФУТЕР ============ */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    color: var(--green-dark);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-top: 2px solid var(--green-pale);
}

.footer-leaf {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ============ ПЛАВНОЕ ПОЯВЛЕНИЕ ============ */
.section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ АДАПТИВ ============ */
@media (max-width: 600px) {
    .section { padding: 3rem 1rem; }
    .card { padding: 1.5rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; text-align: center; }
    .project-header { flex-direction: column; align-items: flex-start; }
    .avatar { font-size: 4rem; }
}