:root {
  --bg: #0b0c10;
  --panel: #111218;
  --text: #e8eaf1;
  --muted: #a9b0c3;
  --brand: #5cc8ff;
  --brand-strong: #38b6ff;
  --border: #222432;
  --accent: #7ee787;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --panel: #f6f7fb;
    --text: #0f172a;
    --muted: #475569;
    --brand: #0ea5e9;
    --brand-strong: #0284c7;
    --border: #e2e8f0;
    --accent: #16a34a;
  }
}

/* Theme override when toggled */
html[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f6f7fb;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9;
  --brand-strong: #0284c7;
  --border: #e2e8f0;
  --accent: #16a34a;
}

html[data-theme="dark"] {
  --bg: #0b0c10;
  --panel: #111218;
  --text: #e8eaf1;
  --muted: #a9b0c3;
  --brand: #5cc8ff;
  --brand-strong: #38b6ff;
  --border: #222432;
  --accent: #7ee787;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu,
    Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 8px;
  padding: 8px 12px;
  background: var(--brand);
  color: white;
  border-radius: 8px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg), transparent 10%);
  backdrop-filter: saturate(140%) blur(8px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.brand-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
}

.nav-toggle {
  display: none;
}

.nav-list {
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-list a:hover,
.nav-list a:focus {
  color: var(--text);
  background: var(--panel);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}
.theme-toggle:hover {
  border-color: color-mix(in oklab, var(--brand), var(--border) 70%);
}

.hero {
  padding: 56px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 32px;
}

.hero-text h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  margin: 0 0 12px 0;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 20px 0;
}
.hero-cta {
  display: flex;
  gap: 12px;
}

.profile-circle {
  position: relative;
  width: 200px;
  aspect-ratio: 1/1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: radial-gradient(
      120px 120px at 30% 30%,
      color-mix(in oklab, var(--brand), transparent 70%),
      transparent
    ),
    var(--panel);
  display: grid;
  place-items: center;
  margin: 0 auto;
}
.profile-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.placeholder-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--muted);
  font-size: 48px;
}

.button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.05s ease-in-out, box-shadow 0.15s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}
.button:hover,
.button:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}
.button.primary {
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--brand), white 5%),
    var(--brand)
  );
  border-color: color-mix(in oklab, var(--brand-strong), var(--border) 40%);
  color: white;
}
.button.small {
  padding: 8px 10px;
  font-size: 14px;
  display: flex;
  flex: auto;
}

.section {
  padding: 56px 0;
}
.section.alt {
  background: color-mix(in oklab, var(--panel), transparent 40%);
}
.section h2 {
  margin: 0 0 16px 0;
  font-size: 26px;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 16px 0 0 0;
  padding: 0;
  list-style: "✓  ";
}
.highlights li {
  padding-left: 6px;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
}

.grid.projects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 {
  margin: 4px 0;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.card-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.contact-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list a {
  color: var(--brand);
  text-decoration: none;
}
.contact-list a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.back-to-top {
  color: var(--muted);
  text-decoration: none;
}
.back-to-top:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-cta {
    justify-content: center;
    flex-wrap: wrap;
  }
  .highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid.projects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .nav-toggle {
    display: inline-block;
  }
  .nav-list {
    display: none;
    position: absolute;
    right: 20px;
    top: 60px;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
  }
  .nav-list[aria-expanded="true"] {
    display: flex;
  }
  .highlights {
    grid-template-columns: 1fr;
  }
  .grid.projects {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    flex-direction: column;
    gap: 10px;
  }
}
