/* ============================================
   TERMINAL NOSTALGIA - CRT AESTHETIC
   Amber phosphor on black with authentic effects
   ============================================ */

:root {
  --amber-bright: #ffcc33;
  --amber-primary: #ffaa00;
  --amber-dim: #dd8800;
  --amber-dark: #aa6600;
  --black: #000000;
  --black-soft: #0a0a0a;

  --glow-small: 0 0 5px var(--amber-primary);
  --glow-medium: 0 0 10px var(--amber-primary), 0 0 20px var(--amber-dim);
  --glow-large: 0 0 10px var(--amber-bright), 0 0 20px var(--amber-primary), 0 0 30px var(--amber-dim);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--black);
  color: var(--amber-primary);
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 18px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

/* ============================================
   CRT SCREEN EFFECTS
   ============================================ */

/* Scanlines overlay */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08),
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1000;
  animation: scanline-flicker 0.1s infinite alternate;
}

/* CRT curvature and vignette */
.crt-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 999;
}

.crt-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--black);
  opacity: 0;
  animation: flicker 4s infinite;
}

@keyframes scanline-flicker {
  0% { opacity: 0.95; }
  100% { opacity: 1; }
}

@keyframes flicker {
  0%, 100% { opacity: 0; }
  50% { opacity: 0.03; }
  51% { opacity: 0; }
  52% { opacity: 0.05; }
  53% { opacity: 0; }
}

/* ============================================
   TERMINAL WINDOW
   ============================================ */

.terminal {
  position: relative;
  width: 100%;
  max-width: 900px;
  background: var(--black-soft);
  border: 2px solid var(--amber-dark);
  border-radius: 8px;
  box-shadow:
    0 0 40px rgba(255, 153, 0, 0.3),
    0 0 80px rgba(255, 153, 0, 0.1),
    inset 0 0 100px rgba(255, 153, 0, 0.05);
  z-index: 10;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(255, 153, 0, 0.1);
  border-bottom: 1px solid var(--amber-dark);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.terminal-title {
  color: var(--amber-bright);
  text-shadow: var(--glow-small);
}

.terminal-status {
  color: var(--amber-primary);
  animation: pulse 2s infinite;
}

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

.terminal-body {
  padding: 2.5rem 2rem;
}

/* ============================================
   TERMINAL CONTENT
   ============================================ */

.terminal-content {
  margin-top: 1rem;
}

.output-line {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.prompt {
  color: var(--amber-dim);
  font-weight: 500;
  white-space: nowrap;
}

.command {
  color: var(--amber-bright);
  font-weight: 700;
  text-shadow: var(--glow-small);
}

/* ASCII Art */
.ascii-art {
  color: var(--amber-primary);
  font-size: 0.75rem;
  line-height: 1.2;
  margin: 1rem 0 1.5rem;
  text-shadow: var(--glow-small);
  overflow-x: auto;
}

/* Info Block */
.info-block {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--amber-dark);
}

.info-block p {
  margin: 0.75rem 0;
  color: var(--amber-primary);
  font-size: 1.1rem;
  line-height: 2;
}

/* Typing effect */
.type-text {
  opacity: 0;
  animation: type-fade-in 0.5s forwards;
}

.delayed-1 {
  animation-delay: 0.8s;
}

.delayed-2 {
  animation-delay: 1.6s;
}

@keyframes type-fade-in {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
  margin: 1.5rem 0 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--amber-dark);
}

.about-section p {
  margin: 0.75rem 0;
  color: var(--amber-primary);
  font-size: 1rem;
  line-height: 1.9;
}

/* ============================================
   INTERESTS SECTION
   ============================================ */

.interests-section {
  margin: 1.5rem 0 2rem;
  padding-left: 1rem;
  border-left: 2px solid var(--amber-dark);
}

.interests-section p {
  margin: 0.75rem 0;
  color: var(--amber-primary);
  font-size: 1rem;
  line-height: 1.9;
}

/* ============================================
   LINKS SECTION
   ============================================ */

