/* Stronger retro 2000s + sci-fi style */
:root {
  --accent-color: #ffe600;
  --base-font: 'Verdana', 'Geneva', Tahoma, sans-serif;
  --sans-font: 'Verdana', 'Geneva', Tahoma, sans-serif;
  --heading-font: 'Courier New', Courier, monospace;
  --space-unit: 6px;
  --space-xs: 8px;
  --space-sm: 10px;
  --space-md: 12px;
  --space-lg: 14px;
  --space-xl: 16px;
  --space-xxl: 18px;
  --space-3xl: 24px;
  --color-bg: #01010a;
  --color-panel: #0b0b1a;
  --color-text: #eaf6ff;
  --color-muted: #9aa0b2;
  --color-neon: #00eaff;
  --color-neon-2: #ff2dd4;
  --color-primary: #9be8ff;
  --color-accent: var(--accent-color);
  --color-link: var(--color-primary);
  --color-link-hover: var(--color-neon);
  --color-button-text: #051220;
  --font-base: var(--base-font);
  --font-heading: var(--heading-font);
  --muted: var(--color-muted);
  --neon: var(--color-neon);
  --neon-2: var(--color-neon-2);
  --accent: var(--accent-color);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  /* older-style system fonts mix for that early-2000s feel */
  font-family: var(--base-font);
  background-color: var(--color-bg);
  background:
    radial-gradient(ellipse at bottom, rgba(10,8,30,0.88) 0%, rgba(2,3,10,1) 60%),
    linear-gradient(180deg, rgba(2,0,20,0.35), rgba(0,0,0,0.75));
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Justify list text site-wide */
ul,
ol,
ul li,
ol li {
  text-align: justify;
  text-justify: inter-word;
}

.justified-intro {
  text-align: justify;
  text-justify: inter-word;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
}

.scene {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 36px 18px 56px;
  position: relative;
  overflow: hidden;
  border-top: 6px solid rgba(255,255,255,0.02);
}

/* dense starfield with subtle twinkle lines */
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 50% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 30%, #fff 50%, transparent 51%),
    radial-gradient(0.8px 0.8px at 90% 90%, #fff 50%, transparent 51%);
  background-repeat: repeat;
  opacity: 0.14;
  filter: blur(0.8px);
}

.header {
  z-index: 1;
  text-align: center;
  margin-top: var(--space-sm);
}

.title {
  font-size: 56px;
  margin: var(--space-unit) 0 var(--space-unit);
  color: var(--neon);
  /* heavier, stacked text-shadow for a neon / pixel glow */
  text-shadow:
    0 0 6px rgba(0,234,255,0.45),
    0 2px 0 rgba(0,0,0,0.6),
    2px 2px 0 rgba(0,0,0,0.35);
  letter-spacing: 1px;
  font-weight: 700;
  font-family: var(--font-heading); /* more retro/pixel feel */
  display: inline-block;
  padding: var(--space-unit) var(--space-md);
  border-radius: var(--space-unit);
  background: linear-gradient(90deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  border: 2px solid rgba(0,234,255,0.09);
  box-shadow: 0 8px 0 rgba(0,0,0,0.45), 0 0 18px rgba(0,234,255,0.06) inset;
}

/* blinking underscore like old consoles */
.title::after {
  content: "_";
  color: var(--accent-color);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}



a {
  color: var(--color-link);
}

a:hover {
  color: var(--color-link-hover);
}

.subtitle {
  margin: var(--space-unit) 0 0;
  color: var(--muted);
  font-size: 13px;
}

.links {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  position: relative;
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--space-unit);
  background: linear-gradient(180deg, #1a1a30, #050518);
  border: 2px solid rgba(255,255,255,0.08);
  color: var(--neon);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  box-shadow: 0 8px 0 rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.02);
  transform: translateY(0);
}

.btn:active {
  transform: translateY(6px);
  box-shadow: none;
}

.btn:focus {
  outline: 3px solid rgba(0,234,255,0.12);
  outline-offset: 3px;
}

.btn::after {
  content: "";
  position: absolute;
  left: var(--space-lg);
  right: var(--space-lg);
  bottom: var(--space-unit);
  height: 2px;
  border-radius: 999px;
  background-color: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.btn[aria-current="page"] {
  font-weight: 600;
}

.btn[aria-current="page"]::after {
  opacity: 0.4;
}

.btn[aria-current="page"]:focus-visible {
  outline: 3px solid rgba(255,255,255,0.4);
  outline-offset: 3px;
}

.btn.alt {
  color: var(--neon-2);
  border-color: rgba(255,45,212,0.09);
}

.card {
  z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  border: 2px solid rgba(255,255,255,0.04);
  width: min(980px, 96%);
  margin: var(--space-3xl) auto 0;
  padding: 22px;
  border-radius: var(--space-sm);
  backdrop-filter: blur(3px);
  box-shadow: 0 16px 0 rgba(0,0,0,0.45);
}

/* dense starfield with subtle twinkle lines */
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 80%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 50% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 80% 30%, #fff 50%, transparent 51%),
    radial-gradient(0.8px 0.8px at 90% 90%, #fff 50%, transparent 51%);
  background-repeat: repeat;
  opacity: 0.14;
  filter: blur(0.8px);
}

/* heavier scanlines for retro CRT look */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 5px);
  background-size: 100% 6px;
  opacity: 0.06;
}

