/* =================================================================
   TERMINAL CV THEME - N0DE.BIZ INSPIRED
   ================================================================= */

/* CSS Variables */
:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --bg-tertiary: #404040;
  --text-primary: #e0e0e0;
  --text-secondary: #c0c0c0;
  --text-muted: #808080;
  --text-dim: #606060;
  --accent-color: #ffffff;
  --border-color: #404040;
  --mono-font: 'JetBrains Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  --line-height: 1.6;
  --max-width: 800px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--mono-font);
  font-size: 14px;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  margin: 0;
  padding: 20px;
}

/* Terminal Container */
.terminal-container {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: var(--bg-primary);
  padding: 20px;
}

/* CLI Header */
.cli-header {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--border-color);
  font-size: 13px;
}

.cli-prompt {
  color: var(--text-muted);
}

.cli-command {
  color: var(--text-secondary);
  margin-left: 5px;
}

/* CLI Footer */
.cli-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px dotted var(--border-color);
  font-size: 13px;
}

.cli-cursor {
  color: var(--accent-color);
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono-font);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  color: var(--accent-color);
  margin-bottom: 5px;
}

h2 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin: 30px 0 15px 0;
}

h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 20px 0 10px 0;
}

p {
  color: var(--text-secondary);
  margin: 10px 0;
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}

a:hover {
  border-bottom: 1px solid var(--accent-color);
}

/* CV Sections */
.cv-section {
  margin-bottom: 40px;
}

/* Header Section */
.name {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 5px;
}

.title {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 20px;
}

.summary {
  margin: 20px 0;
}

.summary-line {
  color: var(--text-secondary);
  margin: 5px 0;
}

/* Contact Section */
.contact-section {
  margin: 25px 0 35px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 15px 0;
}

.contact-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.contact-icon {
  color: var(--accent-color);
  margin-right: 8px;
  font-size: 1rem;
  min-width: 20px;
  text-align: center;
}

.contact-label {
  color: var(--text-muted);
  min-width: 80px;
  margin-right: 10px;
}

.contact-value {
  color: var(--text-primary);
}

/* Social Links */
.social-section {
  margin: 25px 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 15px 0;
}

.social-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--accent-color);
  border-bottom: none;
}

/* Experience Section */
.experience-item {
  margin: 25px 0;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--border-color);
}

.experience-item:last-child {
  border-bottom: none;
}

.experience-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.job-title {
  color: var(--accent-color);
  font-weight: 500;
}

.company {
  color: var(--text-secondary);
}

.duration {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: auto;
}

.experience-summary {
  color: var(--text-secondary);
  margin: 10px 0;
}

.experience-highlights {
  margin: 10px 0;
  padding-left: 20px;
}

.experience-highlights li {
  color: var(--text-secondary);
  margin: 5px 0;
}

/* Skills Section */
.skill-category {
  margin: 20px 0;
}

.skill-summary {
  color: var(--text-secondary);
  margin: 10px 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.skill-tag {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
}

/* Projects Section */
.project-item {
  margin: 25px 0;
  padding-bottom: 20px;
  border-bottom: 1px dotted var(--border-color);
}

.project-item:last-child {
  border-bottom: none;
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.project-name {
  color: var(--accent-color);
  font-weight: 500;
}

.project-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: none;
}

.project-link:hover {
  color: var(--accent-color);
}

.project-timeline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-left: auto;
}

.project-role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 5px 0;
}

.project-summary {
  color: var(--text-secondary);
  margin: 10px 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.tag {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 0.7rem;
}

/* Achievements Section */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.achievement-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 15px;
  transition: border-color 0.2s ease;
}

.achievement-item:hover {
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}

.achievement-title {
  color: var(--accent-color);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 5px;
}

.achievement-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.achievement-issuer {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 5px;
}

/* Education Section */
.education-item {
  margin: 20px 0;
  padding-bottom: 15px;
  border-bottom: 1px dotted var(--border-color);
}

.education-item:last-child {
  border-bottom: none;
}

.education-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.degree {
  color: var(--accent-color);
  font-weight: 500;
}

