@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

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

:root {
  --ink:    #1a1a2e;
  --accent: #1e5f74;
  --light:  #3a8fa3;
  --muted:  #6a7a80;
  --bg:     linear-gradient(170deg, #fbfaf6 0%, #eef0ea 45%, #ccddd8 100%);
  --card:   rgba(255,255,255,0.5);
  --border: rgba(30,95,116,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── Accessibility ── */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto;
  padding: 0.5rem 1rem; background: var(--accent); color: #fff; z-index: 100;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-logo {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── Main ── */
main { flex: 1; }

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  gap: 1.2rem;
}

.hero-wordmark {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
}

.hero-wordmark em {
  font-style: italic;
  color: var(--accent);
}

.hero-bar {
  width: 120px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--light));
  margin: 0.2rem 0;
}

.tagline {
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--muted);
  font-weight: 300;
  max-width: 560px;
  line-height: 1.65;
}

.feedback-note {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 400;
  margin-top: 0.2rem;
}

/* ── CTA ── */
.cta {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: var(--accent);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(30,95,116,0.25);
}
.cta:hover {
  background: #2a7a94;
  box-shadow: 0 4px 20px rgba(30,95,116,0.35);
}

/* ── Projects grid ── */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.project {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  backdrop-filter: blur(8px);
  transition: box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.project:hover {
  box-shadow: 0 4px 24px rgba(30,95,116,0.12);
}

.project-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--light);
  text-transform: uppercase;
}

.project h3 {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
}

.project p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.project-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.project-link:hover { text-decoration: underline; }

.project-dev {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ── Prose pages ── */
.prose-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.prose-page h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.prose-page .page-bar {
  width: 180px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--light));
  border-radius: 2px;
  margin-bottom: 2rem;
}

.prose-page .lead {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.prose-page h2 {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2.2rem 0 0.6rem;
}

.prose-page p {
  font-size: 0.95rem;
  color: #4a5560;
  line-height: 1.8;
  margin-bottom: 0.75rem;
  font-weight: 300;
}

.prose-page a { color: var(--accent); }
.prose-page a:hover { text-decoration: underline; }

.cta-block { margin-top: 2.5rem; }

/* ── Contact page ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 300;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,95,116,0.08);
}

.contact-alt {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1.5rem;
  font-weight: 300;
}
.contact-alt a { color: var(--accent); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.73rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,0.25);
  font-weight: 300;
  letter-spacing: 0.02em;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 520px) {
  nav { padding: 1rem 1.25rem; }
  .nav-links { gap: 1.2rem; }
  .hero { padding: 4rem 1rem 3rem; }
  .hero-wordmark { white-space: normal; }
  .prose-page { padding: 3.5rem 1.25rem 4rem; }
}