/* small neon blocks and pixel separators */
hr.retro {
  border: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, rgba(0,234,255,0.12) 0 6px, rgba(255,45,212,0.12) 6px 12px);
  border-radius: 4px;
  margin: 12px 0;
}

.footer {
  z-index: 1;
  margin-top: var(--space-xxl);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

/* small-screen tweaks */
@media (max-width:520px) {
  .title {
    font-size: 40px;
  }
  .card {
    padding: var(--space-xl);
  }
  .btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: 12px;
  }
}

/* gentle pulse on the neon title */
@keyframes neonPulse {
  0% {
    text-shadow: 0 0 6px rgba(0,234,255,0.25);
  }
  50% {
    text-shadow: 0 0 20px rgba(0,234,255,0.45);
  }
  100% {
    text-shadow: 0 0 6px rgba(0,234,255,0.25);
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.photo-slot {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  border: 2px dashed rgba(255,255,255,0.04);
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-radius: var(--space-xs);
  padding: var(--space-sm);
  text-align: center;
  font-size: 13px;
}

.photo-slot img {
  max-width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55);
  border: 0;
  background: transparent;
  padding: 0;
}

@media (max-width:520px) {
  .photo-slot img {
    height: 110px;
  }
}

.photo-slot.placeholder {
  background: linear-gradient(90deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  border-style: dashed;
}

/* Experience dates as inline badges */
.experience-line {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  font-size: 1rem;
}

.experience-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.experience-sub {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.experience-flag {
  margin-left: 0.4rem;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.experience-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.08rem 0.9rem;
  font-size: 0.75rem;
  line-height: 1.1;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--color-panel) 70%, var(--color-text) 30%);
  border: 1px solid color-mix(in srgb, var(--color-text) 50%, var(--color-panel) 50%);
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.experience-date time {
  color: inherit;
}

@media (max-width:520px) {
  .experience-line {
    gap: var(--space-xs);
  }
  .experience-date {
    font-size: 0.66rem;
    padding: 0.1rem 0.75rem;
  }
  .experience-flag {
    margin-left: 0.25rem;
  }
}

.experience-section .education-flag {
  margin-left: 0.4rem;
  font-size: 0.95em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
@media (max-width:520px) {
  .experience-section .education-flag {
    margin-left: 0.25rem;
  }
}

/* blog styles */

/* Ensure individual blog posts use the same retro heading and paragraph styles as the main page */
article h2,
.about h2 {
  margin: 0 0 var(--space-unit);
  color: var(--color-text);
  font-family: var(--font-heading);
}

article p,
.about p {
  margin: 0 0 var(--space-md);
  color: var(--color-text);
  line-height: 1.45;
  text-align: justify;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0 0;
  display: grid;
  gap: var(--space-md);
}

.blog-item {
  border: 1px solid rgba(255,255,255,0.04);
  padding: var(--space-md);
  border-radius: var(--space-xs);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.04));
}

.blog-item h3 {
  margin: 0 0 var(--space-unit);
}

.blog-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: var(--space-xs);
}

/* accessible reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .title,
  .btn {
    animation: none;
  }
}

/* Lightbox modal for viewing larger screenshots */
#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 180ms ease;
}

#lightbox.open {
  display: flex;
  opacity: 1;
}

#lightbox img {
  width: auto;
  height: auto;
  max-width: calc(100% - 40px);
  max-height: calc(100% - 40px);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  display: block;
}

#lightbox .close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.08);
  color: var(--color-text);
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

#lightbox .close:focus {
  outline: 3px solid rgba(0,234,255,0.12);
}

@media (max-width:520px) {
  #lightbox {
    padding: var(--space-md);
  }
  #lightbox img {
    max-width: calc(100% - 40px);
    max-height: calc(100% - 40px);
  }
}

