/* Monochrome palette: blacks and greys only, with a light mode */
:root,
[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #262626;
  --border-strong: #3a3a3a;
  --text: #cfcfcf;
  --text-bright: #f5f5f5;
  --muted: #8a8a8a;

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

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f4f4f4;
  --border: #e4e4e4;
  --border-strong: #c8c8c8;
  --text: #3d3d3d;
  --text-bright: #0b0b0b;
  --muted: #737373;
}

* { 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.65;
  transition: background 0.2s ease, color 0.2s ease;
}

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

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; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.section h2.section-title {
  font-size: 2.1rem;
  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.2rem;
  color: var(--text-bright);
}
.nav-name:hover { text-decoration: none; }

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

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

.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(--border-strong); color: var(--text-bright); }
.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; }

.about-text .name {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.15;
}

.about-text .title { color: var(--muted); font-size: 1rem; margin: 8px 0 0; }

.tagline {
  margin: 22px 0 22px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text-bright);
}

.about-text .summary { margin: 0 0 14px; max-width: 66ch; }

.about-links { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.about-links a {
  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(--border-strong); color: var(--text-bright); text-decoration: none; }

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

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

.skill-card h3 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}

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

/* Expandable cards (experience and projects) */
.card-list { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.card:hover { border-color: var(--border-strong); }
.card[open] { border-color: var(--border-strong); }

.card-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  color: inherit;
}
.card-head::-webkit-details-marker { display: none; }
a.card-head:hover { text-decoration: none; }

.card-mark {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-bright);
}
.card-thumb { border-radius: 10px; overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); }
.card:hover .card-thumb img, .card[open] .card-thumb img { filter: none; }

.card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; color: var(--text-bright); }
.card-sub { font-size: 14px; color: var(--muted); }

.card-side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.card-date { font-size: 14px; color: var(--text); }
.card-length { font-size: 13px; color: var(--muted); }
.card-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-bright);
}
.card-toggle .when-open { display: none; }
.card[open] .card-toggle .when-open { display: inline; }
.card[open] .card-toggle .when-closed { display: none; }

.card-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 260px; }
.card-tags span {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.card-body {
  border-top: 1px solid var(--border);
  padding: 20px 22px 22px 92px;
  animation: card-open 0.2s ease;
}
@keyframes card-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.card-summary { margin: 0 0 4px; color: var(--text-bright); }
.card-meta { margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.card-points { margin: 0 0 18px; padding-left: 18px; }
.card-points li { margin-bottom: 8px; font-size: 15px; }
.card-points li::marker { color: var(--muted); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 14px;
}
.card-link:hover { background: var(--surface-hover); text-decoration: none; }

@media (max-width: 640px) {
  .card-head { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .card-side { width: 100%; align-items: flex-start; text-align: left; padding-left: 66px; }
  .card-tags { justify-content: flex-start; max-width: none; }
  .card-body { padding: 18px; }
}

/* 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-size: 15px; }

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