/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:           #FAF8F5;       /* warm off-white */
  --surface:      #F3F0EB;       /* slightly darker card surface */
  --border:       #E5E0D8;       /* subtle divider */
  --text:         #1A1917;       /* near-black */
  --text-muted:   #6B6560;       /* secondary text */
  --accent:       #C17A5A;       /* muted terracotta */
  --accent-hover: #A8634A;       /* darker on hover */
  --accent-light: #F0E4DC;       /* tinted bg for accent areas */
  --link:         #C17A5A;
  --link-hover:   #A8634A;
  --code-bg:      #EDEAE4;
  --radius:       6px;
  --radius-lg:    12px;
  --nav-h:        64px;
  --max-w:        780px;
  --max-w-wide:   1100px;
  --transition:   0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--link-hover); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5 {
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);  }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p + p { margin-top: 1em; }

strong { font-weight: 600; }
em     { font-style: italic; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--wide {
  max-width: var(--max-w-wide);
}

.section {
  padding-block: 4rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w-wide);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.nav__logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }
.nav__logo:hover { color: var(--text); }

.nav__links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
  background: var(--surface);
}
.nav__links a.active { color: var(--accent); }

/* hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  border-radius: var(--radius);
}
.nav__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* mobile nav drawer */
.nav__mobile {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  padding: 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}
.nav__mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
.nav__mobile a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.nav__mobile a:last-child { border-bottom: none; }
.nav__mobile a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .nav__links  { display: none; }
  .nav__burger { display: flex; }
}

/* dimmed backdrop — closes mobile nav when tapping outside drawer */
.nav__backdrop {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 98;
  background: rgba(0, 0, 0, 0.4);
}
@media (max-width: 640px) {
  .nav__backdrop { display: block; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-w-wide);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.footer__links a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--accent); }

.footer__links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   HOME / HERO
   ============================================================ */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h));
  padding-block: 5rem;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.1s;
}

.hero__name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero__name .accent-dot {
  color: var(--accent);
}

.hero__tagline {
  margin-top: 1.25rem;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-muted);
  font-weight: 400;
  max-width: 540px;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.35s;
}

.hero__tagline .underline-anim {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-weight: 500;
}
.hero__tagline .underline-anim::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  animation: lineGrow 0.7s ease forwards 1s;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.5s;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform 0.15s ease;
  border: none;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(193, 122, 90, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--text-muted);
}

/* ============================================================
   CARDS (used on blog index, etc.)
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

.card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  line-height: 1.3;
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--accent); }

.card__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   TAGS
   ============================================================ */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent-hover);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding-top: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.page-header__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.page-header__subtitle {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 540px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

.about-aside {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

@media (max-width: 699px) {
  .about-aside {
    position: static;
  }
}

.about-aside__name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.about-aside__title {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.about-aside__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-aside__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.about-aside__links a:hover { color: var(--accent); }

.about-body h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.about-body h2:first-child { margin-top: 0; }

.about-body p {
  color: var(--text-muted);
  line-height: 1.75;
}

/* ============================================================
   RESUME PAGE
   ============================================================ */
.resume-header {
  margin-bottom: 2.5rem;
}
.resume-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.resume-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.resume-section {
  margin-bottom: 3rem;
}

.resume-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-summary {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.975rem;
}

.competencies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.competency {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 500;
}

.job {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding-bottom: 1.75rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}
.job:last-child { border-bottom: none; margin-bottom: 0; }

@media (min-width: 600px) {
  .job {
    grid-template-columns: 1fr auto;
    column-gap: 1.5rem;
  }
  .job__dates { text-align: right; }
}

.job__company {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.job__role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.1rem;
}
.job__dates {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 0.15rem;
  align-self: start;
}
.job__bullets {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.job__bullets li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.edu-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.edu-row__degree { font-weight: 600; font-size: 0.95rem; }
.edu-row__school { color: var(--text-muted); font-size: 0.875rem; }
.edu-row__year   { color: var(--text-muted); font-size: 0.825rem; white-space: nowrap; }

.certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cert {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-weight: 600;
}

/* ============================================================
   BLOG INDEX
   ============================================================ */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ============================================================
   BLOG POST
   ============================================================ */
.post-header {
  padding-top: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.post-header__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.post-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.post-body {
  font-size: 1.025rem;
  line-height: 1.8;
  color: var(--text);
}

.post-body h1, .post-body h2, .post-body h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.post-body h1 { font-size: 1.75rem; }
.post-body h2 { font-size: 1.4rem; border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.post-body h3 { font-size: 1.15rem; }

.post-body p  { margin-bottom: 1.25rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.post-body li { margin-bottom: 0.35rem; }

.post-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
.post-body code {
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}
.post-body pre code {
  background: transparent;
  padding: 0;
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }

/* ============================================================
   NOW PAGE
   ============================================================ */
.now-sections {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.now-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.now-card__label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.now-card__content {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1rem;
}

/* ============================================================
   HOMELAB PAGE
   ============================================================ */
.homelab-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stack-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: start;
}

.stack-item__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stack-item__body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.stack-item__body p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.homelab-note {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}
.empty-state__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.empty-state p {
  font-size: 0.95rem;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: 2.5rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lineGrow {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   PRINT (resume)
   ============================================================ */
@media print {
  .nav, .footer { display: none; }
  .section { padding-block: 1rem; }
  body { font-size: 11pt; }
  .btn { display: none; }
}
