/* ═══════════════════════════════════════════════
   Gruvbox Light / Dark — Ryan's Portfolio
   ═══════════════════════════════════════════════ */

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

:root {
  /* Gruvbox Light palette */
  --bg0-hard:  #f9f5d7;
  --bg0:       #fbf1c7;
  --bg1:       #ebdbb2;
  --bg2:       #d5c4a1;
  --bg3:       #bdae93;
  --bg4:       #928374;
  --fg0:       #282828;
  --fg1:       #3c3836;
  --fg2:       #504945;
  --fg3:       #7c6f64;
  --red:       #cc241d;
  --green:     #98971a;
  --yellow:    #d79921;
  --blue:      #458588;
  --purple:    #b16286;
  --aqua:      #689d6a;
  --orange:    #d65d0e;

  --font-sans:  'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
}

/* ── Gruvbox Dark palette ── */
[data-theme="dark"] {
  --bg0-hard:  #1d2021;
  --bg0:       #282828;
  --bg1:       #32302f;
  --bg2:       #3c3836;
  --bg3:       #504945;
  --bg4:       #585858;
  --fg0:       #f9f5d7;
  --fg1:       #f2e5bc;
  --fg2:       #ebdbb2;
  --fg3:       #d5c4a1;
  --red:       #fb4934;
  --green:     #b8bb26;
  --yellow:    #fabd2f;
  --blue:      #83a598;
  --purple:    #d3869b;
  --aqua:      #8ec07c;
  --orange:    #fe8019;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg0);
  color: var(--fg0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding-top: 56px;
}

/* ── Active nav state ── */
.nav-menu a.active {
  color: var(--fg0);
  position: relative;
}
.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
}

/* ── Floating particles ── */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}
@keyframes float-up {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  3%   { opacity: .35; }
  97%  { opacity: .35; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Page layout ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

#page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Top Navigation ── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--bg0-hard);
  border-bottom: 1px solid var(--bg2);
  transition: background 0.3s, border-color 0.3s;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo img {
  height: 32px;
  width: auto;
  display: block;
}

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

.nav-menu a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--fg3);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--fg0);
}

/* ═══════════════════════════════════════════════
   About Page
   ═══════════════════════════════════════════════ */
.about-hero {
  width: min(92vw, 960px);
  margin-inline: auto;
}
.about-hero p {
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════
   Homelab Page
   ═══════════════════════════════════════════════ */
.homelab-hero {
  width: min(92vw, 960px);
  margin-inline: auto;
}

.homelab-hero p {
  font-size: 1.05rem;
}

.homelab-hardware {
  max-width: 960px;
  margin-inline: auto;
}

/* ── Hardware overview ── */
.hardware-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.hardware-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid var(--bg2);
}
.hardware-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.hardware-specs {
  display: flex;
  flex-direction: column;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg2);
  color: var(--fg3);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════
   Contact Page
   ═══════════════════════════════════════════════ */
.contact-split {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 640px;
  margin-inline: auto;
  margin-top: auto;
  margin-bottom: auto;
  flex: 1;
  justify-content: center;
}

.contact-top {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact-logo {
  width: 72px;
  height: auto;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.contact-intro {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-intro h2 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--fg0);
}
.contact-intro h2::before { content: none; }

.contact-intro p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--fg2);
}

.contact-right {
  display: flex;
  flex-direction: row;
  gap: 0;
  border: 1.5px solid var(--bg2);
  border-radius: 10px;
  overflow: hidden;
}

.contact-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  padding: 1.5rem 1rem;
  text-decoration: none;
  background: var(--bg1);
  border-right: 1px solid var(--bg2);
  transition: background 0.15s;
}
.contact-row:last-child {
  border-right: none;
}
.contact-row:hover {
  background: var(--bg2);
}

