@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:      #faf6ef;
  --bg2:     #f3ede3;
  --border:  #e2d9cc;
  --text:    #1a1a1a;
  --muted:   #6b6560;
  --orange:  #e85d04;
  --orange2: #f48c06;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── NAV ── */
nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-text {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-logo span { color: var(--orange); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--text); background: var(--bg2); }
.nav-links a.active { color: var(--text); font-weight: 500; }

/* ── PAGE WRAPPER ── */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ── HERO ── */
.hero {
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--orange);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1.5px;
  background: var(--orange);
  border-radius: 2px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 28px;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
}

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── SECTIONS ── */
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── PROJECTS ── */
.projects-list { display: flex; flex-direction: column; gap: 1px; }

.project-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.project-row:first-child { border-top: 1px solid var(--border); }

.project-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.project-desc {
  font-size: 0.83rem;
  color: var(--muted);
}

.project-links-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--bg);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.pill:hover { border-color: var(--orange); color: var(--orange); background: #fff8f5; }
.pill.filled { background: var(--orange); color: #fff; border-color: var(--orange); }
.pill.filled:hover { background: #c94d00; border-color: #c94d00; }

/* ── WRITING ── */
.posts-list { display: flex; flex-direction: column; }

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 8px;
  margin: 4px 0;
}

.post-row-inner { 
  display: flex; 
  flex-direction: column;
  gap: 6px;
}

.post-row:first-child { border-top: 1px solid var(--border); }
.post-row:hover { background: var(--bg2); }
.post-row:hover .post-title { color: var(--orange); }

.post-category {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 6px;
  width: fit-content;
  border: 1px solid transparent;
}

.post-category.company {
  background: #fef3e2;
  color: #c94d00;
  border-color: #f5c17a;
}

.post-category.personal {
  background: #e8f3f8;
  color: #0066cc;
  border-color: #a5d8ff;
}

.post-category.learning {
  background: #f0e8f5;
  color: #6b4199;
  border-color: #d9b3ff;
}

.post-category.tip {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #9ccc65;
}

.post-title { font-size: 0.95rem; font-weight: 500; color: var(--text); transition: color 0.15s; }
.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--muted);
  margin-top: 4px;
}
.post-date { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.post-excerpt { font-size: 0.84rem; color: var(--muted); margin-top: 4px; line-height: 1.6; }

/* Post full view */
.post-full { display: none; }
.post-full.open { display: block; }
.post-list-view { display: block; }
.post-list-view.hidden { display: none; }

.post-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #2a2a2a;
  white-space: pre-wrap;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 0;
  border: none;
  background: none;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--orange); }

.post-heading {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin: 16px 0 8px;
}

/* ── EMPTY STATE ── */
.empty {
  padding: 48px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── CONTACT ── */
.contact-list { display: flex; flex-direction: column; }

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.contact-row:first-child { border-top: 1px solid var(--border); }

.contact-label { color: var(--muted); font-size: 0.82rem; }
.contact-value { color: var(--text); font-weight: 500; }
.contact-value a { color: var(--text); transition: color 0.15s; }
.contact-value a:hover { color: var(--orange); }

/* ── EXPERIENCE (on home) ── */
.exp-list { display: flex; flex-direction: column; margin-top: 40px; }

.exp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.exp-row:first-child { border-top: 1px solid var(--border); }

.exp-period { font-size: 0.78rem; color: var(--muted); padding-top: 3px; }
.exp-company { font-size: 0.78rem; font-weight: 500; color: var(--orange); margin-top: 4px; }

.exp-title { font-size: 0.95rem; font-weight: 500; margin-bottom: 10px; }

.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.exp-bullets li {
  font-size: 0.84rem;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}
.exp-bullets li::before { content: '–'; position: absolute; left: 0; color: var(--border); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .page { padding: 32px 16px 64px; }
  .hero { padding: 40px 0 40px; }
  .hero h1 { font-size: 2.2rem; }
  
  .nav-inner {
    height: auto;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-links a {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .exp-row { 
    grid-template-columns: 1fr; 
    gap: 12px; 
    padding: 24px 0;
  }
  
  .exp-period { margin-bottom: 4px; }

  .project-row { 
    grid-template-columns: 1fr; 
    padding: 20px 0;
  }
  
  .project-links-row { 
    margin-top: 16px; 
    justify-content: flex-start;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
  }

  .post-date {
    font-size: 0.72rem;
    margin-top: 4px;
  }

  .contact-item {
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .contact-link-wrapper {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 4px;
  }
}
