/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #0a0a0a;
  --white: #fafaf8;
  --gray-100: #f2f2f0;
  --gray-200: #e4e4e0;
  --gray-300: #c8c8c4;
  --gray-500: #888884;
  --gray-700: #444442;
  --accent: #111;
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --radius: 4px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  height: var(--nav-h);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* LOGO */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-line1 {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--black);
  letter-spacing: 0.01em;
}

.logo-line2 {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* NAV LINKS */
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 2px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 2px;
  color: var(--gray-700);
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover { background: var(--gray-100); color: var(--black); }
.nav-link.active { background: var(--black); color: var(--white); }

/* HAMBURGER */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: transform 0.2s, opacity 0.2s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 12px 24px;
  gap: 4px;
}

.nav-mobile .nav-link {
  padding: 10px 12px;
  font-size: 13px;
}

.nav-mobile.open { display: flex; }

/* ===== HERO ===== */
.hero {
  padding: 52px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.5vw, 38px);
  color: var(--gray-700);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-rule {
  margin-top: 48px;
  height: 1px;
  background: linear-gradient(to right, var(--black) 0%, var(--black) 40%, transparent 100%);
}

/* ===== FILTERS ===== */
.filters-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
}

.filters-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-input {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  padding: 8px 14px;
  border-radius: 2px;
  outline: none;
  width: 280px;
  transition: border-color 0.15s, background 0.15s;
  color: var(--black);
}

.search-input::placeholder { color: var(--gray-300); }
.search-input:focus { border-color: var(--black); background: var(--white); }

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--gray-200);
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  color: var(--gray-700);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.chip:hover { border-color: var(--gray-500); color: var(--black); }
.chip.active { background: var(--black); color: var(--white); border-color: var(--black); }

/* ===== TABLE AREA ===== */
main.container { padding-top: 32px; padding-bottom: 64px; }

.table-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.swipe-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  text-transform: uppercase;
  display: none; /* shown only on mobile via JS */
}

.count-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.04em;
}

/* TABLE */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  /* Subtle scroll shadow indicators */
  background:
    linear-gradient(to right, var(--white) 20px, transparent 20px),
    linear-gradient(to left, var(--white) 20px, transparent 20px) 100% 0,
    radial-gradient(ellipse at left, rgba(0,0,0,.08) 0%, transparent 70%) 0 50%,
    radial-gradient(ellipse at right, rgba(0,0,0,.08) 0%, transparent 70%) 100% 50%;
  background-repeat: no-repeat;
  background-color: var(--white);
  background-size: 40px 100%, 40px 100%, 14px 60%, 14px 60%;
  background-attachment: local, local, scroll, scroll;
}

.conf-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 14px;
}

.conf-table thead tr {
  border-bottom: 2px solid var(--black);
}

.conf-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
  background: var(--white);
}

.conf-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-200);
  color: var(--black);
  white-space: nowrap;
}

.conf-table tbody tr {
  transition: background 0.1s;
}

.conf-table tbody tr:hover { background: var(--gray-100); }
.conf-table tbody tr:last-child td { border-bottom: none; }
.conf-table tbody tr.hidden { display: none; }

/* Conf name cell */
.conf-name {
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.conf-field-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  color: var(--gray-500);
  font-weight: 400;
  flex-shrink: 0;
}

/* Deadline cell */
.deadline-cell {
  white-space: nowrap;
}

.deadline-note {
  display: block;
  font-size: 10px;
  color: var(--gray-300);
  font-family: var(--font-mono);
  margin-top: 2px;
  white-space: normal;
  max-width: 160px;
  line-height: 1.4;
}

/* Website link */
.conf-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--black);
  border-bottom: 1px solid var(--gray-300);
  padding-bottom: 1px;
  transition: border-color 0.15s;
  white-space: nowrap;
}

.conf-link:hover { border-color: var(--black); }

/* ===== MOBILE CARDS ===== */
.card-list {
  display: none;
  flex-direction: column;
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.conf-card {
  background: var(--white);
  padding: 18px 16px;
  transition: background 0.1s;
}

.conf-card.hidden { display: none; }
.conf-card:active { background: var(--gray-100); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.card-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  color: var(--gray-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.card-rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.card-row {}

.card-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  display: block;
  margin-bottom: 2px;
}

.card-val {
  font-size: 13px;
  color: var(--black);
  line-height: 1.4;
}

.card-deadline-note {
  display: block;
  font-size: 10px;
  color: var(--gray-300);
  font-family: var(--font-mono);
}

.card-link-row {
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
}

/* ===== NO RESULTS ===== */
.no-results {
  text-align: center;
  padding: 48px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  text-transform: uppercase;
}

/* ===== TABLE FOOTER ===== */
.table-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}
.table-footer p {
  font-size: 13px;
  color: var(--gray-500);
  font-family: var(--font-serif);
  font-style: italic;
}

/* ===== ORG SECTIONS ===== */
.org-section {
  margin-bottom: 56px;
}

.org-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--black);
}

.org-label {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--black);
  letter-spacing: -0.01em;
}

.org-label-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--gray-300);
  text-transform: uppercase;
}

.org-section.hidden-section { display: none; }

/* ===== SITE FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--gray-200);
  padding: 28px 24px;
  background: var(--white);
}

.site-footer .container {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--gray-500);
}

.footer-sep { color: var(--gray-300); }
.site-footer a:hover { color: var(--black); }

/* ===== ABOUT / CONTACT PAGES ===== */
.page-hero {
  padding: 64px 24px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 20px;
}

.page-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.page-body p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  margin-bottom: 20px;
}

.page-body h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  margin: 40px 0 12px;
  color: var(--black);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 520px;
  margin-top: 32px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.form-input, .form-textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  padding: 10px 14px;
  border-radius: 2px;
  outline: none;
  color: var(--black);
  transition: border-color 0.15s, background 0.15s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--black);
  background: var(--white);
}

.form-textarea { min-height: 120px; resize: vertical; }

.form-btn {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.form-btn:hover { opacity: 0.82; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .navbar { height: auto; }
  .nav-inner { height: 56px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 40px 16px 32px; }
  .filters-bar .container { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }

  /* On mobile: hide table, show cards */
  .table-wrapper { display: none; }
  .card-list { display: flex; }
  .swipe-hint { display: block; }

  .site-footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-sep { display: none; }
}

@media (min-width: 769px) {
  .card-list { display: none !important; }
  .table-wrapper { display: block; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.conf-table tbody tr {
  animation: fadeIn 0.25s ease both;
}

.conf-card {
  animation: fadeIn 0.2s ease both;
}

/* ===== HERO MOBILE ===== */
@media (max-width: 600px) {
  .hero-sub { white-space: normal; font-size: 22px; }
}
