* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Color Scheme */
:root {
  --bg-dark: #0a0e27;
  --bg-surface: #0f1535;
  --bg-secondary: #151d3a;
  --border-light: #4a7c9e;
  --text-primary: #a8d5ff;
  --text-secondary: #7aa3c4;
  --text-muted: #536b7d;
  --accent-cyan: #5ad9ff;
  --accent-red: #ff5555;
  --accent-green: #55dd55;
}

/* <CHANGE> Improved retro text animation - slower, more readable flicker with better visual control */

body {
  overflow-x: hidden;
}

html {
  background: #111;
  padding: 1em;
  font-family: 'Noto Sans Display', sans-serif;
  color: #eee;
  font-size: 1em;
  line-height: 1.4;
  letter-spacing: 0.125em;
  text-shadow: 
    0.05rem 0.02rem 0.1rem #ea36af,
    -0.05rem -0.02rem 0.1rem #75fa69;
  animation: textGlitch 0.4s ease-in-out infinite;
}

@keyframes textGlitch {
  0% {
    text-shadow: 
      0.05rem 0.02rem 0.1rem #ea36af,
      -0.05rem -0.02rem 0.1rem #75fa69;
  }
  25% {
    text-shadow: 
      0.15rem 0.05rem 0.15rem #ea36af,
      -0.1rem -0.05rem 0.15rem #75fa69;
  }
  50% {
    text-shadow: 
      -0.08rem 0.03rem 0.12rem #ea36af,
      0.08rem -0.03rem 0.12rem #75fa69;
  }
  75% {
    text-shadow: 
      0.1rem -0.04rem 0.14rem #ea36af,
      -0.12rem 0.04rem 0.14rem #75fa69;
  }
  100% {
    text-shadow: 
      0.05rem 0.02rem 0.1rem #ea36af,
      -0.05rem -0.02rem 0.1rem #75fa69;
  }
}

body {
  background: linear-gradient(135deg, #0a0e27 0%, #0d1a36 100%);
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.terminal-container {
  width: 100%;
  max-width: 1200px;
}

/* CRT Bezel Effect */
.crt-bezel {
  background: #0f1a2e;
  border: 2px solid #5ad9ff;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(90, 217, 255, 0.15),
    0 0 80px rgba(15, 21, 53, 0.9);
  padding: 20px;
  position: relative;
}

.crt-bezel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.15) 1px,
      transparent 1px,
      transparent 2px
    );
  pointer-events: none;
  border: 2px solid #5ad9ff;
}

/* Header Bar */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  letter-spacing: 2px;
}

.header-logo {
  font-weight: bold;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(90, 217, 255, 0.5);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.signal-indicator {
  color: var(--text-secondary);
  font-size: 12px;
}

.signal-dots {
  display: flex;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  display: inline-block;
  animation: pulse 1s ease-in-out infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.1s;
}

.dot:nth-child(3) {
  animation-delay: 0.2s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Sidebar */
.sidebar {
  border: 2px solid var(--border-light);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(15, 21, 53, 0.5);
  max-height: 800px;
  overflow-y: auto;
}

.sidebar-section {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 15px;
}

.sidebar-section:last-child {
  border-bottom: none;
}

.section-title {
  color: var(--accent-cyan);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.profile-info {
  text-align: center;
  padding: 10px 0;
}

.avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
}

.name {
  font-size: 13px;
  font-weight: bold;
  color: var(--accent-cyan);
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.title {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--border-light);
}

.label {
  color: var(--text-secondary);
}

.value {
  color: var(--text-primary);
  font-weight: bold;
}

.status-active {
  color: var(--accent-green);
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-tag {
  background: rgba(90, 217, 255, 0.1);
  border: 1px solid var(--accent-cyan);
  padding: 4px 8px;
  font-size: 9px;
  color: var(--accent-cyan);
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: rgba(90, 217, 255, 0.2);
  box-shadow: 0 0 10px rgba(90, 217, 255, 0.3);
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  border: 2px solid var(--border-light);
  padding: 20px;
  background: rgba(15, 21, 53, 0.5);
  transition: all 0.3s ease;
}

.section:hover {
  box-shadow: inset 0 0 20px rgba(90, 217, 255, 0.05);
}

.section-content {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 13px;
}

.section-content p {
  margin-bottom: 10px;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.project-card {
  background: rgba(21, 29, 58, 0.8);
  border: 1px solid var(--border-light);
  padding: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(90, 217, 255, 0.2);
  transform: translateY(-2px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.project-name {
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.project-year {
  color: var(--text-muted);
  font-size: 11px;
}

.project-card p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.project-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(90, 217, 255, 0.05);
  border: 1px solid var(--border-light);
  padding: 3px 6px;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Experience */
.experience-item {
  padding: 15px;
  border-left: 2px solid var(--accent-cyan);
  margin-bottom: 15px;
  background: rgba(90, 217, 255, 0.03);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.company {
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.date {
  color: var(--text-muted);
  font-size: 11px;
}

.position {
  color: var(--text-primary);
  font-size: 12px;
  margin-bottom: 8px;
  font-weight: bold;
}

.experience-item p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* Footer */
.footer {
  border-top: 2px solid var(--border-light);
  padding-top: 15px;
  font-size: 11px;
  letter-spacing: 1px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.footer-section {
  display: flex;
  justify-content: space-between;
}

.footer-label {
  color: var(--text-muted);
}

.footer-value {
  color: var(--text-primary);
}

.footer-link {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-link:hover {
  text-shadow: 0 0 10px rgba(90, 217, 255, 0.5);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 10px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 21, 53, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Responsive Design */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .header-bar {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .crt-bezel {
    padding: 15px;
  }

  .section {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .crt-bezel {
    padding: 10px;
  }

  .header-bar {
    font-size: 12px;
  }

  .section-title {
    font-size: 10px;
  }
}