* {
  box-sizing: border-box;
}

:root {
  --bg: #0b1020;
  --surface: #121a2d;
  --surface-2: #18223a;
  --text: #f5f7fb;
  --muted: #aab4c7;
  --border: #26324d;
  --accent: #8bb8ff;
  --accent-text: #08111f;
  --max-width: 1100px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 16, 32, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.contact-links a:hover {
  color: var(--text);
}

.hero {
  padding: 110px 0 90px;
}

.eyebrow,
.section-label,
.project-type {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 12px 0 4px;
  font-size: clamp(3rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h2 {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--muted);
}

.hero-text {
  max-width: 760px;
  margin: 28px 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-weight: 700;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button.secondary {
  background: var(--surface);
}

.section {
  padding: 85px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 8px 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.035em;
}

.section > p:not(.section-label) {
  max-width: 800px;
  color: var(--muted);
}

.project-card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  padding: 28px;
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.project-card h2 {
  margin-top: 4px;
}

.project-card h3 {
  margin-top: 28px;
}

.project-content p,
.project-content li {
  color: var(--muted);
}

.project-content ul {
  padding-left: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.tags span {
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
}

.project-media {
  min-height: 360px;
}
.project-media img {
  width: auto;
  height: auto;
  max-width: 72%;
  max-height: 560px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: var(--surface-2);
  border-radius: 14px;
}

.project-gallery {
  margin-top: 34px;
}

.gallery-heading h3 {
  margin-bottom: 4px;
}

.gallery-heading p {
  margin-top: 0;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.gallery-grid figure {
  margin: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  display: block;
  border-radius: 9px;
  background: var(--surface-2);
}

.gallery-grid figcaption {
  padding: 10px 2px 2px;
  font-size: 0.82rem;
  color: var(--muted);
}


.media-placeholder {
  height: 100%;
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 14px;
  color: var(--muted);
}

.media-placeholder span {
  color: var(--text);
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.skill-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.skill-card h3 {
  margin-top: 0;
}

.skill-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact {
  padding-bottom: 110px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
  font-weight: 700;
}

footer {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .project-card,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-media {
    min-height: 280px;
  }

  .project-media img {
    max-width: 58%;
    max-height: 430px;
  }

  .media-placeholder {
    min-height: 280px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(var(--max-width), calc(100% - 28px));
  }

  .nav-links {
    gap: 12px;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 80px;
  }
}
