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

:root {
  --bg: #ffffff;
  --bg-2: #f7f5f2;
  --text: #111111;
  --muted: #777;
  --accent: #ff3115;
  --accent-hover: #e51d00;
  --accent-soft: #ffe1db;
  --border: rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Archivo', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.5;
  font-weight: 500;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== HEADER (тонкий) ===== */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 12px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s ease;
}

header.scrolled { padding: 8px 60px; }

.logo {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.3px;
  text-transform: uppercase;
}
.logo .italic {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 900;
  color: var(--accent);
}

nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}
nav a {
  font-size: 13px;
  font-weight: 700;
  position: relative;
  transition: color 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
nav a:hover { color: var(--accent); }
nav a:hover::after { width: 100%; }

.btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}
.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,49,21,0.35);
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-outline:hover {
  background: var(--text);
  color: #fff;
  box-shadow: none;
}
.btn-large {
  padding: 18px 42px;
  font-size: 14px;
}

/* ===== HERO ===== */
.hero {
  min-height: 92vh;
  padding: 140px 60px 80px;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: -10%; right: -5%;
  width: 650px; height: 650px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  will-change: transform;
}
.hero-bg-2 {
  position: absolute;
  bottom: -20%; left: -10%;
  width: 550px; height: 550px;
  background: radial-gradient(circle, #ffd0c5 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  opacity: 0.7;
  will-change: transform;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 36px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.hero-tag::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.hero h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(70px, 12vw, 200px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.05em;
  margin-bottom: 20px;
}
.hero h1 .italic {
  font-style: italic;
  font-weight: 900;
  color: var(--accent);
}
.hero h1 .outline {
  -webkit-text-stroke: 3px var(--text);
  color: transparent;
  font-weight: 900;
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 60px;
  flex-wrap: wrap;
  gap: 40px;
}
.hero-desc {
  max-width: 480px;
  font-size: 17px;
  color: #333;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== SECTIONS ===== */
section.block {
  padding: 120px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 30px;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(46px, 6vw, 84px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.section-title .italic {
  font-style: italic;
  font-weight: 900;
  color: var(--accent);
}
.section-subtitle {
  color: #333;
  max-width: 380px;
  font-size: 16px;
  line-height: 1.6;
}

/* ===== CARDS КОНКУРСЫ ===== */
.contest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}
.contest-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}
.contest-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}
.contest-cover {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  position: relative;
  overflow: hidden;
}
.contest-cover img {
  width: 100%; height: 100%; object-fit: cover;
}
.contest-cover .cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 64px;
}
.contest-status {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--accent);
}
.contest-status.archive { color: var(--muted); }
.contest-body { padding: 24px 26px 28px; }
.contest-title {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.contest-dates {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.contest-dates b { color: var(--text); font-weight: 700; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 17px;
}

/* ===== CONTEST DETAIL ===== */
.detail-hero {
  padding: 140px 60px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.detail-back {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 24px;
  display: inline-block;
}
.detail-back:hover { color: var(--accent); }
.detail-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(48px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
}
.detail-cover {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 40px;
}
.detail-desc { font-size: 17px; line-height: 1.7; color: #333; max-width: 800px; }

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 50px 0 40px;
}
.timeline-item {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 22px 24px;
}
.timeline-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px;
}
.timeline-value {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 900;
}

/* ===== RATING TABLE ===== */
.rating-section { padding: 60px 60px 120px; max-width: 1400px; margin: 0 auto; }
.rating-section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}
.rating-section h2 .italic { font-style: italic; color: var(--accent); }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.work-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.10);
}
.work-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-2);
}
.work-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.work-rank {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.work-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.work-author { font-size: 13px; color: var(--muted); }
.work-stats {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.work-score {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
}
.work-score-suffix { font-size: 13px; color: var(--muted); font-weight: 600; }
.work-votes { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

.vote-bar {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.vote-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 100px;
  width: 38px; height: 38px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: var(--text);
}
.vote-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.vote-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.your-score {
  display: inline-block;
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* ===== FORMS ===== */
.form-page {
  max-width: 540px;
  margin: 0 auto;
  padding: 160px 30px 120px;
}
.form-page h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
}
.form-page .helptext, .form-page small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.form-page ul.errorlist {
  list-style: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.form-aside {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.form-aside a { color: var(--accent); font-weight: 700; }

/* ===== MESSAGE ===== */
.message-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160px 30px 80px;
}
.message-page p {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 700px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--text);
  color: var(--bg);
  padding: 80px 60px 40px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand {
  font-family: 'Fraunces', serif;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  line-height: 0.95;
}
.footer-brand .italic { font-style: italic; color: var(--accent); font-weight: 900; }
footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
  color: var(--accent);
  font-weight: 800;
}
footer ul { list-style: none; }
footer ul li { margin-bottom: 12px; }
footer ul a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}
footer ul a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-stagger.visible > * { opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  header, .hero, section.block, footer, .detail-hero, .rating-section {
    padding-left: 24px; padding-right: 24px;
  }
  nav ul { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .hero { padding-top: 120px; min-height: auto; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  header { padding: 10px 20px; }
  .btn { padding: 9px 16px; font-size: 11px; }
}

/* ===== PROFILE ===== */
.profile-hero {
  position: relative;
  overflow: hidden;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

.profile-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 64px;
  flex-shrink: 0;
  box-shadow: 0 20px 50px rgba(255,49,21,0.25);
}

.profile-info { flex: 1; min-width: 0; }

.profile-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.profile-name {
  font-family: 'Fraunces', serif;
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  word-break: break-word;
}

.profile-username {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 20px;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: var(--bg-2);
  border-radius: 14px;
  padding: 28px 26px;
  transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-4px); }

.stat-card-accent {
  background: var(--text);
  color: #fff;
}
.stat-card-accent .stat-label { color: rgba(255,255,255,0.6); }

.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 54px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.stat-card-accent .stat-value { color: var(--accent); }

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
}

/* === Best work === */
.best-work {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  background: var(--bg-2);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.best-work:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(0,0,0,0.15);
}
.best-work-img {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: cover;
}
.best-work-body {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.best-work-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}

.work-card-link { text-decoration: none; color: inherit; }

@media (max-width: 700px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 22px;
  }
  .profile-avatar {
    width: 110px; height: 110px; font-size: 48px;
  }
  .best-work { grid-template-columns: 1fr; }
  .best-work-body { padding: 30px 24px; }
}