:root{
  /* MATRIX TERMINAL PALETTE */
  --bg: #020402;
  --panel: rgba(0, 0, 0, 0.72);
  --panel-2: rgba(0, 0, 0, 0.58);

  --text: rgba(0, 255, 65, 0.92);
  --muted: rgba(0, 255, 65, 0.64);

  --green: #00ff41;
  --green-dim: #00c833;
  --line: rgba(0,255,65,0.12);

  --radius: 14px;
  --shadow: 0 18px 60px rgba(0,0,0,0.70);
  --glow: 0 0 18px rgba(0,255,65,0.22);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: var(--mono);
  background:
    radial-gradient(900px 700px at 12% 10%, rgba(0,255,65,0.10), transparent 60%),
    radial-gradient(900px 600px at 88% 18%, rgba(0,255,65,0.06), transparent 55%),
    linear-gradient(180deg, #000, var(--bg) 60%, #000);
  overflow-x: hidden;
}

.muted{ color: var(--muted); }

/* Matrix canvas sits behind everything */
#matrix{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
  background: transparent;
  opacity: 1;
  transition: opacity 180ms ease;
}
/* When off: hide + stop interaction (just in case) */
#matrix.is-off{
  opacity: 0;
  pointer-events: none;
}

/* Scanlines + faint terminal grid */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px,
    repeating-linear-gradient(
      180deg,
      rgba(0,255,65,0.06),
      rgba(0,255,65,0.06) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.35;
  mix-blend-mode: screen;
}

.wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

header{
  border: 1px solid rgba(0,255,65,0.20);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,255,65,0.06), rgba(0,0,0,0.45));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* subtle "CRT vignette" inside header */
header::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: radial-gradient(120% 90% at 50% 10%, transparent 40%, rgba(0,0,0,0.55) 100%);
  opacity: 0.55;
}

header .topbar{
  position: relative;
  z-index: 1;
  display:flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: linear-gradient(90deg, rgba(0,255,65,0.12), rgba(0,0,0,0.10), rgba(0,255,65,0.08));
  border-bottom: 1px solid rgba(0,255,65,0.18);
}

.tag{
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(0,255,65,0.88);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,65,0.22);
  background: rgba(0,0,0,0.55);
  box-shadow: var(--glow);
  white-space: nowrap;
}
.tag.alt{
  color: rgba(0,255,65,0.80);
  border-style: dashed;
  opacity: 0.95;
}

/* Toggle button styled like a terminal control */
.toggle{
  appearance: none;
  border: 1px solid rgba(0,255,65,0.22);
  background: rgba(0,0,0,0.55);
  color: rgba(0,255,65,0.90);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--glow);
  user-select: none;
}
.toggle:hover{
  color: #001b07;
  background: rgba(0,255,65,0.88);
  box-shadow: 0 0 0 3px rgba(0,255,65,0.18);
}
.toggle:focus-visible{
  outline: 2px solid rgba(0,255,65,0.55);
  outline-offset: 3px;
}

header .hero{
  position: relative;
  z-index: 1;
  padding: 18px 16px 16px;
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

h1{
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(0,255,65,0.22);
}

/* terminal cursor */
.cursor::after{
  content: "█";
  display: inline-block;
  margin-left: 10px;
  color: rgba(0,255,65,0.85);
  animation: blink 1.05s steps(1) infinite;
  transform: translateY(-2px);
}
@keyframes blink{
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.subtitle{
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.subtitle strong{
  color: rgba(0,255,65,0.90);
  font-weight: 600;
}

.accentline{
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--green), rgba(0,255,65,0.45), transparent);
  opacity: 0.85;
  filter: drop-shadow(0 0 10px rgba(0,255,65,0.18));
  border-radius: 999px;
  margin: 10px 0 0;
}

.contact{
  border-radius: 12px;
  border: 1px solid rgba(0,255,65,0.20);
  background: rgba(0,0,0,0.55);
  padding: 14px;
  box-shadow: var(--glow);
}

.contact h2{
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,255,65,0.86);
}

a{
  color: rgba(0,255,65,0.92);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0,255,65,0.35);
}
a:hover{
  color: #001b07;
  background: rgba(0,255,65,0.88);
  border-bottom-color: rgba(0,255,65,0.0);
  box-shadow: 0 0 0 3px rgba(0,255,65,0.18);
  border-radius: 6px;
  padding: 0 2px;
}

