/* ===== CSS Variables ===== */
:root {
  --bg: #ffffff;
  --bg-card: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --border: #e5e5e7;
  --shadow: rgba(0, 0, 0, 0.06);
  --accent: #3a3a3c;
  --toggle-bg: #e5e5e7;
  --toggle-icon: #1d1d1f;
}

[data-theme="dark"] {
  --bg: #1a1a2e;
  --bg-card: #22223a;
  --text: #e8e8ed;
  --text-secondary: #a1a1a6;
  --border: #2c2c4a;
  --shadow: rgba(0, 0, 0, 0.2);
  --accent: #c7c7cc;
  --toggle-bg: #2c2c4a;
  --toggle-icon: #e8e8ed;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s ease;
}

a:hover {
  border-bottom-color: var(--text);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Layout ===== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header__controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: none;
}

.lang-switch:hover {
  color: var(--text);
}

.lang-switch--active {
  color: var(--text);
  font-weight: 600;
}

.lang-separator {
  color: var(--border);
  font-size: 0.875rem;
}

.theme-toggle {
  background: var(--toggle-bg);
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--toggle-icon);
  transition: background-color 0.3s ease;
}

.theme-toggle:hover {
  opacity: 0.8;
}

/* ===== Sections ===== */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

.section__title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.hero__photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  border: 3px solid var(--border);
}

.hero__name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero__tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ===== About ===== */
.about__text {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.8;
}

.about__text p {
  margin-bottom: 16px;
}

.about__text p:last-child {
  margin-bottom: 0;
}

/* ===== Skills ===== */
.skills__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ===== Contact ===== */
.contact__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.contact__link {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.contact__link:hover {
  border-bottom: none;
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

.contact__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  fill: var(--text-secondary);
  transition: fill 0.2s ease;
}

.contact__link:hover .contact__icon {
  fill: var(--text);
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero {
    padding: 40px 0 32px;
  }

  .hero__photo {
    width: 110px;
    height: 110px;
  }

  .hero__name {
    font-size: 1.5rem;
  }

  .hero__tagline {
    font-size: 1rem;
  }

  .section {
    padding: 32px 0;
  }

  .container {
    padding: 0 16px;
  }
}
