/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:         #f5f4f0;
  --text:       #888888;
  --strong:     #2e2e2e;
  --link:       #2e2e2e;
  --link-dec:   #bbb;
  --accent:     #ffbd6d;
  --accent2:    #f5a83a;
  --border:     #dddbd5;
  --muted:      #aaa;
  --radius:     4px;
  --max-w:      480px;
  --transition: 0.2s ease;
}

body.dark-theme {
  --bg:       #1c1c1c;
  --text:     #888;
  --strong:   #e0e0e0;
  --link:     #d5d5d5;
  --link-dec: #555;
  --border:   #333;
  --muted:    #5a5a5a;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  font-size: 15.5px;
  line-height: 1.75;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ─── Content ───────────────────────────────────────────────── */
.content {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 24px;
  transform: translateX(-200px);
  opacity: 0;
  animation: fadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-200px) translateY(8px); }
  to   { opacity: 1; transform: translateX(-200px) translateY(0); }
}

/* ─── Title row ─────────────────────────────────────────────── */
.title-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.stronga {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--strong);
  transition: color var(--transition);
}

/* ─── Typography ────────────────────────────────────────────── */
p { margin: 0 0 10px; }

strong {
  color: var(--strong);
  font-weight: 600;
  transition: color var(--transition);
}

/* ─── Links ─────────────────────────────────────────────────── */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-dec);
  transition: color var(--transition), text-decoration-color var(--transition);
}

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

.highlight {
  background: var(--accent);
  color: #2e2e2e;
  padding: 1px 4px;
  border-radius: 2px;
  text-decoration: none;
}
.highlight:hover {
  background: var(--accent2);
  color: #1a1a1a;
  text-decoration: none;
}

/* ─── Theme toggle ──────────────────────────────────────────── */
.theme-toggle {
  cursor: pointer;
  font-size: 16px;
  color: var(--accent);
  padding: 2px;
  transition: color var(--transition), transform 0.25s ease;
  user-select: none;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.15); }

/* ─── Social icons ──────────────────────────────────────────── */
.social-icons {
  display: flex;
  gap: 14px;
  margin-top: 18px;
}

.social-icon {
  font-size: 17px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition), transform 0.2s ease;
}
.social-icon:hover {
  color: var(--strong);
  transform: translateY(-2px);
}

/* ─── Selection ─────────────────────────────────────────────── */
::selection      { background: var(--accent); color: #2e2e2e; }
::-moz-selection { background: var(--accent); color: #2e2e2e; }

/* ─── Blog ──────────────────────────────────────────────────── */
.article-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 6px 0;
  transition: border-color var(--transition);
}

.articles { margin-top: 4px; }

.article { padding: 8px 0; }

.article-date {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
  font-family: 'Inter', sans-serif;
}

.article-title {
  font-size: 15.5px;
  color: var(--strong);
  font-weight: 600;
  margin: 0;
  transition: color var(--transition);
}
.article:hover .article-title { color: var(--accent2); }

/* ─── Work ──────────────────────────────────────────────────── */
.work-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.work-list li {
  border-bottom: 1px solid var(--border);
  transition: border-color var(--transition);
}

.work-item {
  text-decoration: none;
  color: var(--link);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius);
  transition: background-color var(--transition);
}
.work-item:hover {
  background-color: rgba(255, 189, 109, 0.12);
  text-decoration: none;
  color: var(--link);
}

.work-initial {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(255, 189, 109, 0.18);
  color: var(--accent2);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  line-height: 28px;
  border-radius: 50%;
  font-family: 'Inter', sans-serif;
}

.work-sub {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 1px;
}

/* ─── Home / footer ─────────────────────────────────────────── */
.home {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.home:hover { color: var(--accent); text-decoration: none; }

.footer { margin-top: 24px; }

/* ─── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    align-items: center;
    padding-top: 0;
    min-height: 100vh;
  }
  .content {
    transform: none;
    padding: 0 20px;
    animation: fadeInMob 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
  }
  @keyframes fadeInMob {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
@media (max-width: 480px) {
  .content { padding: 0 16px; }
}

/* ─── Reach out popover ─────────────────────────────────────── */
.reach-out-wrap {
  position: relative;
  display: inline-block;
}

.reach-out {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--link-dec);
  cursor: pointer;
}
.reach-out.active {
  color: var(--accent2);
  text-decoration-color: var(--accent2);
}

.social-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  display: flex;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.22,1,0.36,1);
}

.social-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border);
}
.social-popover::before {
  content: '';
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--bg);
  z-index: 1;
}

.social-popover.open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.social-popover .social-icon {
  font-size: 17px;
  color: var(--muted);
  transition: color var(--transition), transform 0.2s ease;
}
.social-popover .social-icon:hover {
  color: var(--strong);
  transform: translateY(-2px);
}

/* ─── Action row (CV + GitHub) ──────────────────────────────── */
.action-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 11px;
  transition: color var(--transition), border-color var(--transition), background-color var(--transition);
}

.action-btn:hover {
  color: var(--strong);
  border-color: var(--strong);
  background-color: transparent;
  text-decoration: none;
}

/* ─── Mobile popover fix ────────────────────────────────────── */
@media (max-width: 768px) {
  .social-popover {
    position: fixed;
    bottom: 24px;
    left: 50%;
    top: auto;
    transform: translateX(-50%) translateY(10px);
  }
  .social-popover.open {
    transform: translateX(-50%) translateY(0);
  }
  .social-popover::after,
  .social-popover::before {
    display: none;
  }
}

/* ─── Site footer ───────────────────────────────────────────── */
.site-footer {
  margin-top: 32px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: var(--border);
  letter-spacing: 0.03em;
}

/* ─── Work in progress ──────────────────────────────────────── */
.wip-block {
  margin: 28px 0 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wip-icon {
  display: block;
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 10px;
  animation: spin-slow 6s linear infinite;
  display: inline-block;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.wip-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.wip-sub {
  font-size: 15px;
  color: var(--text);
  margin: 0;
}