/* Contact form styles */
section[data-addon="contact-form"]{
  z-index:1;
  width:100%;
  max-width:980px;
  margin:18px auto 6px;
  padding:16px;
  border-radius:8px;
  background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.04));
  border:1px solid rgba(255,255,255,0.03);
  color:var(--color-text);
  box-shadow:0 12px 0 rgba(0,0,0,0.45);
}
section[data-addon="contact-form"] h3{
  margin:0 0 8px;
  color:var(--color-text);
  font-family:var(--font-heading);
}
section[data-addon="contact-form"] .form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
section[data-addon="contact-form"] label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
section[data-addon="contact-form"] input[type="text"],
section[data-addon="contact-form"] input[type="email"],
section[data-addon="contact-form"] textarea{
  width:100%;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.04);
  color:var(--color-text);
  font-family:inherit;
  font-size:14px;
  outline:none;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.01);
}
section[data-addon="contact-form"] textarea{min-height:120px;resize:vertical}
section[data-addon="contact-form"] .form-actions{display:flex;justify-content:flex-end;margin-top:8px}
section[data-addon="contact-form"] button[type="submit"]{
  padding:10px 14px;border-radius:6px;background:linear-gradient(180deg,var(--neon),var(--neon-2));
  color:var(--color-button-text);font-weight:700;border:0;cursor:pointer;
  box-shadow:0 8px 0 rgba(0,0,0,0.45);
}
section[data-addon="contact-form"] button[type="submit"]:focus{outline:3px solid rgba(0,234,255,0.12);outline-offset:3px}
section[data-addon="contact-form"] .note{font-size:13px;color:var(--muted);margin-top:8px}

@media (max-width:520px){
  section[data-addon="contact-form"] .form-row{grid-template-columns:1fr}
  section[data-addon="contact-form"]{padding:12px}
}

/* Keep Publio comments and contact form text left-aligned */
.publio-comments,
.publio-comments *,
.publio-cf,
.publio-cf * {
  text-align: left;
  text-justify: auto;
}

.publio-comments-host{
  z-index:1;
  width:100%;
  max-width:980px;
  margin:18px auto 6px;
  padding:16px;
  border-radius:8px;
  background:linear-gradient(180deg, rgba(255,255,255,0.01), rgba(0,0,0,0.04));
  border:1px solid rgba(255,255,255,0.03);
  color:var(--color-text);
  box-shadow:0 12px 0 rgba(0,0,0,0.45);
}
.publio-comments{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.publio-comments__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:24px;
}
.publio-comments__list::after{
  content:"";
  display:block;
  width:100%;
  height:8px;
  margin:22px 0 16px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--neon),var(--neon-2));
  opacity:0.45;
  pointer-events:none;
}
.publio-comments__item{
  padding:12px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.04);
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.05));
}
.publio-comments__author{
  color:var(--neon);
  font-weight:700;
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:0.5rem;
}
.publio-comments__meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:rgba(154,160,178,0.85);
  margin-bottom:6px;
}
.publio-comments__time{
  font-size:12px;
  letter-spacing:0;
  text-transform:none;
  color:var(--muted);
  white-space:nowrap;
}
.publio-comments__message{
  color:var(--color-text);
  margin:0;
}
.publio-comments__control{
  width:100%;
  padding:10px 12px;
  border-radius:6px;
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.04);
  color:var(--color-text);
  font-family:inherit;
  font-size:14px;
  outline:none;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.01);
}
.publio-comments__control:focus{
  outline:3px solid rgba(0,234,255,0.15);
  outline-offset:3px;
}
.publio-comments__submit{
  padding:10px 14px;
  border-radius:6px;
  background:linear-gradient(180deg,var(--neon),var(--neon-2));
  color:var(--color-button-text);
  font-weight:700;
  border:0;
  cursor:pointer;
  box-shadow:0 8px 0 rgba(0,0,0,0.45);
  align-self:flex-end;
}
.publio-comments__submit:focus{
  outline:3px solid rgba(0,234,255,0.12);
  outline-offset:3px;
}
.publio-comments__notice{
  font-size:13px;
  color:var(--muted);
}
section[aria-labelledby="guestbook-heading"] > p {
  text-align: justify;
  text-justify: inter-word;
}
.guestbook-note{
  font-size:13px;
  color:var(--muted);
  margin:8px 0 16px;
}

@media (max-width:520px){
  .publio-comments-host{
    padding:12px;
  }
  .publio-comments__list{
    margin-bottom:16px;
  }
  .publio-comments__list::after{
    height:5px;
    margin:14px 0 10px;
  }
  .publio-comments__submit{
    width:100%;
    text-align:center;
  }
}

/* Scoped border and shadow reset for specific visual elements */
.photo-slot img,
#lightbox img,
.shelf-cover,
.shelf-cover img,
.publio-blog .post-body img,
.publio-blog .post-lightbox__image,
.publio-blog-lightbox__image {
  border: none;
  box-shadow: none;
}

/* shelf item description hover/focus behaviour */
/* Apply to both .description and the existing .shelf-note used in shelf-of-self markup */
.shelf-item .description,
.shelf-item .shelf-note {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
}
.shelf-item:hover .description,
.shelf-item:focus-within .description,
.shelf-item:hover .shelf-note,
.shelf-item:focus-within .shelf-note {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 200px;
}
.shelf-item a:focus + .description,
.shelf-item button:focus + .description,
.shelf-item a:focus + .shelf-note,
.shelf-item button:focus + .shelf-note {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 200px;
}
.shelf-item.open .description,
.shelf-item.open .shelf-note {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  max-height: 200px;
}

.experience > ul > li .experience-main {
  gap: 0;
}

.experience-section .experience-main {
  gap: 0;
}
