:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --text: #231f20;
  --text-muted: #5b6066;
  --accent: #ee0949;
  --accent-2: #ad0536;
  --border: #e3e6e9;
  --shadow: 0 10px 30px rgba(35, 31, 32, 0.07);
  --radius: 16px;
  --hero-from: #8c0631;
  --hero-to: #440217;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120608;
    --surface: #1d0e11;
    --text: #f5eef0;
    --text-muted: #ac9ea2;
    --accent: #ff2f63;
    --accent-2: #ff6b8f;
    --border: #3a1e23;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --hero-from: #530a24;
    --hero-to: #200510;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  padding: 64px 20px 100px;
  color: #fff;
}

.hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.hero-text {
  flex: 1;
  min-width: 240px;
}

.hero-text h1 {
  margin: 0 0 4px;
  font-size: 2.1rem;
  font-weight: 700;
}

.role {
  font-size: 1.1rem;
  font-weight: 500;
  opacity: 0.92;
  margin: 0 0 10px;
}

.meta {
  font-size: 0.92rem;
  opacity: 0.85;
  margin: 0 0 18px;
}

.about {
  max-width: 560px;
  font-size: 0.98rem;
  opacity: 0.95;
  margin: 0 0 18px;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.contact-icon:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
  color: #fff;
}

/* Content cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.card + .card {
  margin-top: 24px;
}

.card h2 {
  font-size: 1.25rem;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card h2 i {
  color: var(--accent);
  font-size: 1.05rem;
}

/* Skills */
.skills {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-period {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding-top: 2px;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.98rem;
}

.timeline-place {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

.timeline-item.is-current .timeline-period {
  color: var(--accent);
}

/* Projects */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.project-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: auto;
  padding-top: 10px;
}

/* Footer */
.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 30px 20px 0;
}

@media (max-width: 600px) {
  .hero {
    padding: 48px 16px 90px;
    text-align: center;
  }
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .contacts {
    justify-content: center;
  }
  .card {
    padding: 22px 18px;
    margin-top: -40px;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
