/* Shared styles for index.html and resume.html */

:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --ink: #151c17;
  --ink-soft: #4a554d;
  --ink-faint: #6b756e;
  --line: #dde3de;
  --accent: #2c6a44;
  --accent-hover: #22553a;
  --accent-soft: #e3eee6;
  --on-accent: #f7faf8;
  --radius: 6px;
  --shadow: 0 1px 2px rgb(21 45 30 / .06), 0 8px 24px rgb(21 45 30 / .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111612;
    --surface: #171e19;
    --ink: #e8eee9;
    --ink-soft: #b3beb6;
    --ink-faint: #8f9b93;
    --line: #2a332d;
    --accent: #7cc49a;
    --accent-hover: #98d4b0;
    --accent-soft: #1d2c22;
    --on-accent: #0f1a13;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { margin: 0; color: var(--ink); font-weight: 600; }

h2 {
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p { margin: 0; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s cubic-bezier(.16, 1, .3, 1),
              border-color .2s cubic-bezier(.16, 1, .3, 1),
              color .2s cubic-bezier(.16, 1, .3, 1),
              transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }

.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover { color: var(--ink); }

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

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 14px;
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
