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

:root {
  --bg: #f4f2ee;
  --bg-card: #ffffff;
  --border: #e0ddd9;
  --text: #191919;
  --text-secondary: #666666;
  --text-muted: #00000099;
  --accent: #0a66c2;
  --accent-hover: #004182;
  --green: #057642;
  --font: 'Inter', -apple-system, system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ---- Profile Card ---- */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.cover {
  height: 180px;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 40%, #0a3d6e 100%);
  position: relative;
}

.profile-main {
  padding: 0 24px 24px;
  position: relative;
}

.avatar {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  overflow: hidden;
  margin-top: -76px;
  position: relative;
  background: var(--bg);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.profile-info h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.headline {
  font-size: 16px;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.4;
}

.location {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.open-to {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 6px 12px;
  background: #e8f5e9;
  color: var(--green);
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}
.open-to-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5, 118, 66, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(5, 118, 66, 0); }
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  padding-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(10, 102, 194, 0.08); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); border-color: #999; }

/* ---- Sections (cards) ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ---- About ---- */
.about-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

/* ---- Skills ---- */
.skills-group {
  margin-bottom: 20px;
}
.skills-group:last-child { margin-bottom: 0; }

.skills-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  padding: 4px 14px;
  background: #f0f0f0;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* ---- Experience ---- */
.exp-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: none; padding-bottom: 0; }

.exp-logo {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f3f3f3;
}
.exp-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 4px;
}

.exp-content { flex: 1; min-width: 0; }

.exp-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.exp-company {
  font-size: 14px;
  color: var(--text);
}

.exp-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.exp-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.6;
}

.exp-links {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.exp-links a {
  font-size: 13px;
  font-weight: 500;
}

/* ---- Availability ---- */
.availability {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.avail-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.avail-item svg {
  width: 16px;
  height: 16px;
  stroke: var(--text-secondary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---- Footer ---- */
footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 16px 0 32px;
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .cover { height: 120px; }
  .avatar { width: 120px; height: 120px; margin-top: -60px; }
  .profile-info { flex-direction: column; }
  .profile-info h1 { font-size: 20px; }
  .profile-actions { width: 100%; }
  .profile-actions .btn { flex: 1; justify-content: center; }
  .profile-main { padding: 0 16px 20px; }
  .card { padding: 20px 16px; }
  .exp-item { flex-direction: column; gap: 8px; }
  .exp-logo { width: 40px; height: 40px; font-size: 12px; }
}

/* ===================================================== */
/* Article / post pages                                  */
/* ===================================================== */

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px 48px;
  margin-bottom: 8px;
}

.article-card h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text);
}

.article-meta {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.article-meta a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border);
}

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

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  transition: background .15s;
}

.article-back:hover {
  background: rgba(10,102,194,0.08);
  text-decoration: none;
}

/* Body content typography */

.article-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.article-body > * + * {
  margin-top: 16px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 40px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 28px;
  margin-bottom: 8px;
  color: var(--text);
}

.article-body h4 {
  font-size: 15px;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.article-body p {
  color: var(--text);
}

.article-body strong {
  font-weight: 600;
  color: var(--text);
}

.article-body em {
  color: var(--text);
  font-style: italic;
}

.article-body ul,
.article-body ol {
  padding-left: 26px;
}

.article-body li + li {
  margin-top: 6px;
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(10,102,194,0.3);
  text-underline-offset: 2px;
}

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

.article-body code {
  background: #f0ede8;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: 'JetBrains Mono', Menlo, Consolas, monospace;
  font-size: 0.87em;
  color: #b33000;
}

.article-body pre {
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: inherit;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  background: rgba(10,102,194,0.05);
  padding: 12px 18px;
  margin: 16px 0;
  border-radius: 0 6px 6px 0;
  color: var(--text);
}

.article-body blockquote p {
  margin: 0;
}

.article-body blockquote > * + * {
  margin-top: 10px;
}

.article-body blockquote strong {
  color: var(--accent-hover);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.article-body thead th {
  background: #faf8f4;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  color: var(--text);
}

.article-body tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.article-body tbody tr:last-child td {
  border-bottom: none;
}

.article-body tbody tr:hover {
  background: rgba(10,102,194,0.03);
}

.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 20px auto;
}

.article-body img + em,
.article-body img + p em {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: -12px;
  margin-bottom: 20px;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.article-body details {
  background: #faf8f4;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
}

.article-body summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
}

.article-body summary:hover {
  color: var(--accent-hover);
}

.article-body details[open] > *:not(summary) {
  margin-top: 12px;
}

.article-body details table {
  margin: 8px 0;
}

/* Disclosure / errata / key callouts */

.article-body blockquote > p:first-child > strong:first-child {
  display: inline;
}

/* Wider tables on wide screens */
@media (min-width: 900px) {
  .article-body table {
    font-size: 14px;
  }
}

/* Responsive */
@media (max-width: 600px) {
  .article-card {
    padding: 24px 20px;
  }
  .article-card h1 {
    font-size: 24px;
  }
  .article-body {
    font-size: 14.5px;
  }
  .article-body pre {
    font-size: 12px;
  }
  .article-body table {
    font-size: 12.5px;
  }
}
