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

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #000000;
  background: #efefef84;
  font-weight: 400;
}

html {
  scroll-behavior: smooth;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #000000;
  z-index: 1000;
}

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

.logo-container {
  width: 100px;
  height: auto;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image {
  width: 100px;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

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

.nav-link {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  /*opacity: 0.6;*/
  color: red;
}

/* Hero Section */
.hero-section {
  min-height: clamp(60vh, 100vh, 120vh);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  margin-top: 80px;
  width: 100%; /* Ensure it takes the full width */
  box-sizing: border-box; /* Include padding in width calculation */
}

.hero-container {
  max-width: 1200px;
  margin: auto auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  flex-shrink: 1;
  flex-grow: 0;
}

.hero-content {
  text-align: left;
}

.hero-title {
  font-size: 4rem;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 2rem;
  color: #000000;
}

.name-highlight {
  font-weight: 700;
  display: block;
  margin-top: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  color: #666666;
  margin-bottom: 4rem;
  line-height: 1.6;
}

.cta-button {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 1.2rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
}

.cta-button:hover {
  background: #333333;
}

.about-buttons-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.about-button {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 1.2rem 3rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-button:hover {
  background: #333333;
}

/* Enhanced Tech Stack Section with Progress Bars */
.tech-stack {
  padding: 4rem 2rem;
  background: #ffffff;
}

.tech-stack-container {
  max-width: 1200px;
  margin: 0 auto;
}

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

.tech-skill-item {
  padding: 2rem;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-skill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tech-skill-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tech-skill-icon {
  font-size: 40px; /* icon size */
  flex-shrink: 0; /* keeps spacing consistent */
  line-height: 1; /* avoids weird spacing */
}

.tech-skill-info {
  flex: 1;
}

.tech-skill-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #000000;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.5px;
}

.tech-skill-level {
  font-size: 0.9rem;
  color: #666666;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-skill-percentage {
  font-size: 1rem;
  font-weight: 600;
  color: red;
  min-width: 40px;
  text-align: right;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #e0e0e0;
  border: 1px solid #000000;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #000000 0%, red 100%);
  width: 0%;
  transition: width 1.5s ease-in-out;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: #ffffff;
  opacity: 0.8;
}

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

.profile-image {
  width: 320px;
  height: 400px;
  object-fit: cover;
  border: 1px solid #000000;
}

/* Details Section */
.details-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.content-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 8rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  color: #000000;
  margin-bottom: 0;
  letter-spacing: -0.5px;
}

.underline {
  width: 100px;
  height: 4px;
  background-color: black;
  margin-bottom: 4rem;
}

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

.detail-item {
  padding: 3rem;
  border: 1px solid #e0e0e0;
  background: #ffffff;
}

.detail-label {
  font-weight: 600;
  color: red;
  font-size: 0.9rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  display: block;
  text-transform: uppercase;
}

.detail-value {
  color: #333333;
  font-weight: 400;
  line-height: 1.6;
  font-size: 1rem;
}

.hobbies-list {
  list-style: none;
  display: grid;
  gap: 2rem;
}

.hobbies-list li {
  padding: 2.5rem;
  border: 1px solid #e0e0e0;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
}

.goal-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333333;
  padding: 4rem;
  border: 1px solid #e0e0e0;
  font-weight: 400;
}

.quote-section {
  text-align: center;
  padding: 4rem;
  border: 1px solid #000000;
  background: #000000;
  color: #ffffff;
}

.programming-quote p {
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.4;
  font-style: italic;
}

.programming-quote cite {
  font-size: 1rem;
  color: #cccccc;
  font-style: normal;
  font-weight: 400;
}

/* Footer */
.footer {
  background: #ffffff;
  color: #000000;
  padding: 2rem 1rem;
  text-align: center;
  border-top: 1px solid #e0e0e0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.social-links {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.social-link {
  color: #000000;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.social-link:hover {
  opacity: 0.6;
  color: red;
}

.separator {
  display: none;
}

.copyright {
  color: #666666;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 1px;
}

/* Projects Section */
.project-cards-section {
  padding: 4rem 2rem;
  background: #ffffff;
}

.project-image-container {
  flex: 1;
  display: flex;
  justify-content: center; /* center image horizontally in its half */
  align-items: center;
  max-width: 100%;
  height: auto;
}

.project-cards-container {
  display: grid;
  /* Set 2 columns as default for most screens */
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
  max-width: 1200px;
}

.project-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  padding: 2rem;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Ensure cards take full grid cell width */
  width: 100%;
  max-width: none;
  /* Add min-width to prevent cards from getting too narrow */
  min-width: 0;
}