.contact-row__icon {
  font-size: 1.25rem;
  color: var(--orange);
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.contact-row__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


.contact-row__arrow {
  display: none;
}

@media (max-width: 600px) {
  .contact-top {
    flex-direction: column;
  }
  .contact-right {
    flex-direction: column;
  }
  .contact-row {
    border-right: none;
    border-bottom: 1px solid var(--bg2);
    flex-direction: row;
    justify-content: flex-start;
  }
  .contact-row:last-child {
    border-bottom: none;
  }
  .contact-row__body {
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════ */
.section.hero {
  margin-top: 1rem;
  margin-bottom: 1rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
}
.hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  width: min(92vw, 960px);
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  text-align: left;
}

.hero-content h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--fg0);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.hero-role {
  font-size: 1.1rem;
  color: var(--orange);
  margin-top: .35rem;
  font-weight: 600;
}

.hero-desc {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--fg2);
  margin-top: .85rem;
  max-width: 420px;
}

.hero-tags {
  display: flex;
  flex-wrap: nowrap;
  gap: .5rem;
  margin-top: 1.15rem;
  justify-content: flex-start;
}

.hero-tags span {
  font-family: var(--font-mono);
  font-size: .68rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  color: var(--fg3);
  letter-spacing: .04em;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.hero-tags span:hover {
  color: var(--fg0);
  border-color: var(--bg3);
}

/* ── Photo / Orbit circle ── */
.hero-photo {
  position: relative;
  flex-shrink: 0;
  width: 220px;
  min-height: clamp(320px, 50vh, 600px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero buttons ── */
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: .8rem;
  padding: .6rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--fg0);
  color: var(--bg0);
  border: 2px solid var(--fg0);
}

.btn-primary:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.btn-secondary {
  background: transparent;
  color: var(--fg0);
  border: 2px solid var(--bg3);
}

.btn-secondary:hover {
  border-color: var(--fg0);
  background: var(--bg2);
}

/* ═══════════════════════════════════════════════
   Skills Orbit
   ═══════════════════════════════════════════════ */
.skills-orbit-container {
  position: relative;
  width: min(90vw, 600px);
  height: 600px;
  margin: 0 auto 1rem;
}

/* Central hub */
.hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  border: 2.5px solid var(--fg3);
  box-shadow:
    0 2px 16px rgba(40,40,40,.08),
    0 0 0 6px var(--bg0),
    0 0 0 8px rgba(146,131,116,.15);
  transition: box-shadow 0.3s;
  overflow: hidden;
}
[data-theme="dark"] .hub {
  box-shadow:
    0 2px 16px rgba(249,245,215,.06),
    0 0 0 6px var(--bg0),
    0 0 0 8px rgba(80,73,69,.2);
}
.hub img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Orbit rings — dotted circles that rotate */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 270px;
  height: 270px;
  margin: -135px 0 0 -135px;
  border: 2px dashed rgba(146,131,116,.2);
  border-radius: 50%;
  animation: rotate-ring 35s linear infinite;
  transition: border-color 0.3s;
}
[data-theme="dark"] .orbit-ring {
  border-color: rgba(80,73,69,.25);
}
@keyframes rotate-ring {
  to { transform: rotate(360deg); }
}

.orbit-ring-2 {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border: 2px dashed rgba(146,131,116,.12);
  border-radius: 50%;
  animation: rotate-ring 55s linear infinite reverse;
  transition: border-color 0.3s;
}
[data-theme="dark"] .orbit-ring-2 {
  border-color: rgba(80,73,69,.15);
}

/* Orbit nodes — positioned on the ring using rotate+translate */
.orbit-ring .orbit-node {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
}
.orbit-ring .orbit-node:nth-child(1) { transform: rotate(0deg)   translate(135px) rotate(0deg); }
.orbit-ring .orbit-node:nth-child(2) { transform: rotate(72deg)   translate(135px) rotate(-72deg); }
.orbit-ring .orbit-node:nth-child(3) { transform: rotate(144deg)  translate(135px) rotate(-144deg); }
.orbit-ring .orbit-node:nth-child(4) { transform: rotate(216deg)  translate(135px) rotate(-216deg); }
.orbit-ring .orbit-node:nth-child(5) { transform: rotate(288deg)  translate(135px) rotate(-288deg); }

