/* whitepapers.xyz - Elegant Scholarly Knowledge Curation */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter */

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

html{scroll-behavior:smooth}

body{
  font-family:'Inter',sans-serif;
  background-color:#1a1a2e;
  color:#f5f0e8;
  overflow-x:hidden;
  line-height:1.6;
}

/* Connection SVG Canvas */
.connection-canvas{
  position:fixed;
  top:0;left:0;
  width:100%;height:100%;
  pointer-events:none;
  z-index:1;
}
.connection-canvas path{
  fill:none;
  stroke:#e8b84b;
  stroke-width:1;
  opacity:0.15;
}

/* Header */
#site-header{
  position:fixed;
  top:0;left:0;right:0;
  z-index:100;
  background:rgba(26,26,46,0.95);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(232,184,75,0.15);
  padding:0 40px;
  transition:background 0.3s ease;
}
.header-inner{
  max-width:1400px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
}
.logo-group{
  display:flex;
  align-items:center;
  gap:12px;
}
.logo-text{
  font-size:1.4rem;
  font-weight:600;
  color:#f5f0e8;
  letter-spacing:-0.02em;
}
.logo-dot{
  color:#e8b84b;
}
.header-nav{
  display:flex;
  gap:8px;
}
.nav-link{
  color:#6c757d;
  text-decoration:none;
  font-size:0.875rem;
  font-weight:500;
  padding:8px 16px;
  border-radius:6px;
  transition:all 0.3s ease;
}
.nav-link:hover,.nav-link.active{
  color:#f5f0e8;
  background:rgba(232,184,75,0.1);
}
.nav-link.active{
  color:#e8b84b;
}
.header-search{
  position:relative;
}
.search-field{
  background:rgba(245,240,232,0.06);
  border:1px solid rgba(232,184,75,0.2);
  border-radius:8px;
  padding:8px 16px;
  color:#f5f0e8;
  font-family:'Inter',sans-serif;
  font-size:0.875rem;
  width:220px;
  transition:all 0.3s ease;
}
.search-field::placeholder{color:#6c757d}
.search-field:focus{
  outline:none;
  border-color:#e8b84b;
  background:rgba(245,240,232,0.1);
  width:280px;
}

/* Hero Section */
#hero{
  position:relative;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:120px 40px 80px;
  overflow:hidden;
}
.hero-nature-element{
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  opacity:0.08;
  pointer-events:none;
}
.hero-leaf-svg{
  width:400px;
  height:400px;
}
.hero-leaf-path,.hero-vein-path{
  stroke-dasharray:1000;
  stroke-dashoffset:1000;
  animation:pathDraw 3s ease forwards;
}
.hero-vein-path{animation-delay:1s}
@keyframes pathDraw{
  to{stroke-dashoffset:0}
}
.hero-content{
  position:relative;
  z-index:2;
}
.hero-title{
  font-size:3.5rem;
  font-weight:700;
  line-height:1.15;
  margin-bottom:24px;
  letter-spacing:-0.03em;
}
.gold-text{
  color:#e8b84b;
  display:inline-block;
}
.hero-subtitle{
  font-size:1.15rem;
  color:#6c757d;
  max-width:600px;
  margin:0 auto 48px;
  font-weight:300;
  line-height:1.7;
}
.hero-stats{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:40px;
}
.stat-item{
  display:flex;
  flex-direction:column;
  align-items:center;
}
.stat-number{
  font-size:2.5rem;
  font-weight:700;
  color:#e8b84b;
  line-height:1;
}
.stat-label{
  font-size:0.8rem;
  color:#6c757d;
  text-transform:uppercase;
  letter-spacing:0.1em;
  margin-top:8px;
  font-weight:500;
}
.stat-divider{
  width:1px;
  height:40px;
  background:linear-gradient(to bottom,transparent,#e8b84b,transparent);
  opacity:0.3;
}
.hero-gold-line{
  position:absolute;
  bottom:0;left:0;right:0;
  height:1px;
  background:linear-gradient(to right,transparent,#e8b84b,transparent);
  opacity:0.3;
}

/* Section Headers */
#featured{
  padding:80px 40px 20px;
}
.section-header{
  text-align:center;
  max-width:1400px;
  margin:0 auto;
}
.section-ornament{
  margin-bottom:16px;
  opacity:0.6;
}
.section-title{
  font-size:2rem;
  font-weight:600;
  letter-spacing:-0.02em;
  margin-bottom:8px;
}
.section-desc{
  color:#6c757d;
  font-size:1rem;
  font-weight:300;
}

/* Papers Grid - Masonry */
#papers-grid{
  padding:40px 40px 80px;
  position:relative;
  z-index:2;
}
.masonry-container{
  max-width:1400px;
  margin:0 auto;
  columns:3;
  column-gap:24px;
}

