:root {
  --bg: #0c0b0f;
  --surface: #141318;
  --surface-2: #1c1b22;
  --line: rgba(255, 255, 255, 0.07);
  --text: #e8e6ed;
  --muted: #7a7585;
  --accent: #e06b4d;
  --accent-hover: #ec8064;
  --accent-soft: rgba(224, 107, 77, 0.12);
  --radius: 10px;
  --maxw: 940px;
  --shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(12, 11, 15, 0.8);
}

[data-theme="light"] {
  --bg: #f5f3f0;
  --surface: #ffffff;
  --surface-2: #eae7e3;
  --line: rgba(15, 12, 20, 0.09);
  --text: #1a1820;
  --muted: #6e6878;
  --accent: #c4553a;
  --accent-hover: #a9432b;
  --accent-soft: rgba(196, 85, 58, 0.1);
  --shadow: 0 10px 28px -14px rgba(20, 15, 30, 0.18);
  --header-bg: rgba(245, 243, 240, 0.82);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Alexandria', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(120%);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#nav-menu ul {
  display: flex;
  gap: 2px;
  list-style: none;
}

#nav-menu a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color 0.2s, background 0.2s;
}

#nav-menu a:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.nav-toggle,
.nav-toggle-label {
  display: none;
}

.hero {
  padding: 80px 0 56px;
}

.hero-inner {
  max-width: 640px;
}

.hero .role {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .about {
  color: var(--muted);
  font-size: 16px;
  max-width: 52ch;
  line-height: 1.8;
}

section {
  padding: 24px 0 64px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.skill-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.skill-item img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.skill-fallback {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.grid {
  display: grid;
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card-img {
  width: calc(100% + 40px);
  margin: -20px -20px 16px;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--surface-2);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.card .desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.65;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
  margin-bottom: 14px;
}

.chip {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip svg {
  width: 12px;
  height: 12px;
}

.actions {
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  transition: background 0.2s, border-color 0.2s;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: transparent;
}

.contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact .label {
  color: var(--muted);
  font-size: 14px;
}

.contact a {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  word-break: break-word;
  transition: color 0.2s;
}

.contact a:hover {
  color: var(--accent-hover);
}

.empty {
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0;
}

footer {
  padding: 36px 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
}

.admin-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.4;
  transition: opacity 0.2s;
}

.admin-link:hover {
  opacity: 1;
}

@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 100px 0 64px;
  }

  .container {
    padding: 0 32px;
  }
}

@media (max-width: 860px) {
  .nav-toggle-label {
    display: grid;
    place-items: center;
  }

  #nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  #nav-toggle:checked ~ #nav-menu {
    display: block;
  }

  #nav-menu ul {
    flex-direction: column;
    gap: 2px;
  }

  #nav-menu a {
    display: block;
  }
}

@media (max-width: 420px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding: 56px 0 40px;
  }

  section {
    padding: 16px 0 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
