/* ===== Global / Layout ===== */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PP Neue Machina";
  src: url("../assets/fonts/PPNeueMachina-Ultrabold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: #000;
  background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "PP Neue Machina", "Inter", sans-serif;
}

@media (max-width: 768px) {
  .custom-padding {
    padding: 0.31rem !important;
  }
}

@media (min-width: 768px) {
  .custom-padding {
    padding: 2.5rem !important;
  }
}

/* ===== Header ===== */
.navbar-brand {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #000;
  text-decoration: none;
  line-height: 1;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-block;
}

.navbar-brand:hover {
  opacity: 0.7;
}

.logo-brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.logo-brand img {
  height: 2.5rem;
  width: auto;
  display: block;
}

.mobile-header .logo-brand img {
  height: 2rem;
}

/* Desktop header */
.desktop-header {
  width: 100%;
  padding: 1.5rem 0 3rem;
}

.desktop-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.desktop-header .header-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.desktop-header .header-menu .nav-link,
.desktop-header .header-social a {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  color: #000;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

.desktop-header .header-menu .nav-link:hover,
.desktop-header .header-social a:hover {
  opacity: 0.6;
}

.desktop-header .header-social a {
  font-size: 1.25rem;
}

.desktop-header .header-social a i {
  font-size: 1.25rem;
}

/* Mobile header */
.mobile-header {
  display: none;
  width: 100%;
  padding: 1rem 0;
}

.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.mobile-header .navbar-brand {
  font-size: 1rem;
}

.mobile-menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #000;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding-top: 1.5rem;
  gap: 0.75rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 1.5rem;
  color: #000;
  text-decoration: none;
}

@media (max-width: 768px) {
  .desktop-header {
    display: none;
  }

  .mobile-header {
    display: block;
  }
}

.api-error {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffebee;
  color: #c62828;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== Home Intro ===== */
.home-intro {
  padding: 2rem 0 4rem;
  max-width: 900px;
}

.home-intro p {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 2.5rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: #000;
}

.home-intro .home-hello {
  display: block;
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .home-intro {
    padding: 1rem 0 2.5rem;
  }

  .home-intro p {
    font-size: 1.6rem;
  }
}

/* ===== Projects Grid ===== */
.projects-section {
  padding-bottom: 4rem;
}

.projects-grid {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

.project-card-link {
  display: block;
  text-decoration: none;
}

.project-card {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0 !important;
  overflow: hidden;
  background-color: #666;
}

.project-card-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  background-color: #666;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0 !important;
}

.project-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem;
  color: #fff;
  z-index: 2;
  pointer-events: none;
}

.project-card-info h3,
.project-card-info p,
.project-card-info span {
  margin: 0;
  line-height: 1.2;
}

