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

:root {
  --bg: #07070a;
  --surface: #0f0f13;
  --surface2: #161619;
  --border: rgba(255,255,255,0.07);
  --border-mid: rgba(255,255,255,0.13);
  --text-primary: #f0f0ee;
  --text-secondary: #7a7a78;
  --text-muted: #3e3e3c;
  --star-on: #f0b429;
  --star-off: #2a2a28;
  --radius: 10px;
  --radius-lg: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Page fade-in */
body { animation: pageFade 0.5s ease both; }
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#star-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
body > *:not(#star-canvas) { position: relative; z-index: 2; }

/* ── NAV ── */
.nav-bar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(7,7,10,0.88);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: flex-end; justify-content: space-between;
  height: 52px;
}
.nav-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: #fff; color: #07070a;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  text-decoration: none; flex-shrink: 0; margin-bottom: 10px;
}
.nav-tabs {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; padding: 0 8px;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 400;
  color: var(--text-secondary); background: transparent; border: none;
  cursor: pointer; white-space: nowrap; padding: 7px 22px 6px;
  position: relative; margin-bottom: -1px; transition: color 0.18s;
  clip-path: polygon(10px 0%, calc(100% - 10px) 0%, calc(100% - 10px) 0%, 100% 6px, 100% 100%, 0% 100%, 0% 6px, 10px 0%);
  text-decoration: none; display: inline-flex; align-items: center;
}
.nav-tab::before {
  content: ''; position: absolute; inset: 0; background: transparent;
  border-radius: 8px 8px 0 0;
  transform: perspective(18px) rotateX(3deg); transform-origin: bottom center;
  transition: background 0.18s, box-shadow 0.18s; z-index: -1;
}
.nav-tab:hover { color: var(--text-primary); }
.nav-tab:hover::before { background: rgba(255,255,255,0.07); }
.nav-tab.active { color: var(--text-primary); padding-top: 8px; }
.nav-tab.active::before {
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border), 0 0 0 1px var(--bg);
}
.nav-spacer { width: 32px; flex-shrink: 0; }

/* ── HERO ── */
.hero {
  max-width: 720px; margin: 0 auto; padding: 92px 2rem 64px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
}
.logo-mark {
  width: 82px; height: 82px; border-radius: 22px;
  background: #fff; color: #07070a;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; font-size: 18px; font-weight: 500;
  letter-spacing: -0.02em; flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 48px rgba(0,0,0,0.8);
}
.hero-name {
  font-size: clamp(40px, 9vw, 68px);
  font-weight: 300; letter-spacing: -0.04em; line-height: 1.0;
}
.hero-tagline { font-size: 15px; color: var(--text-secondary); max-width: 340px; line-height: 1.65; }

/* View Projects button */
.view-projects-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px; margin-top: 8px;
  background: #fff; color: #07070a;
  border: none; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.view-projects-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.view-projects-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* ── SOCIALS ── */
.socials { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.social-btn {
  display: inline-flex; align-items: center;
  height: 42px; padding: 0 13px; border-radius: 100px;
  border: 1px solid var(--border-mid); background: var(--surface);
  color: var(--text-secondary); text-decoration: none; cursor: pointer;
  max-width: 46px; overflow: hidden; white-space: nowrap;
  will-change: max-width, color, background, border-color;
  transition: max-width 0.4s cubic-bezier(0.16,1,0.3,1), color 0.22s ease,
    background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.social-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1); }
.social-label { font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  margin-left: 8px; opacity: 0; white-space: nowrap;
  transition: opacity 0.25s ease 0.08s; pointer-events: none; }
.social-btn:hover { max-width: 160px; border-color: rgba(255,255,255,0.25);
  background: var(--surface2); color: var(--text-primary); transform: translateY(-1px); }
.social-btn:hover svg { transform: rotate(16deg) scale(1.1); }
.social-btn:hover .social-label { opacity: 1; }

/* ── DIVIDER ── */
hr.divider { max-width: 900px; margin: 0 auto; border: none; border-top: 1px solid var(--border); }

/* ── SECTION ── */
.section { max-width: 960px; margin: 0 auto; padding: 56px 2rem; }
.section-label {
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 32px;
}

/* ── PAGE HEADER (category pages) ── */
.page-header {
  max-width: 960px; margin: 0 auto; padding: 48px 2rem 32px;
  display: flex; flex-direction: column; gap: 6px;
}
.page-header-label {
  font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted);
}
.page-header-title { font-size: clamp(28px, 5vw, 42px); font-weight: 300; letter-spacing: -0.03em; }

/* ── SHOWCASE ── */
.showcase { display: flex; flex-direction: column; gap: 12px; }
.showcase-item {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: transparent; transition: border-color 0.2s; min-height: 260px;
}
.showcase-item:hover { border-color: var(--border-mid); }
.showcase-item.flip .showcase-media { order: 2; }
.showcase-item.flip .showcase-body { order: 1; }
.showcase-media {
  position: relative; background: transparent; overflow: hidden;
  height: 300px; display: flex; align-items: center; justify-content: center;
}
.showcase-media img, .showcase-media video {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
}
.showcase-media img.cover { width: 100%; height: 100%; object-fit: cover; }
.showcase-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-muted); font-family: 'DM Mono', monospace; font-size: 11px;
}
.placeholder-icon {
  width: 40px; height: 40px; border: 1px solid var(--border-mid);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
}
.placeholder-icon svg { width: 18px; height: 18px; stroke: var(--text-muted); fill: none; }
.showcase-body {
  padding: 28px 30px; display: flex; flex-direction: column;
  justify-content: center; gap: 10px;
  border-left: 1px solid var(--border); background: var(--surface);
}
.showcase-item.flip .showcase-body { border-left: none; border-right: 1px solid var(--border); }
.showcase-tag { font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.showcase-title { font-size: 20px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.showcase-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; max-width: 380px; }
.showcase-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  text-decoration: none; margin-top: 6px; opacity: 0.6; transition: opacity 0.15s; cursor: pointer;
  background: none; border: none; font-family: 'DM Sans', sans-serif;
}
.showcase-link:hover { opacity: 1; }
.showcase-link svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }

