/* === Color Scheme === */
:root {
  --bg: #fff;
  --text: #333;
  --text-secondary: #555;
  --text-muted: #666;
  --text-faint: #888;
  --text-fainter: #999;
  --text-faintest: #bbb;
  --link: #333;
  --link-hover: #666;
  --link-underline: #ccc;
  --border: #ddd;
  --border-light: #ccc;
  --bullet: #bbb;
  --shadow: rgba(0,0,0,0.08);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161616;
    --text: #d4d4d4;
    --text-secondary: #b0b0b0;
    --text-muted: #999;
    --text-faint: #808080;
    --text-fainter: #707070;
    --text-faintest: #555;
    --link: #d4d4d4;
    --link-hover: #999;
    --link-underline: #444;
    --border: #333;
    --border-light: #444;
    --bullet: #555;
    --shadow: rgba(0,0,0,0.3);
  }
}

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

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding: 2rem 1.5rem;
}

/* === Global transitions === */
a {
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

/* === Layout === */
.container {
  max-width: 620px;
  margin: 0 auto;
}

/* === Profile Photo === */
.profile-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 4px var(--shadow);
}

/* === Header / Name === */
header {
  margin-bottom: 3rem;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
}

header h1 a:hover {
  color: var(--text-muted);
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}

/* === Navigation === */
nav {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1.2rem;
}

nav a:hover {
  color: var(--text);
}

nav a.active {
  color: var(--text);
  font-weight: 600;
}

.nav-right {
  margin-left: auto;
  font-size: 0.8rem;
}

.nav-right a {
  color: var(--text-fainter);
  margin-right: 0;
  margin-left: 0.8rem;
}

.nav-right a:hover {
  color: var(--text);
}


/* === Bio / About === */
.bio {
  margin-bottom: 2.5rem;
}

.bio p {
  margin-bottom: 0.8rem;
}

.bio a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
}

.bio a:hover {
  text-decoration-color: var(--text);
}

/* === Section Headings === */
h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-fainter);
  margin-top: 3rem;
  margin-bottom: 1rem;
}

/* === Experience / Career === */
.role {
  margin-bottom: 1.5rem;
}

.role h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.role .meta {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 0.3rem;
}

.role p, .role ul {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.role ul {
  list-style: none;
  padding: 0;
}

.role ul li {
  padding-left: 0.9rem;
  position: relative;
}

.role ul li::before {
  content: "\00B7";
  position: absolute;
  left: 0;
  color: var(--bullet);
  font-weight: 700;
}

.role ul a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
}

.role ul a:hover {
  text-decoration-color: var(--text-secondary);
}

/* === Links list (articles, talks) === */
.links-list {
  list-style: none;
  padding: 0;
}

.links-list li {
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
}

.links-list a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
}

.links-list a:hover {
  text-decoration-color: var(--text);
}

.links-list .meta {
  font-size: 0.78rem;
  color: var(--text-fainter);
}

/* === Section subtitle (press topics) === */
.section-subtitle {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

/* === Inline section h3 === */
.section-h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

/* === Blog === */
.blog-list {
  list-style: none;
  padding: 0;
}

.blog-list li {
  margin-bottom: 1.2rem;
}

.blog-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.blog-list a:hover {
  text-decoration: underline;
}

.blog-list .date {
  font-size: 0.78rem;
  color: var(--text-fainter);
  display: block;
  margin-top: 0.1rem;
}

.blog-list .excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* === Blog Post === */
article h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

article .post-date {
  font-size: 0.8rem;
  color: var(--text-fainter);
  margin-bottom: 1.5rem;
}

article p {
  margin-bottom: 1rem;
}

article h2 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  font-family: Georgia, 'Times New Roman', serif;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

article blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  font-style: italic;
}

article a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 2px;
}

article a:hover {
  text-decoration-color: var(--text);
}

/* === Footer === */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-faintest);
}

footer a {
  color: var(--text-faintest);
  text-decoration: none;
}

footer a:hover {
  color: var(--text);
}

.footer-lang {
  float: right;
}

/* === Responsive === */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  body {
    padding: 1.5rem 1rem;
  }

  /* Nav: stack About/Blog on left, contacts on right, with comfortable tap targets */
  nav {
    flex-wrap: wrap;
    gap: 0.4rem 0;
  }

  nav a {
    padding: 0.3rem 0;
    margin-right: 1rem;
  }

  .nav-right {
    margin-left: auto;
  }

  .nav-right a {
    padding: 0.3rem 0;
    margin-left: 0.6rem;
  }

  /* Slightly larger photo on mobile */
  .profile-photo {
    width: 80px;
    height: 80px;
  }

  /* More breathing room between list items for tap targets */
  .links-list li {
    margin-bottom: 0.85rem;
  }

  .role ul li {
    margin-bottom: 0.3rem;
  }

  /* Footer: prevent float collision on narrow screens */
  footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.3rem;
  }

  .footer-lang {
    float: none;
  }
}
