/* --- Minimal Modern Styles --- */
:root {
  /* Minimal color palette */
  --bg-color: #ffffff;
  --primary-color: #111827;
  --secondary-color: #f9fafb;
  --accent-color: #3b82f6;
  --text-color: #374151;
  --text-light-color: #6b7280;
  --border-color: #e5e7eb;
  --border-width: 1px;
  --font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scroll globally */
}

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

h1,
h2,
h3 {
  margin: 0 0 1.2rem 0;
  font-weight: 600;
  color: var(--primary-color);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Make headings responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1.125rem;
  }
}

section {
  margin-bottom: 4rem;
  padding: 0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%; /* Ensure container takes full width available */
  box-sizing: border-box; /* Include padding in width calculation */
}

/* Modern minimal hero */
.hero {
  text-align: left;
  padding: 5rem 0 3rem;
}

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

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light-color);
}

/* Simplified skills list */
.skills-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.skills-list li {
  background-color: var(--secondary-color);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  color: var(--text-color);
}

/* Minimal project cards */
.project-list,
.experience-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.project-list li,
.experience-list li {
  background-color: var(--bg-color);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: var(--border-width) solid var(--border-color);
}

.project-list li:hover,
.experience-list li:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.project-list h3,
.experience-list h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

/* Tech badge style */
.tech {
  font-size: 0.8rem;
  margin-top: 1rem;
  color: var(--text-light-color);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-item {
  padding: 1.5rem;
  background-color: var(--secondary-color);
  border-radius: 0.75rem;
}

.service-item h3 {
  margin-bottom: 0.75rem;
}

/* Modern button style */
.button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  margin-right: 1rem;
  margin-bottom: 0.75rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: none;
  font-size: 0.95rem;
}

.button:hover {
  background-color: #2563eb;
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

.button.secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.button.secondary:hover {
  background-color: #e5e7eb;
}

/* Contact form */
#contact form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  width: 100%; /* Take available width up to max-width */
  box-sizing: border-box; /* Include padding/border in width */
}

#contact label {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  display: block;
  color: var(--primary-color);
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
  width: 100%;
  padding: 0.75rem;
  border: var(--border-width) solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--bg-color);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box; /* Ensure padding is included in width */
}

#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

/* Modern footer */
footer {
  text-align: center;
  margin-top: 4rem;
  padding: 1.5rem 0;
  border-top: var(--border-width) solid var(--border-color);
  color: var(--text-light-color);
  font-size: 0.875rem;
}

footer a {
  color: var(--text-color);
  text-decoration: none;
  position: relative;
}

footer a:hover {
  color: var(--accent-color);
}

footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: var(--accent-color);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

footer a:hover::after {
  transform: scaleX(1);
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  .project-list,
  .experience-list {
    grid-template-columns: 1fr;
  }

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

  .button {
    text-align: center;
    margin-right: 0; /* Remove right margin for stacked buttons */
    flex-grow: 1; /* Allow buttons to grow if needed in flex context */
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-buttons {
    flex-direction: column; /* Stack buttons vertically */
    width: 100%; /* Take full width of parent */
    align-items: stretch; /* Make buttons stretch to full width */
  }

  .hero-buttons .button {
    margin-bottom: 0.75rem;
  }

  .container {
    padding-left: 1rem; /* Adjust padding for smaller screens */
    padding-right: 1rem; /* Adjust padding for smaller screens */
  }

  #contact form {
    padding: 0; /* Reset padding if any was added */
    max-width: 100%; /* Ensure form doesn't exceed container */
  }
}
