:root {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --text: #0f172a;
  --subtext: #475569;
  --accent: #2563eb;
  --border: #e2e8f0;
}

[data-theme='dark'] {
  --bg: #020617;
  --surface: #0b1228;
  --text: #e2e8f0;
  --subtext: #94a3b8;
  --accent: #60a5fa;
  --border: #334155;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.hero { text-align: center; padding: 4rem 1rem; background: #000; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: none; pointer-events: none; }
.profile-photo { width: 140px; height: 140px; object-fit: cover; border-radius: 50%; border: 3px solid rgba(255,255,255,0.85); margin-bottom: .8rem; display: inline-block; }
@media (max-width: 640px) {
  .profile-photo { width: 110px; height: 110px; }
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: 0; }
.hero p { margin-top: 1rem; max-width: 34rem; margin-left: auto; margin-right: auto; }
.tagline { font-weight: 600; }

.top-nav { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin: 1rem auto; max-width: 1000px; }
.top-nav a { color: var(--text); font-weight: 600; padding: .6rem 1rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.top-nav a:hover { background: rgba(37, 99, 235, .1); }

.content { width: min(92vw, 1000px); margin: 0 auto 2rem; padding: 1rem 0; display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08); }
.card h2 { margin-top: 0; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.skill-grid div { padding: .8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); }

@media (max-width: 600px) {
  .top-nav { border-radius: 12px; }
}

footer { text-align: center; padding: 1rem 0.25rem; color: var(--subtext); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: .56rem .9rem; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
button:hover { background: #eff6ff; border-color: #93c5fd; }
