/* ===========================================================================
   PORTFOLIO — Swiss / International Typographic Style
   ·  Inter — one typeface, hierarchy through weight and size only
   ·  Pure black and white — no grey, no opacity fading
   ·  Horizontal rules as primary structural device
   ·  Labels: small, bold, uppercase, black — hierarchy by size, not color
   ·  Static, confident presentation — no decorative animation
   =========================================================================== */

:root {
  --bg:      #FFFFFF;
  --bg-alt:  #F2F2F2;
  --ink:     #000000;

  --f: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --max: 1120px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --section-gap: clamp(5rem, 10vw, 8rem);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--bg); }

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

/* ---------- Navigation ---------- */
.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ink);
}

.nav-brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

.nav-links {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 2.25rem;
}
.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Shared section structure ---------- */
section {
  padding: var(--section-gap) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
section + section {
  border-top: 1px solid var(--ink);
}

/* Section labels — small, bold, fully black */
.section-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.section-title {
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.section-title em { font-style: normal; }

.section-intro {
  max-width: 54ch;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  border-top: none;
}

.eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-bottom: 2.5rem;
  color: var(--ink);
}
.hero-title .line-1,
.hero-title .line-2 { display: block; }

.hero-meta {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero-tagline {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
  max-width: 40ch;
}

.hero-meta-bottom {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  flex-wrap: wrap;
}
.hero-meta-bottom > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.hero-meta-bottom .lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero-meta-bottom .val {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}


/* ---------- About ---------- */
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.about-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}

.about-portrait { position: sticky; top: 6rem; }
.about-portrait-img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--bg-alt);
}
.about-portrait-caption {
  margin-top: 0.75rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
}

.about-content { max-width: 56ch; }

.about-lede {
  font-weight: 400;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.75rem;
}
.about-lede em { font-style: normal; }

.about-bio p {
  font-size: 0.9375rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1rem;
}
.about-bio p:last-of-type { margin-bottom: 0; }

.about-expertise {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}
.expertise-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.expertise-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.expertise-list {
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
}

/* ---------- Category / project sections ---------- */
.category-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.category-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 0.25rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.5rem;
}

/* ---------- Project cards ---------- */
.project-card {
  background: var(--bg);
  border-top: 2px solid var(--ink);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}
.project-card:hover { background: var(--bg-alt); }
.project-card:hover .card-link .arrow { transform: translateX(3px); }

.card-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: 1rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.card-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.card-title {
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 auto;
}

.card-link {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.card-link .arrow {
  transition: transform 0.2s;
  display: inline-block;
}

/* ---------- Aside ---------- */
.aside-inner {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.aside-inner .section-label {
  margin-bottom: 0;
}
.aside-text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
}
.aside-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}
.aside-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Contact ---------- */
.contact-inner { padding-bottom: 2rem; }

.contact-title {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 1rem 0 1.25rem;
}
.contact-title em { font-style: normal; }

.contact-lede {
  max-width: 48ch;
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 640px;
  border: 1px solid var(--ink);
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  background: var(--bg);
  border: none;
  transition: background 0.2s;
  color: var(--ink);
}
.contact-card + .contact-card {
  border-left: 1px solid var(--ink);
}
.contact-card:nth-child(n+3) {
  border-top: 1px solid var(--ink);
}
.contact-card:nth-child(3) {
  border-left: none;
}
.contact-card:hover { background: var(--bg-alt); }
.contact-card.primary {
  background: var(--ink);
  color: var(--bg);
}
.contact-card.primary:hover {
  background: #1A1A1A;
}
.contact-card-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.contact-card-type {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.contact-card-value {
  font-size: 14px;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.contact-card-arrow {
  flex-shrink: 0;
  transition: transform 0.2s;
}
.contact-card:hover .contact-card-arrow { transform: translate(2px, -2px); }

.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
}
.modal[aria-hidden="false"] {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--ink);
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.modal-close:hover {
  background: var(--ink);
  color: var(--bg);
}

.modal-content {
  overflow-y: auto;
  padding: clamp(2rem, 4vw, 3rem);
}

.modal-tag {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}
.modal-title {
  font-weight: 700;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.modal-lede {
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 2rem;
  max-width: 54ch;
}

.modal-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.modal-meta .meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.modal-meta .meta-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.modal-meta .meta-value {
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ink);
}

.modal-body h4 {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}
.modal-body p {
  font-size: 14px;
  line-height: 1.65;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.75rem;
  max-width: 58ch;
}
.modal-body strong { font-weight: 500; }

.modal-gallery {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}
.modal-gallery img {
  width: 100%;
  border: 1px solid var(--ink);
  aspect-ratio: 4/3;
  object-fit: cover;
  object-position: top;
  cursor: zoom-in;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--ink);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.1rem;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: all 0.15s;
  cursor: pointer;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: #1A1A1A; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[aria-hidden="false"] { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
}
.lightbox-img {
  position: relative;
  max-width: 90vw;
  max-height: calc(90vh - 3rem);
  object-fit: contain;
}
.lightbox-bar {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255,255,255,0.2);
  z-index: 2;
  white-space: nowrap;
}
.lightbox-bar-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.lightbox-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255,255,255,0.4);
  transition: all 0.15s;
}
.lightbox-bar-btn:hover {
  background: #fff;
  color: #000;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.lightbox-close:hover {
  background: #fff;
  color: #000;
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-prev:hover,
.lightbox-next:hover {
  background: #fff;
  color: #000;
}

/* ---------- Scroll-triggered reveals ---------- */
/* Swiss design: static, confident, immediate — no decorative animation */
.reveal {
  opacity: 1;
  transform: none;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-portrait { position: static; max-width: 320px; }
  .about-expertise { grid-template-columns: 1fr; }
  .category-header { flex-direction: column; gap: 1rem; }
  .hero-meta-bottom { gap: 2rem; }
}

@media (max-width: 640px) {
  .nav-links { gap: 1.5rem; }
  .nav-links a { font-size: 10px; }
  .nav-links li:nth-child(4) { display: none; }
  .project-grid { grid-template-columns: 1fr; }
  .modal-meta { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card + .contact-card { border-left: none; }
  .contact-card:nth-child(n+2) { border-top: 1px solid var(--ink); }
  .footer { flex-direction: column; }
}
