:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1f21;
  --text-muted: #5c6166;
  --accent: #0f6b62;
  --border: #e3e3df;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.name {
  margin: 0;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: filter 0.15s ease;
}

.linkedin:hover { filter: brightness(1.12); }

/* ---------- Card grid ---------- */

main { padding: 2.5rem 0 3.5rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 0 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ecedecf0;
}

.card-body { padding: 1rem 1.1rem 1.15rem; }

.card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.tag {
  flex-shrink: 0;
  background: #e8f1ef;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.card p {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a { color: var(--accent); }

/* ---------- Modal / carousel ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal[hidden], .fullscreen[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 24, 0.62);
}

.modal-panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  width: min(1060px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.carousel {
  position: relative;
  background: #14161a;
  border-radius: var(--radius) var(--radius) 0 0;
}

.stage {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(62vh, 620px);
}

.stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s ease;
}

.nav:hover { background: #fff; }
.nav.prev { left: 0.75rem; }
.nav.next { right: 0.75rem; }
.nav[disabled] { opacity: 0; pointer-events: none; }

.carousel-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 0.7rem 1rem 0.15rem;
}

.counter {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.dots { display: flex; gap: 0.4rem; }

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.dot.active { background: var(--accent); }

.modal-info { padding: 0.6rem 1.5rem 1.5rem; }

.modal-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modal-info h2 {
  margin: 0;
  font-size: 1.3rem;
}

.modal-info p {
  margin: 0.6rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  white-space: pre-line;
}

/* ---------- Fullscreen overlay ---------- */

.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 11, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.fullscreen img {
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .site-header { padding: 1.5rem 0; }
  .name { font-size: 1.4rem; }
  .stage { height: 46vh; }
  .modal { padding: 0.5rem; }
  .modal-panel { max-height: calc(100vh - 1rem); }
  .modal-info { padding: 0.5rem 1rem 1.25rem; }
}
