/* ===================== Base Styles ===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #fdfdfd;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ===================== Layout Helpers ===================== */
section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 2rem;
}

.section-head .kicker {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #999;
  font-weight: 600;
}

.section-head h2 {
  font-size: 2rem;
  margin: 0.5rem 0;
}

.section-head .sub {
  color: #555;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

/* ===================== Header / Navigation ===================== */
header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: fixed; /* use fixed instead of sticky */
  width: 100%;
  top: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
}

/* hidden state */
header.hidden {
  transform: translateY(-100%);
}


.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.2rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: #444;
  border-radius: 50%;
  vertical-align: middle;
}

nav a {
  margin-left: 1rem;
  font-weight: 500;
  color: #333;
}

nav a.cta-btn {
  padding: 0.4rem 0.8rem;
  background: #444;
  color: #fff;
  border-radius: 6px;
}

/* ===================== Hero Section ===================== */
.hero {
  display: grid;
  gap: 2rem;
  padding: 4rem 1rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 1rem 0;
}

.hero p {
  max-width: 40ch;
  color: #444;
}

.hero .actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.primary,
.outline {
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
}

.primary {
  background: #444;
  color: #fff;
}

.outline {
  border: 2px solid #444;
  color: #444;
}

.hero-media {
  position: relative;
}

.hero-media img {
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-media .badge {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===================== Services ===================== */
.service-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.service-card h3 {
  margin: 0.8rem 0;
}

.service-icon {
  font-size: 2rem;
}

/* ===================== Portfolio ===================== */
.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 100%;
  aspect-ratio: 4/3;
  transition: transform 0.3s, box-shadow 0.3s;
}

.portfolio-card:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.portfolio-card:hover img {
  transform: scale(1.05);
}

.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: #fff;
  font-family: 'Arial', sans-serif;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.caption strong {
  display: block;
  font-size: 1.2rem;
}

.caption .tag {
  font-size: 0.85rem;
  color: #ddd;
  font-weight: 300;
  letter-spacing: 0.5px;
  background: #fff;
  color: #333;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

/* ===================== About Section ===================== */
.about {
  display: grid;
  gap: 2rem;
}

.about .panel {
  background: #fff;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about h3 {
  margin-bottom: 1rem;
}

/* ===================== Projects Section ===================== */
#projects {
  padding: 2rem 1rem;
  background-color: #ffffff;
}

#projects .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

#projects .section-head .kicker {
  font-size: 0.9rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}

#projects .section-head h2 {
  font-size: 2.2rem;
  margin: 0;
}

#projects .section-head .sub {
  font-size: 1rem;
  color: #666;
}

#projects .section-head .outline {
  text-decoration: none;
  border: 2px solid #333;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s;
}

#projects .section-head .outline:hover {
  background-color: #333;
  color: #fff;
}

#projects .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ===================== Lightbox ===================== */
#lightbox {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox img.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#lightbox .close {
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  font-size: 1.8rem;
  position: absolute;
  top: 20px;
  right: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  color: #ffffff;
}

#lightbox .close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
  color: #ffffff;
}

#lightbox .prev,
#lightbox .next {
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  color: #ffffff;
  font-size: 2rem;
  line-height: 50px;
  text-align: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

#lightbox .prev:hover,
#lightbox .next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.2);
}

#lightbox .prev {
  left: 20px;
}

#lightbox .next {
  right: 20px;
}

/* ===================== Contact Form ===================== */
form,
#reviewForm {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  max-width: 600px;
}

form div,
#reviewForm div {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

input,
textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

/* ===================== Reviews Section ===================== */
.reviews-container {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
  height: 100%;
}

#reviewForm {
  flex: 1 1 350px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

#reviewForm:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.reviews-list {
  flex: 2 1 600px;
  max-height: 500px;
  overflow-y: auto;
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Individual Review Card */
.review-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fdfdfd;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-header {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.reviewer-name {
  font-weight: 600;
  font-size: 1rem;
  color: #222;
}

.review-main {
  display: flex;
  flex-direction: column;
  /* name on top, date under it */
}

.review-date {
  font-size: 0.8rem;
  color: #999;
  margin-top: 2px;
}

.review-message {
  flex: 1;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
}

/* Stars - display in review card */
.review-card .stars {
  color: #FFD700;
  font-size: 1rem;
  margin-top: 0.2rem;
}

/* Stars - interactive in review form */
#reviewForm .stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

#reviewForm .stars input[type="radio"] {
  display: none;
}

#reviewForm .stars label {
  font-size: 1.8rem;
  color: lightgray;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}

#reviewForm .stars label:hover,
#reviewForm .stars label:hover~label,
#reviewForm .stars input[type="radio"]:checked~label {
  color: gold;
}

/* ===================== Footer ===================== */
footer.footer {
  text-align: center;
  padding: 1.5rem 1rem;
}

footer.footer p {
  margin: 0;
  line-height: 1.6;
}

.footer a {
  color: #444;
}

/* ===================== Responsive Media Queries ===================== */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1rem;
  }

  .hero .actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    grid-template-columns: 1fr;
  }

  nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #projects .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  header .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav a {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .primary,
  .outline {
    width: 100%;
    text-align: center;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .portfolio-card img {
    height: auto;
  }

  .caption {
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
  }

  .section-head h2 {
    font-size: 1.6rem;
  }
}