:root {
  /* Backgrounds */
  --bg: #f7f9fc;          /* soft cool white */
  --bg-soft: #eef2f8;     /* subtle section contrast */
  --surface: #ffffff;     /* cards, nav background */

  /* Text */
  --text: #1c2433;        /* deep slate */
  --muted: #5f6c85;       /* cool gray-blue */

  /* Borders + shadow */
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(28, 36, 51, 0.08);

  /* Data accents (Research / Works) */
  --data-primary: #3c5ccf;     /* strong indigo-blue */
  --data-primary-rgb: 60, 92, 207; /* matches #3c5ccf */
  --data-secondary: #2fb7c8;   /* teal */
  --data-soft: #e6edff;        /* soft blue background */

  /* Coaching accents */
  --coach-primary: #f29e4c;    /* warm golden */
  --coach-primary-rgb: 242, 158, 76; /* matches #f29e4c */
  --coach-secondary: #884a02;  /* soft coral */
  --coach-soft: #fff1e6;       /* light peach background */

  /* Global */
  --radius: 16px;
}

/* Base */
* { box-sizing: border-box; }

body {
  font-family: system-ui, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

main {
  padding: 2rem 1.25rem;
  max-width: 980px;
  margin: 0 auto;
}

h1, h2, h3 {
  line-height: 1.2;
}

h1 { margin: 0 0 0.75rem 0; }
h2 { margin: 0 0 0.5rem 0; }

.prose { max-width: 70ch; }

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

/* Links */
a {
  color: var(--data-primary);
  text-decoration: none;
}

a:hover {
  opacity: 0.85;
}

.contact-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

/* Nav */
nav {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: var(--text);
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
}

nav a:hover {
  background: var(--bg-soft);
  opacity: 1;
}

.nav-spacer {
  flex: 1;
}

.lang-switch {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted) !important;
  font-weight: 600;
}

.lang-switch:hover {
  background: var(--bg-soft);
  color: var(--text) !important;
  opacity: 1;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Home hero layout */
.home-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  grid-template-areas: "title avatar" "content content";
  gap: 1rem;
  align-items: start;
}

.hero-title {
  grid-area: title;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
}

.hero-title h1 {
  margin: 0;
}

.hero-title .muted {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: #8a96ab;
}

.hero-title p {
  margin: 0;
}

.hero-avatar {
  grid-area: avatar;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  align-self: end;
}

.hero-content {
  grid-area: content;
}

.hero-content h2 {
  margin-top: 2rem;
}

.hero-content .prose {
  max-width: none;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.work-card p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: var(--muted);
}

.work-card a {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

@media (max-width: 650px) {
  .work-cards {
    grid-template-columns: 1fr;
  }
}

.hero-content h2 {
  margin-top: 2rem;
}

.work-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.75rem;
}

.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.work-card p {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  color: var(--muted);
}

.work-card a {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

@media (max-width: 650px) {
  .work-cards {
    grid-template-columns: 1fr;
  }
}

.hero-content .prose {
  max-width: none;
}
.pronounce-button {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--data-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

.pronounce-button:hover {
  background: var(--data-soft);
  opacity: 1;
}

.avatar {
  max-width: 260px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Hero links (pill buttons) */
.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.hero-links a {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--data-primary);
  font-weight: 600;
}

.hero-links a:hover {
  background: var(--data-soft);
  opacity: 1;
}

/* Grid + cards */
.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 1000px){
  .grid{ grid-template-columns: repeat(2, minmax(240px, 1fr)); }
}

@media (max-width: 650px){
  .grid{ grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(28, 36, 51, 0.03);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.card-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

/* Tone wrappers for page-level background shifts */
.tone-data {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.tone-coach {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

/* Coaching-specific link variant (optional utility class) */
.link-coach {
  color: var(--coach-secondary);
}

.button-coach {
  background: var(--coach-primary);
  border: 1px solid var(--coach-primary);
  color: var(--text);
  padding:14px 22px;
  border-radius:14px;
  cursor:pointer;
  font-weight:600;
}

.tone-coach .button-coach:hover,
.button-coach:hover {
  background: var(--coach-secondary);
  border-color: var(--coach-secondary);
  color: #fff;
  opacity: 1;
}

/* Mobile */
@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "avatar" "title" "content";
    gap: 1.5rem;
  }
  nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  main {
    padding: 1rem 1rem;
  }
  nav {
    padding: 0.75rem 1rem;
  }
  .home-hero {
    padding: 1rem;
  }
  .hero-grid {
    gap: 1rem;
  }
  .avatar {
    max-width: 200px;
  }
  .page-hero,
  .page-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .page-hero__content {
    left: 1rem;
  }
  .page-hero__title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
}



.page-hero{
  position: relative;
  width: 100%;
  height: clamp(260px, 34vh, 420px);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 1.25rem 0;
  border: 1px solid var(--border);
  background: var(--data-soft);
}

.page-hero--compact{
  height: auto;
  padding: 2rem 0 0.75rem 0;
  background: transparent;
  border: none;
}


/* align hero and the page body text to the same centered width as main */
.page-hero,
.page-body {
  max-width: 980px;         /* same as main */
  margin: 0 auto;           /* center within viewport */
  padding-left: 1.25rem;    /* match main horizontal padding */
  padding-right: 1.25rem;
  box-sizing: border-box;
}

.tone-coach .page-hero{
  background: var(--coach-soft);
}

.page-hero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;        /* fill the whole box */
  object-position: center;  /* keep image centered */
  display: block;
}

/* dark gradient overlay driven by --data-primary */
.page-hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--data-primary-rgb), 0.82) 0%,
    rgba(var(--data-primary-rgb), 0.45) 45%,
    rgba(var(--data-primary-rgb), 0.10) 100%
  );
}

.tone-coach .page-hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(var(--coach-primary-rgb), 0.82) 0%,
    rgba(var(--coach-primary-rgb), 0.45) 45%,
    rgba(var(--coach-primary-rgb), 0.10) 100%
  );
}

/* title layer */
.page-hero__content{
  position: absolute;
  left: 1.5rem;
  bottom: 1.25rem;
  z-index: 2;
}

.page-hero--compact .page-hero__content{
  position: relative;
  left: 0;
  bottom: 0;
}


.page-hero__title{
  margin: 0;
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  text-align: left;
  text-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Featured image for project pages */
.project-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}

.project-left {
  flex: 1;
}

.project-right {
  flex: 0 0 25%;
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.project-button {
  display: inline-block;
  margin-bottom: 20px;
  padding: 11px 22px;

  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;

  background-color: var(--data-primary);
  color: #ffffff;

  border: 1.5px solid var(--data-primary);

  text-decoration: none;
  transition: all 0.25s ease;
}

.project-button:hover {
  background-color: var(--data-secondary);
  color: var(--data-primary);
  transform: translateY(-2px);

  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.project-divider {
  border: none;
  border-top: 1px solid var(--data-primary);
  margin: 24px 0 16px;
}


.works-toggle {
  margin-bottom: 1.5rem;
}

.works-toggle__title {
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.works-toggle__title::-webkit-details-marker {
  display: none;
}

.works-toggle__title::after {
  content: "＋";
  float: right;
  font-weight: 400;
  transition: transform 0.2s ease;
}

details[open] .works-toggle__title::after {
  content: "–";
}

.works-toggle__content {
  margin-top: 1rem;
}