.contact ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: rgba(0,255,65,0.84);
}
.contact li span{ color: rgba(0,255,65,0.62); }

main{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

/* NEW: left column stack (Blog above Work) */
.col-left{
  display: grid;
  gap: 18px;
  align-content: start;
}

.card{
  border-radius: var(--radius);
  border: 1px solid rgba(0,255,65,0.20);
  background: linear-gradient(180deg, rgba(0,255,65,0.05), rgba(0,0,0,0.60));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: radial-gradient(140% 100% at 20% 0%, rgba(0,255,65,0.07), transparent 55%);
  opacity: 0.45;
}

.card .hd{
  position: relative;
  z-index: 1;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(0,255,65,0.16);
  background: linear-gradient(90deg, rgba(0,255,65,0.10), rgba(0,0,0,0.10), transparent 75%);
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.card .hd h2{
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,255,65,0.88);
}

.card .bd{
  position: relative;
  z-index: 1;
  padding: 14px 14px 16px;
}

.list{ display:grid; gap: 12px; }

.item{
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,255,65,0.16);
  background: rgba(0,0,0,0.55);
}

.item .top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.item h3{
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: rgba(0,255,65,0.92);
}

.meta{
  font-size: 12px;
  color: rgba(0,255,65,0.60);
  white-space: nowrap;
  text-align: right;
}

.item p{
  margin: 8px 0 0;
  color: rgba(0,255,65,0.74);
  line-height: 1.60;
  font-size: 13px;
}

.pillrow{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,65,0.22);
  background: rgba(0,0,0,0.55);
  color: rgba(0,255,65,0.86);
  box-shadow: 0 0 14px rgba(0,255,65,0.14);
}

/* Certifications grid */
.certs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cert{
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,255,65,0.16);
  background: rgba(0,0,0,0.55);
}

.cert .name{
  font-size: 12px;
  color: rgba(0,255,65,0.92);
  margin: 0 0 6px;
}

.cert .sub{
  font-size: 11px;
  color: rgba(0,255,65,0.62);
  line-height: 1.45;
  margin: 0;
}

/* Collapsible terminal block */
details.terminal{
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,255,65,0.16);
  background: rgba(0,0,0,0.55);
  overflow: hidden;
}
details.terminal > summary{
  cursor: pointer;
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,255,65,0.78);
  background: linear-gradient(90deg, rgba(0,255,65,0.12), rgba(0,0,0,0.10), transparent 70%);
  border-bottom: 1px solid rgba(0,255,65,0.16);
  list-style: none;
  user-select: none;
}
details.terminal > summary::-webkit-details-marker{ display: none; }

/* GitHub contributions embed */
.gh-graph{ padding: 12px; }
.gh-graph img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(0,255,65,0.16);
  background: rgba(0,0,0,0.65);
  box-shadow: 0 0 18px rgba(0,255,65,0.12);
  filter: saturate(0.9) contrast(1.05);
}
.gh-meta{
  margin-top: 8px;
  font-size: 12px;
  color: rgba(0,255,65,0.62);
}

/* status.lol embed (text form) */
.statusbox{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,255,65,0.16);
}
.statushdr{
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0,255,65,0.78);
  margin-bottom: 8px;
}
.statustext{
  font-size: 12px;
  line-height: 1.55;
  color: rgba(0,255,65,0.86);
}
.statustext *{
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

footer{
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: rgba(0,255,65,0.55);
}

/* Reduced motion: default rain off */
@media (prefers-reduced-motion: reduce){
  #matrix{ display:none; }
  .cursor::after{ animation: none; opacity: 1; }
}

@media (max-width: 900px){
  header .hero, main { grid-template-columns: 1fr; }
  .meta{ white-space: normal; text-align: left; }
  .certs{ grid-template-columns: 1fr; }
  .tag{ max-width: 48vw; overflow:hidden; text-overflow: ellipsis; }
}

@media print{
  body{ background:#fff; color:#111; }
  body::before, #matrix{ display:none; }
  header, .card{ box-shadow:none; background:#fff; border-color:#bbb; }
  a{ color:#111; border-bottom:none; background:none; box-shadow:none; }
}
