﻿/* Terminal Portfolio - Matrix Theme CSS */

/* CSS Custom Properties */
:root {
  --bg: #0b0f0c;
  --panel: rgba(9, 14, 11, 0.65);
  --grid: rgba(24, 36, 29, 0.35);
  --text: #87eb78;
  --muted: #a5cbb4;
  --primary: #00ff95;
  --secondary: #39c6ff;
  --accent: #ff3d81;
  --glow: 0 0 18px rgba(0, 255, 149, 0.35);

  /* Typography */
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Borders */
  --border-radius: 8px;
  --border-color: #173a2a;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

body > * {
  transition: filter 0.3s ease;
}

/* Grid Background Effect */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
      60vw 60vh at 50% 120%,
      rgba(0, 0, 0, 0.55),
      transparent
    ),
    repeating-linear-gradient(0deg, transparent 0 28px, var(--grid) 28px 29px),
    repeating-linear-gradient(90deg, transparent 0 28px, var(--grid) 28px 29px),
    linear-gradient(var(--bg), var(--bg));
  pointer-events: none;
  z-index: -2;
}

body.gallery-open {
  overflow: hidden;
}

body.gallery-open > *:not(.gallery-overlay) {
  filter: blur(8px);
}

body.gallery-open {
  overflow: hidden;
}

body.gallery-open > *:not(.gallery-overlay) {
  filter: blur(8px);
}

/* Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Container */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.header__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Window Controls */
.header__controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__bullet {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header__bullet--red {
  background: #ff5f56;
}

.header__bullet--yellow {
  background: #ffbd2e;
}

.header__bullet--green {
  background: #27ca3f;
}

.header__bullet:hover,
.header__bullet:focus-visible {
  transform: scale(1.1);
  box-shadow: var(--glow);
}

.header__bullet:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Terminal Title */
.header__title {
  flex: 1;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

/* Navigation */
.header__nav {
  display: flex;
  align-items: center;
}

.nav-pills {
  display: flex;
  list-style: none;
  gap: var(--space-xs);
}

.nav-pills__link {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: all 0.2s ease;
  font-size: 13px;
}

.nav-pills__link:hover,
.nav-pills__link:focus-visible {
  background: rgba(0, 255, 149, 0.1);
  color: var(--primary);
  /* box-shadow: var(--glow); */
}

.nav-pills__link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Mobile Menu Toggle */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.header__menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s ease;
}

/* Social Sidebar */
.social-sidebar {
  position: fixed;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
}

.social-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  list-style: none;
}

.social-sidebar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: all 0.2s ease;
}

.social-sidebar a:hover,
.social-sidebar a:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateX(-4px);
}

.social-sidebar a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Main Content */
main {
  padding-top: 80px;
}

section {
  padding: 25px 0;
  scroll-margin-top: 80px;
}

/* Window Component */
.window {
  background: var(--panel);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all 0.2s ease;
}

.window:hover {
  border-color: rgba(0, 255, 149, 0.3);
}

.window__titlebar {
  display: flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
}

.window__bullets {
  display: flex;
  gap: var(--space-xs);
}

.bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.bullet--red {
  background: #ff5f56;
}

.bullet--yellow {
  background: #ffbd2e;
}

.bullet--green {
  background: #27ca3f;
}

.window__title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.window__content {
  padding: var(--space-md);
}

/* Terminal */
.terminal {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.4;
}

.terminal__line {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.terminal__prompt {
  color: var(--primary);
  font-weight: 600;
}

.terminal__command {
  color: #c878eb;
}

.terminal__output {
  margin-left: calc(var(--space-xs) + 8px);
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.terminal__output ul {
  list-style: none;
  padding-left: var(--space-sm);
}

.terminal__output li {
  margin-bottom: 2px;
  color: var(--muted);
}

/* Hero Section */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) 0;
}

.hero__title {
  margin: var(--space-xl) 0;
  text-align: center;
}

