/* ==================================================
   GLOBAL
================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background: #0f1117;
  color: #e2e8f0;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.7;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ==================================================
   TYPOGRAPHY
================================================== */

h1,
h2,
h3 {
  color: white;
  line-height: 1.2;
}

p {
  color: #94a3b8;
}

ul {
  margin-top: 18px;
  padding-left: 20px;
}

li {
  color: #cbd5e1;
  margin-bottom: 10px;
}

/* ==================================================
   LAYOUT
================================================== */

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

section {
  padding: 90px 0;
}

/* ==================================================
   NAVIGATION
================================================== */

.project-nav {
  position: sticky;
  top: 0;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 14px 24px;

  background: rgba(15, 17, 21, 0.92);

  backdrop-filter: blur(14px);

  border-bottom: 1px solid #1e293b;

  font-size: 16px;
  z-index: 1000;
}

.project-nav a {
  color: #cbd5e1;
  opacity: 0.8;
  transition: 0.25s ease;
}

.project-nav a:hover {
  opacity: 1;
  color: #60a5fa;
}

.project-nav .divider {
  color: #334155;
}

.project-nav .title {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ==================================================
   HERO
================================================== */

.hero {
  padding: 120px 0;

  background:
    radial-gradient(
      circle at top left,
      rgba(59,130,246,0.15),
      transparent 35%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(14,165,233,0.08),
      transparent 30%
    ),
    #0f1117;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 70px;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 320px;
}

.hero-text h1 {
  font-size: 4rem;
  margin-bottom: 28px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 26px;
  max-width: 700px;
}

.hero-text p {
  font-size: 1.05rem;
  max-width: 700px;
}

.project-date {
  margin-top: 28px;
  color: #64748b;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-image {
  flex: 1;
  min-width: 320px;
}

.hero-image img {
  width: 100%;
  max-width: 560px;

  aspect-ratio: 1 / 1;
  object-fit: cover;

  margin-inline: auto;

  border-radius: 26px;
  border: 1px solid #1e293b;

  box-shadow:
    0 25px 60px rgba(0,0,0,0.45);
}

/* ==================================================
   TAGS
================================================== */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.tag {
  background: #1e293b;
  color: #cbd5e1;

  padding: 9px 15px;

  border-radius: 999px;

  font-size: 0.9rem;

  border: 1px solid rgba(255,255,255,0.04);
}

/* ==================================================
   BUTTONS
================================================== */

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;

  margin-top: 36px;
}

.btn {
  padding: 13px 22px;

  border-radius: 12px;

  font-weight: 600;

  transition:
    transform 0.25s ease,
    background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #161b22;
  color: #cbd5e1;

  border: 1px solid #334155;
}

.btn-secondary:hover {
  background: #1e293b;
}

/* ==================================================
   SECTIONS
================================================== */

.section-title {
  margin-bottom: 42px;
}

.section-title h2 {
  font-size: 2.3rem;
}

/* ==================================================
   CARDS
================================================== */

.card {
  background: #161b22;

  border: 1px solid #1e293b;

  border-radius: 24px;

  padding: 36px;

  transition:
    transform 0.25s ease,
    border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #334155;
}

.card h3 {
  margin-bottom: 18px;
}

.card p + p {
  margin-top: 18px;
}

/* ==================================================
   GRIDS
================================================== */

.grid-2 {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

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

/* ==================================================
   IMAGES
================================================== */

/* Modern image class */

.project-image,

/* Backward compatibility */
.diagram-image,
.card img {
  width: 100%;

  border-radius: 16px;

  border: 1px solid #1e293b;

  background: #161b22;

  padding: 10px;

  transition: none;
}

/* Old diagram wrapper support */

.image-container {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* CAD */

.project-image.cad {
  object-fit: contain;
  padding: 14px;
  background: #0b1120;
  width: auto;
}

/* UI Screenshots */

.project-image.interface {
  object-fit: contain;
  max-height: 700px;
  background: #0b1120;
  padding: 12px;
}

/* Portrait photos */

.project-image.portrait {
  aspect-ratio: 4 / 5;
}

/* ==================================================
   PLACEHOLDER
================================================== */

.placeholder-img {
  width: 100%;

  aspect-ratio: 16 / 9;

  margin-top: 28px;

  padding: 20px;

  border-radius: 20px;

  border: 1px dashed #475569;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0.01)
    );

  display: flex;
  align-items: center;
  justify-content: center;

  text-align: center;

  color: #64748b;

  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ==================================================
   TABLES
================================================== */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 18px;
  text-align: left;

  border-bottom: 1px solid #1e293b;
}

th {
  background: #111827;
  color: white;
}

td {
  color: #cbd5e1;
}

/* ==================================================
   GALLERY
================================================== */

.gallery {
  gap: 24px;
}

.gallery img {
  width: 100%;

  aspect-ratio: 1 / 1;

  object-fit: cover;

  border-radius: 18px;

  border: 1px solid #1e293b;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.gallery img:hover {
  transform: translateY(-5px);

  box-shadow:
    0 14px 40px rgba(0,0,0,0.35);
}

/* ==================================================
   RESOURCES
================================================== */

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.resource-links a {
  background: #1e293b;

  color: white;

  padding: 13px 18px;

  border-radius: 12px;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.resource-links a:hover {
  background: #334155;
  transform: translateY(-2px);
}

/* ==================================================
   FOOTER
================================================== */

footer {
  padding: 60px 20px;

  text-align: center;

  border-top: 1px solid #1e293b;

  color: #64748b;
}

/* ==================================================
   RESPONSIVE
================================================== */

@media (max-width: 900px) {
  .hero {
    padding: 90px 0;
  }

  .hero-content {
    gap: 50px;
  }

  .hero-text h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .card {
    padding: 28px;
  }

  .gallery img {
    aspect-ratio: 4 / 3;
  }
}