:root {
  --ink: #17201d;
  --muted: #66736f;
  --line: #dce5df;
  --paper: #f8faf7;
  --panel: #ffffff;
  --mint: #4fbea3;
  --teal: #196f72;
  --coral: #e56f51;
  --gold: #d7a84b;
  --shadow: 0 18px 50px rgba(18, 38, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(248, 250, 247, 0.88);
  border-bottom: 1px solid rgba(220, 229, 223, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: white;
  background: var(--teal);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: #394843;
  font-size: 15px;
  font-weight: 700;
}

.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: clamp(56px, 8vw, 86px) clamp(20px, 5vw, 64px) clamp(42px, 6vw, 70px);
  background:
    linear-gradient(135deg, rgba(79, 190, 163, 0.18), transparent 42%),
    linear-gradient(315deg, rgba(229, 111, 81, 0.12), transparent 38%),
    var(--paper);
}

.hero-copy {
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 5.7vw, 76px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.hero-mobile-line {
  display: inline;
}

.hero-lead {
  max-width: 720px;
  margin-bottom: 0;
  color: #45524e;
  font-size: clamp(17px, 1.65vw, 21px);
  line-height: 1.65;
}

.hero-lead span {
  display: block;
  white-space: nowrap;
}

.hero-lead .hero-lead-mobile {
  display: none;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.hero-highlights span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(25, 111, 114, 0.14);
  border-radius: 8px;
  color: #21423d;
  background: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.hero-actions,
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.contact-methods a,
.share-item a,
.file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: white;
  background: var(--teal);
}

.button.secondary,
.contact-methods a,
.share-item a,
.file-button {
  color: var(--teal);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.file-button {
  font: inherit;
  cursor: pointer;
}

.admin-toggle {
  justify-self: end;
  align-self: start;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(25, 111, 114, 0.22);
  border-radius: 8px;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 19px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
}

.admin-toggle:hover {
  color: white;
  border-color: var(--teal);
  background: var(--teal);
}

.section {
  padding: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 64px);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(260px, 0.32fr);
  gap: 24px;
  align-items: end;
  max-width: none;
  margin-bottom: 18px;
}

.section h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.2;
}

.section-heading > p {
  margin-bottom: 3px;
  color: var(--muted);
  line-height: 1.65;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.08fr);
  gap: 16px;
  align-items: stretch;
}

.profile-card,
.portfolio-card,
.share-item,
.contact-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(18, 38, 35, 0.06);
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(20px, 2.4vw, 28px);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(79, 190, 163, 0.22), rgba(255, 255, 255, 0.94) 48%),
    linear-gradient(315deg, rgba(229, 111, 81, 0.14), transparent 46%),
    #f5fbf8;
}

.profile-card h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.avatar {
  display: block;
  width: min(82%, 390px);
  height: clamp(380px, 36vw, 510px);
  object-fit: contain;
  object-position: center bottom;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  background: transparent !important;
}

.profile-card p,
.portfolio-card p,
.share-item p,
.contact-section p {
  color: var(--muted);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.profile-intro {
  margin-bottom: 0;
  width: 100%;
  max-width: 620px;
  text-align: left;
}

.profile-intro span {
  display: block;
  white-space: nowrap;
}

.profile-intro .mobile-intro-line {
  display: none;
}

.history-list {
  display: grid;
  gap: 7px;
  align-content: stretch;
}

.history-list div {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 12px 14px;
  border-left: 4px solid var(--mint);
  background: white;
  min-height: 47px;
}

.history-list span {
  color: var(--teal);
  font-weight: 800;
  white-space: nowrap;
}

.history-list p {
  margin-bottom: 0;
  line-height: 1.48;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portfolio-card {
  min-height: 260px;
  padding: 20px;
}

.portfolio-card span {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--coral);
  font-weight: 800;
}

.portfolio-card h3,
.share-item h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.35;
}

.portfolio-card p {
  font-size: 15px;
  white-space: pre-line;
}

.portfolio-list {
  color: var(--muted);
}

.portfolio-list.nowrap-list {
  font-size: 14px;
  word-break: keep-all;
  overflow-wrap: normal;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
  margin: 0;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form button {
  align-self: stretch;
}

.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.delete-button {
  display: none;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(229, 111, 81, 0.28);
  border-radius: 8px;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

body.is-admin .delete-button {
  display: inline-flex;
  align-items: center;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(23, 32, 29, 0.26);
}

.modal-backdrop[hidden] {
  display: none;
}

.admin-modal {
  position: relative;
  width: min(100%, 560px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-modal h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  font-size: 20px;
  cursor: pointer;
}

.password-step,
.post-picker-step,
.editor-step {
  display: grid;
  gap: 10px;
}

.password-step label {
  color: var(--teal);
  font-weight: 800;
}

.editor-step[hidden],
.post-picker-step[hidden],
.password-step[hidden] {
  display: none;
}

.post-picker-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.post-picker-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.post-picker-edit {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.post-picker-edit strong {
  font-size: 16px;
}

.post-picker-edit span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.post-picker-item:hover {
  border-color: rgba(25, 111, 114, 0.34);
  background: #ffffff;
}

.post-picker-delete {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(229, 111, 81, 0.28);
  border-radius: 8px;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.json-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(79, 190, 163, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.shares-section {
  background: #eef5f1;
}

.share-list {
  display: grid;
  gap: 8px;
}

.share-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}

.share-item.is-hidden {
  display: none;
}

.tag {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.7fr);
  gap: 24px;
  align-items: center;
  margin: clamp(42px, 6vw, 72px) clamp(20px, 5vw, 64px);
  padding: clamp(24px, 3.2vw, 34px);
}

.contact-section h2 {
  margin-bottom: 12px;
}

.contact-copy {
  margin-bottom: 0;
}

.contact-copy span {
  display: block;
  white-space: nowrap;
}

.contact-methods {
  justify-content: flex-end;
  margin-top: 0;
}

footer {
  padding: 22px clamp(20px, 5vw, 64px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .profile-grid,
  .contact-section,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .avatar {
    height: clamp(360px, 68vw, 470px);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-methods {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .hero-title-line {
    white-space: normal;
  }

  .hero-mobile-line {
    display: block;
  }

  .hero-lead span {
    white-space: normal;
  }

  .hero-lead .hero-lead-desktop {
    display: none;
  }

  .hero-lead .hero-lead-mobile {
    display: block;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 35px;
  }

  .hero {
    padding-top: 38px;
  }

  .portfolio-grid,
  .profile-card,
  .share-item {
    grid-template-columns: 1fr;
  }

  .profile-card {
    gap: 16px;
  }

  .avatar {
    width: min(100%, 320px);
    height: 390px;
  }

  .profile-intro span {
    white-space: nowrap;
  }

  .profile-intro .desktop-intro-line {
    display: none;
  }

  .profile-intro .mobile-intro-line {
    display: block;
  }

  .profile-intro {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.72;
  }

  .contact-copy span {
    white-space: normal;
  }

  .portfolio-card {
    min-height: auto;
    padding: 18px 12px;
  }

  .portfolio-card span {
    margin-bottom: 28px;
  }

  .portfolio-card p {
    font-size: 11.5px;
    line-height: 1.75;
    letter-spacing: 0;
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .portfolio-card p.portfolio-list {
    font-size: 12.5px;
    line-height: 1.65;
    white-space: pre-line;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .portfolio-card p.nowrap-list {
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: normal;
  }

  .button,
  .contact-methods a,
  .share-item a,
  .file-button {
    width: 100%;
  }

  .admin-toggle {
    width: 30px;
  }
}
