/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --bg:      #0a0c10;
  --bg2:     #0f1219;
  --bg3:     #151a24;
  --accent:  #00e5ff;
  --accent2: #7b61ff;
  --accent3: #39ff14;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --border:  rgba(0, 229, 255, 0.15);
  --card:    rgba(15, 18, 25, 0.9);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* =============================================
   NAV
   ============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  padding: 6px 7px;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
/* Animate to X when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: rgba(10, 12, 16, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1rem;
    list-style: none;
  }
  .nav-links.open { display: flex; }

  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.85rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .nav-links li:last-child a { border-bottom: none; }
}

/* =============================================
   SECTIONS (shared)
   ============================================= */
section {
  min-height: 100vh;
  padding: 100px 10vw 80px;
}

.sec-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.sec-label::before { content: '['; }
.sec-label::after  { content: ']'; }

h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 0.7rem 1.8rem;
  border: none;
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: opacity 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  padding: 0.7rem 1.8rem;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: var(--accent);
}

/* =============================================
   HERO
   ============================================= */
#hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 140px;
}

.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.circuit-accent {
  position: absolute;
  right: 8vw;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.12;
}

.hero-content { position: relative; z-index: 1; }

.eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.eyebrow::before { content: '// '; }

h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
h1 span { color: var(--accent); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-row {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}

.stat {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}
.stat-num {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================
   HERO ROW LAYOUT
   ============================================= */
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 70vh;
}

.hero-text-col {
  flex: 1;
  min-width: 0;
}

/* =============================================
   SOLDERING SCENE AVATAR
   ============================================= */
.engineer-avatar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.18)) drop-shadow(0 4px 40px rgba(0,0,0,0.6));
  align-self: center;
}

.engineer-svg {
  width: 340px;
  height: 420px;
  border: 1px solid rgba(0,229,255,0.1);
  border-radius: 4px;
  background: #080d14;
}

.engineer-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  opacity: 0.55;
}

/* ── Smoke rising from solder point ── */
@keyframes smokeRise1 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  15%  { opacity: 0.55; }
  60%  { opacity: 0.3;  transform: translate(-3px, -18px) scaleX(1.3); }
  100% { opacity: 0;    transform: translate(-5px, -36px) scaleX(1.6); }
}
@keyframes smokeRise2 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  15%  { opacity: 0.45; }
  60%  { opacity: 0.25; transform: translate(4px, -20px)  scaleX(1.4); }
  100% { opacity: 0;    transform: translate(6px, -40px)  scaleX(1.7); }
}
@keyframes smokeRise3 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  20%  { opacity: 0.4;  }
  70%  { opacity: 0.2;  transform: translate(-2px, -22px) scaleX(1.5); }
  100% { opacity: 0;    transform: translate(-4px, -44px) scaleX(1.8); }
}
@keyframes smokeRise4 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  20%  { opacity: 0.35; }
  70%  { opacity: 0.15; transform: translate(3px, -25px)  scaleX(1.6); }
  100% { opacity: 0;    transform: translate(5px, -50px)  scaleX(2.0); }
}
@keyframes smokeRise5 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  25%  { opacity: 0.25; }
  100% { opacity: 0;    transform: translate(-6px, -55px) scaleX(2.2); }
}
@keyframes smokeRise6 {
  0%   { opacity: 0;    transform: translate(0px, 0px)    scaleX(1);   }
  25%  { opacity: 0.18; }
  100% { opacity: 0;    transform: translate(7px, -60px)  scaleX(2.5); }
}

.smoke-1 { animation: smokeRise1 2.4s ease-out infinite 0.0s; }
.smoke-2 { animation: smokeRise2 2.8s ease-out infinite 0.4s; }
.smoke-3 { animation: smokeRise3 3.2s ease-out infinite 0.8s; }
.smoke-4 { animation: smokeRise4 3.6s ease-out infinite 1.2s; }
.smoke-5 { animation: smokeRise5 4.0s ease-out infinite 1.6s; }
.smoke-6 { animation: smokeRise6 4.4s ease-out infinite 2.0s; }

