﻿:root {
  --bg: #ffffff;
  --text: #1b1f24;
  --muted: #5a6472;
  --accent: #2f5d8a;
  --border: #dde3ea;
  --card: #f8fafc;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #15181c;
  --text: #e4e7eb;
  --muted: #9aa5b3;
  --accent: #7fb1e3;
  --border: #2c333c;
  --card: #1c2026;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(960px, 92%);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
}

.nav-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
}

.theme-toggle {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

.theme-toggle .icon-moon,
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 400ms ease, color 400ms ease, border-color 400ms ease !important;
  transition-delay: 0s !important;
}

main {
  padding: 2rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.hero h1 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.hero .title {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.social-links {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.social-link {
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--bg);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.social-link svg {
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  fill: currentColor;
}

.hero img {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: block;
  margin-left: auto;
}

section {
  margin-bottom: 2.2rem;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3rem;
}

ul {
  padding-left: 1.2rem;
  margin: 0.4rem 0 0;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0.4rem 0 0.7rem;
  color: var(--muted);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.95rem;
}

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.pub-item:last-child {
  border-bottom: 0;
}

.pub-title {
  font-weight: 600;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  margin-left: 0.4rem;
  white-space: nowrap;
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.entry:last-child {
  border-bottom: 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.entry-title {
  font-weight: 600;
}

.numbered {
  counter-reset: entry;
}

.numbered .entry-title::before {
  counter-increment: entry;
  content: counter(entry) ". ";
}

.entry-date {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.entry-sub {
  color: var(--muted);
  margin-top: 0.15rem;
}

.entry-desc {
  margin-top: 0.35rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cv-frame {
  width: 100%;
  min-height: 70vh;
  border: 1px solid var(--border);
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    justify-content: flex-end;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero img {
    margin: 0;
    max-width: 220px;
  }
}

.course-list li {
  margin-bottom: 0.4rem;
}

.course-platform {
  color: var(--muted);
  font-size: 0.92rem;
}

.course-platform::before {
  content: " \00b7  ";
}

.course-group {
  margin-top: 0.9rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--border);
}

.group-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.course {
  margin-bottom: 0.7rem;
}

.course:last-child {
  margin-bottom: 0;
}

.course-name {
  font-weight: 600;
  font-size: 1rem;
}

.course-topics {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.1rem;
}

.entry .link-row {
  margin-top: 0.55rem;
}
