/* Figma-Inspired Portfolio Styles */

/* Global Variables & Reset */
:root {
  --primary-color: #106682; /* User's Primary Color */
  --secondary-color: #0b5269; /* Darker shade of primary */
  --background-color: #FFFFFF;
  --card-background: #FFFFFF;
  --text-color: #333333;
  --text-light: #555555;
  --border-color: #E0E0E0;
  --highlight-bg: #106682; /* Use primary color */
  --highlight-text: #FFFFFF;
  --contact-bg: #106682; /* Use primary color */
  --contact-text: #FFFFFF;
  --footer-bg: #f8f9fa; /* Light grey for footer */
  --footer-text: #6c757d;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --card-border-radius: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%; /* 1rem = 10px */
  scroll-behavior: smooth;
  scroll-padding-top: 8rem; /* Account for sticky header */
}

body {
  opacity: 1;
  transition: opacity 0.3s ease;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Montserrat Alternates', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  font-size: 1.6rem; /* Default font size */
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 4.8rem;
  font-weight: 600;
}

h2 {
  font-size: 3.6rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 5rem; /* Increased margin */
}

h3 {
  font-size: 2.4rem;
  font-weight: 500;
}

h4 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

section {
  padding: 10rem 0 8rem;
  scroll-margin-top: 7rem; /* Match header height */
}

section:first-of-type {
  scroll-margin-top: 0; /* No extra space needed for hero */
}

/* Header */
.site-header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.5rem 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--primary-color);

}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
  position: relative; /* Needed for absolute positioning of the indicator */
  display: flex;
  align-items: center;
  gap: 3rem; /* Increased gap */
  margin-right: 3rem;
}

.main-nav a {
  font-size: 1.6rem;
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem; /* Add some horizontal padding for indicator spacing */
  position: relative;
  z-index: 1; /* Ensure link text is above indicator */
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Style for the active link */
.main-nav a.active {
    color: var(--primary-color); /* Ensure active link has primary color */
}

/* Navigation Indicator */
.nav-indicator {
    position: absolute;
    bottom: -2px; /* Position slightly below the nav ul bottom edge */
    left: 0; /* Initial position, will be updated by JS */
    height: 3px; /* Underline thickness */
    background-color: var(--primary-color);
    border-radius: 2px;
    z-index: 0;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth transition */
    pointer-events: none; /* Don't interfere with clicks */
}

/* Container link for the resume button */
.resume-link {
  display: inline-block; /* Allow hover transform */
  text-decoration: none; /* Remove default underline */
}

/* Inner div styled as the button */
.resume-button-inner {
  background-color: var(--primary-color);
  color: #FFFFFF; /* Explicitly set text color to white */
  padding: 1.2rem 3rem; /* Match Get In Touch padding */
  border-radius: var(--card-border-radius); /* Match Get In Touch border-radius */
  font-weight: 600; /* Match Get In Touch font-weight */
  transition: background-color 0.3s ease, transform 0.3s ease; /* Match transition timing, keep transform */
  display: inline-block; /* Ensure transform works */
  border: none; /* Match Get In Touch */
  cursor: pointer;
}

/* Apply hover effect to the inner div when the link is hovered */
.resume-link:hover .resume-button-inner {
  background-color: var(--secondary-color);
  color: #FFFFFF; /* Explicitly set hover text color to white */
  transform: scale(1.05);
}

/* Remove download icon style */

/* Hero Section */
.hero-section {
  text-align: left; /* Align text left */
  padding-top: 6rem;
  padding-bottom: 6rem;
  min-height: auto; /* Remove min-height */
  animation: fadeInUp 0.6s ease-out;
}

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

.hero-section h1 {
    margin-bottom: 0.5rem; /* Reduce margin */
}

.hero-section .subtitle {
  font-size: 3.6rem; /* Match h2 size */
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.hero-section .description {
  font-size: 1.8rem;
  color: var(--text-light);
  max-width: 700px; /* Limit width */
}

/* Experience Section */
.experience-section {
  background-color: var(--primary-color); /* Teal background */
  color: var(--highlight-text);
}

.experience-section h2 {
  color: var(--highlight-text); /* White heading */
}

.experience-grid {
  display: grid;
  grid-template-columns: 1fr; /* Single column */
  gap: 3rem;
}

.experience-card {
  background-color: transparent; /* Transparent background */
  border: 1px solid rgba(255, 255, 255, 0.5); /* Light border */
  border-radius: var(--card-border-radius);
  padding: 3rem;
  animation: fadeIn 0.6s ease-out;
  opacity: 0;
  animation-fill-mode: forwards;
}

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

.experience-card:nth-child(1) {
  animation-delay: 0.4s;
}

.experience-card:nth-child(2) {
  animation-delay: 0.8s;
}

.experience-card .card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.experience-card .company-logo {
    /* Add styles for company logos if available */
    width: 30px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2); /* Placeholder */
    border-radius: 50%;
    display: inline-block;
}

.experience-card h3 {
  color: var(--highlight-text); /* White heading */
  margin-bottom: 0; /* Remove margin */
}

.experience-card .date {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8); /* Lighter text */
  margin-bottom: 1.5rem;
}

