:root {
    --primary-color: #fefff7;
    --secondary-color: #faebd7;
    --text-color: #1d523b;
    --card-bg: rgba(255, 255, 255, 0.3);
    --card-hover: rgba(255, 255, 255, 0.4);
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background: linear-gradient(130deg, #f4fdf7 0%, #def8e6 25%, #c6f0d4 50%, #b0e5c1 75%, #a2d8af 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Grainy effect - making it more subtle */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 5vw, 2rem);
    position: relative;
    z-index: 2;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    margin-bottom: clamp(2rem, 8vh, 4rem);
    opacity: 1;
    animation: none;
}

.logo {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
}

.nav-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.nav-container:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-links {
    display: flex;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.nav-links a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.nav-links a.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

/* Section transitions */
section {
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #256820 0%, #62ae81 50%, #aeff9f 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    position: relative;
    text-shadow: 0px 2px 10px rgba(0, 255, 85, 0.3);
    font-weight: 700;
    animation: gradientMove 3s ease infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hero section should always be visible */
.hero {
    text-align: center;
    margin-bottom: clamp(3rem, 10vh, 6rem);
    opacity: 1;
    transform: none;
}

.greeting {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: clamp(0.5rem, 2vh, 1rem);
    line-height: 1.2;
    opacity: 1;
    animation: none;
}

.intro {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    opacity: 1;
    max-width: 600px;
    margin: 0 auto;
    animation: none;
}

/* Projects Section */
.projects {
    margin-bottom: clamp(2rem, 8vh, 4rem);
}

.projects h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 5vh, 2rem);
    text-align: center;
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1s forwards;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
}

.project-card {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border-radius: clamp(0.5rem, 2vw, 1rem);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: clamp(1rem, 3vw, 1.5rem);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
    z-index: 1;
}

.project-card:nth-child(1) { animation-delay: 1.2s; }
.project-card:nth-child(2) { animation-delay: 1.4s; }
.project-card:nth-child(3) { animation-delay: 1.6s; }

.project-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.3);
}

.project-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.2);
    border-radius: clamp(0.25rem, 1vw, 0.5rem);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* <-- key line */
  transition: transform 0.3s ease;
}

.project-image:hover img {
    transform: scale(1.01);
}

/* Update project card to handle image hover better */
.project-card:hover .project-image {
    transform: none;
}

.project-card h3 {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.project-card p {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    flex-grow: 1;
}

.project-links {
    display: flex;
    gap: clamp(0.5rem, 2vw, 1rem);
    margin-top: auto;
}

.project-link, .github-link {
    color: var(--text-color);
    text-decoration: none;
    padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.8rem, 2vw, 1rem);
    border-radius: clamp(0.25rem, 1vw, 0.5rem);
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    text-align: center;
    flex: 1;
}

.project-link:hover, .github-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: clamp(1rem, 4vh, 2rem) 0;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.8s forwards;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        position: fixed;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        padding: 0.5rem;
        border-radius: 0.75rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .container {
        padding-bottom: 5rem;
    }
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
}

.info-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.info-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    color: var(--text-color);
}

.info-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.info-btn:hover, .info-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

.info-btn:hover i {
    transform: scale(1.01);
}

.info-content {
    display: none;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    width: 100%;
}

.info-content:hover {
    background: rgba(255, 255, 255, 0.3);
}

.info-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

.info-btn.active i {
    transform: scale(1.1);
}

.info-btn.active + .info-content {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

@media (max-width: 768px) {
    .info-buttons {
        gap: 0.5rem;
    }

    .info-btn {
        padding: 0.6rem;
    }

    .info-content {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
}

/* About Section */
.about-section {
    margin-bottom: clamp(2rem, 8vh, 4rem);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.8s forwards;
}

.about-section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 5vh, 2rem);
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
    gap: clamp(1.5rem, 4vw, 2.5rem);
    width: 100%;
}

