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

html {
  scroll-behavior: smooth;
}

/* ─── Base ─── */
body {
  background-color: #f0ece6;
  color: #111111;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ─── Layout ─── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ─── Buttons ─── */
.btn-pill {
  display: inline-block;
  background-color: #111111;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: opacity 0.18s ease;
}

.btn-pill:hover {
  opacity: 0.78;
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  transition: opacity 0.18s ease;
}

.btn-text:hover {
  opacity: 0.6;
}

/* ─── Navigation ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 300;
  background-color: #f0ece6;
  padding: 18px 0;
}

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

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111111;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
}

.nav-links a:not(.btn-pill) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.18s ease;
}

.nav-links a:not(.btn-pill):hover {
  opacity: 0.55;
}

.nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── Hamburger button ─── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #111111;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.nav-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile menu ─── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 72%;
  max-width: 300px;
  background-color: #f0ece6;
  z-index: 200;
  padding: 80px 32px 40px;
  flex-direction: column;
  gap: 32px;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.mobile-menu.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-menu-link {
  font-size: 18px;
  font-weight: 400;
  color: #111111;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.18s ease;
}

.mobile-menu-link:hover {
  opacity: 0.55;
}

.mobile-menu-link.btn-pill {
  font-size: 14px;
  align-self: flex-start;
  margin-top: 8px;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Hero ─── */
.hero {
  padding: 40px 0 40px;
}

.hero-headline {
  font-family: 'Lato', sans-serif;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.025em;
  max-width: 820px;
  margin-bottom: 20px;
  color: #111111;
}

.hero-sub {
  font-size: 13px;
  color: #666666;
  line-height: 1.65;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-label {
  font-size: 12px;
  color: #999999;
  letter-spacing: 0.01em;
}

.stat-value {
  font-size: 16px;
  font-weight: 400;
  color: #111111;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ─── Experiences ─── */
.experiences {
  padding: 40px 0 40px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  color: #111111;
}

.exp-date {
  display: block;
  font-size: 12px;
  color: #888888;
  margin-bottom: 6px;
}

.exp-timeline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.exp-current-label {
  font-size: 16px;
  color: #5e8a6a;
  white-space: nowrap;
}

.exp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1.5px solid #b0aba4;
  flex-shrink: 0;
}

.exp-line {
  flex: 1;
  height: 1px;
  background-color: #d8d3cc;
}

.exp-featured {
  padding: 0 0 32px;
}

.exp-role {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 3px;
}

.exp-company {
  font-size: 12px;
  color: #999999;
  margin-bottom: 14px;
}

.exp-bullets {
  list-style: disc;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exp-bullets li {
  font-size: 12.5px;
  color: #555555;
  line-height: 1.6;
}

.exp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}

.exp-grid .exp-row {
  padding: 20px 0;
}

.exp-grid .exp-row .exp-company {
  margin-bottom: 0;
}

.exp-grid--detailed .exp-row .exp-company {
  margin-bottom: 14px;
}

/* ─── Selected Works ─── */
.works {
  padding: 40px 0 40px;
}

.works-group {
  margin-bottom: 24px;
}

.works-label {
  font-size: 12px;
  font-weight: 400;
  color: #999999;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.works-grid {
  display: grid;
  gap: 14px;
}

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

.works-grid.col-4 {
  grid-template-columns: repeat(4, 1fr);
}

.work-card {
  display: block;
  cursor: pointer;
}

.work-thumb {
  background-color: #d9d4ce;
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  width: 100%;
  margin-bottom: 10px;
  transition: opacity 0.2s ease;
}

.work-card:hover .work-thumb {
  opacity: 0.82;
}

.work-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.work-name {
  font-size: 13px;
  font-weight: 700;
  color: #111111;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 11px;
  color: #666666;
  background-color: #e6e1da;
  padding: 3px 9px;
  border-radius: 100px;
}

/* ─── Contact ─── */
.contact {
  padding: 40px 0 0px;
}

.contact-headline {
  font-family: 'Lato', sans-serif;
  font-size: 62px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #111111;
  margin-bottom: 14px;
}

.contact-sub {
  font-size: 13px;
  color: #666666;
  max-width: fit-content;
  line-height: 1.65;
  margin-bottom: 28px;
}

.contact-grid {
  display: flex;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #d8d3cc;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  padding: 0 28px;
  border-right: 1px solid #d8d3cc;
}

.contact-item:first-child {
  padding-left: 0;
}

.contact-item:last-child {
  border-right: none;
}

.contact-label {
  font-size: 11px;
  color: #999999;
}

.contact-val {
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  line-height: 1.5;
}

.status-dot {
  color: #3d9e5a;
}

.status-dot::before {
  content: '● ';
  font-size: 9px;
  color: #3d9e5a;
  vertical-align: middle;
  margin-right: 2px;
}

.contact-link {
  text-decoration: underline;
  text-decoration-color: rgba(17, 17, 17, 0.25);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.18s ease;
}

.contact-link:hover {
  text-decoration-color: #111111;
}

/* ─── Footer ─── */
.footer {
  padding: 22px 0 36px;
  border-top: 1px solid #d8d3cc;
  margin-top: 24px;
}

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

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  font-size: 13px;
  color: #111111;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: opacity 0.18s ease;
}

.footer-nav a:hover {
  opacity: 0.55;
}

.footer-copy {
  font-size: 11px;
  color: #999999;
}

/* ─── About Page ─── */
.about-hero {
  padding: 32px 0 56px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #888888;
  margin-bottom: 40px;
  transition: opacity 0.18s ease;
}

.back-link:hover {
  opacity: 0.6;
}

.about-headline {
  font-family: 'Lato', sans-serif;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #111111;
  max-width: 580px;
  margin-bottom: 36px;
}

.about-prose {
  max-width: 700px;
}

.about-prose p {
  font-size: 14px;
  color: #444444;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-italic {
  font-style: italic;
  color: #888888;
}

.about-signature {
  text-align: right;
  margin-top: 36px;
}

.signature-name {
  font-size: 14px;
  color: #111111;
  font-style: italic;
  margin-bottom: 4px;
}

.signature-pronunciation {
  font-size: 12px;
  color: #999999;
  font-style: italic;
  line-height: 1.65;
}

/* Education, Certificate, Skills share this wrapper */
.about-section {
  padding: 40px 0;
}

.exp-company--highlight {
  color: #5e8a6a;
  margin-bottom: 14px;
}

/* ─── Tools & Skills ─── */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skills-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.skills-label {
  font-size: 12px;
  color: #888888;
  min-width: 90px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   Responsive — Tablet  (≤ 768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {

  .container,
  .nav-inner {
    padding-left: 28px;
    padding-right: 28px;
  }

  /* Nav: hide desktop links, show hamburger */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .mobile-overlay {
    display: block;
  }

  /* Hero */
  .hero-headline {
    font-size: 36px;
    letter-spacing: -0.02em;
    max-width: 100%;
  }

  /* Experiences: detailed grid (about.html) stacks */
  .exp-grid--detailed {
    grid-template-columns: 1fr;
  }

  /* Works: 4-col → 2-col */
  .works-grid.col-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact */
  .contact-headline {
    font-size: 44px;
  }

  .contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .contact-item {
    flex: none;
    padding: 0;
    border-right: none;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* About page */
  .about-headline {
    font-size: 40px;
    max-width: 100%;
  }
}

/* ═══════════════════════════════════════
   Responsive — Mobile  (≤ 480px)
═══════════════════════════════════════ */
@media (max-width: 480px) {

  .container,
  .nav-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Hero */
  .hero {
    padding: 28px 0;
  }

  .hero-headline {
    font-size: 26px;
    letter-spacing: -0.015em;
    line-height: 1.2;
    max-width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Experiences: both grids stack to 1 col */
  .section-title {
    font-size: 18px;
  }

  .experiences,
  .about-section {
    padding: 28px 0;
  }

  .exp-grid {
    grid-template-columns: 1fr;
  }

  /* Works: case studies → 1 col; Others stays 2 col (already set at 768px) */
  .works-grid.col-2 {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-headline {
    font-size: 30px;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* Footer */
  .footer-nav {
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  /* About page */
  .about-hero {
    padding: 24px 0 40px;
  }

  .about-headline {
    font-size: 30px;
    letter-spacing: -0.02em;
    max-width: 100%;
    margin-bottom: 24px;
  }

  .about-prose {
    max-width: 100%;
  }

  .about-signature {
    text-align: left;
  }

  .skills-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}