.hero__title h1 {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero__title-line--primary {
  color: var(--text);
}

.hero__title-line--secondary {
  color: var(--primary);
}

.hero__title-line--accent {
  color: var(--secondary);
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn--primary {
  background: var(--primary);
  color: var(--bg);
  box-shadow: var(--glow);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 255, 149, 0.5);
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(0, 255, 149, 0.1);
  box-shadow: var(--glow);
}

.btn--sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: 12px;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* About Section */
.about__grid {
  display: flex;
  gap: var(--space-xl);
}

.about__bio p {
  color: var(--muted);
  line-height: 1.7;
}

.skills-group {
  margin-bottom: var(--space-md);
}

.skills-group h4 {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.chip {
  display: inline-block;
  padding: 4px var(--space-xs);
  font-size: 11px;
  background: rgba(0, 255, 149, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 255, 149, 0.2);
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(0, 255, 149, 0.2);
  border-color: var(--primary);
}

/* Experience */
.experience {
  margin-top: var(--space-xl);
}

.experience__item {
  margin-bottom: var(--space-md);
}

.experience__item:last-child {
  margin-bottom: 0;
}

/* Projects Section */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  height: 100%;
}

.project-card .window {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card .window__content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card p {
  flex: 1;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.project-card__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: auto;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(9, 14, 11, 0.6);
  color: var(--muted);
  transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-icon i {
  pointer-events: none;
}

.btn-icon:hover,
.btn-icon:focus-visible {
  color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-1px);
}

.btn-icon:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-icon:active {
  transform: translateY(0);
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(9, 14, 11, 0.75);
  backdrop-filter: blur(10px);
  z-index: 2000;
}

.gallery-overlay__inner {
  position: relative;
  width: min(960px, 100%);
  background: rgba(10, 16, 13, 0.92);
  border: 1px solid var(--border-color);
  border-radius: calc(var(--border-radius) + 6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.gallery-overlay__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(9, 14, 11, 0.8);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-overlay__close:hover,
.gallery-overlay__close:focus-visible {
  color: var(--primary);
  box-shadow: var(--glow);
}

.gallery-overlay__close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.gallery-overlay__stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-overlay__frame {
  position: relative;
  width: 90%;
  border-radius: calc(var(--border-radius) + 4px);
  border: 1px solid var(--border-color);
  background: linear-gradient(
    135deg,
    rgba(9, 16, 13, 0.9),
    rgba(19, 31, 24, 0.9)
  );

.gallery-overlay__image {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: rgba(8, 12, 10, 0.6);
          border: 5px solid var(--border-color);
        border-radius: 10px;
}

.gallery-overlay__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(9, 14, 11, 0.82);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gallery-overlay__nav:hover,
.gallery-overlay__nav:focus-visible {
  color: var(--primary);
  box-shadow: var(--glow);
}

.gallery-overlay__nav:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.gallery-overlay__nav--prev {
  left: var(--space-sm);
}

.gallery-overlay__nav--next {
  right: var(--space-sm);
}

.gallery-overlay__nav[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.gallery-overlay__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.gallery-overlay__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.gallery-overlay__counter {
  font-size: 0.9rem;
  color: var(--muted);
}

@media (max-width: 768px) {
  .gallery-overlay {
    padding: var(--space-md);
  }

  .gallery-overlay__inner {
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }

  .gallery-overlay__frame {
    min-height: 260px;
  }


  .gallery-overlay__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(9, 14, 11, 0.8);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: color 0.2s ease, box-shadow 0.2s ease;
    margin: -7px;
  }

  .gallery-overlay__frame {
    position: relative;
    width: 90%;
    height: auto;
    border-radius: calc(var(--border-radius) + 4px);
    border: 1px solid var(--border-color);
    background: linear-gradient(
      135deg,
      rgba(9, 16, 13, 0.9),
      rgba(19, 31, 24, 0.9)
    );
    padding: var(--space-lg) var(--space-md) var(--space-md);
  }

  .gallery-overlay__frame {
    min-height: 260px;
    width: 100%;
    min-height: 140px;
  }
}

@media (max-width: 520px) {
  .btn-icon {
    width: 32px;
    height: 32px;
  }

  .gallery-overlay__nav {
    width: 20px;
    height: 20px;
    margin: -14px;
    margin-top: 0px;
  }

  .gallery-overlay__title {
    width: 100%;
  }
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-xs);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
}

.badge--live {
  background: rgba(0, 255, 149, 0.2);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.badge--internal {
  background: rgba(57, 198, 255, 0.2);
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  background: var(--panel);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}

.footer__content {
  margin-bottom: var(--space-xl);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-xl);
  align-items: start;
}

.contact__info p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.contact__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact__item strong {
  color: var(--primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact__item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact__item a:hover,
.contact__item a:focus-visible {
  color: var(--primary);
}

.contact__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__bottom {
  text-align: center;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-color);
  color: var(--muted);
  font-size: 12px;
}

/* Neon Effect Utility */
.neon {
  box-shadow: var(--glow);
  text-shadow: 0 0 8px rgba(0, 255, 149, 0.45);
}

/* Responsive Design */
@media (max-width: 960px) {
  .social-sidebar {
    display: none;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact__actions {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  .header__container {
    padding: var(--space-sm);
  }

  .header__title {
    font-size: 12px;
  }

  .nav-pills {
    display: none;
  }

  .nav-pills.show {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--panel);
    flex-direction: column;
    padding: var(--space-sm);
    border-top: 1px solid var(--border-color);
    z-index: 1001;
  }

  .header__menu-toggle {
    display: flex;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .contact__actions {
    flex-direction: column;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

@media (min-width: 641px) {
  .nav-pills {
    display: flex !important;
  }
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}
