:root {
  --bg-primary: #050212;
  --bg-secondary: rgba(11, 3, 33, 0.75);
  --accent-cyan: #4ef1f2;
  --accent-magenta: #ff5ef6;
  --accent-yellow: #ffe066;
  --text-main: #f0f5ff;
  --text-muted: rgba(240, 245, 255, 0.7);
  --panel-border: rgba(78, 241, 242, 0.35);
  --shadow-glow: 0 0 30px rgba(78, 241, 242, 0.3);
  --shadow-magenta: 0 0 25px rgba(255, 94, 246, 0.3);
  --font-display: "Orbitron", sans-serif;
  --font-mono: "Share Tech Mono", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(78, 241, 242, 0.15), transparent 40%),
              radial-gradient(circle at 20% 80%, rgba(255, 94, 246, 0.2), transparent 45%),
              radial-gradient(circle at 80% 20%, rgba(255, 224, 102, 0.2), transparent 50%),
              linear-gradient(135deg, #030111 0%, #0b0330 40%, #04000f 100%);
  color: var(--text-main);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  position: relative;
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 3px;
  mix-blend-mode: screen;
  opacity: 0.4;
  z-index: 1;
}

.grid-shell {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
  display: grid;
  gap: 2rem;
}

.hero {
  padding: 3rem;
  border: 1px solid var(--panel-border);
  background: linear-gradient(145deg, rgba(11, 3, 33, 0.75), rgba(8, 2, 25, 0.85));
  box-shadow: var(--shadow-glow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(78, 241, 242, 0.15), transparent 55%);
  pointer-events: none;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1px solid var(--accent-cyan);
  border-radius: 999px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
}

.hero__title {
  margin: 1.5rem 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero__subtitle {
  margin: 0 auto 2rem;
  max-width: 720px;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero__meta {
  margin: 0 auto 2rem;
  max-width: 720px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: center;
  font-size: 0.95rem;
}

.hero__meta span,
.hero__meta a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(78, 241, 242, 0.3);
  padding-bottom: 0.2rem;
}

.hero__meta a:hover {
  color: var(--accent-cyan);
  border-color: rgba(255, 94, 246, 0.6);
}

.hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  border: none;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(78, 241, 242, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(255, 94, 246, 0.35);
}

.button--ghost {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  box-shadow: none;
}

.panel {
  border: 1px solid var(--panel-border);
  padding: 2rem 2.5rem;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-magenta);
  backdrop-filter: blur(12px);
}

.panel--wide {
  grid-column: 1 / -1;
}

.panel__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
}

.panel__body {
  margin: 0;
  line-height: 1.8;
  color: var(--text-muted);
}

.panel__list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.75rem;
  color: var(--text-muted);
}

.panel__list li {
  position: relative;
}

.panel__list li::marker {
  color: var(--accent-cyan);
}

.contact-form {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.25rem;
}

.contact-form__field {
  display: grid;
  gap: 0.5rem;
}

.contact-form__field--full {
  grid-column: 1 / -1;
}

.contact-form__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-main);
}

.contact-form__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(78, 241, 242, 0.35);
  background: rgba(5, 2, 18, 0.6);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__input:focus {
  outline: none;
  border-color: rgba(255, 94, 246, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 94, 246, 0.25);
}

.contact-form__input--textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form__submit {
  justify-self: start;
}

.experience-grid {
  display: grid;
  gap: 1.5rem;
}

.experience {
  padding: 1.75rem;
  border: 1px solid rgba(78, 241, 242, 0.25);
  background: rgba(5, 2, 18, 0.6);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.experience::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(78, 241, 242, 0.1), rgba(255, 94, 246, 0.08));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.experience:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 94, 246, 0.45);
}

.experience:hover::after {
  opacity: 1;
}

.experience__header {
  margin-bottom: 1rem;
}

.experience__role {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  font-size: 1.1rem;
}

.experience__company {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.experience__points {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.experience__points li::marker {
  color: var(--accent-yellow);
}

.skills-grid {
  display: grid;
  gap: 1.25rem;
}

.skills-group {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 94, 246, 0.25);
  background: rgba(8, 2, 25, 0.6);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.skills-group:hover {
  border-color: rgba(78, 241, 242, 0.5);
  transform: translateY(-3px);
}

.skills-group__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

.skills-group__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.education-grid {
  display: grid;
  gap: 1rem;
}

.education {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(78, 241, 242, 0.25);
  background: rgba(5, 2, 18, 0.6);
}

.education__degree {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.education__meta {
  margin: 0;
  color: var(--text-muted);
}

.languages-grid {
  display: grid;
  gap: 1.25rem;
}

.languages {
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(255, 94, 246, 0.25);
  background: rgba(8, 2, 25, 0.6);
}

.languages__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.languages__body {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.console {
  background: rgba(2, 0, 10, 0.85);
  border: 1px solid rgba(78, 241, 242, 0.4);
  box-shadow: 0 0 20px rgba(78, 241, 242, 0.2);
  font-family: var(--font-mono);
  position: relative;
}

.console::before {
  content: "RETRO OS v2.4";
  position: absolute;
  top: -1.65rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 94, 246, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-magenta);
}

.console__output {
  min-height: 220px;
  max-height: 320px;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--accent-cyan);
}

.console__line {
  display: flex;
  gap: 0.75rem;
  line-height: 1.4;
}

.console__line--standard {
  color: var(--accent-cyan);
}

.console__line--input {
  color: var(--text-main);
}

.console__line--system {
  color: var(--accent-magenta);
}

.console__line--warning {
  color: var(--accent-yellow);
}

.console__line--art {
  color: #2aff2a;
  text-shadow: 0 0 12px rgba(42, 255, 42, 0.4);
}

.console__line--art pre {
  margin: 0;
  font-family: var(--font-mono);
  white-space: pre;
  letter-spacing: 0.08em;
}

.console__form {
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(78, 241, 242, 0.2);
  padding: 1rem 1.5rem;
  gap: 0.75rem;
}

.console__prompt {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

.console__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.1em;
  outline: none;
}

.console__input::placeholder {
  color: rgba(240, 245, 255, 0.35);
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  background: linear-gradient(180deg, rgba(5, 2, 18, 0.95) 0%, rgba(9, 3, 28, 0.85) 100%);
  border-left: 1px solid rgba(78, 241, 242, 0.35);
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.35), 0 0 25px rgba(255, 94, 246, 0.25);
  transform: translateX(105%);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  z-index: 15;
  display: grid;
  grid-template-rows: auto 1fr;
  backdrop-filter: blur(16px);
}

.side-panel--active {
  transform: translateX(0);
  box-shadow: -20px 0 50px rgba(78, 241, 242, 0.25), 0 0 32px rgba(255, 94, 246, 0.2);
}

.side-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(78, 241, 242, 0.25);
}

