:root {
  --background: #fcfaf7;
  --surface: #ffffff;
  --surface-alt: #f3eee7;
  --text: #1f1f1f;
  --muted: #5f5a54;
  --line: #ddd3c6;
  --accent: #5d7a6f;
  --accent-dark: #496156;
  --shadow: 0 18px 45px rgba(39, 31, 23, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(92%, var(--container));
  margin: 0 auto;
}

.section {
  padding: 5.5rem 0;
}

.alt-section {
  background: var(--surface-alt);
}

.section-label,
.eyebrow,
.project-type,
.timeline-meta,
.card-tag {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-dark);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 1.2rem;
  max-width: 12ch;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 0;
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(252, 250, 247, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(221, 211, 198, 0.75);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  font-size: 0.96rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--text);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 999px;
}

.hero {
  padding: 6.5rem 0 5rem;
}

.hero-grid,
.section-grid,
.contact-wrapper,
.skills-grid {
  display: grid;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.hero-description {
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.95rem 1.45rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus {
  transform: translateY(-2px);
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--accent-dark);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-highlights li,
.tag-list li {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-card,
.card,
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.25rem;
}

.portrait-placeholder {
  width: 100%;
  height: 350px; /* adjust if you want taller */
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* KEY: prevents stretching */
  display: block;
}

.hero-card-content p {
  margin-bottom: 0;
}

.two-column {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.three-column {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.project-card {
  padding: 1.75rem;
}

.featured-card {
  border-color: rgba(93, 122, 111, 0.4);
}

.card-tag {
  display: inline-block;
  margin-bottom: 0.9rem;
}

.projects-list {
  display: grid;
  gap: 1.5rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-link {
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.skills-grid {
  grid-template-columns: repeat(2, 1fr);
}

.skills-column ul li,
.contact-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.skills-column ul li:last-child,
.contact-list li:last-child {
  border-bottom: 0;
}

.timeline {
  display: grid;
  gap: 1.5rem;
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-top: 1rem;
  margin-bottom: 0;
}

.contact-wrapper {
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
}

.contact-btn {
  margin-top: 1.25rem;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-content p,
.footer-content a {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .two-column,
  .contact-wrapper,
  .skills-grid,
  .three-column {
    grid-template-columns: 1fr;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0 1.25rem 1rem;
    display: none;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-top: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .project-header,
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 4.5rem 0;
  }

  .hero {
    padding-top: 5rem;
  }

  .card,
  .project-card,
  .hero-card {
    padding: 1.3rem;
  }

  .hero-highlights,
  .tag-list,
  .hero-buttons {
    gap: 0.7rem;
  }
}