/* ── PROJECT DETAIL OVERLAY ── */
.project-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}
.project-overlay.open { opacity: 1; pointer-events: all; }
.project-overlay-inner {
  max-width: 900px; margin: 0 auto; padding: 48px 2rem 80px;
}
.project-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  background: none; border: none; font-family: 'DM Sans', sans-serif;
  margin-bottom: 36px; transition: color 0.15s;
}
.project-back:hover { color: var(--text-primary); }
.project-back svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.project-detail-tag { font-family: 'DM Mono', monospace; font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.project-detail-title { font-size: clamp(26px, 5vw, 44px); font-weight: 300;
  letter-spacing: -0.03em; margin-bottom: 24px; }
.project-detail-media {
  width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 32px; background: #0d0d11;
}
.project-detail-media img, .project-detail-media video {
  width: 100%; display: block; max-height: 520px; object-fit: cover;
}
.project-extra-images {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px; margin-bottom: 32px;
}
.project-extra-images img {
  width: 100%; border-radius: var(--radius); display: block;
  object-fit: cover; max-height: 280px; background: var(--surface);
}
.project-detail-desc {
  font-size: 16px; color: var(--text-secondary); line-height: 1.8;
  max-width: 680px;
}

/* ── SLIDESHOW DOTS ── */
.slide-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.35); display: inline-block;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
}
.slide-dot.active { background: #fff; transform: scale(1.3); }

/* ── TESTIMONIALS ── */
#testimonials { display: flex; flex-direction: column; align-items: center; text-align: center; }
#testimonials .section-label { align-self: flex-start; }
.testimonials-grid {
  width: 100%; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; margin-bottom: 36px; text-align: left;
}
.testimonial-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.t-stars { display: flex; gap: 3px; margin-bottom: 10px; }
.t-star { font-size: 14px; }
.t-text { font-size: 14px; color: var(--text-primary); line-height: 1.65; margin-bottom: 14px; }
.t-author { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.t-image { width: 100%; border-radius: 8px; margin-bottom: 12px; max-height: 140px; object-fit: cover; display: block; }

/* ── FORM ── */
.t-form-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; width: 100%; max-width: 520px; text-align: left;
}
.t-form-title { font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); display: block; margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-mid); border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--text-primary);
  background: var(--bg); outline: none; transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus { border-color: rgba(255,255,255,0.28); }
.form-textarea { resize: vertical; min-height: 88px; }
.star-picker { display: flex; gap: 6px; }
.star-pick { font-size: 22px; cursor: pointer; transition: transform 0.1s; user-select: none; }
.star-pick:hover { transform: scale(1.2); }
.img-upload-label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
  border: 1px dashed var(--border-mid); border-radius: var(--radius);
  font-size: 13px; color: var(--text-secondary); cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.img-upload-label:hover { border-color: rgba(255,255,255,0.28); color: var(--text-primary); }
#t-img-input { display: none; }
.submit-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px;
  background: #fff; color: #07070a; border: none; border-radius: 100px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  cursor: pointer; margin-top: 6px; transition: opacity 0.15s;
}
.submit-btn:hover { opacity: 0.82; }
.pending-msg {
  display: none; font-size: 13px; color: var(--text-secondary); margin-top: 12px;
  padding: 10px 14px; background: var(--surface2); border-radius: var(--radius); border: 1px solid var(--border);
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border); padding: 22px 2rem;
  text-align: center; font-size: 12px; color: var(--text-muted);
  font-family: 'DM Mono', monospace;
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .hero { padding: 52px 1.25rem 40px; gap: 16px; }
  .logo-mark { width: 64px; height: 64px; border-radius: 16px; font-size: 15px; }
  .hero-name { font-size: clamp(36px, 12vw, 52px); }
  .hero-tagline { font-size: 14px; }
  .social-btn { max-width: 160px; padding: 0 14px; color: var(--text-primary); border-color: var(--border-mid); }
  .social-label { opacity: 1; }
  .nav-bar { padding: 0 1rem; height: 48px; }
  .nav-logo { width: 28px; height: 28px; font-size: 10px; margin-bottom: 8px; }
  .nav-spacer { width: 28px; }
  .nav-tabs { gap: 1px; padding: 0 4px; }
  .nav-tab { font-size: 12px; padding: 6px 12px 5px; }
  .showcase-item, .showcase-item.flip { grid-template-columns: 1fr; min-height: unset; }
  .showcase-item.flip .showcase-media { order: 0; }
  .showcase-item.flip .showcase-body { order: 1; border-right: none; }
  .showcase-body { border-left: none; border-top: 1px solid var(--border); padding: 20px; }
  .showcase-media { min-height: 200px; height: auto; }
  .showcase-title { font-size: 17px; }
  .showcase-desc { font-size: 13px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .t-form-wrap { padding: 18px; }
  .section { padding: 36px 1.25rem; }
  .page-header { padding: 32px 1.25rem 24px; }
  hr.divider { margin: 0 1.25rem; }
}
@media (max-width: 400px) {
  .nav-tab { font-size: 11px; padding: 6px 9px 5px; }
  .hero-name { font-size: 11vw; }
}
