/* ============================================
   RNDM Best Paper Award 2024 — Official Site
   Premium Design System
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colors */
  --accent-teal: #0d9488;
  --navy:       #0f1b2d;
  --navy-light: #1a2d4a;
  --navy-mid:   #2a4070;
  --gold:       #c8a45c;
  --gold-light: #e8d4a0;
  --gold-dark:  #a8863a;
  --cream:      #f8f6f1;
  --white:      #ffffff;
  --gray-50:    #f9fafb;
  --gray-100:   #f3f4f6;
  --gray-200:   #e5e7eb;
  --gray-300:   #d1d5db;
  --gray-400:   #9ca3af;
  --gray-500:   #6b7280;
  --gray-600:   #4b5563;
  --gray-700:   #374151;
  --gray-800:   #1f2937;
  --gray-900:   #111827;
  --red-accent: #b91c1c;
  --teal:       #0d9488;
  --teal-light: #99f6e4;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(15, 27, 45, 0.04);
  --shadow-md:  0 4px 12px rgba(15, 27, 45, 0.06), 0 1px 3px rgba(15, 27, 45, 0.04);
  --shadow-lg:  0 8px 30px rgba(15, 27, 45, 0.08), 0 2px 6px rgba(15, 27, 45, 0.04);
  --shadow-xl:  0 20px 50px rgba(15, 27, 45, 0.12), 0 4px 12px rgba(15, 27, 45, 0.06);
  --shadow-gold: 0 4px 20px rgba(200, 164, 92, 0.25);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--cream);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-mid); text-decoration: none; transition: color 0.2s var(--ease-out); }
a:hover { color: var(--gold-dark); }
::selection { background: var(--gold-light); color: var(--navy); }

/* ----- Container ----- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-title a { color: var(--white); display: flex; align-items: center; gap: 10px; }
.site-title a:hover { color: var(--gold-light); }
.site-title .accent { color: var(--gold); }
.site-title .separator { color: rgba(255,255,255,0.2); font-weight: 300; }
.site-title .year { color: var(--gold); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  color: rgba(255,255,255,0.7);
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s var(--ease-out);
  position: relative;
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.07); }
.main-nav a.active { color: var(--gold); background: rgba(200,164,92,0.1); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.2s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.1); }

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, #132340 40%, #1a2d4a 70%, #0f1b2d 100%);
  color: var(--white);
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(200,164,92,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(255,255,255,0.03) 0%, transparent 40%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 30%, var(--gold-light) 50%, var(--gold) 70%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200,164,92,0.15);
  border: 1px solid rgba(200,164,92,0.3);
  padding: 6px 18px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.hero h1 .highlight { color: var(--gold); }

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  max-width: 640px;
  margin: 0 auto var(--space-sm);
  font-weight: 300;
  line-height: 1.6;
}

.hero-meta {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  margin-top: var(--space-sm);
  letter-spacing: 0.02em;
}
.hero-meta span { display: inline-block; margin: 0 10px; }
.hero-meta .sep { color: rgba(255,255,255,0.2); }

/* ----- Award Banner Below Hero ----- */
.award-banner {
  background: linear-gradient(135deg, #fefcf5 0%, #faf6ec 100%);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-xl) 0;
}
.award-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  max-width: 960px;
  margin: 0 auto;
}
.award-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-gold);
}
.award-text h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.award-text p {
  color: var(--gray-500);
  font-size: 0.92rem;
}

/* ============================================
   LAYOUT: Content + Sidebar
   ============================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: var(--space-3xl) 0;
}
.main-content { min-width: 0; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { position: sticky; top: 92px; align-self: start; }

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  margin-bottom: var(--space-lg);
  overflow: hidden;
}

.sidebar-card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-card-header .icon { font-size: 1.1rem; }
.sidebar-card-header h3 {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
}

.sidebar-card-body { padding: 12px 20px 16px; }

/* News list */
.news-list { list-style: none; }
.news-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.news-list li:first-child { padding-top: 0; }
.news-list li:last-child { border-bottom: none; padding-bottom: 0; }

.news-list .date {
  font-size: 0.75rem;
  color: var(--gray-400);
  display: block;
  margin-bottom: 2px;
  font-weight: 500;
}
.news-list a {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--gray-700);
  transition: color 0.2s;
}
.news-list a:hover { color: var(--navy-mid); }

/* Quick facts */
.fact-list { list-style: none; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list .label {
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fact-list .value {
  color: var(--gray-700);
  font-weight: 500;
  text-align: right;
}

/* Links */
.link-list { list-style: none; }
.link-list li { margin-bottom: 6px; }
.link-list li:last-child { margin-bottom: 0; }
.link-list a {
  font-size: 0.85rem;
  color: var(--navy-mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link-list a:hover { color: var(--gold-dark); }
.link-list .arrow { color: var(--gold); font-size: 0.7rem; }

/* ============================================
   SECTIONS & CARDS
   ============================================ */
.section-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--navy);
  margin-bottom: var(--space-lg);
  line-height: 1.3;
}
.section-title .sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  padding: 32px;
  margin-bottom: var(--space-lg);
}

.content-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.4;
}
.content-card p { margin-bottom: 12px; color: var(--gray-600); }
.content-card p:last-child { margin-bottom: 0; }
.content-card ul, .content-card ol { margin: 0 0 12px 20px; color: var(--gray-600); }
.content-card li { margin-bottom: 6px; }

