:root {
  /* Light theme (default) */
  --bg: #f8f9fa;
  --bg-alt: #ffffff;
  --text: #1a1a1a;
  --text-muted: #4a4a4a;
  --border: #e0e0e0;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --card-bg: #ffffff;
  --chip-bg: #f1f5f9;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-alt: #161616;
  --text: #e6e6e6;
  --text-muted: #a0a0a0;
  --border: #2a2a2a;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --card-bg: #161616;
  --chip-bg: #21262d;
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Theme toggle */
.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 100;
  transition: all 0.2s ease;
}

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

/* Typography */
h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.8rem 0 1rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.10rem;
  font-weight: 500;
  margin: 1.8rem 0 1rem;
  letter-spacing: -0.02em;
}

h4 {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.1rem;
  color: var(--text-muted);
}

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

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

/* Hero */
.hero {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.title {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

/* Skills */
.skills {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.5rem;
  margin: 1.2rem 0 0.5rem;
}

.skills dt {
  font-weight: 500;
  color: var(--text);
}

.skills dd {
  color: var(--text-muted);
}

/* Projects */
.project {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}

.project h4 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.project .meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.tech span {
  background: var(--chip-bg);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* Links list */
.links {
  list-style: none;
  margin-top: 0.8rem;
}

.links li {
  margin-bottom: 0.4rem;
}

/* Contact */
.contact {
  margin-top: 2.8rem;
/*
  padding-top: 1.5rem;
*/
  border-top: 1px solid var(--border);
}

.contact p {
  margin-bottom: 0.5rem;
}

footer {
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 600px) {
  .container {
    padding: 1.75rem 1.15rem 3rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .skills {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .skills dt {
    margin-top: 0.6rem;
  }
}