.experience-card p {
  color: rgba(255, 255, 255, 0.9); /* Lighter text */
  font-size: 1.5rem;
  margin-bottom: 0;
}

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

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Responsive grid */
  gap: 2rem;
  justify-content: center;
}

.skill-card {
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: var(--card-border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default; /* Indicate non-interactive */
  display: flex; /* Use flex for centering */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px; /* Ensure consistent height */
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow);
  background-color: var(--highlight-bg); /* Apply highlight background on hover */
  border-color: var(--highlight-bg); /* Apply highlight border on hover */
  color: var(--highlight-text); /* Apply highlight text color on hover */
}

.skill-card i {
  font-size: 3rem;
  margin-bottom: 1.5rem; /* Increased from 1rem to 1.5rem */
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.skill-card span {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.skill-card:hover i {
  color: var(--highlight-text);
}

/* Apply highlighted text color on hover */
.skill-card:hover span {
    color: var(--highlight-text);
}




/* Projects Section */
.projects-section {
    background-color: #f8f9fa; /* Light background */
}

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

.project-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start; /* Align items to the top */
    gap: 4rem;
    background-color: var(--card-background);
    padding: 3rem;
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Alternate layout for even cards */
.project-card:nth-child(even) .project-image {
    order: 2;
}
.project-card:nth-child(even) .project-info {
    order: 1;
}

.project-image {
    display: flex;
    align-items: center;
    justify-content: center;
    /* max-height: 100%; Removed - JS will handle */
    max-width: 100%; /* Keep max-width constraint */
    overflow: hidden; /* Prevent any overflow */
}

.project-image img {
    max-width: 100%;
    /* max-height: 100%; Removed - JS will handle */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--card-border-radius);
    display: block;
}

.project-info {
    position: relative;
    /* height: 100%; Removed */
    display: flex;
    flex-direction: column;
}

.project-number {
    font-size: 6rem; /* Large number */
    font-weight: 700;
    color: rgba(16, 102, 130, 0.1); /* Light shade of primary */
    line-height: 1;
}

.project-info h3 {
    margin-bottom: 1rem;
    position: relative; /* Ensure h3 is above number */
    z-index: 1;
}

.project-info p {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.project-links {
    display: flex;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.project-link {
    font-weight: 600;
    color: var(--primary-color);
    position: relative; /* Needed for pseudo-element positioning */
    padding-bottom: 0.3rem; /* Space for the underline */
    overflow: hidden; /* Hide underline initially */
}

/* Underline pseudo-element */
.project-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px; /* Underline thickness */
    background-color: var(--primary-color);
    transform: scaleX(0); /* Initially hidden */
    transform-origin: left; /* Animate from left */
    transition: transform 0.3s ease-out; /* Animation */
}

/* Slide in underline on hover */
.project-link:hover::after {
    transform: scaleX(1); /* Show underline */
}


/* Testimonials Section */
.testimonials-section {
    background-color: var(--background-color);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three columns */
    gap: 3rem;
}

.testimonial-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; /* Added transitions */
}

.testimonial-card:hover {
    transform: translateY(-5px);
    background-color: var(--highlight-bg); /* Apply highlight background on hover */
    border-color: var(--highlight-bg); /* Apply highlight border on hover */
    color: var(--highlight-text); /* Apply highlight text color on hover */
}

/* Adjust text colors on hover */
.testimonial-card:hover p,
.testimonial-card:hover h4,
.testimonial-card:hover span {
    color: var(--highlight-text);
}

/* Adjust quote colors on hover */
.testimonial-card:hover p::before,
.testimonial-card:hover p::after {
    color: var(--highlight-text);
}

.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 2rem auto;
    object-fit: cover;
    border: 3px solid var(--background-color); /* Optional border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    position: relative; /* For quotes */
}

