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

:root {
  --bg: #FAFAFA;
  --bg-white: #FFFFFF;
  --border: #E5E5E5;
  --border-light: #F0F0F0;
  --text: #1A1A1A;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --accent: #1A1A1A;
  --accent-hover: #333333;
  --link: #2563EB;
  --link-hover: #1D4ED8;
  --tag-bg: #F3F4F6;
  --tag-text: #4B5563;
  --avatar-bg: #E8E2D4;
  --avatar-text: #5A4F3A;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --font-sans: 'IBM Plex Sans', -apple-system, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--link);
  transition: color 0.15s;
}

a:hover { color: var(--link-hover); }

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

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}

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

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

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

.logo-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); font-weight: 500; }

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg-white) !important;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  font-weight: 500 !important;
  font-size: 0.8rem !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: var(--bg-white) !important;
}

.nav-close { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s;
}

/* ===== HERO ===== */
.hero {
  padding: 5rem 0 3rem;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

.hero-rule {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin-top: 2.5rem;
}

/* ===== ABOUT ===== */
.about {
  padding: 3rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-main h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.about-main p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

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

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.sidebar-card h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.sidebar-card ul {
  list-style: none;
}

.sidebar-card li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-card li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== DIVIDER ===== */
.divider hr {
  border: none;
  height: 1px;
  background: var(--border);
}

/* ===== RESEARCHERS ===== */
.researchers {
  padding: 3rem 0;
}

.researchers h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

/* ===== COUNTDOWN ===== */
.countdown-section {
  padding: 6rem 0;
  background: var(--text);
  width: 100%;
}

.countdown-section .container {
  max-width: 100%;
  padding: 0 4rem;
}

.countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.countdown-num {
  font-family: var(--font-mono);
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 500;
  color: var(--bg);
  line-height: 1;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-right: 2rem;
}

.countdown-sep {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 8vw, 7rem);
  color: rgba(250, 250, 250, 0.15);
  line-height: 1;
  margin: 0 0.5rem;
}

.researchers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.researcher-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.researcher-card:hover {
  border-color: #D1D5DB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.researcher-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--avatar-text);
}

.researcher-avatar-img {
  object-fit: cover;
}

.researcher-info h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.researcher-role {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 500;
  font-style: italic;
  color: var(--link);
  margin-bottom: 0.5rem;
}

.researcher-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PAPERS ===== */
.papers {
  padding: 3rem 0 5rem;
}

.papers h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

.papers-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.paper-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.paper-row:hover {
  border-color: #D1D5DB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.paper-col {
  min-width: 0;
}

.paper-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--tag-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.paper-col h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.paper-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.paper-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.paper-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.paper-arrow svg {
  width: 20px;
  height: 20px;
}

.paper-event .paper-label,
.paper-col:last-child .paper-label {
  background: #ECFDF5;
  color: #065F46;
}

.paper-row-placeholder {
  border-style: dashed;
  background: repeating-linear-gradient(
    -45deg,
    var(--bg-white),
    var(--bg-white) 10px,
    #FAFAFA 10px,
    #FAFAFA 20px
  );
}

.placeholder-title {
  color: var(--text-tertiary) !important;
  font-style: italic;
}

.placeholder-text {
  color: var(--text-tertiary) !important;
  font-style: italic;
}

/* ===== RESEARCH UPLOAD ===== */
.research-papers {
  padding: 4rem 0 5rem;
}

.research-papers h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

.upload-gate {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.upload-form {
  display: none;
}

.upload-form.visible {
  display: block;
}

.research-notice {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.research-deadline {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 2rem;
}

.research-deadline.open {
  color: #059669;
}

.research-deadline.closed {
  color: #EF4444;
}

.code-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
}

.code-form input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-white);
  outline: none;
  transition: border-color 0.15s;
}

.code-form input:focus {
  border-color: var(--text-tertiary);
}

.code-form input::placeholder {
  color: var(--text-tertiary);
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 2rem;
  border: 2px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--text-tertiary);
  background: var(--bg-white);
}

.upload-icon {
  color: var(--text-tertiary);
}

.upload-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.upload-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.upload-status.error { color: #EF4444; }
.upload-status.success { color: #10B981; }

.papers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 2rem;
}

.papers-empty,
.papers-loading {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.paper-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.paper-item:hover {
  border-color: #D1D5DB;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  color: var(--link);
}

.paper-item svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.paper-item span {
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer-links a:hover { color: var(--text-secondary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-close {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    background: var(--bg-white);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
    z-index: 200;
  }

  .nav.open { right: 0; }
  .nav a { font-size: 1rem; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .researchers-grid {
    grid-template-columns: 1fr;
  }

  .paper-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .paper-arrow {
    transform: rotate(90deg);
    margin: 0 auto;
  }

  .hero { padding: 3.5rem 0 2.5rem; }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }

  /* Countdown mobile */
  .countdown-section {
    padding: 3rem 0;
  }

  .countdown-section .container {
    padding: 0 1.5rem;
  }

  .countdown {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .countdown-num {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }

  .countdown-label {
    font-size: 0.55rem;
    margin-right: 0.75rem;
  }

  .countdown-sep {
    font-size: clamp(1.5rem, 8vw, 2.5rem);
    margin: 0 0.1rem;
  }

  /* Upload */
  .code-form {
    max-width: 100%;
  }

  .upload-area {
    padding: 1.5rem 1rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
