/* =========================================================
   Design variables – change these to switch color/feel
   ========================================================= */
:root {
  --accent: #2563eb;          /* accent color – swap for any color you like */
  --accent-hover: #1d4ed8;

  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --text: #1a1a1a;
  --text-muted: #5a5f6b;
  --border: #e3e5e9;

  --radius: 12px;
  --max-width: 880px;
  --space: clamp(2rem, 5vw, 4rem);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
}

/* Dark theme – automatically follows the system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --bg: #0f1115;
    --bg-alt: #171a21;
    --text: #e8eaed;
    --text-muted: #9aa0ac;
    --border: #262a33;
  }
}

/* =========================================================
   Base reset & typography
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* =========================================================
   Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav__brand { font-weight: 700; color: var(--text); }

.nav__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a { color: var(--text-muted); font-weight: 500; }
.nav__links a:hover { color: var(--accent); }

/* Hamburger menu – only shown on mobile */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform .25s, opacity .25s;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 78vh;
  display: flex;
  align-items: center;
}

.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 .5rem;
  letter-spacing: .02em;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  margin: 0 0 1rem;
  letter-spacing: -.01em;
}

.hero__pitch {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  max-width: 38ch;
  margin: 0 0 2rem;
}

/* =========================================================
   Sections
   ========================================================= */
.section {
  padding-block: var(--space);
  border-top: 1px solid var(--border);
}

.section__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 1.5rem;
  letter-spacing: -.01em;
}

.about p { max-width: 60ch; color: var(--text-muted); }
.about p:first-child { color: var(--text); }

/* =========================================================
   Skills
   ========================================================= */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-tag {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .45rem 1rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================================================
   Project cards
   ========================================================= */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -12px rgba(0,0,0,.25);
}

.card__title { margin: 0 0 .5rem; font-size: 1.2rem; }
.card__text { margin: 0 0 1rem; color: var(--text-muted); font-size: .98rem; }
.card__link { font-weight: 600; }
.card__link--placeholder {
  display: inline-block;
  color: var(--text-muted);
  font-weight: 600;
  font-style: italic;
  cursor: default;
}

/* =========================================================
   Contact
   ========================================================= */
.contact p { color: var(--text-muted); }

.contact__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}
.contact__links a { font-weight: 600; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-block;
  padding: .75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background .2s, transform .1s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--primary:active { transform: translateY(1px); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .9rem;
}

/* =========================================================
   Scroll animation (fade-in). Respects "reduce motion".
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 640px) {
  .nav__toggle { display: flex; }

  .nav__links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__links.is-open { max-height: 260px; }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }
}