.institution {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.score {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* Lists */
ul {
  padding-left: 20px;
}

li {
  color: var(--text-secondary);
  margin: 5px 0;
}

li::marker {
  color: var(--text-muted);
}

/* Code and Preformatted Text */
code {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: var(--mono-font);
  font-size: 0.9em;
}

pre {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 15px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  font-family: var(--mono-font);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 15px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  .terminal-container {
    padding: 15px;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.1rem;
  }
  
  
  .experience-header,
  .project-header,
  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .duration,
  .project-timeline {
    margin-left: 0;
    margin-top: 5px;
  }
  
  .social-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
    padding: 10px;
  }
  
  .terminal-container {
    padding: 10px;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  .skill-tags {
    gap: 5px;
  }
  
  .project-tags {
    gap: 4px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white !important;
    color: black !important;
    font-size: 12px;
  }
  
  .terminal-container {
    background: white !important;
    max-width: none;
    padding: 0;
  }
  
  .cli-header,
  .cli-footer {
    display: none;
  }
  
  .cv-section {
    break-inside: avoid;
    margin-bottom: 20px;
  }
  
  .achievement-item,
  .experience-item,
  .project-item {
    break-inside: avoid;
  }
  
  a {
    color: black !important;
    text-decoration: underline;
  }
}

/* =================================================================
   TERMINAL EFFECTS & ANIMATIONS
   ================================================================= */

/* Terminal Cursor and Typewriter Effects */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@keyframes terminal-glow {
  0%, 100% { 
    text-shadow: 0 0 3px var(--accent-color); 
  }
  50% { 
    text-shadow: 
      0 0 5px var(--accent-color), 
      0 0 8px var(--accent-color); 
  }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
  100% { transform: translate(0); }
}

@keyframes matrix-scan {
  0% { transform: translateY(-100%); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* Terminal Typewriter Effect */
.typewriter {
  border-right: 2px solid #00ff00;
  animation: blink 2s infinite;
}

.typewriter.completed {
  border-right: none;
  animation: none;
}

/* Glitch Effect */
.glitch {
  animation: glitch 0.3s;
  color: #ff0000 !important;
  text-shadow: 
    2px 0 #00ff00, 
    -2px 0 #ff00ff;
}

/* Interactive Hover Effects - RESTORED */

/* Main Section Sliding Effects */
.cv-section:hover {
  transform: translateX(2px);
  transition: transform 0.3s ease;
}

/* Experience and Project Item Hover Effects */
.experience-item:hover,
.project-item:hover {
  background-color: rgba(64, 64, 64, 0.15);
  border-left: 2px solid var(--text-muted);
  padding-left: 18px;
  transition: all 0.4s ease;
}

/* Matrix Background */
#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.02;
  pointer-events: none;
}

/* Boot Sequence */
#boot-sequence {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #00ff00;
  font-family: var(--mono-font);
  font-size: 14px;
  padding: 20px;
  z-index: 9999;
  overflow-y: auto;
  line-height: 1.4;
}

#boot-sequence div {
  margin: 2px 0;
  opacity: 0;
  animation: fade-in-boot 0.5s ease forwards;
}

@keyframes fade-in-boot {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Particle Effects */
.particle {
  position: fixed;
  width: 3px;
  height: 3px;
  background: #00ff00;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  animation: particle-float 2s ease-out forwards;
}

@keyframes particle-float {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translateY(-20px);
  }
}

/* Enhanced Terminal Elements */
.cli-prompt {
  position: relative;
}

.cli-prompt::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #00ff00;
  animation: blink 2s infinite;
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Terminal Window Effect */
.terminal-container {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: linear-gradient(145deg, var(--bg-primary), #1f1f1f);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.terminal-container::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(45deg, #00ff00, #ffffff, #00ff00);
  border-radius: 8px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.terminal-container:hover::before {
  opacity: 0.03;
}

/* Section Fade-in Animation */
.cv-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.cv-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Animation for Async Content */
.loading {
  position: relative;
  color: transparent;
}

.loading::after {
  content: 'Loading...';
  position: absolute;
  left: 0;
  top: 0;
  color: #00ff00;
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
  0%, 20% { content: 'Loading'; }
  40% { content: 'Loading.'; }
  60% { content: 'Loading..'; }
  80%, 100% { content: 'Loading...'; }
}

/* Mobile Responsiveness for Effects */
@media (max-width: 768px) {
  #matrix-bg {
    opacity: 0.01;
  }
  
  .cv-section:hover {
    transform: none;
  }
  
  .terminal-container:hover::before {
    opacity: 0;
  }
  
  .experience-item:hover,
  .project-item:hover {
    transform: none;
    background-color: transparent;
    border-left: none;
    padding-left: 0;
  }
  
  .achievement-item:hover {
    transform: none;
    border-color: var(--border-color);
  }
}

/* Breakout Game Animations */
@keyframes explosion-particle {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(360deg) translateY(-100px);
  }
}

/* Breakout Game Block Damage Effects */
.breakout-block {
  position: relative !important;
  background: linear-gradient(45deg, #ff00ff, #00ffff) !important;
  border: 2px solid #ffffff !important;
  color: #000000 !important;
  font-weight: bold !important;
  text-shadow: 1px 1px 2px #ffffff !important;
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.8) !important;
  transition: all 0.2s ease !important;
  padding: 4px 8px !important;
  margin: 2px !important;
  border-radius: 4px !important;
  opacity: 1 !important;
  display: inline-block !important;
  visibility: visible !important;
  z-index: 1000 !important;
  min-width: 20px !important;
  min-height: 16px !important;
  line-height: 1.2 !important;
}

.breakout-block.damaged {
  animation: block-damage 0.3s ease;
}

@keyframes block-damage {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Breakout Game UI Enhancements */
#breakout-ui {
  animation: ui-glow 2s infinite alternate;
}

@keyframes ui-glow {
  0% { text-shadow: 0 0 10px #00ff00; }
  100% { text-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  
  #matrix-bg {
    display: none;
  }
  
  .breakout-block {
    animation: none !important;
  }
}