.project-card:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 1px 4px rgba(172, 0, 0, 0.703);
}

/* Image smaller than card */
.project-card-image {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 150px;
  margin-right: 1rem;
  flex-shrink: 0; /* Prevent image from shrinking */
}

.project-card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.project-card-title {
  margin: 5px 0 0 0;
  font-size: 2rem;
}

.project-card-description {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: #555;
  text-align: justify;
}

.project-language-group {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-language-card {
  font-size: 0.8rem;
  color: white;
  background-color: #b93535;
  border-radius: 5px;
  display: inline-block; /* keeps them side by side */
  padding: 0.3rem 0.7rem;
  margin-right: 0.5rem; /* space between badges */
  margin-bottom: 0.5rem;
}

.project-links {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.4;
}

.project-card-link {
  font-size: 0.95rem;
  color: #555555b6;
  text-decoration: none;
  margin-right: 1rem;
  transition: color 0.2s ease;
}

.project-card-link:hover {
  color: red;
}

/*Contact Section*/
.contact-hero-section {
  min-height: clamp(60vh, 100vh, 120vh);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  margin-top: 80px;
}

.contact-hero-container {
  max-width: 1024px;
  margin: 0 auto;
  text-align: center;
}

.contact-hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

.accent-text {
  color: red;
}

.contact-hero-divider {
  width: 96px;
  height: 4px;
  background-color: black;
  margin: 0 auto 32px;
}

.contact-hero-description {
  font-size: 1.2rem;
  font-weight: 400;
  color: #666666;
  margin-bottom: 4rem;
  line-height: 1.6;
  max-width: 512px;
}

.contact-main-content {
  padding: 60px 24px 80px;
  background-color: white;
}

.contact-content-container {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-content-grid {
  display: flex;
  flex-direction: column;
  gap: 40px; /* space between header, grid, and footer */
}

.info-header {
  grid-column: 1 / -1; /* span across both columns */
  text-align: center;
  margin-bottom: 5px;
  width: 100%;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50% each */
  gap: 40px;
}

.contact-info,
.form-container {
  background: #fff;
  padding: 20px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);

  /* force both to stretch equally */
  display: flex;
  flex-direction: column;
}

.contact-grid > * {
  height: 100%;
  width: 100%;
}

.contact-section-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: #000000;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.contact-section-description {
  font-size: 1.2rem;
  color: #666666;
  max-width: 700px;
  margin: 0 auto 4rem; /* Center under title */
  line-height: 1.6;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 15px;
  background-color: white;
  border: 1px solid #e0e0e0;
  transition: border-color 0.3s ease;
}

.contact-card:hover {
  border-color: red;
}

.contact-icon {
  width: 24px;
  height: 24px;
  color: red;
  margin-top: 4px;
  flex-shrink: 0;
}

.contact-title {
  font-weight: 600;
  color: black;
  margin-bottom: 4px;
}

.contact-text {
  color: #333333;
  margin-bottom: 4px;
}

.contact-subtitle {
  font-size: 0.875rem;
  color: #a3a3a3;
}

.info-footer {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.contact-social {
  text-align: center;
}

.contact-social-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 15px;
  color: red;
  opacity: 70%;
  justify-content: center;
  text-align: center;
}

.contact-social-links {
  display: flex;
  gap: 16px;
}