.side-panel__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent-magenta);
  text-transform: uppercase;
}

.side-panel__title {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

.side-panel__close {
  background: rgba(255, 94, 246, 0.08);
  border: 1px solid rgba(255, 94, 246, 0.5);
  color: var(--text-main);
  font-size: 1.1rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-panel__close:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(255, 94, 246, 0.35);
}

.side-panel__body {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.75rem;
  padding: 0 0 1.25rem;
}

.side-panel__viewport {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(78, 241, 242, 0.2);
}

.side-panel__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  padding: 1.25rem 1.25rem 1.75rem;
  max-height: 70vh;
  overflow-y: auto;
  background: radial-gradient(circle at 20% 20%, rgba(78, 241, 242, 0.08), transparent 45%),
              radial-gradient(circle at 80% 30%, rgba(255, 94, 246, 0.08), transparent 50%),
              rgba(6, 2, 18, 0.85);
}

.side-panel__tile {
  position: relative;
  width: 100%;
  padding-top: 100%;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(78, 241, 242, 0.2);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.side-panel__tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 2, 18, 0.2), rgba(5, 2, 18, 0.6));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.side-panel__tile:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(255, 94, 246, 0.45);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35), 0 0 18px rgba(255, 94, 246, 0.25);
}

.side-panel__tile:hover::after {
  opacity: 1;
}

.side-panel__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(5, 2, 18, 0.92), rgba(9, 3, 28, 0.88));
  border: 1px dashed rgba(255, 94, 246, 0.35);
  box-shadow: inset 0 0 24px rgba(78, 241, 242, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.side-panel__fallback.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.side-panel__fallback-title {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
}

.side-panel__fallback-copy {
  margin: 0;
  color: var(--text-muted);
}

.side-panel__footer {
  padding: 0 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.side-panel__note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.side-panel__link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.side-panel__link::after {
  content: '↗';
  font-size: 0.9em;
}

.side-panel__link:hover {
  color: var(--accent-magenta);
}

.footer {
  text-align: center;
  color: rgba(240, 245, 255, 0.5);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
}

.pulse {
  display: inline-block;
  animation: pulse 1.5s infinite;
  color: var(--accent-magenta);
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  mix-blend-mode: screen;
  opacity: 0.65;
}

.glitch {
  position: relative;
  display: inline-block;
  color: var(--accent-cyan);
  text-shadow: -3px 0 rgba(255, 94, 246, 0.6), 3px 0 rgba(78, 241, 242, 0.6);
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.glitch::before {
  left: 2px;
  animation: glitch 1.5s infinite;
  color: rgba(255, 94, 246, 0.8);
}

.glitch::after {
  left: -2px;
  animation: glitch 1.75s infinite;
  color: rgba(78, 241, 242, 0.8);
}

@keyframes glitch {
  0% {
    clip-path: inset(0 0 80% 0);
  }
  20% {
    clip-path: inset(10% 0 30% 0);
  }
  40% {
    clip-path: inset(50% 0 20% 0);
  }
  60% {
    clip-path: inset(40% 0 50% 0);
  }
  80% {
    clip-path: inset(20% 0 60% 0);
  }
  100% {
    clip-path: inset(0 0 80% 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@media (min-width: 768px) {
  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .education-grid,
  .languages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2.5rem 1.5rem;
  }

  .panel {
    padding: 1.75rem 1.5rem;
  }

  .console::before {
    left: 0.75rem;
    top: -1.45rem;
  }
}

/* Lightbox styles for gallery images */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 1, 10, 0.85);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__frame {
  transform: scale(0.98);
  transition: transform 360ms cubic-bezier(.2,.9,.2,1);
  width: 90vw;
  max-width: 1100px;
  height: 80vh;
  max-height: 850px;
  border-radius: 12px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 6px 18px rgba(78,241,242,0.08);
}

.lightbox.is-visible .lightbox__frame {
  transform: scale(1);
}

.lightbox__close { position: absolute; top: 24px; right: 24px; }

@media (max-width: 640px) {
  .lightbox__close { top: 12px; right: 12px; }
}

@media (max-width: 640px) {
  .lightbox__close { top: 12px; right: 12px; }
}