/* Paper Cards */
.paper-card{
  break-inside:avoid;
  background:rgba(245,240,232,0.04);
  border:1px solid rgba(232,184,75,0.1);
  border-radius:12px;
  padding:28px;
  margin-bottom:24px;
  position:relative;
  overflow:hidden;
  transition:all 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  cursor:pointer;
}
.paper-card:hover{
  transform:translateY(-4px);
  border-color:rgba(232,184,75,0.3);
  background:rgba(245,240,232,0.07);
  box-shadow:0 16px 48px rgba(0,0,0,0.3),0 0 0 1px rgba(232,184,75,0.1);
}
.paper-card.hidden{
  display:none;
}
.card-gold-accent{
  position:absolute;
  bottom:0;left:0;right:0;
  height:2px;
  background:linear-gradient(to right,transparent,#e8b84b,transparent);
  opacity:0;
  transition:opacity 0.4s ease;
}
.paper-card:hover .card-gold-accent{
  opacity:1;
}
.card-tag{
  display:inline-block;
  font-size:0.7rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:#e8b84b;
  background:rgba(232,184,75,0.1);
  padding:4px 10px;
  border-radius:4px;
  margin-bottom:14px;
}
.card-title{
  font-size:1.15rem;
  font-weight:600;
  line-height:1.35;
  margin-bottom:12px;
  color:#f5f0e8;
  letter-spacing:-0.01em;
}
.card-excerpt{
  font-size:0.875rem;
  color:#6c757d;
  line-height:1.65;
  margin-bottom:16px;
  font-weight:300;
}
.card-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  padding-top:12px;
  border-top:1px solid rgba(232,184,75,0.08);
}
.card-author{
  font-size:0.8rem;
  color:#4a90d9;
  font-weight:500;
}
.card-date{
  font-size:0.75rem;
  color:#6c757d;
}
.card-footer{
  display:flex;
  gap:16px;
}
.card-pages,.card-citations{
  font-size:0.7rem;
  color:#6c757d;
  font-weight:400;
}

/* Card sizes for masonry variation */
.card-large .card-title{font-size:1.3rem}
.card-large .card-excerpt{font-size:0.9rem}
.card-small .card-title{font-size:1rem}
.card-small .card-excerpt{font-size:0.8rem}

/* Newsletter */
#newsletter{
  padding:80px 40px;
  position:relative;
  z-index:2;
}
.newsletter-container{
  max-width:600px;
  margin:0 auto;
  text-align:center;
  background:rgba(245,240,232,0.03);
  border:1px solid rgba(232,184,75,0.15);
  border-radius:16px;
  padding:60px 40px;
  position:relative;
  overflow:hidden;
}
.newsletter-nature-motif{
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  opacity:0.05;
  pointer-events:none;
}
.newsletter-tree-svg{
  width:200px;
  height:200px;
}
.newsletter-title{
  font-size:1.75rem;
  font-weight:600;
  margin-bottom:12px;
  letter-spacing:-0.02em;
  position:relative;
}
.newsletter-desc{
  color:#6c757d;
  font-size:0.95rem;
  margin-bottom:32px;
  font-weight:300;
  position:relative;
}
.newsletter-form{
  display:flex;
  gap:12px;
  justify-content:center;
  position:relative;
}
.email-field{
  background:rgba(245,240,232,0.06);
  border:1px solid rgba(232,184,75,0.2);
  border-radius:8px;
  padding:12px 20px;
  color:#f5f0e8;
  font-family:'Inter',sans-serif;
  font-size:0.9rem;
  width:280px;
  transition:all 0.3s ease;
}
.email-field::placeholder{color:#6c757d}
.email-field:focus{
  outline:none;
  border-color:#e8b84b;
  background:rgba(245,240,232,0.1);
}
.subscribe-button{
  background:linear-gradient(135deg,#e8b84b,#d4a03a);
  color:#1a1a2e;
  border:none;
  border-radius:8px;
  padding:12px 28px;
  font-family:'Inter',sans-serif;
  font-size:0.9rem;
  font-weight:600;
  cursor:pointer;
  transition:all 0.3s ease;
}
.subscribe-button:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(232,184,75,0.3);
}

/* Footer */
#site-footer{
  padding:60px 40px 30px;
  border-top:1px solid rgba(232,184,75,0.1);
  position:relative;
  z-index:2;
}
.footer-inner{
  max-width:1400px;
  margin:0 auto;
}
.footer-brand{
  margin-bottom:40px;
}
.footer-logo{
  font-size:1.3rem;
  font-weight:600;
  color:#f5f0e8;
}
.footer-tagline{
  color:#6c757d;
  font-size:0.85rem;
  margin-top:8px;
  font-weight:300;
}
.footer-links{
  display:flex;
  gap:80px;
  margin-bottom:40px;
}
.footer-col{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-heading{
  font-size:0.75rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.1em;
  color:#e8b84b;
  margin-bottom:4px;
}
.footer-link{
  color:#6c757d;
  text-decoration:none;
  font-size:0.85rem;
  transition:color 0.3s ease;
  font-weight:300;
}
.footer-link:hover{color:#f5f0e8}
.footer-bottom{
  padding-top:24px;
}
.footer-gold-line{
  height:1px;
  background:linear-gradient(to right,#e8b84b,transparent);
  opacity:0.2;
  margin-bottom:20px;
}
.footer-copy{
  font-size:0.75rem;
  color:#6c757d;
  font-weight:300;
}

/* Animations */
.paper-card{
  opacity:0;
  transform:translateY(30px);
}
.paper-card.visible{
  opacity:1;
  transform:translateY(0);
  transition:opacity 0.6s ease,transform 0.6s ease;
}
.hero-title,.hero-subtitle,.hero-stats{
  opacity:0;
  transform:translateY(20px);
}
.hero-title.visible,.hero-subtitle.visible,.hero-stats.visible{
  opacity:1;
  transform:translateY(0);
  transition:opacity 0.8s ease,transform 0.8s ease;
}

/* Responsive */
@media(max-width:1024px){
  .masonry-container{columns:2}
  .header-nav{display:none}
  .hero-title{font-size:2.5rem}
}
@media(max-width:640px){
  .masonry-container{columns:1}
  #site-header{padding:0 20px}
  #hero{padding:100px 20px 60px}
  .hero-title{font-size:2rem}
  .hero-stats{flex-direction:column;gap:20px}
  .stat-divider{width:40px;height:1px}
  #papers-grid{padding:20px}
  .newsletter-form{flex-direction:column;align-items:center}
  .email-field{width:100%}
  .footer-links{flex-direction:column;gap:30px}
}