.project-card-info h3 {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.project-card-info p,
.project-card-info span {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  opacity: 0.85;
}

.project-card-info p {
  margin-bottom: 0.15rem;
}

@media (max-width: 768px) {
  .project-card {
    aspect-ratio: 16 / 10;
  }

  .project-card-info {
    padding: 1rem;
  }

  .project-card-info h3 {
    font-size: 1.1rem;
  }

  .project-card-info p,
  .project-card-info span {
    font-size: 0.75rem;
  }
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #f5c6cb;
}

/* ===== About ===== */
.project-image {
  border-radius: 1.5rem;
  width: 550px;
  height: 675px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .project-image {
    width: 388.16px;
    height: 476.13px;
  }
}

.contact-links a {
  display: block;
  color: black;
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
}

.contact-links a:hover {
  text-decoration: underline;
}

.about-text p {
  font-size: 1.7rem;
}

/* ===== Project Detail / Sections ===== */
.project-header-row {
  padding: 2rem 0 3rem;
}

.project-header-row h1 {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase;
}

.project-header-row .project-description {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #000;
  margin: 0;
}

.project-hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #666;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.project-hero-media iframe,
.project-hero-media video,
.project-hero-media img,
.project-hero-media .skeleton-box {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.project-gallery {
  margin: 0;
}

.project-gallery-item {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.project-gallery-item .skeleton-box,
.project-gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  cursor: pointer;
  border-radius: 0;
}

.project-container .no-media {
  text-align: center;
  padding: 2rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.loading-spinner,
.error-message {
  text-align: center;
  padding: 2rem;
  font-size: 1.5rem;
}

.error-message {
  color: #d32f2f;
  background: #ffebee;
  border-radius: 4px;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .project-header-row {
    padding: 1rem 0 2rem;
  }

  .project-header-row h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    max-width: 100%;
  }

  .project-header-row .project-description {
    font-size: 0.95rem;
  }

  .project-hero-media {
    aspect-ratio: 4 / 3;
  }

  .project-gallery-item {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ===== Navigation ===== */
.text-link {
  color: black;
  transition: color 0.3s ease-in-out;
  cursor: pointer;
  text-decoration: none;
}

/* ===== Footer ===== */
.site-footer {
  width: 100%;
  padding: 2rem 0 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.footer-inner > div {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: #000;
}

.footer-inner a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.footer-inner a:hover {
  opacity: 0.6;
}

.footer-top-link {
  text-transform: capitalize;
}

@media (max-width: 768px) {
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0;
  }

  .footer-left {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  .footer-right {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .footer-right a::before {
    content: "→";
    margin-right: 0.35rem;
  }

  .footer-center {
    grid-column: 2;
    grid-row: 1 / 3;
    text-align: right;
    align-self: center;
  }
}

/* ===== Images Block / Lightbox ===== */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-modal .modal-content {
  display: block;
  max-width: 90%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@media only screen and (max-width: 768px) {
  .lightbox-modal .modal-content {
    max-width: 95%;
    max-height: 80vh;
  }

  .project-container h1 {
    font-size: 2rem;
  }

  .project-container .media-container {
    aspect-ratio: 4 / 3;
  }

  .project-container .media-container iframe,
  .project-container .media-container video {
    height: 100%;
  }
}

@keyframes zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
}

/* ===== Skeleton Loaders ===== */
.skeleton-box {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  width: 100%;
  height: 35rem;
  border-radius: 1.5rem;
  display: block;
}

@media (max-width: 768px) {
  .skeleton-box {
    height: 250px;
  }
}

.skeleton-box::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
  content: "";
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1.5rem;
}

#project-presentation .skeleton-box {
  height: auto;
  min-height: 200px;
  border-radius: 1.5rem;
}

@media (max-width: 768px) {
  #project-presentation .skeleton-box {
    height: 250px;
  }
}

.image-block .skeleton-box {
  height: auto;
  min-height: 150px;
  cursor: pointer;
  border-radius: 1.5rem;
}

.image-block img {
  cursor: pointer;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 1.5rem;
}

@media (max-width: 768px) {
  .image-block .skeleton-box {
    height: 250px;
  }
}

/* ===== Contact Page ===== */
.contact-page {
  padding: 2rem 0 4rem;
}

.contact-title {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 2.5rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
}

.contact-intro {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.contact-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-links-list a {
  font-family: "PP Neue Machina", "Inter", sans-serif;
  font-size: 1.25rem;
  color: #000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.contact-links-list a:hover {
  opacity: 0.6;
}

.contact-form-row {
  margin-top: 4rem;
}

.contact-form label {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #000;
}

.contact-form .form-control {
  border: 1px solid #000;
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #000;
  background-color: transparent;
}

.contact-form .form-control:focus {
  box-shadow: none;
  border-color: #000;
  background-color: transparent;
}

.contact-form textarea {
  resize: vertical;
}

.btn-send {
  border-radius: 0;
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #000;
  border-color: #000;
}

.btn-send:hover {
  background-color: #333;
  border-color: #333;
}

@media (max-width: 768px) {
  .contact-page {
    padding: 1rem 0 2.5rem;
  }

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

  .contact-form-row {
    margin-top: 2.5rem;
  }
}
