:root {
  --bg: #0f1115;
  --text: #e6e6e6;
  --muted: #9aa0aa;
  --accent: #7c9aff;
  --card: #1a1d23;
}

[data-theme="light"] {
  --bg: #ffffff;
  --text: #111111;
  --muted: #5f6368;
  --accent: #4f6ef7;
  --card: #f5f5f5;
}

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

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

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

/* TOGGLE */
.theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
}

#toggle-theme {
  border: none;
  background: transparent;
  cursor: pointer;
}

.toggle-track {
  width: 52px;
  height: 26px;
  background: var(--card);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  position: relative;
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  z-index: 1;
}

.toggle-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--text);
  border-radius: 50%;
  left: 3px;
  transition: transform 0.25s ease, background 0.25s ease;
}

/* Move thumb in light mode */
[data-theme="light"] .toggle-thumb {
  transform: translateX(26px);
}

/* HERO */
.hero {
  margin-bottom: 2rem;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1.05rem;
}

/* FOCUS */
.focus {
  margin-bottom: 3rem;
}

/* WORK */
.work {
  margin-bottom: 3rem;
}

.work h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.work-item {
  margin-bottom: 1.2rem;
}

.work-item a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

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

.work-item p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* PORTAL */
.portal {
  display: grid;
  gap: 1.2rem;
}

.card {
  display: block;
  padding: 1.2rem;
  background: var(--card);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, background 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  background: #22252d;
}

.card h3 {
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* CONTACT */
.contact {
  margin-top: 3rem;
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.15s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.contact-item:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.contact-item svg {
  opacity: 0.85;
}

/* FOOTER */
footer {
  margin-top: 4rem;
  font-size: 0.9rem;
}

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

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