.contact-social-link {
  width: 48px;
  height: 48px;
  background-color: white;
  border: 1px solid black;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: black;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-social-link:hover {
  background-color: red;
  border-color: red;
  color: white;
  transform: scale(1.1);
}

/* Form container */
.form-container {
  background-color: white;
  border: 1px solid #e0e0e0;
  padding: 40px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

/* Title */
.form-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: black;
  text-align: center;
}

/* Form grid for name + email */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.form-label {
  margin-bottom: 10px;
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333333;
}

/* Inputs */
.form-input,
.form-textarea {
  padding: 14px 16px;
  border: 1px solid #333333;
  background-color: white;
  color: black;
  font-size: 1rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #888;
}

/* Focus state */
.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255, 0, 0, 0.301);
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.3);
}

/* Textarea */
.form-textarea {
  resize: none;
  line-height: 1.5;
}

/* Button */
.submit-button {
  margin-top: 12px;
  padding: 14px 20px;
  background: red;
  opacity: 80%;
  color: white;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.submit-button i {
  font-size: 1rem;
}

.submit-button:hover {
  background: white;
  color: black;
  border: 1px solid balck;
  transform: translateY(-2px);
}

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

/* Disclaimer */
.form-footer {
  margin-top: 16px;
  text-align: center;
}

.form-disclaimer {
  font-size: 0.85rem;
  color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Ensure consistent resets for mobile */
  html {
    -webkit-text-size-adjust: 100%; /* Prevent font boosting */
  }

  .logo-container {
    width: 50px;
    height: auto;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-image {
    width: 50px;
    height: auto;
    object-fit: contain;
    filter: invert(1);
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    align-items: center;
    gap: 4rem;
    margin: 0 auto; /* Center the container horizontally */
    flex-shrink: 1;
    flex-grow: 0;
    width: 100%; /* Ensure it takes the full width */
    box-sizing: border-box; /* Include padding in width calculation */
  }

  .hero-content {
    text-align: center;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 3rem;
    text-align: center;
  }

  .profile-image {
    width: 280px;
    height: 350px;
    margin-top: 80px;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-link,
  .nav-link active {
    font-size: 0.9rem;
  }

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

  .social-links {
    flex-direction: column;
    gap: 2rem;
  }

  .section-title {
    font-size: 2rem;
    text-align: center;
  }

  .underline {
    margin: 0.5rem auto 4rem auto;
  }

  .cta-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    margin-bottom: 4rem;
  }

  .about-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    margin: 2rem;
  }

  .hero-title {
    margin-bottom: 1rem;
  }

  .about-buttons-section {
    justify-content: center; /* center on mobile */
    gap: 1rem;
  }

  .hero-image {
    margin: 0 auto;
    justify-content: center;
    align-items: center;
  }

  .project-cards-container {
    display: grid;
    grid-template-columns: 1fr; /* one card per row */
    padding: 0 2rem;
    gap: 2.5rem;
  }

  .project-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: flex-start; /* align content nicely */
    padding: 2rem;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
  }

  .project-card-image {
    width: 50%; /* take full card width */
    height: auto; /* keep proportions */
    max-height: 100px; /* optional: limit tall images */
    max-width: 100px;
    object-fit: cover;
    border-radius: 8px; /* optional: match card corners */
  }

  .project-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* spacing between text, links, etc. */
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .project-image {
    margin: 20px auto;
    width: 50%;
    height: auto;
    max-width: 400px;
  }

  .project-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* spacing between text, links, etc. */
    width: 100%;
  }

  .contact-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    background-color: white;
  }

  .contact-content-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
  }

  .contact-content-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
  }

  .info-header {
    grid-column: unset; /* Clear desktop grid */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 1rem;
    text-align: center;
  }

  .contact-section-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .contact-section-description {
    font-size: 1rem;
    max-width: 90%; /* Fit narrow screens */
    margin: 0 auto 2rem;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
  }

  .contact-info,
  .form-container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: none; /* Simplify for mobile */
  }

  .contact-details {
    align-items: center;
    gap: 1rem;
  }

  .contact-card {
    flex-direction: row; /* Keep icon and text side-by-side if space allows */
    justify-content: center;
    align-items: center;
    text-align: left; /* Left-align text for readability */
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
  }

  .contact-content {
    flex: 1;
  }

  .contact-title {
    font-size: 1.2rem;
  }

  .contact-text,
  .contact-subtitle {
    font-size: 0.9rem;
  }

  .form-container {
    padding: 1.5rem; /* Slightly more padding for the whole form */
  }

  .form-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-group {
    align-items: flex-start;
    margin-bottom: 0.5rem; /* Add space between groups */
  }

  .form-label {
    text-align: left;
    font-size: 0.9rem;
    margin-bottom: 0.5rem; /* Tighter spacing after label */
  }

  .form-input,
  .form-textarea {
    font-size: 0.9rem;
    padding: 1rem; /* Increased from 0.75rem for better touch targets */
    width: 100%;
    border: 1px solid #333333; /* Ensure consistent border */
  }

  .form-textarea {
    min-height: 120px; /* Explicit min-height for better vertical space */
    resize: vertical; /* Allow vertical resizing only, to prevent horizontal mess */
    line-height: 1.5;
    min-height: 120px; /* Explicit min-height for better vertical space */
  }

  /* Ensure the message form-group has extra space */
  .form-group:has(.form-textarea) {
    margin-bottom: 1rem; /* More space after textarea */
  }

  .submit-button {
    justify-content: center;
    width: 100%;
    max-width: 280px; /* Slightly wider for balance */
    margin: 1.5rem auto 1rem; /* More top margin after textarea */
    padding: 1rem 1.5rem; /* Increased padding for better feel */
    font-size: 1rem;
  }

  .form-footer {
    margin-top: 1rem; /* Space after button */
  }

  .form-disclaimer {
    font-size: 0.85rem;
    padding: 0 0.5rem; /* Slight padding to avoid edge crowding */
  }

  .info-footer {
    grid-column: unset;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 0;
    text-align: center;
  }

  .contact-social-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .contact-social-title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
  }

  .contact-social-link {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .contact-social-link:hover,
  .contact-card:hover {
    transform: none; /* Disable hover effects */
    border-color: inherit;
  }

  .tech-skills-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tech-skill-item {
    padding: 1.5rem;
  }

  .tech-skill-header {
    gap: 0.75rem;
  }

  .tech-skill-icon {
    font-size: 32px;
  }

  .tech-skill-name {
    font-size: 1.1rem;
  }

  .tech-skill-level {
    font-size: 0.8rem;
  }

  .tech-skill-percentage {
    font-size: 0.9rem;
  }

  .progress-bar {
    height: 6px;
  }
}