/* ── Solder tip heat glow ── */
.solder-tip {
  animation: tipGlow 1.8s ease-in-out infinite;
}
@keyframes tipGlow {
  0%, 100% { fill: #ff7a20; filter: drop-shadow(0 0 3px #ff7a20); }
  50%       { fill: #ffaa40; filter: drop-shadow(0 0 8px #ffcc60); }
}

/* ── Solder point glow ── */
.solder-glow {
  animation: solderGlow 1.8s ease-in-out infinite;
}
@keyframes solderGlow {
  0%, 100% { opacity: 0.12; r: 7; }
  50%       { opacity: 0.28; r: 10; }
}

/* ── PCB LEDs ── */
.pcb-led-1 { animation: pcbLed 1.1s ease-in-out infinite; }
.pcb-led-2 { animation: pcbLed 1.4s ease-in-out infinite 0.3s; }
.pcb-led-3 { animation: pcbLed 1.7s ease-in-out infinite 0.6s; }
.pcb-led-4 { animation: pcbLed 2.0s ease-in-out infinite 0.9s; }
@keyframes pcbLed {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.15; }
}

/* ── Oscilloscope waveform flicker ── */
.eng-iris-l { animation: engBlink 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.eng-iris-r { animation: engBlink 6s ease-in-out infinite 0.3s; transform-box: fill-box; transform-origin: center; }
@keyframes engBlink {
  0%, 88%, 100% { transform: scaleY(1); }
  93%           { transform: scaleY(0.1); }
}

/* ── Multimeter reading flicker ── */
.multimeter-reading {
  animation: meterFlicker 3s step-end infinite;
}
@keyframes meterFlicker {
  0%   { opacity: 1; }
  92%  { opacity: 1; }
  94%  { opacity: 0.3; }
  96%  { opacity: 1; }
  98%  { opacity: 0.5; }
  100% { opacity: 1; }
}

/* =============================================
   ABOUT
   ============================================= */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1rem;
}
.about-text p strong {
  color: var(--text);
  font-weight: 500;
}

.terminal-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 1.5rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 1rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #28ca41; }

.terminal-line { color: var(--muted); margin-bottom: 0.4rem; }
.terminal-line.mt { margin-top: 0.8rem; }
.terminal-line .cmd { color: var(--accent3); }
.terminal-line .val { color: var(--accent); }
.terminal-line .ok  { color: var(--accent3); }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* =============================================
   PROJECTS
   ============================================= */
#projects { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.project-card:hover::before { transform: scaleX(1); }

.project-tag {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(123, 97, 255, 0.1);
  padding: 3px 10px;
  margin-bottom: 0.85rem;
  width: fit-content;
  line-height: 1.6;
}

/* Project title as clickable link only — always on its own line */
.project-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  display: block;
  clear: both;
  line-height: 1.4;
}

.project-link {
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
  display: inline;
}
.project-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 229, 255, 0.4);
}

.project-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tech-pill {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
  padding: 2px 8px;
}

.project-num {
  position: absolute;
  bottom: 1.2rem;
  right: 1.4rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(0, 229, 255, 0.05);
  pointer-events: none;
}

/* =============================================
   SKILLS
   ============================================= */
#skills { background: var(--bg2); }

.skills-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skill-group h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-item { margin-bottom: 1.2rem; }
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.85rem;
  align-items: center;
}
.skill-pct {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  min-width: 36px;
  text-align: right;
}

/* Active skill bar */
.skill-bar {
  height: 6px;
  background: rgba(100, 116, 139, 0.12);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.skill-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
}
.skill-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #fff;
  border-radius: 2px;
  opacity: 0;
  box-shadow: 0 0 8px var(--accent);
  transition: opacity 0.3s ease 1.2s;
}
.skill-fill.animated::after { opacity: 0.8; }
.skill-fill.animated {
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* =============================================
   EXPERIENCE
   ============================================= */
#experience { background: var(--bg); }

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.1rem;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--bg);
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.timeline-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.timeline-item h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.85rem;
  color: var(--accent2);
  margin-bottom: 0.6rem;
}
.timeline-item p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Photo avatar — 4:3, edge-melting into dark bg ── */
.engineer-avatar {
  position: relative;
  flex-shrink: 0;
  align-self: center;
}