.orbit-ring-2 .orbit-node {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -32px 0 0 -32px;
}
.orbit-ring-2 .orbit-node:nth-child(1)  { transform: rotate(0deg)    translate(260px) rotate(0deg); }
.orbit-ring-2 .orbit-node:nth-child(2)  { transform: rotate(40deg)   translate(260px) rotate(-40deg); }
.orbit-ring-2 .orbit-node:nth-child(3)  { transform: rotate(80deg)   translate(260px) rotate(-80deg); }
.orbit-ring-2 .orbit-node:nth-child(4)  { transform: rotate(120deg)  translate(260px) rotate(-120deg); }
.orbit-ring-2 .orbit-node:nth-child(5)  { transform: rotate(160deg)  translate(260px) rotate(-160deg); }
.orbit-ring-2 .orbit-node:nth-child(6)  { transform: rotate(200deg)  translate(260px) rotate(-200deg); }
.orbit-ring-2 .orbit-node:nth-child(7)  { transform: rotate(240deg)  translate(260px) rotate(-240deg); }
.orbit-ring-2 .orbit-node:nth-child(8)  { transform: rotate(280deg)  translate(260px) rotate(-280deg); }
.orbit-ring-2 .orbit-node:nth-child(9)  { transform: rotate(320deg)  translate(260px) rotate(-320deg); }

/* Skill nodes */
.orbit-node {
  z-index: 10;
  pointer-events: auto;
}
.orbit-ring .orbit-node {
  width: 50px;
  height: 50px;
}
.orbit-ring-2 .orbit-node {
  width: 64px;
  height: 64px;
}
.skill-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg0);
  border: 2px solid;
  cursor: default;
  box-shadow: 0 2px 10px rgba(40,40,40,.06);
  will-change: transform;
  backface-visibility: hidden;
  transition: box-shadow 0.3s;
}
[data-theme="dark"] .skill-inner {
  box-shadow: 0 2px 10px rgba(249,245,215,.04);
}
.orbit-ring .skill-inner i {
  font-size: 1.5rem;
}
.orbit-ring-2 .skill-inner i {
  font-size: 2rem;
}

/* Counter-rotation on inner content so icons stay upright */
.orbit-ring .skill-inner {
  animation: counter-rotate 35s linear infinite;
}
.orbit-ring-2 .skill-inner {
  animation: counter-rotate-reverse 55s linear infinite;
}
@keyframes counter-rotate {
  to { transform: rotate(-360deg); }
}
@keyframes counter-rotate-reverse {
  to { transform: rotate(360deg); }
}

/* ── Skill node colors ── */
.node-git        { border-color: var(--red); }
.node-git i      { color: var(--red); }

.node-linux      { border-color: var(--fg0); }
.node-linux i    { color: var(--fg0); }

.node-servers    { border-color: var(--yellow); }
.node-servers i  { color: var(--yellow); }

.node-cli        { border-color: var(--fg0); }
.node-cli i      { color: var(--fg0); }

.node-kubernetes { border-color: var(--blue); }
.node-kubernetes i { color: var(--blue); }

.node-ansible    { border-color: var(--red); }
.node-ansible i  { color: var(--red); }

.node-github     { border-color: var(--fg0); }
.node-github i   { color: var(--fg0); }

.node-gitlab     { border-color: var(--orange); }
.node-gitlab i   { color: var(--orange); }

.node-terraform  { border-color: var(--purple); }
.node-terraform i{ color: var(--purple); }

.node-grafana    { border-color: var(--yellow); }
.node-grafana i  { color: var(--yellow); }

.node-security   { border-color: var(--orange); }
.node-security i { color: var(--orange); }

.node-docker     { border-color: var(--blue); }
.node-docker i   { color: var(--blue); }

.node-jenkins    { border-color: var(--fg0); }
.node-jenkins i  { color: var(--fg0); }

.node-argocd     { border-color: var(--orange); }
.node-argocd i   { color: var(--orange); }

