.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #9592A5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: background 0.2s;
}
.social-link i {
  font-size: 1.25rem;
  color: #fff;
}
/* Improved contrast for accessibility (WCAG) */
.social-link:hover {
  background: #3a3750;
}
.social-link:hover i {
  color: #fff;
  filter: brightness(1.5) drop-shadow(0 0 2px #222);
}
    /* === Стили из <style> в <head> index.html === */
@media (max-width: 600px) {
    .project-card {
        width: 98vw !important;
        max-width: 650px !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }
    .project-bg-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    .project-bg-image img,
    .project-bg-image video {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
        border-radius: 0 0 10px 10px !important;
    }
}

/* Optimize image loading */
img[loading="lazy"],
.project-gif[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img[loading="lazy"].lazyloaded,
.project-gif[loading="lazy"].lazyloaded {
    opacity: 1;
}
.hero-content h1 {
    position: relative;
    display: inline-block;
}
.hero-content h1::after {
    content: '';
    display: block;
    margin: 0 auto;
    margin-top: 8px;
    width: 540px;
    height: 8px;
    background: linear-gradient(90deg, #9592A5, #bdbdbd);
    background-size: 200% 200%;
    animation: shimmer-bar 2.5s linear infinite, bar-fade-in 0.8s cubic-bezier(.42,0,.58,1) 0.2s both;
    border-radius: 20px;
    opacity: 0;
    transform: translateY(16px);
}
@keyframes shimmer-bar {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes bar-fade-in {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
    .hero-content h1::after {
        width: 88vw;
        max-width: 96vw;
    }
    .hero-flex {
        display: flex;
        flex-direction: column-reverse;
    }
}
/* Add margin-top for project-info h3 */
.project-info h3 {
    margin-top: 18px;
}
:root {
    --primary: #9592A5;
    --primary-dark: #6D6A7F;
    --primary-light: #B8B5C7;
    --secondary: #D4C9C9;
    --dark: #2D2D2D;
    --light: #F5F5F5;
    --accent: #C4A69D;
    --text: #333333;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

body {
    background: linear-gradient(135deg, var(--light) 0%, rgba(212, 201, 201, 0.3) 100%);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Temporarily disable smooth scroll on page load to prevent unwanted scrolling */
html.no-scroll-behavior {
    scroll-behavior: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.section-title {
    text-align: center;
    margin-bottom: 5px;
    font-size: 2.5rem;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -30px;
    content: '';
    position: absolute;
    top: 50%;
    right: -30px;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.section-title span {
    position: relative;
    z-index: 1;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--accent) 100%);
    opacity: 0.3;
    z-index: -1;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.primary-btn {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.secondary-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: transparent;
}

.small-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: white;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    transform: translateY(-2px);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger:hover span {
    background-color: var(--light);
}

/* Hero Section */
.logo {
    display: none !important;
}

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

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: var(--primary-dark);
    position: relative;
    display: inline-block;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.1);
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 5px;
    opacity: 0.5;
    z-index: -1;
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent);
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s infinite linear;
    background-size: 200% 100%;
}

.typing-text {
    position: relative;
}

.typing-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    width: 8px;
    height: 100%;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 500px;
    line-height: 1.8;
    animation: fadeIn 1s ease-in-out;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 300px;
    height: 300px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.image-placeholder i {
    font-size: 150px;
    color: var(--light);
}

.profile-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: float 6s ease-in-out infinite;
    position: relative;
}

.profile-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0.3;
    filter: blur(15px);
    z-index: -1;
    animation: pulse 6s ease-in-out infinite;
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 0%; /* Position at the very top to ensure the entire head is visible */
    border: 5px solid var(--light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-image:hover img {
    transform: scale(1.05);
    border-color: var(--accent);
}




.profile-placeholder p {
    font-size: 18px;
    font-weight: 500;
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 0;
    gap: 50px;
}

.about-text {
    flex: 2;
    min-width: 300px;
    text-align: center;
}

.about-text p {
    margin-bottom: 20px;
}

.about-info {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-item {
    background-color: var(--light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
}

.info-item h3 {
    color: var(--primary-dark);
    margin-bottom: 5px;
}

/* Skills Section */
.skills {
    background-color: var(--light);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.skill-category {
    flex: 1;
    min-width: 250px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-dark);
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(50% - 15px);
    padding: 15px;
    border-radius: 8px;
    background-color: var(--light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    color: white;
}

.skill-item:hover::before {
    opacity: 1;
}

.skill-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-item:hover i {
    color: white;
    transform: scale(1.15) rotate(3deg);
}

/* Projects Section */
.projects {
    background-color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 2000px;
    margin: 0 auto;
    justify-content: center;
}
@media (max-width: 1320px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 0;
        row-gap: 2rem;
        max-width: 1000px;
        margin: 0 auto;
    }
}

@media (max-width: 800px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    min-width: 410px;
    max-width: 420px;
    background-color: var(--light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 2;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-image {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    background-color: transparent;
    display: block;
    padding: 0;
    margin: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.project-image .image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
}

.project-image .image-placeholder i {
    font-size: 60px;
    color: var(--light);
}

.project-info {
    padding: 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    margin: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-radius: 0 0 10px 10px;
}

.project-gif,
.project-image img,
.project-bg-image img,
.project-modal-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
    border-radius: 0 0 10px 10px;
}
.project-bg-image, .project-modal-header-image {
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: transparent;
    overflow: hidden;
}
@media (max-width: 600px) {
    .project-bg-image, .project-modal-header-image {
        height: 280px !important;
        min-height: 280px !important;
        max-height: 280px !important;
    }
    .project-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    .project-gif,
    .project-image img,
    .project-bg-image img,
    .project-bg-image video {
        aspect-ratio: 2/1;
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    .project-modal-header-image img,
    .project-modal-header-image video {
        width: 100% !important;
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 10px 10px 0 0 !important;
        display: block !important;
    }
    .hero .container {
        margin-top: 0 !important;
    }
    .contact {
        margin-top: -20px !important;
        padding-top: 40px !important;
    }
    .projects {
        padding-bottom: 8px !important;
    }
    footer p {
        font-size: 0.7rem !important;
    }
}
.project-info p {
    margin-bottom: 15px;
    font-size: 0.95rem;
}

@media (max-width: 400px) {
    .about {
        padding-top: 20px !important;
        padding-bottom: 40px !important;
    }
    .hero {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .skills {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .projects {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .hero .container {
        margin-top: 0px !important;
    }
    .hero-content h1::after {
        width: 60% !important;
        left: 20% !important;
    }
}

@media (max-width: 300px) {
    .hero .container {
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 8px !important;
        margin-top: 0 !important;
    }
    .hero-content {
        width: 100% !important;
        text-align: center !important;
    }
    .hero-buttons {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .profile-image {
        width: 180px !important;
        height: 180px !important;
    }
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.project-tech span {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Contact Section */
.contact {
    background-color: var(--light);
    margin-top: -20px;
    padding-top: 100px;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 15px rgba(108, 99, 255, 0.15);
    background-color: white;
    transform: translateY(-3px);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: var(--primary-light);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.form-group:focus-within::after {
    width: 100%;
}

/* Footer */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

@media (max-width: 600px) {
    header {
        padding: 6px 0 !important;
    }
    .logo {
        display: none !important;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-content p {
        margin: 0 auto 30px;
    }

    .hero-buttons {
        justify-content: center;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

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

    .hamburger {
        display: flex;
    }

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

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

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    /* Mobile skills animations */
    .skill-item {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    .skill-item.active {
        transform: translateY(-10px) scale(1.08);
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
        color: white;
        z-index: 10;
    }

    .skill-item.active::before {
        opacity: 1;
    }

    .skill-item.active i {
        color: white;
        transform: scale(1.2) rotate(5deg);
    }

    /* Enhanced mobile animation */
    .skill-item:active {
        transform: translateY(-8px) scale(1.05);
        transition: all 0.15s ease;
    }

    /* Improve touch experience */
    .skill-item:before {
        transition: opacity 0.4s ease;
    }

    /* Add dynamic gradient animation for mobile */
    .skill-item.active::before {
        background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 50%, var(--primary) 100%);
        background-size: 300% 300%;
        animation: gradientShift 0.8s ease infinite;
    }

    /* Add pulsing effect */
    .skill-item.active {
        animation: mobilePulseGlow 0.6s ease-in-out;
    }
}

/* Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation classes for JavaScript */
.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

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

/* Initial state for animated elements */
.skill-item, .project-card {
    opacity: 0;
    transform: translateY(30px);
    transition: none; /* Remove default transition to prevent conflicts */
}

/* Visible state for animated elements */
.skill-item.animate-in, .project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile-specific initial state for skills */
@media (max-width: 768px) {
    .skill-item {
        opacity: 0;
        transform: translateY(50px) scale(0.92);
    }
    
    .project-card {
        opacity: 0;
        transform: translateY(40px);
        backface-visibility: hidden; /* Prevent flickering on mobile */
        -webkit-backface-visibility: hidden;
    }
    
    .skill-item.animate-in.animate-skill-mobile {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === COMPONENTS.CSS CONTENT START === */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
    align-items: flex-start;
    margin-top: 2rem;
}
.about-text {
    flex: 2;
    min-width: 18rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text);
}
.about-info {
    flex: 1;
    min-width: 14rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.info-item {
    background-color: var(--light);
    padding: 1.25rem;
    border-radius: 0.625rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}
.info-item:hover {
    transform: translateY(-4px) scale(1.02);
}
.avatar-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(149, 146, 165, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    margin-bottom: 1.125rem;
}
.hero-content-full {
    width: 100%;
}
/* Project Modal Styles */
.hero-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 4rem;
}
.hero-image {
    margin-bottom: 1.125rem;
}
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
}

.project-modal-content {
    background-color: #fff;
    max-width: 50rem;
    margin: 3rem auto;
    padding: 0;
    border-radius: 0.625rem;
    position: relative;
    box-shadow: 0 0.3125rem 1.25rem rgba(0,0,0,0.2);
    overflow: hidden;
}

.project-modal-header-image {
    width: 100%;
    height: auto;
    min-height: 15rem;
    max-height: 25rem;
    background-size: cover;
    background-position: center;
}
.project-modal-header-image img,
.project-modal-header-image video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.project-modal-header {
    padding: 2rem 1.875rem 0;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9375rem;
    border-bottom: 1px solid #eee;
}
.project-modal-header h2 {
    color: var(--primary-dark);
    margin-bottom: 0.625rem;
}

.project-modal-body {
    padding: 0 1.875rem 1.25rem;
    margin-bottom: 1.25rem;
}
.project-modal-body p {
    margin-bottom: 0.9375rem;
    line-height: 1.6;
}
.project-modal-body h3 {
    color: var(--primary-dark);
    margin: 1.25rem 0 0.625rem;
}
.project-modal-body ul {
    margin-left: 1.25rem;
    margin-bottom: 0.9375rem;
}
.project-modal-body li {
    margin-bottom: 0.3125rem;
}

/* Project modal footer styles */
.project-modal-footer {
    padding: 0 1.875rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-modal-footer .btn {
    padding: 8px 15px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.project-modal-footer .primary-btn {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-modal-footer .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-modal-footer .secondary-btn {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.project-modal-footer .secondary-btn:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

/* Mobile responsive for modal footer */
@media (max-width: 600px) {
    .project-modal-footer {
        padding: 0 1rem 1.5rem;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .project-modal-footer .btn {
        padding: 10px 18px;
        font-size: 0.85rem;
        min-width: 120px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .project-modal-footer {
        flex-direction: column;
        align-items: center;
    }
    
    .project-modal-footer .btn {
        width: 100%;
        max-width: 200px;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

.close-modal {
    position: absolute;
    top: 0.9375rem;
    right: 0.9375rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    transition: color 0.3s ease;
    background-color: rgba(0, 0, 0, 0.5);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.close-modal:hover {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.8);
}
@media (max-width: 600px) {
    .project-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 1rem !important;
    }
    .project-modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        position: relative !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    .close-modal {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 1.3rem !important;
        top: 0.7rem !important;
        right: 0.7rem !important;
        background-color: rgba(0, 0, 0, 0.5) !important;
        border: 1px solid #fff !important;
        z-index: 1001 !important;
        position: absolute !important;
        transition: background-color 0.3s, transform 0.3s;
    }
    .close-modal:hover,
    .close-modal:active {
        background-color: rgba(0, 0, 0, 0.7) !important;
        transform: scale(1.05) !important;
    }
    .project-modal-header-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 2.5rem !important;
        background: transparent !important;
    }
    .project-modal-header-image img,
    .project-modal-header-image video {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        width: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 10px 10px 0 0 !important;
        display: block !important;
    }
}

/* Специальные стили ТОЛЬКО для Expense Manager */
.project-modal[data-project="expense-manager"] .project-modal-header-image {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    overflow: hidden;
}

.project-modal[data-project="expense-manager"] .project-modal-header-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 0 !important;
}

@media (max-width: 600px) {
    .project-modal[data-project="expense-manager"] .project-modal-header-image {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    
    .project-modal[data-project="expense-manager"] .project-modal-header-image img {
        height: 160px !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        border-radius: 8px 8px 0 0 !important;
    }
}
/* === COMPONENTS.CSS CONTENT END === */
