/* ================================
   Global Resets & Base Styles
================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  background-color: #1c352d;
  color: #f9f6f3;
}

html,
body {
  background-color: #1c352d;
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  margin-top: 100px;
}

@media (max-width: 992px) {
  main {
    margin-top: 200px;
  }
}

/* ================================
   Header & Navigation
================================= */
header {
  font-size: 1.5rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 999;
  padding: 1rem 2rem;
  background-color: #1c352d;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header *:not(.btn-warning):not(.btn-outline-light) {
  background-color: transparent !important;
}

header > div {
  background-color: transparent !important;
  border: none !important;
}

header.transparent {
  box-shadow: none;
}

header.scrolled {
  background-color: rgba(0, 0, 0, 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

header .nav-link {
  color: #f9f6f3;
}

header img {
  margin-right: 0px; // 🔍 Could be removed if default
}

header .btn {
  font-size: 1.5rem;
}

header a.nav-link,
header button {
  background-color: transparent;
  border: none;
}

.nav-btns {
  text-align: right;
}

/* ================================
   Hero Section (h1 + background)
================================= */
h1 {
  text-align: center;
  font-size: 6rem;
  background-color: transparent;
}

.h1-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

.h1-wrapper h1 {
  position: relative;
  z-index: 1;
  margin: 0;
}

.h1-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  width: 1100px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

/* ================================
   Index Layout
================================= */
.index-wrapper {
  min-height: 75vh;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  // 🔍 'justify-content' and 'align-items' are duplicated
}

.index-body {
  flex: 1;
}

.index-image {
  flex: 1;
  text-align: center;
}

.index-image img {
  max-width: 100%;
  height: auto;
}

.index-body p {
  margin-top: -1.5rem;
  position: relative;
  z-index: 1;
  background-color: transparent;
}

/* ================================
   Content Blocks (web-p, text-side, image-side)
================================= */
.web-p {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto;
  padding: 1rem;
  align-items: center;
  box-sizing: border-box;
  background-color: #142620;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1750px) {
  .web-p {
    flex-direction: column;
  }
}

.text-side {
  flex: 1 1 50%;
  min-width: 280px;
  background-color: #142620;
}

.text-side p {
  text-align: left;
  margin-bottom: 1rem;
  background-color: #142620;
}

.text-side p b {
  background-color: #142620;
}

.image-side {
  flex: 1 1 40%;
  min-width: 220px;
  text-align: center;
  background-color: #142620;
}

.image-side img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ================================
   Project Grid
================================= */
.my-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  justify-items: center;
  padding: 2rem;
  max-width: 2500px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .my-projects {
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  }
}

.site-project {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: transparent;
  transition: all 0.3s ease-in-out;
}

.project-title {
  position: absolute;
  top: 15%;
  left: 0;
  width: 100%;
  padding: 0.6rem 0;
  background-color: rgba(0, 0, 0, 0.75);
  color: #ffc107;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

.site-project img.project-img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 5px solid #f9f6f3;
}

.site-project:hover {
  transform: scale(1.07);
}

.site-project a {
  position: relative;
  top: -15px;
  display: inline-block;
  padding: 0.6rem 2rem;
  background-color: #ffc107;
  color: black;
  font-size: 1.5rem;
  text-decoration: none;
  border-radius: 8px;
}

/* ================================
   Tech Skills Table
================================= */
.custom-tech-table {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.custom-tech-table table {
  background-color: #1e1e1e;
  color: #f9f6f3;
  font-size: 1.5rem;
  border-collapse: collapse;
  max-width: 1200px;
  width: 100%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.custom-tech-table th,
.custom-tech-table td {
  background-color: #142620;
  color: #f9f6f3;
  border: 1px solid #333;
  padding: 1rem;
  text-align: left;
  white-space: normal;
}

.custom-tech-table thead th {
  background-color: #1e1e1e;
  font-size: 1.7rem;
  border-bottom: 2px solid #555;
}

/* ================================
   Contact Form
================================= */
#contact-form {
  max-width: 750px;
  margin: 5rem auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #142620;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1.5rem;
  box-sizing: border-box;
}

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

#contact-form button {
  padding: 0.8rem;
  background-color: #ffc107;
  color: black;
  border: none;
  border-radius: 5px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#contact-form button:hover {
  background-color: #ffc720;
}

#form-status {
  text-align: center;
  margin-top: 1rem;
  font-style: italic;
}

/* ================================
   Typography
================================= */
main p {
  margin: 0px;
  text-align: center;
  font-size: 1.8rem;
  padding-top: 10px;
  width: 50vw;
  margin: 0 auto;
}

h2 {
  text-align: center;
  font-size: 4rem;
  padding: 20px;
  padding-top: 40px;
}

h3 {
  background-color: #142620;
}

/* ================================
   Footer
================================= */
footer {
  flex-shrink: 0;
  padding: 1rem;
  gap: 1rem;
  text-align: center;
  font-size: 1.5rem;
}

footer .socials a {
  font-size: 4rem;
  text-decoration: none;
  outline: none;
  box-shadow: none;
  transition: color 0.3s ease;
}

footer .socials a:hover .fa-linkedin {
  color: #0077b5;
}

footer .socials a:hover .fa-github {
  color: #333;
}

/* ================================
   Responsive Styles
================================= */
@media (max-width: 768px) {
  .nav-btns {
    text-align: center;
  }

  h1 {
    font-size: 2.5rem;
    text-align: center;
  }

  .h1-wrapper {
    position: relative;
    width: 100%;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
  }

  .h1-bg {
    top: -50px;
    transform: translateX(-50%);
    width: 500px;
    max-width: 100vw;
    opacity: 0.4;
  }

  .index-wrapper {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 540px);
    min-height: 30vh;
  }

  .index-body {
    height: 500px;
  }

  .index-body p,
  .text-side p {
    font-size: 1.2rem;
    width: 90vw;
    margin: 1rem auto;
    line-height: 1.5;
  }

  main {
    margin-top: 300px;
    overflow-y: hidden;
  }

  .index main {
    margin-top: 350px;
  }

  /* Responsive Table */
  .custom-tech-table table,
  .custom-tech-table thead,
  .custom-tech-table tbody,
  .custom-tech-table th,
  .custom-tech-table td,
  .custom-tech-table tr {
    display: block;
    width: 100%;
  }

  .custom-tech-table thead tr {
    display: none;
  }

  .custom-tech-table tbody tr {
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    padding: 1rem;
    border-radius: 8px;
    background-color: #142620;
  }

  .custom-tech-table tbody tr:last-of-type {
    margin-bottom: 0;
  }

  .custom-tech-table tbody td {
    position: relative;
    padding-left: 50%;
    text-align: left;
    white-space: normal;
    border: none;
    border-bottom: 1px solid #444;
  }

  .custom-tech-table tbody td:last-child {
    border-bottom: none;
  }

  .custom-tech-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-weight: bold;
    color: #ffc107;
    white-space: nowrap;
  }

  #contact-form {
    margin: 32px;
  }

  footer {
    font-size: 1.2rem;
  }
}
