/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-primary:    #D6D6D6;
  --bg-secondary:  #E5E5E5;
  --bg-tertiary:   #DCDCDC;
  --text:          #50514f;
  --text-strong:   #2a2b29;
  --text-muted:    #70716e;
  --accent:        #758ecd;
  --accent-dark:   #5A78C4;
  --panel:         rgba(214,214,214,0.90);
  --panel-border:  rgba(117,142,205,0.22);
  --panel-hover:   rgba(195,197,210,0.97);
  --grid-dot:      rgba(80,81,79,0.10);
  --arch-opacity:  0.55;
  --arch-color:    #5A78C4;
  --tag-bg:        rgba(117,142,205,0.13);
  --tag-border:    rgba(117,142,205,0.38);
  --tag-text:      #5A78C4;
  --divider:       rgba(117,142,205,0.30);
  --btn-bg:        rgba(117,142,205,0.14);
  --btn-hover:     rgba(117,142,205,0.26);
  --scroll-thumb:  #758ecd;
  --icon-color:    #50514f;
  /* Thick accent border for header/skills/footer — same panel bg */
  --special-border: rgba(117,142,205,0.70);
}

.dark {
  --bg-primary:    #2E3532;
  --bg-secondary:  #3C4440;
  --bg-tertiary:   #464C49;
  --text:          #E5E5E5;
  --text-strong:   #ffffff;
  --text-muted:    #a8ada9;
  --accent:        #A02C3D;
  --accent-dark:   #802331;
  --panel:         rgba(46,53,50,0.90);
  --panel-border:  rgba(160,44,61,0.20);
  --panel-hover:   rgba(28,34,31,0.97);
  --grid-dot:      rgba(229,229,229,0.055);
  --arch-opacity:  0.55;
  --arch-color:    #A02C3D;
  --tag-bg:        rgba(160,44,61,0.13);
  --tag-border:    rgba(160,44,61,0.38);
  --tag-text:      #d45470;
  --divider:       rgba(160,44,61,0.30);
  --btn-bg:        rgba(160,44,61,0.14);
  --btn-hover:     rgba(160,44,61,0.26);
  --scroll-thumb:  #A02C3D;
  --icon-color:    #E5E5E5;
  --special-border: rgba(160,44,61,0.75);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-secondary);
  color: var(--text);
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

/* Dot grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, var(--grid-dot) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ── AWS Architecture Background ──────────────────────────── */
.arch-bg {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--arch-opacity);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.3s;
}
.arch-bg svg {
  width: 95%;
  height: 95%;
  max-width: 1300px;
  color: var(--arch-color);
}

/* ── Theme Toggle ─────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 200;
  background: var(--btn-bg);
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s;
  backdrop-filter: blur(8px);
}
.theme-toggle:hover { background: var(--btn-hover); transform: rotate(18deg) scale(1.08); }
.theme-toggle svg {
  width: 22px; height: 22px;
  stroke: var(--icon-color);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s;
}

/* ── Page ─────────────────────────────────────────────────── */
.page {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  padding: 52px 24px 0;
}

/* ── HEADER — same panel bg, thick accent border ─────────── */
header {
  margin-bottom: 40px;
  animation: fadeUp 0.5s ease both;
}
.header-inner {
  background: var(--panel);
  border: 2px solid var(--special-border);
  border-radius: 10px;
  padding: 32px 36px;
  backdrop-filter: blur(14px);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  transition: background 0.3s, border-color 0.3s;
}

h1 {
  font-family: 'Albert Sans', sans-serif;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--text-strong);
}

.title-role {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 10px;
}

.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 16px;
  font-size: 13px;
}
.contact-line a, .contact-line span { color: var(--text-muted); text-decoration: none; }
.contact-line a {
  text-decoration: underline;
  text-decoration-color: var(--divider);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.contact-line a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.contact-line .sep { color: var(--divider); margin: 0 10px; font-size: 16px; }

.visitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  align-self: flex-start;
}
.pulse-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.visitor-badge strong { color: var(--text-strong); font-weight: 600; }

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.35; transform:scale(0.8); }
}
@keyframes fadeUp {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ── Sections ─────────────────────────────────────────────── */
section {
  margin-bottom: 28px;
  animation: fadeUp 0.5s ease both;
}
section:nth-child(2) { animation-delay:0.07s; }
section:nth-child(3) { animation-delay:0.13s; }
section:nth-child(4) { animation-delay:0.19s; }
section:nth-child(5) { animation-delay:0.25s; }

.section-label {
  font-family: 'Albert Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--accent), transparent);
  opacity: 0.4;
}

/* ── Entry cards — hoverable ──────────────────────────────── */
.entry {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-left: 3px solid transparent;
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 10px;
  backdrop-filter: blur(8px);
  transition: border-left-color 0.2s, background 0.2s, transform 0.15s;
  cursor: default;
}
.entry:hover {
  border-left-color: var(--accent);
  background: var(--panel-hover);
  transform: translateX(3px);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}
.entry-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
  white-space: nowrap;
}
.entry-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color 0.2s, border-color 0.2s;
}
.entry-title a:hover { color: var(--accent); border-color: var(--accent); }

.entry-org { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.date { font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.tag {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--tag-text);
  padding: 2px 9px;
  border-radius: 4px;
}

.entry ul { list-style:none; padding:0; }
.entry ul li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 5px;
  line-height: 1.65;
}
.entry ul li::before { content:'›'; position:absolute; left:0; color:var(--accent); font-weight:700; }

.achievements {
  margin-top: 8px;
  list-style: none;
  padding: 0;
}
.achievements li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 5px;
  line-height: 1.65;
}
.achievements li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.achievements-grid { display:flex; flex-direction:column; gap:6px; margin-top:10px; }

/* ── Skills — same panel bg, thick border, no hover ─────── */
.skills-grid { display:flex; flex-direction:column; gap:8px; }
.skill-row {
  background: var(--panel);
  border: 2px solid var(--special-border);
  border-radius: 8px;
  padding: 12px 20px;
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  backdrop-filter: blur(8px);
  transition: background 0.3s;
}
.skill-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  min-width: 110px;
  flex-shrink: 0;
}
.skill-values { font-size:12px; color:var(--text); }

/* ── Footer — panel bg, thick border, matching link hover ── */
footer {
  position: relative;
  z-index: 10;
  margin-top: 8px;
}
.footer-inner {
  background: var(--panel);
  border: 2px solid var(--special-border);
  border-radius: 10px;
  text-align: center;
  padding: 12px 20px;
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--text-muted);
  transition: background 0.3s, border-color 0.3s;
}
/* Footer link styled like project title links */
.footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--divider);
  transition: color 0.2s, border-color 0.2s;
}
.footer-inner a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--bg-primary); }
::-webkit-scrollbar-thumb { background:var(--scroll-thumb); border-radius:3px; }

@media (max-width: 640px) {
  .page { padding:20px 14px 0; }
  .header-inner { padding:20px; }
  .entry-header { flex-wrap:wrap; }
  .entry-title { white-space:normal; }
}
/* ── GitHub repo icon link ────────────────────────────────── */
.gh-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.gh-link:hover { color: var(--accent); transform: scale(1.12); }
.gh-link svg { width: 22px; height: 22px; fill: currentColor; }

/* Entry header right cluster: date + gh icon */
.entry-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
