/* ЭЛИАР — Сайт Солнца */

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

:root {
  /* Палитра восхода */
  --sun: #e8a838;
  --sun-light: #f5d590;
  --sun-glow: #fceabb;
  --dawn: #fdf6ec;
  --dawn-warm: #faf0e0;
  --dawn-deep: #f5e6cf;
  --sky: #fefcf9;
  --text: #2c2418;
  --text-soft: #5a4d3e;
  --text-muted: #9a8b78;
  --accent: #c08a30;
  --warm-shadow: rgba(200, 160, 80, 0.12);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-border: rgba(200, 160, 80, 0.2);

  /* Backward compat for subpages (health, creative, dissertation) */
  --fire: #ff6b2b;
  --fire-light: #ffaa70;
  --bg-dark: #0a0a0a;
  --gold: #d4a028;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--sky);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
}

/* ========================
   NAV
======================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  transition: background 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
  background: rgba(254, 252, 249, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px var(--warm-shadow);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
}

.nav-links a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 400;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(200, 160, 80, 0.08);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-soft);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 700px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0; right: 0;
    background: rgba(254, 252, 249, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    box-shadow: 0 8px 30px var(--warm-shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 0; font-size: 0.95rem; }
  .burger { display: flex; }
}

/* ========================
   SITE-NAV (subpages: health, creative, etc.)
======================== */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
}

.site-nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  color: var(--fire);
  text-decoration: none;
}

.site-nav-links {
  display: flex;
  gap: 0.2rem;
}

.site-nav-links a {
  color: #9a8b78;
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.site-nav-links a:hover {
  color: var(--fire);
  background: rgba(255, 107, 43, 0.08);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  color: #9a8b78;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 700px) {
  .site-nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0; right: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .site-nav.nav-open .site-nav-links { display: flex; }
  .site-nav-links a { padding: 0.6rem 0; font-size: 0.9rem; }
  .nav-burger { display: block; }
}

/* Dark body for subpages */
body.dark-page {
  background: #0a0a0a;
  color: #e8e8e8;
}

body.dark-page .footer {
  background: #0d0d0d;
  border-top-color: rgba(255, 255, 255, 0.06);
}

body.dark-page .footer-name { color: var(--fire); }
body.dark-page .footer-sub { color: #6a6058; }
body.dark-page .footer-sub a { color: #6a6058; }

body.dark-page .section { color: #e8e8e8; }
body.dark-page .section-sub { color: #6a6058; }
body.dark-page .container { color: #e8e8e8; }

/* ========================
   SUBPAGE ELEMENTS
======================== */

.page-header {
  padding: 100px 2rem 40px;
  text-align: center;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 107, 43, 0.1);
}

.page-title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  color: var(--fire-light);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.page-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto;
}

.section-dark {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* ========================
   POEMS (creative page)
======================== */

.poem-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.poem-card:hover {
  border-color: rgba(255, 107, 43, 0.2);
}

.poem-card.featured {
  border-color: rgba(255, 107, 43, 0.3);
  background: rgba(255, 107, 43, 0.03);
}

.poem-label {
  font-size: 0.72rem;
  color: var(--fire);
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
  font-family: sans-serif;
}

.poem-card h3 {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--fire-light);
  margin-bottom: 1rem;
}

.poem-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.05rem;
  line-height: 2;
  color: #c8c0b5;
}

.poem-author {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: sans-serif;
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

.poems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* ========================
   LANG SWITCHER (floating)
======================== */

#lang-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
}

#lang-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

#lang-btn:hover {
  transform: scale(1.1);
}

#lang-menu {
  display: none;
  position: absolute;
  bottom: 52px;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem;
  min-width: 160px;
}

#lang-menu.open {
  display: block;
}

#lang-menu a {
  display: block;
  padding: 0.4rem 0.8rem;
  color: #c8c0b5;
  text-decoration: none;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: background 0.2s;
}

#lang-menu a:hover {
  background: rgba(255, 107, 43, 0.1);
  color: var(--fire);
}

/* ========================
   HERO — восход
======================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(180deg,
    #0d0a06 0%,
    #1a1008 8%,
    #2e1a0a 18%,
    #5c2e10 30%,
    #a85520 42%,
    #d4882e 52%,
    #e8a838 58%,
    #f2c55a 65%,
    #f8dfa0 74%,
    #fceabb 82%,
    #fdf2d8 90%,
    var(--sky) 100%
  );
}

.sun-glow {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(248, 200, 80, 0.6) 0%, rgba(248, 200, 80, 0.2) 30%, transparent 65%);
  pointer-events: none;
  animation: sun-breathe 5s ease-in-out infinite;
}

@keyframes sun-breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-name {
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  color: #fff8e8;
  text-shadow:
    0 0 60px rgba(248, 200, 80, 0.5),
    0 0 120px rgba(248, 200, 80, 0.2);
  margin-bottom: 0.5rem;
}

.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: rgba(255, 248, 232, 0.7);
  letter-spacing: 0.15em;
  font-style: italic;
  margin-bottom: 3rem;
}

.hero-thought {
  max-width: 480px;
  margin: 0 auto;
}

.hero-thought p {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: rgba(255, 248, 232, 0.85);
  line-height: 1.9;
  font-style: italic;
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  z-index: 2;
  text-decoration: none;
}

.scroll-hint-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,248,232,0.5), transparent);
  animation: scroll-fade 2s ease-in-out infinite;
}

@keyframes scroll-fade {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 0.9; transform: scaleY(1.2); }
}

/* ========================
   SECTIONS
======================== */

