* {
  box-sizing: border-box;
}
html {
  font-family: "DM Sans", sans-serif;
  background: #f5f0e8;
  color: #0f0f0f;
}

/* Grain overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Nav active link */
nav a {
  position: relative;
}
nav a.active {
  color: #c8522a;
}
nav a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: #c8522a;
  border-radius: 1px;
}

/* Project card hover */
.project-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* Skill pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #c8b8a0;
  background: #ede8df;
  color: #5a5040;
}

/* Section divider */
.section-rule {
  width: 2.5rem;
  height: 2px;
  background: #c8522a;
  border-radius: 1px;
  margin-bottom: 2rem;
}

/* Hero gradient blob */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}

/* ── Lang switcher ─────────────── */
.lang-btn {
  font-family: 'DM Mono', monospace; font-size: .68rem; font-weight: 500;
  padding: .22rem .6rem; border-radius: 999px; border: none;
  cursor: pointer; transition: background .2s, color .2s, box-shadow .15s;
  color: #8a8070; background: transparent; letter-spacing: .06em;
  text-transform: uppercase; line-height: 1.4;
}
.lang-btn.active {
  background: #f5f0e8;
  color: #c8522a;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.lang-btn:not(.active):hover { color: #5a5040; }

/* ── Lightbox ──────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.88); backdrop-filter: blur(12px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: lb-in .2s ease;
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-img {
  max-width: min(88vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: .75rem;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
}

.lightbox-dots {
  display: flex; gap: .75rem; margin-top: 1.25rem;
}
.lightbox-dots button {
  width: .5rem; height: .5rem; border-radius: 999px; border: none;
  background: rgba(255,255,255,.3); cursor: pointer;
  transition: background .2s, transform .2s;
}
.lightbox-dots button.active {
  background: #fff; transform: scale(1.3);
}

.fullscreen-btn {
  position: absolute; bottom: .6rem; right: .6rem;
  width: 1.75rem; height: 1.75rem; border-radius: .4rem; border: none;
  background: rgba(15,15,15,.45); color: #f5f0e8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
.fullscreen-btn:hover { background: rgba(15,15,15,.75); }