/* ============================================
   flaviusmiron.com — Phosphor Terminal Theme
   Zero dependencies. Pure CSS.
   ============================================ */

:root {
  --bg:          #0c0c0c;
  --bg-light:    #161616;
  --bg-terminal: #111111;
  --text:        #b0b0b0;
  --text-bright: #e0e0e0;
  --amber:       #ffb627;
  --amber-glow:  #ffb62740;
  --green:       #4ade80;
  --blue:        #60a5fa;
  --red:         #f87171;
  --cyan:        #67e8f9;
  --purple:      #c084fc;
  --dim:         #555555;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  background: var(--bg);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  overflow: hidden;
}

/* Screen-reader only content for SEO */
.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;
}

/* ============================================
   Terminal Window
   ============================================ */

#terminal {
  position: relative;
  max-width: 900px;
  width: calc(100% - 40px);
  height: calc(100% - 60px);
  margin: 30px auto;
  background: var(--bg-terminal);
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 182, 39, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease;
}

/* CRT Scanlines */
#terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 10px;
}

/* CRT Vignette */
#terminal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 10;
  border-radius: 10px;
}

/* ============================================
   Title Bar
   ============================================ */

.title-bar {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

/* Genie minimize — transform-only, no position change */
.minimized {
  transform: perspective(800px) rotateX(30deg) scaleX(0.2) scaleY(0.01);
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
}

/* Dock icon — appears after genie minimize */
#dock-icon {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #1e1e1e, #141414);
  border: 1px solid #333;
  border-radius: 12px;
  cursor: pointer;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#dock-icon.visible {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

#dock-icon:hover {
  transform: translateX(-50%) scale(1.15);
}

/* Running indicator dot below icon (macOS style) */
#dock-icon::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--amber);
  border-radius: 50%;
}

/* Fullscreen state — fill viewport via CSS, not browser fullscreen */
#terminal.fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  max-width: none;
}
#terminal.fullscreen::before,
#terminal.fullscreen::after {
  border-radius: 0;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.title-text {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

.title-links {
  display: flex;
  gap: 6px;
}

.title-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border: 1px solid #333;
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s;
}

.title-links a:hover {
  color: var(--amber);
  border-color: var(--amber);
}

/* ============================================
   Screen (Output + Input)
   ============================================ */

#screen {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  scroll-behavior: smooth;
}

/* Scrollbar */
#screen::-webkit-scrollbar {
  width: 6px;
}

#screen::-webkit-scrollbar-track {
  background: transparent;
}

#screen::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

#screen::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ============================================
   Output
   ============================================ */

#output {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}

#output .line {
  animation: fadeIn 0.1s ease-in;
}

#output .command-echo {
  color: var(--green);
}

#output .prompt-echo {
  color: var(--amber);
}

#output .error {
  color: var(--red);
}

#output .success {
  color: var(--green);
}

#output .dim {
  color: var(--dim);
}

#output .bright {
  color: var(--text-bright);
}

#output .amber {
  color: var(--amber);
  text-shadow: 0 0 8px var(--amber-glow);
}

#output .cyan {
  color: var(--cyan);
}

#output .purple {
  color: var(--purple);
}

#output .blue {
  color: var(--blue);
}

#output .green {
  color: var(--green);
}

#output .red {
  color: var(--red);
}

/* Output blocks */
.output-block {
  background: var(--bg-light);
  border-left: 2px solid #333;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 0 4px 4px 0;
}

/* Links in output */
#output a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

#output a:hover {
  border-bottom-color: var(--blue);
}

/* Section headers in output */
.section-header {
  color: var(--amber);
  text-shadow: 0 0 8px var(--amber-glow);
  font-weight: 700;
  margin-bottom: 4px;
}

