/* ============================================================
   SHARED STYLES — used by index.html, about.html, work.html,
   and contact.html. Edit colors/fonts here and every page updates.
   ============================================================ */

:root {
  --bg: #F7F8F6;
  --bg-alt: #EFF2EF;
  --ink: #1E2A28;
  --ink-soft: #5B6663;
  --teal: #2B7A6B;
  --teal-deep: #1F5C50;
  --blush: #F0C4AC;
  --line: #DBE1DD;
  --radius: 4px;
}

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

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(247, 248, 246, 0.7), rgba(247, 248, 246, 0.7)),
    url('images/background.jpg');
  background-repeat: no-repeat, no-repeat;
  background-position: center top, center top;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; letter-spacing: -0.02em; }

a { color: inherit; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

/* ---------- signature motif: hand-drawn underline ---------- */
.stroke-under { position: relative; display: inline-block; }
.stroke-under svg {
  position: absolute;
  left: -2%;
  bottom: -0.32em;
  width: 104%;
  height: 0.5em;
  overflow: visible;
}
.stroke-under path {
  stroke: var(--blush);
  stroke-width: 8;
  fill: none;
  stroke-linecap: round;
}

/* ---------- nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 248, 246, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}
.nav-mark {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.nav-logo {
  height: 52px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 0.9rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  padding-bottom: 4px;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--teal-deep); }
.nav-links a.active {
  color: var(--teal-deep);
  font-weight: 500;
  border-bottom: 2px solid var(--blush);
}

/* ---------- hero (home page only) ---------- */
.hero { padding: 120px 0 100px; border-bottom: 1px solid var(--line); }
.hero-logo { text-align: center; margin-bottom: 44px; }
.hero-logo img { max-width: 560px; width: 100%; height: auto; display: inline-block; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); line-height: 1.06; max-width: 14ch; }
.hero p.role { margin-top: 26px; font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- page header (about/work/contact) ---------- */
.page-head { padding: 66px 0 46px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin-top: 10px; }
.page-head p.lede { margin-top: 18px; color: var(--ink-soft); max-width: 52ch; font-size: 1.05rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary { background: #03859D; color: #fff; }
.btn-primary:hover { background: #026A7E; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* ---------- section shared ---------- */
section { padding: 90px 0; }
section.alt { background: rgba(239, 242, 239, 0.75); }
section.alt.characters-alt { background: rgba(239, 242, 239, 0.65); }
.about-section { background: rgba(239, 242, 239, 0.75); }
.section-head { margin-bottom: 52px; max-width: 62ch; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin-top: 10px; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 64px; align-items: start; }
.about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.about-text.has-overlay { background: rgba(247, 248, 246, 0.65); border-radius: var(--radius); padding: 32px; }
.about-text p { margin-bottom: 18px; color: var(--ink-soft); max-width: 56ch; }
.about-text p:first-child { color: var(--ink); font-size: 1.05rem; }
.skills-list { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
}

/* ---------- project detail page ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--teal-deep); }
.project-hero {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  margin-bottom: 48px;
}
.project-hero img { width: 100%; display: block; }
.project-body.has-overlay { background: rgba(247, 248, 246, 0.65); border-radius: var(--radius); padding: 32px; }
.project-body p { margin-bottom: 18px; color: var(--ink-soft); max-width: 68ch; font-size: 1.02rem; }
.project-body .btn { margin-top: 8px; }
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.character-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.character-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.character-photo { aspect-ratio: 1 / 1; background: var(--bg-alt); }
.character-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.character-body { padding: 22px 24px 26px; }
.character-name { font-size: 1.15rem; }
.character-role {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin-top: 4px;
  display: block;
}
.character-stats { margin-top: 4px; color: var(--ink-soft); font-size: 0.8rem; display: block; }
.character-body p.character-desc { margin-top: 12px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- projects (subsections) ---------- */
.projects-subsection { margin-bottom: 72px; }
.projects-subsection:last-child { margin-bottom: 0; }
.subsection-head { margin-bottom: 26px; display: flex; align-items: baseline; gap: 14px; }
.subsection-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
.subsection-head .eyebrow { font-size: 0.68rem; }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.work-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.work-card-link { position: absolute; inset: 0; z-index: 2; }
.work-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 42, 40, 0.08); }
.work-thumb { aspect-ratio: 16 / 10; background: var(--bg-alt); display: block; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.work-body { padding: 22px 24px 26px; }
.work-tag {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.work-body h3 { margin-top: 10px; font-size: 1.2rem; }
.work-body p { margin-top: 8px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- contact ---------- */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.contact-links { list-style: none; margin-top: 26px; }
.contact-links li { margin-bottom: 14px; }
.contact-links a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.contact-links a:hover { border-color: var(--teal); }

/* ---------- linktree page ---------- */
.linktree-head { text-align: center; }
.linktree-head .wrap { max-width: 560px; }
.linktree-head .lede { margin-left: auto; margin-right: auto; }
.linktree-avatar {
  width: 100%;
  max-width: 260px;
  height: auto;
  object-fit: contain;
  margin-bottom: 20px;
}
.linktree {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.linktree-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.linktree-link:hover, .linktree-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(30, 42, 40, 0.08);
  border-color: var(--teal);
}
.linktree-link--accent {
  background: #03859D;
  border-color: #03859D;
  color: #fff;
  font-size: 1.15rem;
}
.linktree-link--accent:hover { background: #026A7E; border-color: #026A7E; }
.linktree-form-head { text-align: center; max-width: none; }
.linktree-form { max-width: 480px; margin: 0 auto; }

form.contact-form { display: flex; flex-direction: column; gap: 16px; }
form.contact-form label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 6px;
  display: block;
}
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
}
form.contact-form input:focus, form.contact-form textarea:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}
form.contact-form textarea { resize: vertical; min-height: 110px; }

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.footer-contact { margin-bottom: 18px; }

@media (max-width: 760px) {
  body { background-attachment: scroll, scroll; }
  .nav-links { gap: 18px; font-size: 0.82rem; }
  .about-grid, .contact-inner { grid-template-columns: 1fr; }
  .work-grid, .character-grid { grid-template-columns: 1fr; }
  .hero { padding: 90px 0 70px; }
  section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .work-card, .btn { transition: none; }
}
