/* ---------- Reset & base ---------- */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fafaf7;
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

/* ---------- Header ---------- */

.site-header {
  margin-bottom: 4rem;
}

.site-name {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.site-nav a {
  color: #666;
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-home svg {
  display: block;
}

.site-nav a:hover {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

/* ---------- Intro ---------- */

.intro {
  margin-bottom: 4rem;
  max-width: 520px;
}

.intro h1 {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.intro p {
  color: #555;
}

/* ---------- Section headings ---------- */

section h2 {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

section {
  margin-bottom: 3rem;
}

/* ---------- About / Headshot ---------- */

.about {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.headshot-wrapper {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.headshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  transform: scale(1.7) translateX(6%);
}

.about-text h1 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.about-text p {
  color: #555;
}

@media (max-width: 520px) {
  .about {
    flex-direction: column;
  }
}

/* ---------- Contact page ---------- */

.contact-section h2 {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.contact-intro {
  font-size: 14px;
  color: #555;
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  border-top: 1px solid #e5e3dd;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e3dd;
  text-decoration: none;
  color: #1a1a1a;
  transition: color 0.15s;
}

.contact-item:hover {
  color: #666;
}

.contact-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 14px;
  font-weight: 500;
}

.contact-label svg {
  flex-shrink: 0;
  color: #888;
  transition: color 0.15s;
}

.contact-item:hover .contact-label svg {
  color: #555;
}

.contact-value {
  font-size: 13px;
  color: #999;
  transition: color 0.15s;
}

.contact-item:hover .contact-value {
  color: #666;
}

.contact-arrow {
  margin-left: 3px;
}

/* ---------- Writing list ---------- */

.post-list {
  list-style: none;
  border-top: 1px solid #e5e3dd;
}

.post-list li {
  border-bottom: 1px solid #e5e3dd;
}

.post-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.15s;
}

.post-list a:hover {
  color: #666;
}

.post-date {
  font-size: 13px;
  color: #999;
}

/* ---------- Projects page ---------- */

.projects-section h2 {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  display: block;
  padding: 1.25rem 1.5rem;
  border: 1px solid #e5e3dd;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fafaf7;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  background: #f0ede6;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.project-card-header h3 {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
}

.project-arrow {
  font-size: 16px;
  color: #aaa;
  transition: color 0.2s, transform 0.2s;
}

.project-card:hover .project-arrow {
  color: #1a1a1a;
  transform: translate(2px, -2px);
}

.project-card p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-date {
  font-size: 12px !important;
  color: #999 !important;
  margin-bottom: 0.5rem !important;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid #dedad3;
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
  color: #555;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  cursor: default;
}

.tech-tag:hover {
  background: #fffefb;
  border-color: #b8b3a8;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

.tech-tag img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

/* ---------- Projects ---------- */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.project-grid h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.project-grid p {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* ---------- Photo gallery ---------- */

.photo-gallery h2 {
  font-size: 13px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  background: #e5e3dd;
  display: block;
  transition: opacity 0.2s;
}

.gallery-item img:hover {
  opacity: 0.85;
}

.gallery-item figcaption {
  font-size: 12px;
  color: #999;
  text-align: center;
  line-height: 1.4;
}

@media (max-width: 520px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e3dd;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #999;
}

.site-footer a {
  color: #999;
  text-decoration: none;
}

.site-footer a:hover {
  color: #1a1a1a;
}

/* ---------- Mobile ---------- */

@media (max-width: 520px) {
  body {
    padding: 2rem 1.25rem;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}