/* ── Skill labels ── */
.skill-label {
  position: absolute;
  bottom: -1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--fg2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.orbit-ring,
.orbit-ring-2 {
  pointer-events: none;
}

.orbit-node:hover .skill-label {
  opacity: 1;
}

/* ── Section dividers ── */
.section-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0 auto;
  max-width: 960px;
  padding: 0.5rem 0;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg3) 20%, var(--bg3) 80%, transparent);
}
.section-divider span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--bg4);
  letter-spacing: 0.15em;
  user-select: none;
}

/* Hero divider — suggests scrolling */
.hero-divider {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.hero-divider::before {
  content: '';
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg3) 30%, var(--bg3) 70%, transparent);
}
.hero-divider span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--bg4);
  letter-spacing: 0.15em;
  user-select: none;
}
.hero-divider .scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  animation: bounce 2s ease-in-out infinite;
  color: var(--bg4);
}
.hero-divider .scroll-arrow svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-divider .scroll-arrow {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════ */
.section {
  width: min(92vw, 960px);
  margin: 2.5rem auto;
}
.section h2 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--fg1);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section h2::before {
  content: '//';
  color: var(--bg4);
}
.section p {
  line-height: 1.85;
  color: var(--fg2);
}
.section p strong {
  color: var(--fg0);
}

/* ═══════════════════════════════════════════════
   Experience Timeline
   ═══════════════════════════════════════════════ */
.experience-section p {
  font-size: 0.9rem;
  color: var(--fg3);
  margin-bottom: 2rem;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1rem 0 2rem;
}

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--bg3) 5%,
    var(--bg3) 95%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 0;
}

/* Dot on the line */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 1.5rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg0);
  border: 2.5px solid var(--bg3);
  transform: translateX(-50%);
  z-index: 2;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.timeline-item:hover .timeline-dot {
  border-color: var(--orange);
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(214, 93, 14, 0.12);
}

/* Card wrapper — takes half width and pushes to left or right */
.timeline-card {
  width: calc(50% - 2rem);
  background: var(--bg1);
  border: 1.5px solid var(--bg2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.timeline-card:hover {
  border-color: var(--bg3);
  box-shadow: 0 2px 12px rgba(40, 40, 40, 0.05);
  transform: translateY(-2px);
}
[data-theme="dark"] .timeline-card:hover {
  box-shadow: 0 2px 12px rgba(249, 245, 215, 0.03);
}

/* Left card — pushes to the left side */
.timeline-item:nth-child(odd) .timeline-card {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* Right card — pushes to the right side */
.timeline-item:nth-child(even) .timeline-card {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.timeline-card__header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg3);
  background: var(--bg2);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.timeline-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.timeline-role {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--fg1);
  font-weight: 600;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg3);
}

.timeline-card__desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--fg2);
  margin-bottom: 0.85rem;
}

.timeline-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ═══════════════════════════════════════════════
   Tech Stack Section
   ═══════════════════════════════════════════════ */
.stack-header {
  margin-bottom: 2rem;
}
.stack-header p {
  font-size: 0.9rem;
  color: var(--fg3);
  margin-top: 0.35rem;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.stack-category {
  background: var(--bg1);
  border: 1.5px solid var(--bg2);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.stack-category:hover {
  border-color: var(--bg3);
  box-shadow: 0 2px 12px rgba(40,40,40,.05);
}
[data-theme="dark"] .stack-category:hover {
  box-shadow: 0 2px 12px rgba(249,245,215,.03);
}

.stack-category__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.stack-category__title .stack-category__icon {
  font-size: 0.55rem;
  color: var(--orange);
  opacity: 0.7;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg2);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: var(--bg0);
  border: 1px solid var(--bg2);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: default;
}
.stack-item:hover {
  color: var(--fg0);
  border-color: var(--bg3);
  background: var(--bg2);
}
.stack-item i {
  font-size: 1rem;
  line-height: 1;
}

/* Category accent colors */
.stack-category:nth-child(1) .stack-item i  { color: var(--fg0); }   /* Core - neutral */
.stack-category:nth-child(2) .stack-item i  { color: var(--blue); }  /* Containers - blue */
.stack-category:nth-child(3) .stack-item i  { color: var(--purple); } /* CI/CD - purple */
.stack-category:nth-child(4) .stack-item i  { color: var(--aqua); }  /* IaC - aqua */
.stack-category:nth-child(5) .stack-item i  { color: var(--green); } /* Observability - green */
.stack-category:nth-child(6) .stack-item i  { color: var(--orange); } /* Cloud - orange */

@media (max-width: 600px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }
  .stack-category__title {
    font-size: 0.68rem;
  }
  .stack-item {
    font-size: 0.68rem;
    padding: 0.3rem 0.55rem;
  }
}

