/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #536d34;
    --primary-dark: #283618;
    --secondary-color: #504B38;
    --accent-color: #B9B28A;
    --text-primary: #1B1B1B;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-primary: #f7efda;
    --bg-secondary: #fffdf6;
    --bg-accent: #EBE5C2;
    --border-color: #DED3C4;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--text-primary);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

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

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

.profile-picture img {
    border-radius: 50%; /* makes it circular */
    object-fit: cover; /* keeps aspect ratio */
    width: 450px; /* same as in your HTML */
    height: 450px;
    border: 5px solid var(--primary-dark); /* optional, adds a nice border */
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: linear-gradient(0deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.about-content {
  display: grid;
  gap: 4rem;
  justify-content: center;   /* centers the grid items */
  max-width: 900px;          /* keeps it from spanning too wide */
  margin: 0 auto;            /* centers the whole section in the page */
  text-align: center;        /* centers text inside */
}

.about-text p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.skills h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Education Section */
.education {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.education-timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;  /* ensures logos don’t escape the circle */
    padding: 5px;      /* spacing inside the circle */
}

.timeline-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;  /* scales logos proportionally */
    display: block;
}

.timeline-content {
    flex: 1;
    padding: 2rem;
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.timeline-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Experiences Section */
.experience {
    background: linear-gradient(0deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.experience-card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.experience-image {
    overflow: hidden;
}

.experience-image img {
    width: 100%;       /* ensures the image fits the width of its container */
    height: auto;      /* keeps the aspect ratio */
    display: block;    /* removes extra inline spacing */
    object-fit: contain; /* ensures the full image fits without cropping */
}

.experience-content {
    padding: 2rem;
}

.experience-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.experience-content p {
    margin-bottom: 1.5rem;
}

.experience-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background-color: var(--bg-accent);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.experience-links {
    display: flex;
    gap: 1rem;
}

.experience-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.experience-link:hover {
    color: var(--primary-dark);
    transform: translateX(2px);
}

/* Experiences Gallery Section */
.gallery-title {
    text-align: center;
    font-size: 2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-primary); /* matches your theme */
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;   /* width : height ratio */
    object-fit: cover;     /* keeps image cropped nicely without stretching */
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery img {
        height: 150px; /* smaller on mobile */
    }
}

/* Home link in corner */
.home-link {
    position: fixed;       /* Fixes it in place on the screen */
    top: 20px;             /* 20px down from the top */
    left: 40px;            /* 20px in from the left */
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 8px 12px;    /* optional: adds some padding inside the link */
    z-index: 1000;        /* ensures it stays above other elements */
}

/* Lightbox overlay */
.lightbox {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 2000;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  margin-bottom: 15px;
}

.lightbox-caption {
  color: white;
  font-size: 1.1rem;
  text-align: center;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  font-weight: bold;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.contact-methods {
    margin-bottom: 2rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-method i {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact-method h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-method p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background-color: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    position: relative;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background-color: white;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    padding: 0 0.5rem;
}

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

/* Footer */
.footer {
    background-color: #504B38;
    color: #ffffff;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    color: white;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-between;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .timeline-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

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

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
        max-width: 280px;
    }

    .about-stats {
        flex-direction: column;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .skill-tags {
        justify-content: center;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.project-link:focus,
.social-link:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .nav-toggle {
        display: none !important;
    }
    
    .hero {
        padding-top: 0;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* Hero Style */
@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 60px 20px;
    }

    .hero-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .hero img, .hero svg {
        max-width: 100%;
        height: auto;
    }
}