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

body {
  margin: 0;
  background: #E2E2E2;
  color: #363537;
  font-family: Lato, 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

/* ── Nav ── */
nav {
  background: #fff;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  display: inline-block;
  padding: .85em 1em;
  color: #363537;
  text-decoration: none;
  font-size: .95rem;
}

nav a:hover { color: #00b5ad; }

/* ── Main container ── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* ── About ── */
#about {
  margin-bottom: 4rem;
}

details {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: .4rem;
  padding: .9rem 1.25rem;
}

details[open] { border-color: #00b5ad; }

summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  list-style: none;
  padding: .2rem 0;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }

summary::before {
  content: '▶ ';
  font-size: .7rem;
  color: #00b5ad;
  margin-right: .4rem;
}

details[open] summary::before { content: '▼ '; }

details p {
  font-size: 1.25rem;
  line-height: 1.65;
  margin: .9rem 0 .2rem;
}

/* ── Projects ── */
#projects { margin-bottom: 4rem; }

#projects h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

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

.card {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  min-height: 580px;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: .9rem 1.1rem;
  flex: 1;
}

.card-body h2 {
  font-size: 1.15rem;
  margin: .4rem 0 .2rem;
}

.card-body .subtitle {
  color: #999;
  font-size: .85rem;
  margin-bottom: .7rem;
}

.card-body p {
  font-size: .93rem;
  line-height: 1.55;
  margin: 0;
}

.card-actions {
  padding: .75rem 1rem;
  border-top: 1px solid #eee;
  display: flex;
  gap: .6rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: .55em 1.1em;
  background: #00b5ad;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: .88rem;
  font-weight: 700;
  transition: background .15s;
}

.btn:hover { background: #009c95; color: #fff; }

/* ── Contact ── */
#contact { margin-top: 2rem; }

#contact h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

#contact p {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 640px;
}
