/* ====================================================
   DIGITAL NAME CARD — ARCHITECTURAL EDITORIAL AESTHETIC
   Typography: Fraunces (display) + Inter Tight (body)
   Palette: Warm stone, deep ink, brass accent
   ==================================================== */

:root {
  --ink: #1a1915;
  --stone: #f4f1ec;
  --stone-deep: #e8e2d8;
  --paper: #fefcf8;
  --brass: #b08856;
  --brass-dark: #8a6839;
  --muted: #78716c;
  --line: rgba(26, 25, 21, 0.12);
  --shadow-soft: 0 1px 2px rgba(26,25,21,.04), 0 8px 24px rgba(26,25,21,.06);
  --shadow-lift: 0 2px 4px rgba(26,25,21,.06), 0 20px 40px rgba(26,25,21,.08);
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Inter+Tight:wght@300;400;500;600&display=swap');

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--stone);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

.serif { font-family: 'Fraunces', Georgia, serif; font-weight: 400; letter-spacing: -0.02em; }
.mono-label { font-family: 'Inter Tight', sans-serif; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; font-weight: 500; color: var(--muted); }

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

/* ====== LAYOUT ====== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 2rem; }

/* ====== NAMECARD HERO ====== */
.namecard {
  min-height: 100vh;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}

.namecard::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(176, 136, 86, 0.08), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(26, 25, 21, 0.04), transparent 50%);
  pointer-events: none;
}

.namecard-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.nc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}

.nc-brand { display: flex; align-items: center; gap: .75rem; }
.nc-brand .logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--stone-deep); }
.nc-brand .company-name { font-size: .85rem; font-weight: 500; }
.nc-brand .locale { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }

.nc-meta { text-align: right; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }
.nc-meta .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); margin-right: .35rem; vertical-align: middle; animation: pulse 2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

.nc-photo-wrap {
  width: 140px; height: 140px;
  margin-bottom: 2.5rem;
  position: relative;
}
.nc-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}
.nc-photo-wrap::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--brass);
  border-radius: 50%;
  opacity: .3;
}

.nc-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
}

.nc-name .ital { font-style: italic; font-weight: 300; color: var(--brass); }

.nc-title {
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: .4rem;
  font-weight: 500;
}
.nc-company { color: var(--muted); font-size: .95rem; margin-bottom: 2rem; }

.nc-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.25rem;
  color: var(--muted);
  line-height: 1.45;
  padding: 1.5rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 540px;
}

/* ====== ACTIONS ====== */
.nc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 2.5rem 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1.15rem 1.4rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  transition: all .3s ease;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.btn:hover { background: var(--brass); border-color: var(--brass); transform: translateY(-1px); }
.btn.outline { background: transparent; color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: var(--paper); }

.btn-full { grid-column: 1 / -1; }

.btn svg { width: 16px; height: 16px; }

/* ====== CONTACT LIST ====== */
.nc-contacts {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2.5rem 0;
}

.nc-contact {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  transition: background .2s;
}
.nc-contact:last-child { border-bottom: 1px solid var(--line); }
.nc-contact:hover { background: rgba(176,136,86,.05); }

.nc-contact .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.nc-contact .value { font-size: 1rem; color: var(--ink); word-break: break-word; }
.nc-contact .arrow { color: var(--brass); font-size: 1.2rem; }

/* ====== SOCIAL ROW ====== */
.nc-socials {
  display: flex;
  gap: .75rem;
  margin: 2rem 0 1rem;
}
.nc-social {
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s ease;
}
.nc-social:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.nc-social svg { width: 18px; height: 18px; }

/* ====== ABOUT SECTION ====== */
.nc-about {
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.nc-about p {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 300;
}

/* ====== CATALOGUE LINK ====== */
.catalogue-link {
  display: block;
  margin-top: 3rem;
  padding: 2.5rem 2rem;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
  transition: all .3s ease;
}
.catalogue-link::before {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(135deg, transparent, rgba(176,136,86,.2));
  transition: width .4s ease;
}
.catalogue-link:hover::before { width: 100%; }
.catalogue-link > * { position: relative; z-index: 1; }
.catalogue-link .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--brass); margin-bottom: .8rem; }
.catalogue-link h2 { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 400; letter-spacing: -.02em; margin-bottom: .5rem; }
.catalogue-link .desc { opacity: .7; font-size: .95rem; margin-bottom: 1.5rem; }
.catalogue-link .arrow-big { font-size: 2.5rem; line-height: 1; font-family: 'Fraunces', serif; font-weight: 300; }

/* ====== FOOTER ====== */
.nc-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ====== CATALOGUE PAGE ====== */
.cat-header {
  padding: 5rem 0 3rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.cat-header .back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .15em;
  color: var(--muted); margin-bottom: 2rem;
  transition: color .2s;
}
.cat-header .back-link:hover { color: var(--ink); }
.cat-header .back-link::before { content: '←'; font-size: 1.1rem; }

.cat-header h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.035em;
  margin-bottom: 1rem;
}
.cat-header h1 .ital { font-style: italic; color: var(--brass); font-weight: 300; }
.cat-header .sub { font-family: 'Fraunces', serif; font-style: italic; color: var(--muted); font-size: 1.25rem; max-width: 500px; }

.cat-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ====== PROJECT GRID ====== */
.projects-wrap { padding: 4rem 0 6rem; background: var(--stone); }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem 2rem;
}

.project-card {
  position: relative;
  background: var(--paper);
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.project-card:hover { transform: translateY(-4px); }

.project-card .img-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--stone-deep);
}
.project-card .img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s ease;
}
.project-card:hover .img-wrap img { transform: scale(1.04); }

