:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1c1917;
  --text-muted: #6b6560;
  --accent: #bc6243;
  --accent-dark: #9a4f36;
  --accent-soft: #f3e8e2;
  --border: #e8e2db;
  --nav-bg: rgba(250, 248, 245, 0.92);
  --shadow: 0 1px 3px rgba(28, 25, 23, 0.06), 0 8px 24px rgba(28, 25, 23, 0.06);
  --radius: 12px;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--accent-dark);
}

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Nav */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.site-nav .brand {
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-nav .brand:hover {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle svg {
  display: block;
}

.site-nav .brand {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 640px) {
  .site-nav .container {
    position: relative;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .nav-toggle:active {
    background: var(--accent-soft);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0 0.75rem;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links a:active {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }
}

/* Hero */

.hero {
  padding: 7rem 0 5rem;
  text-align: center;
}

.hero-photo {
  width: 9rem;
  height: 9rem;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero .tagline {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6875rem 1.375rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* Sections */

section {
  padding: 4.5rem 0;
}

.section-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

section h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

#projects .section-label {
  margin-bottom: 1.75rem;
}

.about p {
  margin: 0;
  max-width: 42rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.about p + p {
  margin-top: 1rem;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.08), 0 16px 32px rgba(28, 25, 23, 0.08);
}

.project-card-link {
  display: block;
  color: inherit;
}

.project-card-link:hover {
  color: inherit;
}

.project-card-visual {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-card-body {
  padding: 1.25rem 1.375rem 1.5rem;
}

.project-card-body h3 {
  margin: 0 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-card-body p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Contact */

.contact {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.contact-intro {
  margin: -0.75rem 0 1.75rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6875rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  background: var(--bg);
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .contact-links a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
  }
}

.contact-links a:active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.contact-links a:focus {
  outline: none;
}

.contact-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.contact-links svg {
  flex-shrink: 0;
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