/* ── Terminal card ── */
.terminal-card {
  background: var(--bg1);
  border: 1.5px solid var(--bg2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.85;
  margin-top: .75rem;
  box-shadow: 0 1px 8px rgba(40,40,40,.04);
  transition: box-shadow 0.3s;
}
[data-theme="dark"] .terminal-card {
  box-shadow: 0 1px 8px rgba(249,245,215,.03);
}
.terminal-card .prompt { color: var(--green); font-weight: 700; }
.terminal-card .cmd   { color: var(--fg0); }
.terminal-card .output{ color: var(--fg2); padding-left: .75rem; }
.terminal-card .cursor {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  background: var(--fg3);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ── Footer ── */
footer {
  background: var(--bg1);
  border-top: 1px solid var(--bg2);
  padding: 1.5rem 0;
  margin-inline: calc(-50vw + 50%);
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}
.footer-social {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.footer-social a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--fg3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-social a:hover {
  color: var(--fg0);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.social-link i {
  font-size: 1rem;
}

/* ── Theme toggle ── */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--bg3);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg3);
  transition: color 0.2s, border-color 0.2s;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--fg0);
  border-color: var(--fg3);
}
.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
[data-theme="dark"] .theme-toggle .icon-sun {
  display: flex;
}

/* ── Hamburger button ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--bg3);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  padding: 6px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--fg3);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg0-hard);
    border-bottom: 1px solid var(--bg2);
    padding: 0.5rem 0;
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-menu li a {
    display: block;
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }
  .orbit-ring-2 {
    display: none;
  }
  .skills-orbit-container {
    width: 310px;
    height: 310px;
    margin-top: 2rem;
    margin-bottom: 0;
    overflow: hidden;
  }
  .hero-photo {
    width: 310px;
    min-height: 310px;
    overflow: hidden;
  }
  .hub {
    width: 110px;
    height: 110px;
  }
  .orbit-ring {
    width: 246px;
    height: 246px;
    margin: -123px 0 0 -123px;
  }
  .orbit-ring .orbit-node { width: 42px; height: 42px; }
  .orbit-ring .orbit-node:nth-child(1) { transform: rotate(0deg)   translate(123px) rotate(0deg); }
  .orbit-ring .orbit-node:nth-child(2) { transform: rotate(72deg)  translate(123px) rotate(-72deg); }
  .orbit-ring .orbit-node:nth-child(3) { transform: rotate(144deg) translate(123px) rotate(-144deg); }
  .orbit-ring .orbit-node:nth-child(4) { transform: rotate(216deg) translate(123px) rotate(-216deg); }
  .orbit-ring .orbit-node:nth-child(5) { transform: rotate(288deg) translate(123px) rotate(-288deg); }
  .orbit-ring .skill-inner i { font-size: 1.2rem; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hardware-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-desc {
    max-width: 100%;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  .hero-tags {
    justify-content: center;
  }
  .hero-photo {
    width: 300px;
    min-height: 320px;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .top-nav { padding: 0.6rem 1rem; }
  .footer-social { gap: 1.25rem; flex-wrap: wrap; }
  .hub { width: 160px; height: 160px; }
  .skill-node { width: 72px; height: 72px; }
  .skill-node i { font-size: 1.2rem; }
  .skill-node span { font-size: .5rem; }

  /* Timeline — single column on mobile */
  .timeline::before {
    left: 1rem;
  }
  .timeline-item {
    padding-left: 2.5rem;
  }
  .timeline-dot {
    left: 1rem;
  }
  .timeline-card {
    width: 100%;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ═══════════════════════════════════════════════
   Blog
   ═══════════════════════════════════════════════ */
.blog-hero {
  width: min(92vw, 960px);
  margin-inline: auto;
}
.blog-hero p {
  font-size: 1.05rem;
}

/* ── Blog list — minimal changelog style ── */
.blog-feed {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.blog-year-group {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0 2rem;
}

.blog-year-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bg4);
  letter-spacing: 0.05em;
  padding-top: 0.55rem;
  text-align: right;
}

