:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --max-width: 720px;
  --radius: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f0f0f;
    --color-surface: #1a1a1a;
    --color-text: #e5e5e5;
    --color-text-secondary: #999;
    --color-accent: #60a5fa;
    --color-accent-hover: #93bbfd;
    --color-border: #2a2a2a;
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* ---- Header / Nav ---- */

.banner {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  object-position: center top;
}

header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .site-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-text);
}

nav .nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

nav .nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

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

/* ---- Main ---- */

main {
  flex: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

main:has(.resume) {
  max-width: 960px;
  padding: 2rem 1.5rem;
}

/* ---- Hero ---- */

.hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
}

.hero img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.hero p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

/* ---- Sections ---- */

section {
  margin-bottom: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--color-accent), transparent) 1;
}

/* ---- Link lists ---- */

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

.link-list li {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  border-radius: 6px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.link-list li:last-child {
  border-bottom: none;
}

.link-list li:hover {
  background: var(--color-bg);
  transform: translateX(4px);
}

.link-list a {
  font-weight: 500;
}

.link-list a::after {
  content: " \2192";
  opacity: 0;
  transition: opacity 0.15s ease;
}

.link-list li:hover a::after {
  opacity: 1;
}

.link-list .meta {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.15rem;
}

/* ---- Blog list ---- */

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

.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list .post-date {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
}

.post-list .post-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: block;
  margin-top: 0.25rem;
}

.post-list .post-excerpt {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

/* ---- Blog post ---- */

article.post h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

article.post .post-meta {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  margin-bottom: 2rem;
}

article.post p {
  margin-bottom: 1.25rem;
}

article.post h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

article.post code {
  background: var(--color-border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

article.post pre {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

article.post pre code {
  background: none;
  padding: 0;
}

/* ---- Resume ---- */

.resume {
  max-width: 960px;
  margin: 0 auto;
  font-size: 0.88rem;
  line-height: 1.55;
}

.resume-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.resume-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.resume-location {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.resume-details {
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.resume-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.resume-section {
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
}

.resume-section h2 {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--color-accent), transparent) 1;
}

.resume-section > p {
  margin-bottom: 0.7rem;
}

.resume-section > p:last-of-type {
  margin-bottom: 0;
}

.resume-role {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.resume-role:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.resume-role-header {
  margin-bottom: 0.5rem;
}

.resume-role-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.05rem;
}

.resume-via {
  font-weight: 400;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
}

.resume-title {
  display: block;
  font-weight: 500;
  color: var(--color-accent);
  font-size: 0.84rem;
}

.resume-dates {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
}

.resume-role ul {
  list-style: disc;
  padding-left: 1.15rem;
}

.resume-role li {
  margin-bottom: 0.2rem;
  font-size: 0.86rem;
  line-height: 1.5;
}

.resume-education {
  list-style: none;
}

.resume-education li {
  margin-bottom: 0.4rem;
  font-size: 0.86rem;
}

.resume-edu-details {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 0.05rem;
}

.resume-community {
  list-style: none;
}

.resume-community li {
  padding: 0.2rem 0;
  font-size: 0.86rem;
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  nav {
    flex-direction: column;
    gap: 0.75rem;
  }
}
