/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

a { color: #c36; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }

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

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -40px; left: 0; background: #1a1a1a; color: #fff;
  padding: 8px 16px; z-index: 100; font-size: 14px;
}
.skip-link:focus { top: 0; }

/* ===== LAYOUT ===== */
.page-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===== HEADER ===== */
.site-header {
  border-bottom: 1px solid #eee;
  padding: 0 24px;
}
.header-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}
.site-title {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #c36;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.site-title:hover { text-decoration: none; color: #a22; }
.site-nav { display: flex; align-items: center; gap: 24px; }
.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: #555;
}
.nav-link:hover { color: #1a1a1a; text-decoration: none; }
.nav-link.active { color: #1a1a1a; }
.nav-resume {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #c36;
  padding: 6px 14px;
  border-radius: 4px;
}
.nav-resume:hover { background: #a22; text-decoration: none; }

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid #eee;
  padding: 32px 24px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 700px;
  margin: 0 auto;
}
.footer-links { display: flex; gap: 24px; }
.footer-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
}
.footer-link:hover { color: #1a1a1a; text-decoration: none; }
.footer-link svg { flex-shrink: 0; }

/* ===== BIO ===== */
.bio {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 48px;
}
.bio-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.bio-text p {
  font-size: 17px;
  line-height: 1.6;
  color: #1a1a1a;
  margin-bottom: 16px;
}
.bio-text p:last-child { margin-bottom: 0; }

/* ===== SELECTED WORK ===== */
.selected-work { margin-bottom: 48px; }
.selected-work h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-bottom: 16px;
}
.project-list { list-style: none; }
.project-item { border-bottom: 1px solid #eee; }
.project-item:first-child { border-top: 1px solid #eee; }
.project-trigger {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.project-trigger:hover .project-name { color: #c36; }
.project-name {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  transition: color 0.15s;
}
.project-meta {
  font-size: 15px;
  color: #777;
}

/* ===== PROJECT MODAL (desktop) ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 12px; max-width: 560px; width: 100%;
  max-height: 85vh; overflow-y: auto; position: relative;
  padding: 32px; animation: modalIn 0.2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 28px; color: #999; cursor: pointer; padding: 4px;
}
.modal-close:hover { color: #1a1a1a; }
.modal-image {
  width: 100%; height: 280px; border-radius: 8px; margin-bottom: 20px;
  object-fit: contain;
}
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.modal-role { font-size: 15px; color: #777; margin-bottom: 16px; }
.modal-description { font-size: 16px; line-height: 1.6; margin-bottom: 16px; }
.modal-links { display: flex; gap: 12px; }
.modal-links a {
  font-size: 14px; font-weight: 600; color: #c36;
  padding: 6px 12px; border: 1px solid #c36; border-radius: 4px;
}
.modal-links a:hover { background: #c36; color: #fff; text-decoration: none; }
.modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.9); border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 28px; color: #333;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 1001; transition: background 0.15s;
}
.modal-nav:hover { background: #fff; color: #c36; }
.modal-prev { left: 12px; }
.modal-next { right: 12px; }

/* ===== DETAIL VIEW (mobile full-page) ===== */
.detail-view {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: #fff; overflow-y: auto; flex-direction: column;
}
.detail-view.active { display: flex; }
.detail-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid #eee;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.detail-back {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: #c36; font-weight: 700; padding: 0 4px;
}
.detail-title { font-size: 18px; font-weight: 700; }
.detail-body { padding: 24px 20px 40px; }
.detail-image {
  width: 100%; border-radius: 8px; margin-bottom: 20px;
  background: #f0f0f0; min-height: 200px; object-fit: cover;
}
.detail-role { font-size: 15px; color: #777; margin-bottom: 16px; }
.detail-description { font-size: 16px; line-height: 1.6; margin-bottom: 16px; }
.detail-links { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-links a {
  font-size: 14px; font-weight: 600; color: #c36;
  padding: 6px 12px; border: 1px solid #c36; border-radius: 4px;
}
.detail-links a:hover { background: #c36; color: #fff; text-decoration: none; }

/* ===== PAGE TITLES ===== */
.page-title { color: #c36; }
.post-header h1 { color: #c36; }

/* ===== BLOG INDEX ===== */
.post-list { list-style: none; }
.post-item { border-bottom: 1px solid #eee; padding: 20px 0; }
.post-item:first-child { border-top: 1px solid #eee; }
.post-link {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; text-decoration: none;
}
.post-title { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.post-link:hover .post-title { color: #c36; }
.post-date { font-size: 14px; color: #999; white-space: nowrap; }
.post-summary { font-size: 15px; color: #777; margin-top: 4px; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex; justify-content: space-between;
  margin-top: 32px; font-size: 15px;
}
.pagination-link { color: #c36; font-weight: 600; }

/* ===== BLOG POST ===== */
.post-header { margin-bottom: 32px; }
.post-header h1 { margin-bottom: 8px; }
.post-meta { font-size: 14px; color: #999; display: flex; gap: 16px; }
.reading-time::before { content: "\00b7"; margin-right: 16px; }
.post-body { margin-bottom: 48px; }
.post-body p { margin-bottom: 16px; }
.post-body h2 { margin-top: 32px; margin-bottom: 12px; }
.post-body h3 { margin-top: 24px; margin-bottom: 8px; }
.post-body ul, .post-body ol { margin-bottom: 16px; padding-left: 24px; }
.post-body li { margin-bottom: 4px; }
.post-body blockquote {
  border-left: 3px solid #c36; margin: 24px 0; padding: 0 20px;
  color: #555; font-style: italic;
}
.post-body code {
  background: #f5f5f5; padding: 2px 6px; border-radius: 3px;
  font-size: 15px;
}
.post-body pre {
  background: #f5f5f5; padding: 16px; border-radius: 6px;
  overflow-x: auto; margin-bottom: 16px;
}
.post-body pre code { background: none; padding: 0; }
.post-body img { border-radius: 8px; margin: 16px 0; }
.post-footer { border-top: 1px solid #eee; padding-top: 24px; }
.post-footer a { color: #c36; font-weight: 600; font-size: 15px; }

/* ===== 404 ===== */
.page-404 { padding-top: 80px; text-align: center; }
.page-404 h1 { margin-bottom: 12px; }
.page-404 p { font-size: 17px; color: #555; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-nav { gap: 16px; }
  .nav-link { font-size: 14px; }
  .nav-resume { font-size: 13px; padding: 5px 10px; }
  .page-content { padding: 24px 16px 60px; }
  .bio { flex-direction: column; align-items: center; text-align: center; }
  .bio-photo { width: 100px; height: 100px; }
  .post-link { flex-direction: column; gap: 2px; }
  .modal-overlay { display: none !important; }
}
@media (min-width: 769px) {
  .detail-view { display: none !important; }
}
@media (max-width: 480px) {
  .header-inner { height: 48px; }
  .site-title { font-size: 18px; }
  .site-nav { gap: 12px; }
  h1 { font-size: 24px; }
  .project-name { font-size: 15px; }
  .project-meta { font-size: 13px; }
}