.engineer-photo {
  width: 360px;
  height: 270px;          /* 4:3 */
  object-fit: cover;
  object-position: center top;
  display: block;
  border: none;
  border-radius: 0;
  /* Radial mask: bright centre, fully transparent at all edges */
  -webkit-mask-image: radial-gradient(
    ellipse 75% 80% at 52% 45%,
    black 38%,
    rgba(0,0,0,0.92) 52%,
    rgba(0,0,0,0.65) 63%,
    rgba(0,0,0,0.3)  74%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 75% 80% at 52% 45%,
    black 38%,
    rgba(0,0,0,0.92) 52%,
    rgba(0,0,0,0.65) 63%,
    rgba(0,0,0,0.3)  74%,
    transparent 88%
  );
  /* Very subtle cyan tint to match the site palette */
  filter: saturate(1.08) brightness(0.92);
}

@media (max-width: 1100px) {
  .engineer-photo { width: 340px; height: 255px; }
}
@media (max-width: 800px) {
  .engineer-photo { width: 280px; height: 210px; }
}

/* =============================================
   BLOG
   ============================================= */
#blog { background: var(--bg2); }

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.btn-write-post {
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  padding: 0.5rem 1.2rem;
}

/* Featured post */
.blog-featured {
  border: 1px solid var(--border);
  background: var(--bg3);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: border-color 0.25s, background 0.25s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.blog-featured:hover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.04);
}

.blog-featured-img {
  height: 220px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.blog-featured-img svg { opacity: 0.25; }

.blog-featured-label {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid var(--border);
  padding: 3px 10px;
}

.blog-featured-body { padding: 1.5rem; }
.blog-featured-body p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Clickable blog titles */
.blog-post-link {
  cursor: pointer;
  transition: color 0.2s;
}
.blog-featured-body h3 {
  font-family: 'Lora', serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text);
  display: block;
}
.blog-featured:hover .blog-featured-body h3 { color: var(--accent); }

.blog-card-title.blog-post-link:hover { color: var(--accent); }

.recent-item.blog-post-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.blog-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}
.blog-meta-dot {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
}

/* Post list */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.blog-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--border);
  background: var(--bg3);
  transition: border-color 0.25s;
}
.blog-card:hover { border-color: rgba(0, 229, 255, 0.25); }

.blog-card-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.4rem;
  color: rgba(0, 229, 255, 0.12);
  font-weight: 700;
  min-width: 36px;
  line-height: 1;
}
.blog-card-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.3rem;
}
.blog-card-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.3rem;
  color: var(--text);
}
.blog-card-meta {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
}

/* Sidebar */
.sidebar-box {
  border: 1px solid var(--border);
  background: var(--bg3);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}
.sidebar-box h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-about {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tag:hover { color: var(--accent); border-color: var(--border); }

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.recent-item {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}
.recent-item:hover {
  border-color: var(--accent);
  color: var(--text);
}
.recent-item-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  margin-bottom: 2px;
}

/* =============================================
   BLOG READER
   ============================================= */
.blog-reader {
  max-width: 760px;
}

.blog-reader-nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-back-blog,
.btn-back-home {
  font-size: 0.75rem;
  padding: 0.5rem 1.2rem;
}

.blog-article {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2.5rem 3rem;
}

.blog-article-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(123, 97, 255, 0.1);
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 1rem;
}

.blog-article-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  border: none;
  padding: 0;
  color: var(--text);
}

.blog-article-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.blog-article-body {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--muted);
}
.blog-article-body h2 {
  font-size: 1.2rem;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  border: none;
  padding: 0;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
}
.blog-article-body strong { color: var(--text); }
.blog-article-body code {
  font-family: 'Share Tech Mono', monospace;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid var(--border);
  padding: 1px 6px;
  font-size: 0.85rem;
  color: var(--accent);
  border-radius: 2px;
}
.blog-article-body p { margin-bottom: 1.2rem; }

/* =============================================
   BLOG WRITER
   ============================================= */
.blog-writer {
  max-width: 800px;
}

.writer-panel {
  background: var(--bg3);
  border: 1px solid var(--border);
  overflow: hidden;
}

.writer-header {
  background: var(--bg);
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.writer-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
}

