:root {
  --bg: #fdfbf6;
  --text: #0f0f0f;
  --muted: #343434;
  --border: #cfcfcf;
  --accent: #000000;
  --chat-width: 340px;
}

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

body {
  font-family: "Segoe UI Symbol", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

nav {
  padding: 1.25rem 6%;
  border-bottom: 1px solid var(--border);
  background: rgba(253, 251, 246, 0.9);
  backdrop-filter: blur(6px);
  z-index: 10;
  position: sticky;
  top: 0;
}

.nav-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease;
  font-size: 1.35rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: transparent;
}

main {
  flex: 1;
  padding: 2.5rem 6% 4rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.hero {
  margin-bottom: 2.2rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

h1 {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.15rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 760px;
  margin-bottom: 1.1rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.contact-chip {
  display: inline-block;
  padding: 0.1rem 0;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: underline;
}

.section {
  margin-bottom: 2.2rem;
}

.section h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #000;
}

.section h2::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
}

.summary-list p {
  margin-bottom: 0.7rem;
  color: var(--text);
}

.link-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin-top: 0.4rem;
}

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

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.chip {
  background: transparent;
  border: none;
  padding: 0;
  font-weight: 600;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}

.chip span {
  background: #fff;
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  font-weight: 500;
}

.resume-list {
  list-style: disc;
  padding-left: 1.1rem;
  color: var(--text);
}

.resume-list > li {
  margin-bottom: 1rem;
}

.role-line {
  font-weight: 700;
}

.date-line {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.mono-list {
  list-style: disc;
  padding-left: 1.1rem;
  color: var(--text);
}

.mono-list li {
  margin-bottom: 0.45rem;
}

.journal-hero {
  margin-bottom: 1.6rem;
}

.journal-list {
  list-style: none;
}

.journal-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.journal-item a {
  display: inline-block;
  margin-bottom: 0.15rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.journal-item a:hover {
  text-decoration: underline;
}

.journal-item .date {
  color: var(--muted);
  font-size: 0.9rem;
}

.article {
  max-width: 760px;
}

.article section {
  margin-top: 1.4rem;
}

.article ul {
  list-style: disc;
  padding-left: 1.2rem;
}

.article h2 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.article p {
  margin-bottom: 0.8rem;
  color: var(--text);
}

footer {
  padding: 1.4rem 6%;
  color: var(--muted);
  font-size: 0.95rem;
}

.chat-toggle-btn {
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.8rem !important;
  font-size: 1rem !important;
  margin-left: 0.5rem;
  transition: font-weight 0.1s ease;
}

.chat-toggle-btn:hover {
  background: transparent;
  font-weight: 800 !important;
  border-color: var(--text);
}

.chat-widget {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: #fffefb;
  border-left: 1px solid var(--border);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.chat-widget.open {
  transform: translateX(0);
}

body.chat-open main,
body.chat-open nav,
body.chat-open footer {
  margin-right: 400px;
  transition: margin-right 0.3s ease;
}

main, nav, footer {
  transition: margin-right 0.3s ease;
}

.chat-header {
  padding: 0.85rem 1rem;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.chat-body {
  flex: 1;
  padding: 0.95rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.chat-input-area {
  padding: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  background: #fdfbf6;
}

.chat-input-area input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.chat-input-area button {
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
}

.message {
  padding: 0.6rem 0.8rem;
  border-radius: 9px;
  max-width: 82%;
  font-size: 0.95rem;
  border: 1px solid var(--border);
}

.message.user {
  background: #f2f2f2;
  align-self: flex-end;
}

.message.bot {
  background: #0f172a;
  color: #fff;
  align-self: flex-start;
  border-color: #0f172a;
}

@media (max-width: 900px) {
  nav {
    padding: 1rem 1.2rem;
  }

  main {
    padding: 2.1rem 1.2rem 3.6rem;
  }

  .chat-widget {
    width: calc(100% - 2.4rem);
    right: 1.2rem;
    bottom: 1.2rem;
  }
}

@media (max-width: 600px) {
  .contact-row {
    flex-direction: column;
  }

  .card-header {
    flex-direction: column;
  }
}