.links-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.terminal-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 153, 0, 0.05);
  border: 1px solid var(--amber-dark);
  color: var(--amber-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.terminal-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: rgba(255, 153, 0, 0.15);
  transition: width 0.3s ease;
  z-index: -1;
}

.terminal-link:hover::before,
.terminal-link:focus::before {
  width: 100%;
}

.terminal-link:hover,
.terminal-link:focus {
  border-color: var(--amber-primary);
  color: var(--amber-bright);
  text-shadow: var(--glow-small);
  transform: translateX(4px);
}

.link-prefix {
  color: var(--amber-dim);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-section {
  margin: 2rem 0;
}

.contact-header {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 153, 0, 0.05);
  border-left: 4px solid var(--amber-dark);
}

.contact-header p {
  margin: 0.35rem 0;
  font-size: 0.95rem;
}

.status-ok {
  color: var(--amber-bright);
  text-shadow: var(--glow-small);
}

.terminal-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  color: var(--amber-dim);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: var(--glow-small);
}

.terminal-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--amber-dark);
  color: var(--amber-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  padding: 0.85rem 1.1rem;
  outline: none;
  transition: all 0.2s ease;
}

.terminal-input::placeholder {
  color: var(--amber-dark);
  opacity: 0.7;
}

.terminal-input:focus {
  border-color: var(--amber-primary);
  box-shadow:
    0 0 10px rgba(255, 153, 0, 0.3),
    inset 0 0 20px rgba(255, 153, 0, 0.05);
  background: rgba(0, 0, 0, 0.7);
}

textarea.terminal-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.terminal-button {
  background: rgba(255, 153, 0, 0.1);
  border: 2px solid var(--amber-primary);
  color: var(--amber-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.85rem 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: var(--glow-small);
  position: relative;
  overflow: hidden;
}

.terminal-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--amber-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.terminal-button:hover::before,
.terminal-button:focus::before {
  opacity: 0.2;
}

.terminal-button:hover,
.terminal-button:focus {
  border-color: var(--amber-bright);
  box-shadow:
    0 0 20px rgba(255, 153, 0, 0.5),
    inset 0 0 20px rgba(255, 153, 0, 0.1);
  transform: translateY(-2px);
}

.terminal-button:active {
  transform: translateY(0);
}

/* ============================================
   TERMINAL FOOTER
   ============================================ */

.terminal-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--amber-dark);
}

.cursor-blink {
  display: inline-block;
  color: var(--amber-bright);
  font-weight: 700;
  animation: blink 1s step-end infinite;
  text-shadow: var(--glow-medium);
}

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

/* ============================================
   PROFILE PICTURE
   ============================================ */

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0 1.5rem;
}

.profile-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin: 1.5rem 0;
}

.profile-image-container {
  flex-shrink: 0;
}

.profile-image {
  width: 140px;
  height: 140px;
  border-radius: 4px;
  border: 2px solid var(--amber-dark);
  box-shadow: var(--glow-medium);
  filter: sepia(30%) saturate(120%) brightness(90%) contrast(110%);
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.lang-switcher {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.lang-link {
  color: var(--amber-dim);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.lang-link:hover,
.lang-link.active {
  color: var(--amber-bright);
  border-color: var(--amber-dark);
  text-shadow: var(--glow-small);
}

.lang-link.active {
  border-color: var(--amber-primary);
  background: rgba(255, 153, 0, 0.1);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.mt-4 {
  margin-top: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  .terminal {
    border-radius: 4px;
  }

  .terminal-header {
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
  }

  .terminal-body {
    padding: 1.5rem 1rem;
  }

  .output-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .ascii-art {
    font-size: 0.6rem;
  }

  .terminal-link {
    font-size: 0.85rem;
    padding: 0.65rem 0.85rem;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
  }

  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .profile-info {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .terminal-button {
    width: 100%;
    text-align: center;
  }

  .info-block p {
    font-size: 1rem;
  }

  .about-section p {
    font-size: 0.95rem;
  }
}