/* Optional: Add quote marks */
.testimonial-card p::before,
.testimonial-card p::after {
    content: '"';
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.5;
    position: absolute;
}
.testimonial-card p::before { top: -1rem; left: 0; }
.testimonial-card p::after { bottom: -1rem; right: 0; }


.testimonial-card h4 {
    margin-bottom: 0.3rem;
}

.testimonial-card span {
    font-size: 1.4rem;
    color: var(--text-light);
}

/* Contact Section */
.contact-section {
  background-color: var(--contact-bg);
  color: var(--contact-text);
  padding: 8rem 0;
}

.contact-section h2 {
  color: var(--contact-text);
  text-align: left; /* Align left */
  margin-bottom: 1rem;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* Adjust column ratio */
  gap: 5rem;
  align-items: start; /* Align items to the top */
}

.contact-info p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.contact-form {
  display: grid;
  gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.8rem;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--contact-text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1.5rem;
  font-size: 1.6rem;
  font-family: inherit;
  border: none; /* Remove border */
  border-radius: var(--card-border-radius);
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white */
  color: var(--contact-text);
  transition: background-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.25);
}

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

.contact-form .cta-button {
  background-color: var(--highlight-text); /* White background */
  color: var(--primary-color); /* Teal text */
  padding: 1.2rem 3rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: var(--card-border-radius);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  justify-self: start; /* Align button left */
  margin-top: 1rem;
}

.contact-form .cta-button:hover {
  background-color: #f0f0f0; /* Slightly darker white */
  color: var(--secondary-color);
}

/* Footer */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 3rem 0;
  margin-top: 0; /* Remove margin if contact is last */
  border-top: 1px solid var(--border-color);
}

.site-footer p {
  font-size: 1.4rem;
  margin-bottom: 0;
}

/* Dialog Styles */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-container {
  background-color: var(--background-color);
  padding: 3rem;
  border-radius: var(--card-border-radius);
  max-width: 500px;
  width: 90%;
  box-shadow: var(--card-shadow);
  animation: fadeInUp 0.3s ease-out;
}

.dialog-content {
  text-align: center;
}

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

.dialog-content p {
  margin-bottom: 2rem;
  font-size: 1.6rem;
}

.dialog-close {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--card-border-radius);
  font-size: 1.6rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dialog-close:hover {
  background-color: var(--secondary-color);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    h1 { font-size: 4rem; }
    h2 { font-size: 3.2rem; }
    .hero-section .subtitle { font-size: 3.2rem; }

    .project-card {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 3rem;
    }
    /* Ensure image is always first on smaller screens */
    .project-card .project-image { order: 1 !important; }
    .project-card .project-info { order: 2 !important; }
    .project-number { top: -3rem; font-size: 5rem; }

    .testimonials-grid {
        grid-template-columns: 1fr; /* Stack testimonials */
        gap: 3rem;
    }

    .contact-content {
        grid-template-columns: 1fr; /* Stack contact info and form */
        gap: 4rem;
    }
    .contact-section h2 { text-align: center; }
    .contact-info { text-align: center; }
    .contact-form .cta-button { justify-self: center; }
}

@media (max-width: 768px) {
    html { font-size: 58%; } /* Adjust base font size */
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.8rem; }
    .hero-section .subtitle { font-size: 2.8rem; }
    section { padding: 6rem 0; }

    .site-header .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .main-nav {
        flex-direction: column;
        gap: 1.5rem;
    }
    .main-nav ul { margin-right: 0; }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1.5rem;
    }
    .skill-card { padding: 2rem 1.5rem; min-height: 100px; }

    .project-card { padding: 2rem; }
    .project-number { top: -2rem; font-size: 4rem; }

}

@media (max-width: 480px) {
    html { font-size: 55%; }
    .container { padding: 0 1.5rem; }
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }
    .hero-section .subtitle { font-size: 2.5rem; }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 1.5rem;
    }
    .resume-button { width: 100%; text-align: center; }

    .experience-card { padding: 2rem; }
    .skills-grid { grid-template-columns: repeat(2, 1fr); } /* Force 2 columns */
    .project-card { padding: 1.5rem; }
    .testimonial-card { padding: 2rem; }
    .contact-form { gap: 1.5rem; }
}