.blog-year-posts {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--bg2);
  padding-left: 2rem;
  gap: 0;
}

.blog-entry {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: baseline;
  gap: 0 1.25rem;
  padding: 0.55rem 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.blog-entry:not(:last-child) {
  border-bottom-color: var(--bg1);
}
.blog-entry:hover .blog-entry__title {
  color: var(--orange);
}

.blog-entry__date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--fg3);
  white-space: nowrap;
}

.blog-entry__title {
  font-size: 0.95rem;
  color: var(--fg0);
  transition: color 0.15s;
}

.blog-entry__tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.blog-empty {
  color: var(--fg3);
  font-style: italic;
}

@media (max-width: 600px) {
  .blog-year-group {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .blog-year-label {
    text-align: left;
  }
  .blog-year-posts {
    border-left: none;
    padding-left: 0;
  }
  .blog-entry {
    grid-template-columns: 3.5rem 1fr;
    grid-template-rows: auto auto;
  }
  .blog-entry__tags {
    grid-column: 2;
    justify-content: flex-start;
  }
}

/* Blog post page */
.blog-post {
  max-width: 720px;
  margin-inline: auto;
}

.blog-post__header {
  margin-bottom: 2rem;
}

.blog-post__header h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--fg0);
  margin-bottom: 0.75rem;
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.blog-post__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg3);
  background: var(--bg2);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.blog-post__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.blog-post__content {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--fg2);
}

.blog-post__content h2,
.blog-post__content h3 {
  font-family: var(--font-mono);
  color: var(--fg0);
  margin: 2rem 0 0.75rem;
}

.blog-post__content h2::before {
  content: '// ';
  color: var(--bg4);
}

.blog-post__content p {
  margin-bottom: 1rem;
}

.blog-post__content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg1);
  border: 1px solid var(--bg2);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: var(--orange);
}

.blog-post__content pre {
  background: var(--bg1);
  border: 1.5px solid var(--bg2);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.25rem 0;
}

.blog-post__content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--fg1);
  font-size: 0.82rem;
}

.blog-post__content ul,
.blog-post__content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.blog-post__content li {
  margin-bottom: 0.35rem;
}

.blog-post__content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-post__content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border-radius: 6px;
}

.blog-post__back {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-entry {
    grid-template-columns: 3rem 1fr;
    gap: 0 0.75rem;
  }
  .blog-entry__date {
    font-size: 0.65rem;
  }
}

/* ── Page transitions ── */
#page-content {
  transition: opacity 0.075s ease;
}
.page-leaving {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  #page-content {
    transition: none;
  }
}

@media (max-width: 480px) {
  .top-nav {
    padding: 0.6rem 1rem;
  }
  .section {
    margin: 1.5rem auto;
  }
  .hero-buttons {
    gap: 0.65rem;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .contact-row {
    padding: 1rem 0.75rem;
  }
  .contact-row__label {
    font-size: 0.62rem;
  }
}

@media (max-width: 360px) {
  .timeline-dot {
    left: 0.75rem;
  }
  .timeline-item {
    padding-left: 1.75rem;
  }
  .blog-post__header h1 {
    font-size: 1.35rem;
  }
}
