/* ========== Base Reset & Typography ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #0d0d11;
  color: #e0e0e0;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ========== Header ========== */
header {
  background-color: #111319;
  padding: 10px 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: padding 0.3s ease, background-color 0.3s ease;
  z-index: 1000;
}

header h1 {
  font-size: 2rem;
  color: #fff;
  transition: font-size 0.3s ease;
}

header p {
  color: #ff4040;
  font-size: 0.9rem;
}

/* ========== Navigation ========== */
nav {
  text-align: center;
  background-color: #0b0c10;
  padding: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

nav a {
  color: #c0c0c0;
  margin: 0 12px;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
  color: #fff;
  background-color: #4c90c930;
}

/* ========== Hero Section ========== */
.hero {
  padding: 100px 20px;
  text-align: center;
  background: linear-gradient(to bottom right, #101216, #1b1f26);
  font-family: 'Helvetica', 'Arial', sans-serif;
}

.hero h2 {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 10px;
}

.hero p {
  color: #b0b0b0;
  font-size: 1rem;
}

/* ========== Portfolio Grid ========== */
.portfolio {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 40px;
}

.portfolio img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}

.portfolio img:hover {
  transform: scale(1.05);
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
}

/* ========== Scroll-to-Top Button ========== */
#scrollTopBtn {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
  background-color: #ff4040;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

#scrollTopBtn:hover {
  background-color: #b82020;
}

/* ========== Footer ========== */
footer {
  background-color: #111319;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: #888;
}

.social a {
  color: #ff4040;
  text-decoration: none;
  margin: 0 8px;
}

/* ========== About & Contact Sections ========== */
section#about h2,
section#contact h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #fff;
}

section#about p,
section#contact p {
  font-size: 1rem;
  color: #ccc;
  max-width: 700px;
  margin: 0 auto;
}

/* ========== Modal Contact Form ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1002;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
}

.modal-content {
  background-color: #1a1a1d;
  margin: 10% auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  color: #e0e0e0;
  position: relative;
}

.modal-content h2 {
  margin-bottom: 15px;
  color: #ff4040;
}

.modal-content label {
  display: block;
  margin: 10px 0 5px;
  color: #ccc;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: none;
  border-radius: 5px;
  background-color: #2a2a2d;
  color: white;
}

.modal-content button {
  background-color: #ff4040;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #b82020;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: white;
}

/* ========== Responsive Breakpoints ========== */
@media (max-width: 1024px) {
  .portfolio {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .portfolio {
    grid-template-columns: 1fr;
  }
}
