:root {
    --primary-bg-color: #1A2A29;
    --secondary-bg-color: #1F3837;
    --primary-text-color: #E3E3E3;
    --accent-color: #3BD16F; 
    --card-bg-color: #2E4745;
    --heading-font: 'Special Gothic Expanded One', sans-serif;
    --body-font: 'Poppins', sans-serif;
}

body {
    margin: 0;
    font-family: var(--body-font);
    background-color: var(--primary-bg-color);
    color: var(--primary-text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.hero {
    background-color: var(--primary-bg-color);
    text-align: center;
    padding: 4rem 1rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-image {
    width: clamp(120px, 15vw, 180px);
    height: clamp(120px, 15vw, 180px);
    border-radius: 50%;
    object-fit: cover; 
    object-position: 50% 25%; 
    margin-bottom: 1.5rem;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.hero-content .main-heading {
    font-family: var(--heading-font);
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    margin: 0;
    letter-spacing: 2px;
    color: #fff;
}

.project-gallery {
    padding: 2rem 0;
}

.project-grid {
    column-width: 320px;
    column-gap: 2rem;
}

.project-card {
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 2rem;
    opacity: 0;
    animation: floatIn 0.6s ease-out forwards;
    /* Fix for Safari animation bug */
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.project-card a {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-decoration: none;
    color: var(--primary-text-color);
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.project-card:hover a {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.image-container {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg-color);
    overflow: hidden;
}

.project-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.emoji-icon {
    font-size: 140px;
    line-height: 1;
    color: var(--primary-text-color);
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
}

.project-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: var(--accent-color);
}

.project-description {
    font-size: 1rem;
    margin: 0;
}

.project-card:nth-child(1) { animation-delay: 0.2s; }
.project-card:nth-child(2) { animation-delay: 0.4s; }
.project-card:nth-child(3) { animation-delay: 0.6s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }

.main-footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--secondary-bg-color);
    margin-top: 4rem;
}

@media (max-width: 789px) {
    .project-card:hover a {
        transform: scale(1.05); 
    }
}
