@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ── Tokens ── */
:root {
  --bg:          #f4f6f9;
  --bg-card:     #ffffff;
  --fg:          #0b2341;
  --fg-muted:    #3d5068;
  --fg-faint:    #9aadbe;
  --accent:      #0b2341;
  --accent-warm: #e86100;
  --accent-sky:  #0093d2;
  --border:      #d6dde6;
  --serif:       'DM Serif Display', Georgia, serif;
  --sans:        'DM Sans', system-ui, sans-serif;
  --radius:      6px;
  --max:         1100px;
  --transition:  200ms ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #060f1c;
    --bg-card:     #0d1e30;
    --fg:          #e8edf3;
    --fg-muted:    #8da3b8;
    --fg-faint:    #2e4560;
    --accent:      #0093d2;
    --accent-warm: #e86100;
    --accent-sky:  #0093d2;
    --border:      #162840;
  }
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Layout ── */
.container {
  width: min(var(--max), 100% - 3rem);
  margin-inline: auto;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.nav-logo span { color: var(--accent-warm); }
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-sky);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--fg);
  padding: 0.25rem;
}

/* ── Hero ── */
.hero {
  padding-block: 6rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-sky);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-warm);
}
.hero-body {
  font-size: 1.05rem;
  color: var(--fg-muted);
  max-width: 42ch;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  transition: transform var(--transition), filter var(--transition), background var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--accent-warm);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--fg); border-color: var(--accent-sky); }

.hero-visual {
  display: flex;
  justify-content: flex-end;
}
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 360px;
}
.hero-card-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 1.5rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.stat {
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stat-num {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.3;
}

/* ── Section common ── */
section { padding-block: 5rem; }
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  color: var(--fg);
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Experience ── */
.exp-section { border-top: 1px solid var(--border); }

.exp-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.exp-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent-warm);
  border-radius: 4px 0 0 4px;
}
.exp-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-sky);
  background: color-mix(in srgb, var(--accent-sky) 10%, transparent);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  width: fit-content;
}
.exp-role {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 0.3rem;
}
.exp-company {
  font-size: 0.95rem;
  color: var(--accent-warm);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.exp-date {
  font-size: 0.8rem;
  color: var(--fg-faint);
  margin-bottom: 1.5rem;
}
.exp-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.exp-bullets li {
  font-size: 0.925rem;
  color: var(--fg-muted);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}
.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent-warm);
  font-size: 0.8rem;
}

.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
}
.exp-card:hover {
  border-color: var(--fg-faint);
  transform: translateY(-2px);
}
.exp-card-role {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--fg);
  margin-bottom: 0.2rem;
}
.exp-card-company {
  font-size: 0.85rem;
  color: var(--accent-warm);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.exp-card-date {
  font-size: 0.78rem;
  color: var(--fg-faint);
  margin-bottom: 1rem;
}
.exp-card .exp-bullets li {
  font-size: 0.875rem;
}

/* ── Skills ── */
.skills-section { border-top: 1px solid var(--border); background: var(--bg-card); }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.skills-education {
  margin-top: 2rem;
  padding-top: 2rem;
}
.skills-education-header {
  margin-bottom: 2rem;
}
.skill-tag {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--fg-muted);
  background: var(--bg);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  cursor: default;
}
.skill-tag:hover {
  border-color: var(--accent-sky);
  color: var(--accent-sky);
}

/* ── Blog ── */
.blog-section { border-top: 1px solid var(--border); }
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
  cursor: pointer;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--fg-faint);
}
.post-card-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.post-tag {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-sky);
  margin-bottom: 0.75rem;
}
.post-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.post-excerpt {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--fg-faint);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
}
.post-read-more {
  color: var(--accent-warm);
  font-weight: 500;
  font-size: 0.82rem;
}

.no-posts {
  color: var(--fg-muted);
  font-size: 0.95rem;
  padding: 3rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.no-posts strong { color: var(--fg); }

/* ── Post Viewer (modal-like overlay) ── */
.post-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(.4,0,.2,1);
}
.post-overlay.open { transform: translateX(0); }
.post-overlay-inner {
  width: min(780px, 100% - 3rem);
  margin-inline: auto;
  padding-block: 3rem 5rem;
}
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: color var(--transition);
}
.post-back:hover { color: var(--fg); }
.post-full-tag {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-sky);
  margin-bottom: 1rem;
}
.post-full-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 1rem;
}
.post-full-meta {
  font-size: 0.82rem;
  color: var(--fg-faint);
  margin-bottom: 1.5rem;
}
.post-share {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-family: var(--sans);
  color: var(--fg-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.share-btn:hover {
  border-color: var(--accent-sky);
  color: var(--accent-sky);
}
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--fg-muted);
}
.post-content h1 {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--fg);
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.post-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--fg);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.post-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--fg);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}
.post-content p { margin-bottom: 1.4rem; }
.post-content strong { color: var(--fg); font-weight: 500; }
.post-content em { font-style: italic; }
.post-content code {
  font-family: 'Menlo', monospace;
  font-size: 0.88em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--accent-warm);
}
.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.4rem;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.88rem;
}
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.4rem; }
.post-content blockquote {
  border-left: 3px solid var(--accent-warm);
  padding-left: 1.25rem;
  margin-left: 0;
  margin-bottom: 1.4rem;
  color: var(--fg);
  font-style: italic;
}
.post-content a { color: var(--accent-sky); text-decoration: underline; text-underline-offset: 3px; }

/* ── 404 Page ── */
.not-found-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.not-found-section {
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: 0;
}
.not-found-inner {
  padding-block: clamp(2rem, 6vh, 3.5rem);
}
.not-found-code {
  font-family: var(--serif);
  font-size: clamp(6rem, 20vw, 10rem);
  line-height: 1;
  color: var(--border);
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  user-select: none;
}
.not-found-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--fg);
}
.not-found-body {
  font-size: 1rem;
  color: var(--fg-muted);
  max-width: 42ch;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.not-found-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Contact / Footer ── */
.contact-section {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.contact-text h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 1rem;
}
.contact-text p {
  font-size: 0.975rem;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 42ch;
}
.social-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color var(--transition), color var(--transition), transform var(--transition), background var(--transition);
  color: var(--fg-muted);
}
.social-link:hover {
  border-color: var(--accent-warm);
  color: var(--accent-warm);
  transform: translateX(4px);
}
.social-link-icon { width: 20px; flex-shrink: 0; }
.social-link-text { font-size: 0.9rem; font-weight: 400; }
.social-link-arrow { margin-left: auto; font-size: 0.8rem; opacity: 0.5; }

footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--fg-faint);
}
.footer-name { font-family: var(--serif); font-size: 0.95rem; color: var(--fg-muted); }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}
.fade-up:nth-child(1) { animation-delay: 0.05s; }
.fade-up:nth-child(2) { animation-delay: 0.15s; }
.fade-up:nth-child(3) { animation-delay: 0.25s; }
.fade-up:nth-child(4) { animation-delay: 0.35s; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding-block: 3.5rem 3rem; }
  .hero-visual { justify-content: flex-start; }
  .hero-card { max-width: 100%; }
  .exp-featured { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1.5rem; gap: 1.25rem; }
  .nav-links.open { display: flex; }
  .nav-hamburger { display: block; }
  nav { position: relative; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