.project-card .num {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: 'Fraunces', serif;
  font-size: .8rem;
  color: var(--paper);
  background: rgba(26,25,21,.8);
  padding: .25rem .6rem;
  backdrop-filter: blur(8px);
  z-index: 2;
}

.project-card .info {
  padding: 1.5rem 0 0;
}
.project-card .cat {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--brass);
  margin-bottom: .6rem;
}
.project-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: .4rem;
}
.project-card .loc-year {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: .75rem;
  margin-top: .75rem;
}

.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.2rem;
}

/* ====== PROJECT DETAIL PAGE ====== */
.pd-hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  overflow: hidden;
  color: var(--paper);
}
.pd-hero img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .7;
}
.pd-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(26,25,21,.85) 100%);
}
.pd-hero .content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 3rem;
  width: 100%;
}
.pd-hero .cat-tag {
  display: inline-block;
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 1.2rem;
  padding: .4rem .8rem;
  border: 1px solid var(--brass);
}
.pd-hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
  max-width: 900px;
  margin-bottom: 1.5rem;
}
.pd-hero .loc { color: rgba(254,252,248,.7); font-size: 1rem; }

.pd-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.pd-meta-item .label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.pd-meta-item .val { font-family: 'Fraunces', serif; font-size: 1.25rem; letter-spacing: -.01em; }

.pd-body {
  padding: 5rem 0;
  background: var(--stone);
}
.pd-body .desc {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  line-height: 1.75;
  font-weight: 300;
  max-width: 680px;
  color: var(--ink);
}
.pd-body .desc p + p { margin-top: 1.2rem; }

.pd-gallery {
  padding: 3rem 0 6rem;
  background: var(--stone);
}
.pd-gallery .grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}
.pd-gallery .item {
  cursor: pointer;
  overflow: hidden;
  background: var(--stone-deep);
  transition: transform .3s;
}
.pd-gallery .item:hover { transform: scale(.98); }
.pd-gallery .item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
.pd-gallery .item:hover img { transform: scale(1.05); }

/* Varied grid layout for visual rhythm */
.pd-gallery .item:nth-child(1) { grid-column: span 7; aspect-ratio: 4 / 3; }
.pd-gallery .item:nth-child(2) { grid-column: span 5; aspect-ratio: 4 / 5; }
.pd-gallery .item:nth-child(3) { grid-column: span 5; aspect-ratio: 1; }
.pd-gallery .item:nth-child(4) { grid-column: span 7; aspect-ratio: 3 / 2; }
.pd-gallery .item:nth-child(n+5) { grid-column: span 6; aspect-ratio: 4 / 3; }

/* ====== LIGHTBOX ====== */
.lb {
  position: fixed; inset: 0;
  background: rgba(26,25,21,.96);
  z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.lb.open { display: flex; }
.lb img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lb-close, .lb-nav {
  position: absolute;
  background: none; border: 1px solid rgba(254,252,248,.3);
  color: var(--paper);
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: all .2s;
}
.lb-close:hover, .lb-nav:hover { background: var(--brass); border-color: var(--brass); }
.lb-close { top: 2rem; right: 2rem; }
.lb-nav.prev { left: 2rem; top: 50%; transform: translateY(-50%); }
.lb-nav.next { right: 2rem; top: 50%; transform: translateY(-50%); }
.lb-caption { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: rgba(254,252,248,.7); font-size: .9rem; font-family: 'Fraunces', serif; font-style: italic; }

/* ====== QR PAGE ====== */
.qr-wrap {
  min-height: 100vh;
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.qr-card {
  max-width: 460px; width: 100%;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
}
.qr-card::before, .qr-card::after {
  content: ''; position: absolute;
  width: 20px; height: 20px;
  border: 1px solid var(--ink);
}
.qr-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; transform: translate(-8px, -8px); }
.qr-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; transform: translate(8px, 8px); }
.qr-card h1 { font-family: 'Fraunces', serif; font-size: 2rem; letter-spacing: -.02em; margin-bottom: .5rem; }
.qr-card .sub { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .15em; margin-bottom: 2.5rem; }
.qr-canvas-wrap { padding: 1.5rem; background: #fff; border: 1px solid var(--line); display: inline-block; margin-bottom: 2rem; }
.qr-card .url { word-break: break-all; font-family: monospace; font-size: .8rem; color: var(--muted); padding: 1rem; background: var(--stone); margin-top: 1.5rem; }
.qr-card .dl-btn { margin-top: 1.5rem; }

/* ====== RESPONSIVE ====== */
@media (max-width: 640px) {
  .container, .container-narrow, .namecard-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  .namecard-inner { padding-top: 2.5rem; padding-bottom: 3rem; }
  .nc-actions { grid-template-columns: 1fr; }
  .nc-contact { grid-template-columns: 90px 1fr auto; font-size: .9rem; }
  .projects-grid { grid-template-columns: 1fr; gap: 2rem; }
  .pd-gallery .grid { grid-template-columns: 1fr; }
  .pd-gallery .item { grid-column: span 1 !important; aspect-ratio: 4 / 3 !important; }
  .cat-header { padding: 3rem 0 2rem; }
  .cat-header h1 { font-size: 2.8rem; }
  .pd-meta { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 0; }
  .lb-nav.prev { left: 1rem; } .lb-nav.next { right: 1rem; }
  .lb-close { top: 1rem; right: 1rem; }
}

/* ====== FADE-IN ANIMATION ====== */
.fade-up { opacity: 0; transform: translateY(20px); animation: fadeUp .8s ease forwards; }
.fade-up.d1 { animation-delay: .1s; }
.fade-up.d2 { animation-delay: .2s; }
.fade-up.d3 { animation-delay: .3s; }
.fade-up.d4 { animation-delay: .4s; }
.fade-up.d5 { animation-delay: .5s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
