/* ---------- Reset / defaults ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f8f8f6;
  --text: #202020;
  --text-secondary: #666666;
  --accent: #315c4c;
  --border: #dddddd;
  --card-bg: #ffffff;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text);
  max-width: 65ch;
}

/* ---------- Layout helpers ---------- */
.section {
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.section-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.navbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
}

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

.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  max-width: 480px;
}

.hero-eyebrow {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.hero-text h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero-sub {
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
}

.hero-photo {
  flex-shrink: 0;
}

.photo-frame {
  width: 220px;
  height: 260px;
  background-color: #eceae5;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background-color 0.15s ease;
}

.btn:hover {
  background-color: #274a3d;
}

/* ---------- About ---------- */
#about p {
  margin-bottom: 1rem;
}

.learning-box {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.learning-box ul li {
  padding: 0.2rem 0;
  color: var(--text-secondary);
}

/* ---------- Portfolio ---------- */
.filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-image {
  height: 140px;
  background-color: #eceae5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 1.1rem 1.2rem 1.3rem;
}

.project-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.tags span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
}

.project-link {
  font-size: 0.88rem;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---------- Contact ---------- */
#contact p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.contact-links a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer p {
  margin: 0 auto 0.3rem;
  color: var(--text-secondary);
}

.footer-links {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.footer-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    display: none;
  }

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

  .menu-toggle {
    display: block;
  }

  .hero {
    flex-direction: column-reverse;
    text-align: left;
    padding-top: 3rem;
  }

  .hero-text {
    max-width: 100%;
  }

  .photo-frame {
    width: 160px;
    height: 190px;
  }
}
