:root {
  color-scheme: light;
  --bg: #f7f4ef;
  --ink: #171717;
  --muted: #68635d;
  --line: #d9d2c8;
  --surface: #fffdfa;
  --accent: #256f68;
  --accent-strong: #174b47;
  --shadow: 0 16px 45px rgba(31, 25, 18, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 320px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 32px, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 0;
}

.intro {
  margin-bottom: 26px;
  text-align: center;
}

.intro h1 {
  margin: 0;
  font-size: clamp(1.9rem, 6vw, 3.15rem);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: 0;
}

.link-list {
  text-align: center;
}

.portfolio-item {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 14px 4px;
  text-decoration: none;
  outline-offset: 6px;
}

.portfolio-item:hover .item-title,
.portfolio-item:focus-visible .item-title {
  color: var(--accent-strong);
}

.item-title {
  font-size: 1.5rem;
  font-weight: 680;
  transition: color 160ms ease;
}

.item-description {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.resume-shell {
  width: min(100% - 32px, 920px);
  padding: 34px 0;
}

.page-shell {
  width: min(100% - 32px, 920px);
  padding: 34px 0 72px;
}

.project-shell {
  width: min(100% - 32px, 720px);
  padding: 34px 0 72px;
  text-align: center;
}

.project-shell .page-header {
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.page-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 1;
  text-align: center;
}

.resume-intro {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.resume-intro h1 {
  font-size: clamp(2rem, 6vw, 3.8rem);
}

.back-link,
.download-link {
  color: var(--accent-strong);
  font-size: 0.94rem;
  font-weight: 680;
  text-decoration: none;
}

.back-link {
  justify-self: start;
}

.download-link {
  justify-self: end;
}

.back-link:hover,
.download-link:hover {
  text-decoration: underline;
}

.resume-viewer {
  height: min(78vh, 960px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.resume-viewer object {
  display: block;
}

.pdf-fallback {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.pdf-fallback a {
  color: var(--accent-strong);
  font-weight: 680;
}

.travel-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 38px;
}

.globe-wrap {
  display: grid;
  justify-items: center;
  place-items: center;
}

#travel-globe {
  display: block;
  width: min(100%, 620px);
  aspect-ratio: 1;
  cursor: grab;
  touch-action: none;
}

#travel-globe:active {
  cursor: grabbing;
}

.entry-panel,
.writing-preview,
.writing-article {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.entry-panel h2,
.writing-preview h2,
.writing-article h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.14;
}

.entry-panel p,
.writing-preview p,
.writing-article p {
  margin: 0 0 14px;
}

.entry-kicker {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.writing-list {
  display: grid;
  gap: 30px;
  width: min(100%, 680px);
  margin: 0 auto;
}

.writing-preview {
  padding-bottom: 26px;
}

.writing-preview + .writing-preview {
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

.writing-preview a {
  color: var(--ink);
  text-decoration: none;
}

.writing-preview a:hover,
.writing-preview a:focus-visible {
  color: var(--accent-strong);
}

.writing-article {
  width: min(100%, 680px);
  margin: 0 auto;
}

.empty-state {
  color: var(--muted);
  text-align: center;
}

.under-construction-image {
  display: block;
  width: min(100%, 440px);
  height: auto;
  margin: 18px auto 0;
}

.project-status {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 680;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 24px, 560px);
    padding: 48px 0;
  }

  .resume-shell {
    width: min(100% - 20px, 920px);
    padding: 20px 0;
  }

  .page-shell {
    width: min(100% - 20px, 920px);
    padding: 20px 0 48px;
  }

  .project-shell {
    width: min(100% - 20px, 720px);
    padding: 20px 0 48px;
  }

  .page-header {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }

  .page-header h1 {
    grid-row: 1;
    text-align: left;
  }

  .travel-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-header h1#travel-title {
    text-align: center;
  }

  .travel-layout .entry-panel {
    order: 1;
  }

  .travel-layout .globe-wrap {
    order: 2;
  }

  #travel-globe {
    width: min(100%, 390px);
  }

  .resume-intro {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .resume-intro h1 {
    grid-row: 1;
    text-align: left;
  }

  .back-link,
  .download-link {
    justify-self: start;
  }

  .resume-viewer {
    height: 72vh;
    min-height: 440px;
  }
}