/* ============================================
   PAPER INFO CARD
   ============================================ */
.paper-card {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2d4a 100%);
  border-radius: var(--radius-lg);
  padding: 36px;
  color: var(--white);
  margin-bottom: var(--space-lg);
}
.paper-card .award-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}
.paper-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: var(--space-md);
  line-height: 1.35;
}
.paper-card .meta-line {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.paper-card .meta-line strong { color: var(--gold-light); font-weight: 600; }
.paper-card .btn-outline {
  display: inline-block;
  margin-top: var(--space-md);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
  padding: 8px 22px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
}
.paper-card .btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* Student paper card variant */
.card-student {
  background: linear-gradient(135deg, #0d3b3a 0%, #134e4a 100%);
}
.tag-student {
  background: var(--teal);
  color: var(--white);
}
.card-student .meta-line strong { color: var(--teal-light); }
.card-student .btn-outline:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* ============================================
   NEWS ARTICLE PAGE
   ============================================ */
.article-header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--gray-200);
}
.article-header .date {
  color: var(--gray-400);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-header .date::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
}
.article-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.article-body { line-height: 1.85; color: var(--gray-600); }
.article-body p { margin-bottom: var(--space-md); }
.article-body h2 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-size: 1.35rem;
  margin: 36px 0 var(--space-md);
}
.article-body h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin: 24px 0 12px;
}

/* Highlight box */
.highlight-box {
  background: #fefcf5;
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.highlight-box strong { color: var(--navy); font-weight: 600; }

/* Paper detail table */
.paper-details {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}
.paper-details .row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
}
.paper-details .row:last-child { border-bottom: none; }
.paper-details .row-label {
  flex: 0 0 130px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}
.paper-details .row-value {
  flex: 1;
  font-size: 0.9rem;
  color: var(--gray-700);
}

/* ============================================
   HISTORY TABLE
   ============================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--white);
}
.history-table thead { background: var(--navy); }
.history-table th {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  text-align: left;
}
.history-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
}
.history-table tbody tr:hover td { background: #faf8f4; }
.history-table .highlight-row td {
  background: #fefcf5;
  color: var(--navy);
  font-weight: 500;
  border-bottom-color: var(--gold);
}
.history-table .highlight-row td:first-child {
  border-left: 3px solid var(--gold);
}

/* ============================================
   PAGE CONTENT (About, Scope, History without sidebar)
   ============================================ */
.page-section {
  padding: var(--space-4xl) 0;
}
.page-section h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: var(--navy);
  margin-bottom: var(--space-lg);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.page-section .lead {
  font-size: 1.08rem;
  color: var(--gray-500);
  max-width: 720px;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}
.page-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 40px 0 16px;
}
.page-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin: 28px 0 10px;
}
.page-section p {
  color: var(--gray-600);
  margin-bottom: 14px;
  line-height: 1.75;
}
.page-section ul, .page-section ol {
  margin: 0 0 16px 20px;
  color: var(--gray-600);
}
.page-section li { margin-bottom: 6px; }

.page-nav {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: var(--space-lg);
}
.page-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-mid);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.page-nav a:hover { color: var(--gold-dark); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: var(--space-xl) 0;
  text-align: center;
  font-size: 0.82rem;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.site-footer strong { color: rgba(255,255,255,0.7); }
.site-footer a { color: var(--gold-light); }
.site-footer a:hover { color: var(--white); }
.site-footer p { margin-bottom: 2px; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: var(--space-lg);
}
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--navy-mid); }
.breadcrumb .current { color: var(--gray-600); font-weight: 500; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .content-layout { gap: 32px; }
}

@media (max-width: 768px) {
  .hero { padding: var(--space-2xl) 0 var(--space-xl); }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .sidebar { position: static; }

  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--shadow-xl);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 16px; border-radius: var(--radius-md); }
  .main-nav a.active::after { display: none; }
  .main-nav a.active { background: rgba(200,164,92,0.12); }

  .award-banner-inner { flex-direction: column; align-items: center; text-align: center; }

  .content-card { padding: 24px; }
  .paper-card { padding: 24px; }
  .paper-card h3 { font-size: 1.15rem; }

  .article-header h1 { font-size: 1.6rem; }
  .page-section h1 { font-size: 1.8rem; }

  .history-table { font-size: 0.78rem; }
  .history-table th,
  .history-table td { padding: 8px 10px; }

  .paper-details .row { flex-direction: column; gap: 2px; }
  .paper-details .row-label { flex: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.5rem; }
  .site-title { font-size: 0.95rem; }
  .content-card { padding: 20px; }
  .section-title { font-size: 1.35rem; }
}
