/* The Great Game | Istanbul Workshop */

:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #5c5c5c;
  --border: #e4e2dc;
  --accent: #2d3a4a;
  --accent-soft: #eef1f4;
  --max: 68rem;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --radius: 2px;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --font-display: "IBM Plex Serif", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}

.logo span {
  display: block;
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
}

/* Layout */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

section {
  padding-top: var(--gap);
}

.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.prose {
  max-width: 42rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* Hero */

.hero {
  padding-top: clamp(3rem, 10vw, 5rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}

.meta-item strong {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

/* Cards grid */

.grid-2 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.card h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
}

.card .institution {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Timeline / calendar */

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--border);
}

.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.5rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline .date {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.timeline .title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.timeline .desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 1rem;
}

.schedule-table th,
.schedule-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.schedule-table th {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  width: 7rem;
}

.schedule-table tr:last-child td,
.schedule-table tr:last-child th {
  border-bottom: none;
}

/* People */

.people-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 520px) {
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.person-photo {
  aspect-ratio: 4 / 5;
  background: var(--accent-soft);
  object-fit: cover;
  width: 100%;
}

.person-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.person-body {
  padding: 1rem 1.15rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.person-body h3 {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
}

.person-role {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.person-bio {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn-text {
  margin-top: 0.75rem;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover {
  text-decoration: none;
}

/* Projects */

.projects-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-thumb {
  aspect-ratio: 16 / 10;
  background: var(--accent-soft);
  object-fit: cover;
  width: 100%;
}

.project-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.project-body {
  padding: 1rem 1.15rem;
}

.project-body h3 {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
}

.project-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Apply */

.apply-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 36rem;
}

.apply-list {
  margin: 1.25rem 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
}

.apply-list li {
  margin-bottom: 0.5rem;
}

.btn-primary {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.88;
  color: #fff;
}

.contact-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(28, 28, 28, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  max-width: 32rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
}

.modal h3 {
  padding-right: 2rem;
  margin-bottom: 0.25rem;
}

.modal .person-role {
  margin-bottom: 1rem;
}

.modal .person-bio-full {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

/* Footer */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 720px) {
  .nav {
    display: none;
  }

  .header-inner {
    justify-content: center;
  }
}