/* Skill tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 3px;
  font-size: 12px;
  background: #1e1e1e;
  border: 1px solid #333;
  color: var(--text-bright);
}

/* Timeline entries */
.timeline-entry {
  margin: 4px 0;
  padding-left: 16px;
  border-left: 2px solid #333;
}

.timeline-entry .role {
  color: var(--amber);
  font-weight: 700;
}

.timeline-entry .company {
  color: var(--text-bright);
}

.timeline-entry .date {
  color: var(--dim);
  font-size: 12px;
}

.timeline-entry .detail {
  color: var(--text);
  font-size: 13px;
}

/* Neofetch layout */
.neofetch {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.neofetch-ascii {
  color: var(--amber);
  text-shadow: 0 0 8px var(--amber-glow);
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.3;
}

.neofetch-info {
  font-size: 13px;
  line-height: 1.5;
}

.neofetch-info .label {
  color: var(--amber);
  font-weight: 700;
}

.neofetch-info .value {
  color: var(--text);
}

/* Help command */
.help-row {
  display: flex;
  gap: 8px;
  line-height: 1.5;
}

.help-cmd {
  color: var(--green);
  min-width: 160px;
  flex-shrink: 0;
}

.help-desc {
  color: var(--text);
}

/* Project cards */
.project {
  margin: 4px 0;
  padding: 8px 12px;
  background: var(--bg-light);
  border-left: 2px solid var(--amber);
  border-radius: 0 4px 4px 0;
}

.project-name {
  color: var(--amber);
  font-weight: 700;
}

.project-desc {
  color: var(--text);
  font-size: 13px;
}

.project-stat {
  color: var(--dim);
  font-size: 12px;
}

/* ============================================
   Input Line
   ============================================ */

.input-line {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 4px;
}

.prompt {
  color: var(--green);
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 8px;
}

.prompt-path {
  color: var(--blue);
}

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

.input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

#input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  caret-color: transparent;
}

/* Block cursor */
.input-wrapper::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 17px;
  background: var(--amber);
  animation: blink 1s step-end infinite;
  pointer-events: none;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.input-wrapper.typing::after {
  animation: none;
  opacity: 1;
}

/* ============================================
   Boot Sequence
   ============================================ */

.boot-text {
  color: var(--dim);
}

.boot-ok {
  color: var(--green);
  font-weight: 700;
}

.boot-welcome {
  color: var(--amber);
  text-shadow: 0 0 10px var(--amber-glow);
  font-weight: 700;
  font-size: 15px;
}

.boot-hint {
  color: var(--dim);
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  #terminal {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
  }

  #terminal::before,
  #terminal::after {
    border-radius: 0;
  }

  .title-bar {
    height: 34px;
    padding: 0 10px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .title-spacer {
    width: 42px;
  }

  #screen {
    padding: 12px 14px;
  }

  #output {
    font-size: 13px;
  }

  #input {
    font-size: 13px;
  }

  .input-line {
    font-size: 13px;
  }

  .neofetch {
    flex-direction: column;
    gap: 12px;
  }

  .neofetch-ascii {
    font-size: 10px;
  }

  .help-row {
    flex-direction: column;
    gap: 0;
  }

  .help-cmd {
    min-width: unset;
  }
}

@media (max-width: 480px) {
  #output {
    font-size: 12px;
  }

  #input {
    font-size: 12px;
  }

  .input-line {
    font-size: 12px;
  }

  .neofetch-ascii {
    font-size: 8px;
  }
}

/* ============================================
   Noscript Fallback
   ============================================ */

.noscript-fallback {
  max-width: 700px;
  margin: 40px auto;
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  line-height: 1.7;
}

.noscript-fallback h1 {
  color: var(--amber);
  font-size: 20px;
  margin-bottom: 8px;
}

.noscript-fallback h2 {
  color: var(--amber);
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.noscript-fallback a {
  color: var(--blue);
}

.noscript-fallback ul {
  padding-left: 20px;
}

.noscript-fallback li {
  margin: 8px 0;
}