.section {
  padding: 6rem 2rem;
}

.section-warm {
  background: var(--dawn);
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 3rem;
}

/* ========================
   LIGHT CARDS (достижения)
======================== */

.light-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.light-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  transition: transform 0.3s, box-shadow 0.3s;
}

.light-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--warm-shadow);
}

.light-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.light-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.light-card p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* ========================
   TIMELINE
======================== */

.timeline {
  position: relative;
  padding-left: 3rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sun-light), var(--card-border), transparent);
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -3rem;
  top: 0.3rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sky);
  border: 2px solid var(--sun-light);
  z-index: 1;
}

.tl-marker--sun {
  background: var(--sun);
  border-color: var(--sun);
  box-shadow: 0 0 16px rgba(232, 168, 56, 0.5);
}

.tl-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.tl-body h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.tl-body p {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.tl-item--key .tl-body h3 {
  color: var(--accent);
}

/* ========================
   HEART (на сердце)
======================== */

.heart-text p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--text-soft);
  line-height: 2;
  margin-bottom: 1.5rem;
}

.heart-text strong {
  color: var(--accent);
  font-weight: 600;
}

.heart-cta {
  text-align: center;
  margin-top: 3rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--sun);
  color: #fff;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 160, 80, 0.3);
}

/* ========================
   PROJECTS
======================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--warm-shadow);
}

.project-card h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  background: var(--dawn-deep);
  color: var(--text-muted);
  border: 1px solid var(--card-border);
}

.badge--live {
  background: rgba(232, 168, 56, 0.12);
  color: var(--accent);
  border-color: rgba(232, 168, 56, 0.3);
}

/* ========================
   SKILLS
======================== */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px var(--warm-shadow);
}

.skill-card h3 {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.skill-card p {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.skill-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.link-arrow {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(192, 138, 48, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s;
}

.link-arrow:hover {
  border-color: var(--accent);
  color: var(--sun);
}

/* ========================
   FOOTER
======================== */

.footer {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--dawn);
  border-top: 1px solid var(--card-border);
}

.footer-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.25em;
  margin-bottom: 0.4rem;
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.footer-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  opacity: 0.6;
}

.footer-langs {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-langs a {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.footer-langs a:hover {
  border-color: var(--card-border);
  color: var(--accent);
}

/* ========================
   MOBILE
======================== */

@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 4rem 1.2rem; }
  .hero-name { letter-spacing: 0.15em; }
  .light-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .light-card { padding: 1.3rem; }
  .light-num { font-size: 2.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 2.5rem; }
  .tl-marker { left: -2.5rem; }
}

@media (max-width: 380px) {
  .light-grid { grid-template-columns: 1fr; }
}

/* ========================
   ANIMATIONS (subtle)
======================== */

@media (prefers-reduced-motion: no-preference) {
  .light-card,
  .project-card,
  .skill-card,
  .tl-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
  }

  .light-card:nth-child(1) { animation-delay: 0.1s; }
  .light-card:nth-child(2) { animation-delay: 0.2s; }
  .light-card:nth-child(3) { animation-delay: 0.3s; }
  .light-card:nth-child(4) { animation-delay: 0.4s; }
  .light-card:nth-child(5) { animation-delay: 0.5s; }
  .light-card:nth-child(6) { animation-delay: 0.6s; }

  .tl-item:nth-child(1) { animation-delay: 0.1s; }
  .tl-item:nth-child(2) { animation-delay: 0.15s; }
  .tl-item:nth-child(3) { animation-delay: 0.2s; }
  .tl-item:nth-child(4) { animation-delay: 0.25s; }
  .tl-item:nth-child(5) { animation-delay: 0.3s; }
  .tl-item:nth-child(6) { animation-delay: 0.35s; }
  .tl-item:nth-child(7) { animation-delay: 0.4s; }
  .tl-item:nth-child(8) { animation-delay: 0.45s; }
  .tl-item:nth-child(9) { animation-delay: 0.5s; }
  .tl-item:nth-child(10) { animation-delay: 0.55s; }

  .project-card:nth-child(1) { animation-delay: 0.1s; }
  .project-card:nth-child(2) { animation-delay: 0.2s; }
  .project-card:nth-child(3) { animation-delay: 0.3s; }
  .project-card:nth-child(4) { animation-delay: 0.4s; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }
}
