:root {
  --bg: #0a0a0a;
  --fg: #f4f4f4;
  --muted: #8a8a8a;
  --line: #262626;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  font-size: 0.95rem;
  text-transform: lowercase;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

/* ---------- HERO ---------- */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem clamp(1.5rem, 6vw, 6rem);
}

.hero nav a { margin: 0 1rem; color: var(--muted); transition: color 0.2s; }
.hero nav a:hover { color: var(--fg); }

/* ---------- ROLES ---------- */
.roles {
  padding: clamp(5rem, 14vw, 12rem) clamp(1.5rem, 6vw, 6rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--muted);
}

/* ---------- WORK ---------- */
.work { padding: clamp(3rem, 8vw, 7rem) clamp(1.5rem, 6vw, 6rem); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(3rem, 6vw, 6rem);
}

.card {
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.card:hover { opacity: 1; }

.card img { width: 100%; }
.card-img { position: relative; }

.card .count {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--fg);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line);
}

.card .name { display: block; margin-top: 1rem; color: var(--muted); }

/* ---------- CONTACT ---------- */
.contact {
  padding: clamp(6rem, 16vw, 14rem) clamp(1.5rem, 6vw, 6rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.mail { border-bottom: 1px solid var(--fg); padding-bottom: 2px; }
.mail:hover { color: var(--muted); border-color: var(--muted); }
.copy { color: var(--muted); }

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.modal-panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  width: min(820px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}
.modal-close:hover { background: var(--line); }

.modal-title { margin-bottom: 2rem; font-weight: 500; }

.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.modal-gallery img { width: 100%; }