.about-card {
    background: var(--card-bg);
    border-radius: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(1.5rem, 4vw, 2rem);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.about-card h3 {
    font-size: clamp(1.25rem, 3.5vw, 1.5rem);
    margin-bottom: 1.5rem;
    text-align: center;
}

.education-content,
.business-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.education-content i,
.business-content i {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.education-details,
.business-details {
    flex: 1;
}

.education-details h4,
.business-details h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.education-details p,
.business-details p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.year {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    opacity: 0.7;
}

.business-link {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.business-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .education-content,
    .business-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .education-content i,
    .business-content i {
        font-size: 1.75rem;
    }
}

/* Education Section */
.education-section {
    margin-bottom: clamp(4rem, 8vh, 6rem);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.8s forwards;
}

.education-section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 5vh, 2rem);
    text-align: center;
}

.education-card {
    background: var(--card-bg);
    border-radius: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(1.5rem, 4vw, 2rem);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.education-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.education-content i {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.education-details {
    flex: 1;
}

.education-details h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.education-details p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.year {
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    opacity: 0.7;
}

/* Business Section */
.business-section {
    margin-bottom: clamp(4rem, 8vh, 6rem);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 2s forwards;
}

.business-section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 5vh, 2rem);
    text-align: center;
}

.business-card {
    background: var(--card-bg);
    border-radius: clamp(0.5rem, 2vw, 1rem);
    padding: clamp(1.5rem, 4vw, 2rem);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.3s, background 0.3s;
    max-width: 800px;
    margin: 0 auto;
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
}

.business-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.business-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.business-content i {
    font-size: 2rem;
    color: var(--text-color);
    opacity: 0.8;
}

.business-details {
    flex: 1;
}

.business-details h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.business-details p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.8;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.business-link {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.business-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Mobile adjustments for Education and Business sections */
@media (max-width: 768px) {
    .education-content,
    .business-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .education-content i,
    .business-content i {
        font-size: 1.75rem;
    }

    .education-section,
    .business-section {
        margin-bottom: clamp(3rem, 6vh, 4rem);
    }
}

.business-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.business-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .business-icon {
        width: 60px;
        height: 60px;
    }
    
    .education-content,
    .business-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}

/* Skills Section */
.skills-section {
    margin-bottom: clamp(4rem, 8vh, 6rem);
    opacity: 0;
    animation: fadeIn 0.8s ease-out 1.8s forwards;
}

.skills-section h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 5vh, 2rem);
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
}

.skill-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}

.skill-card i {
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.skill-card:hover i {
    transform: scale(1.1);
}

.skill-card span {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-color);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}

@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .skill-card {
        padding: 1rem 0.75rem;
    }

    .skill-card i {
        font-size: 1.25rem;
    }

    .skill-card span {
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Stagger animations for grid items */
.project-card.fade-in:nth-child(1) { transition-delay: 0.1s; }
.project-card.fade-in:nth-child(2) { transition-delay: 0.2s; }
.project-card.fade-in:nth-child(3) { transition-delay: 0.3s; }
.project-card.fade-in:nth-child(4) { transition-delay: 0.4s; }
.project-card.fade-in:nth-child(5) { transition-delay: 0.5s; }
.project-card.fade-in:nth-child(6) { transition-delay: 0.6s; }

.skill-card.fade-in:nth-child(1) { transition-delay: 0.1s; }
.skill-card.fade-in:nth-child(2) { transition-delay: 0.15s; }
.skill-card.fade-in:nth-child(3) { transition-delay: 0.2s; }
.skill-card.fade-in:nth-child(4) { transition-delay: 0.25s; }
.skill-card.fade-in:nth-child(5) { transition-delay: 0.3s; }
.skill-card.fade-in:nth-child(6) { transition-delay: 0.35s; }
.skill-card.fade-in:nth-child(7) { transition-delay: 0.4s; }
.skill-card.fade-in:nth-child(8) { transition-delay: 0.45s; }
.skill-card.fade-in:nth-child(9) { transition-delay: 0.5s; }
.skill-card.fade-in:nth-child(10) { transition-delay: 0.55s; }

/* Only apply initial hidden state to elements when they're below the viewport */
.project-card:not(.in-viewport),
.skill-card:not(.in-viewport),
.education-card:not(.in-viewport),
.business-card:not(.in-viewport) {
    opacity: 0;
    transform: translateY(20px);
}

/* When elements come into view */
.project-card.fade-in,
.skill-card.fade-in,
.education-card.fade-in,
.business-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}
  