@media (max-width: 480px) {
  /* Ensure consistent resets for mobile */
  html {
    -webkit-text-size-adjust: 100%; /* Prevent font boosting */
  }

  .logo-container {
    width: 50px;
    height: auto;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo-image {
    width: 50px;
    height: auto;
    object-fit: contain;
    filter: invert(1);
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    align-items: center;
    gap: 4rem;
    margin: 0;
    flex-shrink: 1;
    flex-grow: 0;
  }

  .nav-menu {
    gap: 1rem;
  }

  .nav-link,
  .nav-link active {
    font-size: 0.9rem;
  }

  .hero-title {
    font-size: 2.5rem;
    text-align: center;
  }

  .hero-content {
    text-align: center;
    padding-bottom: 40px;
  }

  .profile-image {
    width: 240px;
    height: 300px;
    margin-top: 80px;
  }

  .detail-item,
  .goal-text,
  .quote-section {
    padding: 2rem;
  }

  .hobbies-list li {
    padding: 2rem;
  }

  .section-title {
    font-size: 1.8rem;
    text-align: center;
  }

  .underline {
    margin: 0.5rem auto 4rem auto;
  }

  .cta-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    margin-bottom: 4rem;
  }

  .about-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    margin: 2rem;
  }

  .hero-title {
    margin-bottom: 1rem;
  }

  .about-buttons-section {
    justify-content: center; /* center on mobile */
    gap: 1rem;
  }

  .hero-image {
    margin: 0 auto;
    justify-content: center;
    align-items: center;
  }

  .project-cards-container {
    display: grid;
    grid-template-columns: 1fr; /* one card per row */
    padding: 0 2rem;
    gap: 2.5rem;
  }

  .project-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: flex-start; /* align content nicely */
    padding: 2rem;
    gap: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
  }

  .project-card-image {
    width: 100%; /* take full card width */
    height: auto; /* keep proportions */
    max-height: 100px; /* optional: limit tall images */
    max-width: 100px;
    object-fit: cover;
  }

  .project-image-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* spacing between text, links, etc. */
    width: 100%;
    align-items: center;
    justify-content: center;
  }

  .project-image {
    margin: 20px auto;
    width: 50%;
    height: auto;
    max-width: 400px;
  }

  .project-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* spacing between text, links, etc. */
    width: 100%;
  }

  .contact-grid {
    display: flex;
    flex-direction: column; /* Stack items in one column */
    gap: 40px; /* Space between elements */
  }

  .contact-main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 100%; /* Prevent overflow */
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    background-color: white;
  }

  .contact-content-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
  }

  .contact-content-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
  }

  .info-header {
    grid-column: unset; /* Clear desktop grid */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto 1rem;
    text-align: center;
  }

  .contact-section-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .contact-section-description {
    font-size: 1rem;
    max-width: 90%; /* Fit narrow screens */
    margin: 0 auto 2rem;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
  }

  .contact-info,
  .form-container {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #e0e0e0;
    box-shadow: none; /* Simplify for mobile */
  }

  .contact-details {
    align-items: center;
    gap: 1rem;
  }

  .contact-card {
    flex-direction: row; /* Keep icon and text side-by-side if space allows */
    justify-content: center;
    align-items: center;
    text-align: left; /* Left-align text for readability */
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
  }

  .contact-content {
    flex: 1;
  }

  .contact-title {
    font-size: 1.2rem;
  }

  .contact-text,
  .contact-subtitle {
    font-size: 0.9rem;
  }

  .form-container {
    padding: 1.5rem; /* Slightly more padding for the whole form */
  }

  .form-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .form-group {
    align-items: flex-start;
    margin-bottom: 0.5rem; /* Add space between groups */
  }

  .form-label {
    text-align: left;
    font-size: 0.9rem;
    margin-bottom: 0.5rem; /* Tighter spacing after label */
  }

  .form-input,
  .form-textarea {
    font-size: 0.9rem;
    padding: 1rem; /* Increased from 0.75rem for better touch targets */
    width: 100%;
    border: 1px solid #333333; /* Ensure consistent border */
  }

  .form-textarea {
    min-height: 120px; /* Explicit min-height for better vertical space */
    resize: vertical; /* Allow vertical resizing only, to prevent horizontal mess */
    line-height: 1.5;
    min-height: 120px; /* Explicit min-height for better vertical space */
  }

  /* Ensure the message form-group has extra space */
  .form-group:has(.form-textarea) {
    margin-bottom: 1rem; /* More space after textarea */
  }

  .submit-button {
    justify-content: center;
    width: 100%;
    max-width: 280px; /* Slightly wider for balance */
    margin: 1.5rem auto 1rem; /* More top margin after textarea */
    padding: 1rem 1.5rem; /* Increased padding for better feel */
    font-size: 1rem;
  }

  .form-footer {
    margin-top: 1rem; /* Space after button */
  }

  .form-disclaimer {
    font-size: 0.85rem;
    padding: 0 0.5rem; /* Slight padding to avoid edge crowding */
  }

  .info-footer {
    grid-column: unset;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 1.5rem auto 0;
    text-align: center;
  }

  .contact-social-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .contact-social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .contact-social-title {
    font-size: 1.1rem;
    margin: 0.5rem 0;
  }

  .contact-social-link {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .contact-social-link:hover,
  .contact-card:hover {
    transform: none; /* Disable hover effects */
    border-color: inherit;
  }

  .tech-skill-item {
    padding: 1rem;
  }

  .tech-skill-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tech-skill-info {
    min-width: 120px;
  }

  .tech-skill-percentage {
    margin-left: auto;
  }
}