.writer-form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.writer-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.writer-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.writer-input:focus { border-color: var(--accent); }
.writer-input::placeholder { color: var(--muted); }

.writer-input-sm { flex: 1; min-width: 150px; }

.writer-textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  padding: 1rem;
  width: 100%;
  min-height: 320px;
  resize: vertical;
  outline: none;
  line-height: 1.8;
  transition: border-color 0.2s;
}
.writer-textarea:focus { border-color: var(--accent); }
.writer-textarea::placeholder { color: var(--muted); }

.writer-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Post published flash */
.publish-flash {
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.3);
  color: var(--accent3);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  padding: 0.7rem 1.2rem;
  letter-spacing: 0.1em;
  display: none;
}
.publish-flash.show { display: block; }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem 10vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { display: none; }
  .engineer-svg { width: 240px; height: 384px; }
  .hero-content { gap: 2rem; }
}

@media (max-width: 800px) {
  .hero-content { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
  .engineer-avatar { align-self: center; width: 100%; }
  .engineer-svg { width: 200px; height: 320px; }
}

@media (max-width: 700px) {
  nav { padding: 0 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .skills-wrapper { grid-template-columns: 1fr; }
  section { padding: 100px 6vw 60px; }
  .circuit-accent { display: none; }
  footer { flex-direction: column; align-items: flex-start; }
  .blog-article { padding: 1.5rem; }
}

/* =============================================
   ACTIVITY CAROUSEL  (#events)
   ============================================= */

/* Viewport: clips overflowing group */
.ac-stage {
  overflow: hidden;
  width: 100%;
}

/* Track: both groups side-by-side, slides left/right */
.ac-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

/* Each group fills the full viewport width */
.ac-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 0 0 100%;
  min-width: 0;
}

/* Square cards via aspect-ratio — no height tricks needed */
.ac-card {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: default;
}

.ac-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: transform 0.45s ease, opacity 0.3s ease;
}
.ac-card:hover img {
  transform: scale(1.07);
  opacity: 0.35;
}

/* Bottom label — visible by default */
.ac-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(8,10,16,0.85) 0%, transparent 55%);
  transition: opacity 0.25s;
  pointer-events: none;
}
.ac-label span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-shadow: 0 0 8px rgba(0,229,255,0.4);
}

/* Hover overlay — hidden by default */
.ac-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  background: linear-gradient(to top, rgba(8,10,20,0.95) 0%, rgba(8,10,20,0.6) 55%, transparent 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.ac-card:hover .ac-overlay { opacity: 1; transform: translateY(0); }
.ac-card:hover .ac-label   { opacity: 0; }

.ac-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 7px;
  text-shadow: 0 0 8px rgba(0,229,255,0.35);
}
.ac-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ac-list li {
  position: relative;
  font-size: 0.7rem;
  line-height: 1.65;
  color: var(--muted);
  padding-left: 13px;
  font-family: 'Sora', sans-serif;
}
.ac-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(0,229,255,0.6);
}

/* Footer: dots + progress bar */
.ac-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.ac-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.4;
  transition: background 0.3s, opacity 0.3s, transform 0.3s;
}
.ac-dot-on {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(0,229,255,0.5);
}
.ac-bar {
  width: 60px;
  height: 2px;
  border-radius: 2px;
  background: rgba(0,229,255,0.1);
  overflow: hidden;
  margin-left: 4px;
}
.ac-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0,229,255,0.5);
}

@media (max-width: 700px) {
  .ac-group { gap: 10px; }
  .ac-title  { font-size: 0.65rem; }
  .ac-list li { font-size: 0.62rem; }
}

/* =============================================
   TYPEWRITER CURSOR
   ============================================= */
.tw-cursor {
  display: inline-block;
  font-weight: 300;
  color: var(--accent);
  animation: tw-blink 0.7s step-end infinite;
  margin-left: 1px;
}

@keyframes tw-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* =============================================
   PROJECT COMPLETE BADGE
   ============================================= */
.badge-complete {
  position: absolute;
  top: 1.8rem;
  right: 1.8rem;
  padding: 3px 10px;
  font-size: 0.65rem;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.1em;
  color: #0a0a0a;
  background: #22c55e;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.6;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}
