:root,
[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2129;
  --border: #2a313c;
  --text: #c9d1d9;
  --text-bright: #f0f3f6;
  --muted: #8b96a5;

  --accent: #e8a33d;
  --accent-bright: #f4b95c;

  --radius: 8px;
  --max-width: 880px;
  --nav-height: 64px;

  --font-heading: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

[data-theme="light"] {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-hover: #f0eee8;
  --border: #ddd8cd;
  --text: #33312c;
  --text-bright: #16150f;
  --muted: #6f6b60;

  --accent: #b8721f;
  --accent-bright: #96590f;
}

:root[data-accent="teal"] {
  --accent: #4fb8b0;
  --accent-bright: #6cd4cb;
}
[data-theme="light"][data-accent="teal"] {
  --accent: #1f8a82;
  --accent-bright: #146b64;
}

:root[data-accent="rose"] {
  --accent: #e07a8b;
  --accent-bright: #ec96a4;
}
[data-theme="light"][data-accent="rose"] {
  --accent: #c14b60;
  --accent-bright: #a03a4d;
}

:root[data-accent="violet"] {
  --accent: #a78bfa;
  --accent-bright: #c0acfd;
}
[data-theme="light"][data-accent="violet"] {
  --accent: #7c5cf0;
  --accent-bright: #6a49dd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

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

h1, h2, h3 { font-family: var(--font-heading); color: var(--text-bright); margin: 0; }

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type { border-bottom: none; }

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: block;
}

.section h2.section-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 32px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-bright);
}
.nav-name:hover { text-decoration: none; color: var(--accent-bright); }

.nav-links { display: flex; gap: 24px; flex: 1; }
.nav-links a {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
}
.nav-links a:hover { color: var(--text-bright); text-decoration: none; }

.nav-controls { display: flex; align-items: center; gap: 14px; }

.palette { display: flex; gap: 6px; }
.palette button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
}
.palette button:hover { border-color: var(--text-bright); }

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* About / hero */
.about-section {
  padding-top: 100px;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.about-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.about-text { flex: 1; min-width: 260px; }

.about-text .name {
  font-size: 2.6rem;
  font-weight: 600;
  font-style: italic;
}

.about-text .title {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  margin-top: 4px;
}

.about-text .tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 16px;
  max-width: 60ch;
}

.about-text .summary {
  margin-top: 16px;
  max-width: 65ch;
}

.about-links { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.about-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
}
.about-links a:hover { border-color: var(--accent); color: var(--accent-bright); text-decoration: none; }

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.skill-card h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
}

.skill-card p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

/* Experience */
.job {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.job:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.job-role { font-size: 1.25rem; font-weight: 600; }
.job-date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.job-meta { color: var(--accent); font-size: 14px; margin-bottom: 12px; }

.job ul { margin: 0; padding-left: 20px; }
.job li { margin-bottom: 8px; }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.project-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--border);
}

.project-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 1.05rem; margin-bottom: 8px; }
.project-body a { color: var(--text-bright); }
.project-body p { font-size: 14px; color: var(--muted); flex: 1; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.project-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Certifications */
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.cert-item { text-align: center; width: 110px; }
.cert-item img { max-width: 64px; max-height: 64px; object-fit: contain; margin-bottom: 8px; }
.cert-item span { display: block; font-size: 12px; color: var(--muted); }

/* Contact */
.contact-links { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.contact-links a { font-family: var(--font-mono); font-size: 15px; }

/* Footer */
.footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}
