/* ═══════════════════════════════════════════
   aleksandarbasic.com — Terminal Theme CSS
   ═══════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg:           #0a0e1a;
  --bg-card:      #0d1220;
  --bg-lighter:   #111827;
  --green:        #00ff41;
  --green-dim:    #00cc33;
  --green-glow:   rgba(0, 255, 65, 0.15);
  --cyan:         #00d4ff;
  --cyan-dim:     #0099bb;
  --orange:       #ff6b35;
  --red:          #ff4757;
  --dim:          #4a5568;
  --dim2:         #2d3748;
  --text:         #c8d6e0;
  --font:         'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --radius:       4px;
  --transition:   0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); text-decoration: underline; }
ul { list-style: none; }

/* ── Boot Screen ── */
#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2rem;
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--green);
  overflow: hidden;
  transition: opacity 0.6s ease;
}
#boot-screen.fade-out { opacity: 0; pointer-events: none; }
.boot-inner { width: 100%; max-width: 800px; }
#boot-lines { line-height: 1.7; }
#boot-lines .boot-line { display: block; }
#boot-lines .boot-line.ok   { color: var(--green); }
#boot-lines .boot-line.warn { color: var(--orange); }
#boot-lines .boot-line.info { color: var(--cyan); }
#boot-lines .boot-line.dim  { color: var(--dim); }
.boot-cursor {
  display: inline-block;
  color: var(--green);
  animation: blink 1s step-end infinite;
  margin-top: 0.25rem;
}

/* ── Site Wrapper (hidden until boot done) ── */
#site-wrapper {
  opacity: 0;
  transition: opacity 0.8s ease;
  min-height: 100vh;
  position: relative;
}
#site-wrapper.visible { opacity: 1; }

/* ── Scanlines ── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* ── Terminal Title Bar ── */
.terminal-titlebar {
  background: #161b2e;
  border-bottom: 1px solid var(--dim2);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 500;
}
.titlebar-dots { display: flex; gap: 6px; }
.dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.titlebar-title {
  color: var(--dim);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  margin: 0 auto;
}

/* ── Navigation ── */
.terminal-nav {
  background: #0d1220;
  border-bottom: 1px solid var(--dim2);
  position: sticky;
  top: 37px;
  z-index: 490;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-prompt {
  color: var(--green);
  font-size: 0.85rem;
  text-shadow: 0 0 8px var(--green-glow);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav-link {
  color: var(--dim);
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-glow);
  text-shadow: 0 0 6px var(--green);
  text-decoration: none;
}
.nav-link::before { content: '['; color: var(--dim2); }
.nav-link::after  { content: ']'; color: var(--dim2); }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--dim2);
}
.section:last-of-type { border-bottom: none; }

/* ── Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.prompt {
  color: var(--green);
  font-weight: 700;
  text-shadow: 0 0 8px var(--green);
}
.cmd-static {
  color: var(--text);
  font-size: 1rem;
}

/* ── Terminal Block ── */
.terminal-block {
  background: var(--bg-card);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.prompt-line {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.cmd {
  color: var(--text);
  font-size: 1rem;
}
.cursor {
  color: var(--green);
  animation: blink 1s step-end infinite;
  font-size: 1rem;
}
.cursor.hidden { display: none; }
.output {
  color: var(--dim);
  margin-left: 1.2rem;
  margin-bottom: 1rem;
  line-height: 1.8;
  white-space: pre-line;
}
.output .highlight { color: var(--cyan); }
.output .green     { color: var(--green); }

/* ── ASCII Art ── */
.ascii-art {
  color: var(--green);
  font-size: clamp(0.5rem, 1.5vw, 0.9rem);
  line-height: 1.2;
  text-shadow: 0 0 10px var(--green);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

/* ── Services Grid ── */
.output-block {
  background: var(--bg-card);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.ls-header { color: var(--dim); margin-bottom: 1rem; font-size: 0.85rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.service-card {
  background: var(--bg-lighter);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: default;
}
.service-card:hover,
.service-card:focus {
  border-color: var(--green-dim);
  box-shadow: 0 0 16px var(--green-glow);
  outline: none;
}
.service-card-header {
  background: rgba(0,255,65,0.05);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--dim2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
}
.ls-perms { color: var(--cyan); }
.ls-meta  { color: var(--dim); flex: 1; }
.service-name { color: var(--green); font-weight: 700; }
.service-body { padding: 1.25rem 1rem; }
.service-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.service-title {
  color: var(--green);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 6px var(--green);
}
.service-list { padding-left: 0; }
.service-list li {
  color: var(--text);
  font-size: 0.87rem;
  padding: 0.25rem 0;
  padding-left: 1.2em;
  position: relative;
  line-height: 1.5;
}
.service-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--cyan);
}

/* ── Security Advisory ── */
.security-advisory {
  background: rgba(255, 71, 87, 0.05);
  border: 1px solid rgba(255, 71, 87, 0.4);
  border-radius: var(--radius);
  padding: 2rem;
}
.advisory-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.alert-badge {
  color: var(--red);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 0 8px var(--red);
}
.alert-badge.blink { animation: blink 1s step-end infinite; }
.advisory-title {
  color: var(--orange);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 8px var(--orange);
}
.advisory-divider {
  color: var(--dim2);
  margin: 0.75rem 0;
  font-size: 0.8rem;
  overflow: hidden;
  white-space: nowrap;
}
.advisory-body { margin-top: 0.5rem; }
.advisory-line {
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  line-height: 1.6;
}
.advisory-line strong { color: var(--orange); }
.arrow { color: var(--red); margin-right: 0.5rem; }
.arrow.ok { color: var(--green); }
.dim { color: var(--dim); }
.green { color: var(--green); }
.advisory-cta {
  margin-top: 1rem;
  color: var(--orange);
  font-size: 0.9rem;
  font-weight: 700;
}
.advisory-contact { margin-top: 0.5rem; }
.advisory-link {
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
}
.advisory-link:hover { color: var(--cyan); }

/* ── News Feed ── */
.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.news-refresh { text-align: right; }
.news-feed {
  background: var(--bg-card);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  padding: 1rem;
  min-height: 200px;
}
.news-loading {
  color: var(--dim);
  font-size: 0.9rem;
  padding: 1rem;
}
.news-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--dim2);
  font-size: 0.87rem;
  flex-wrap: wrap;
}
.news-item:last-child { border-bottom: none; }
.news-timestamp { color: var(--dim); white-space: nowrap; flex-shrink: 0; }
.news-log-prefix { color: var(--cyan); flex-shrink: 0; }
.news-title a {
  color: var(--text);
  transition: color var(--transition);
}
.news-title a:hover { color: var(--green); text-decoration: none; }
.news-error { color: var(--red); padding: 0.5rem; font-size: 0.9rem; }

/* ── Contact Form ── */
.contact-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 700px;
}
.form-field { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.prompt-dim { color: var(--cyan); }
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-lighter);
  border: 1px solid var(--dim2);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  transition: border-color var(--transition);
}
.input-wrapper:focus-within {
  border-color: var(--green-dim);
  box-shadow: 0 0 8px var(--green-glow);
}
.textarea-wrapper { align-items: flex-start; padding-top: 0.5rem; }
.input-prompt { color: var(--green); flex-shrink: 0; }
.terminal-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  width: 100%;
  padding: 0.6rem 0;
  outline: none;
}
.terminal-input::placeholder { color: var(--dim); }
.terminal-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-actions { margin-top: 1.5rem; }
.btn-submit {
  background: transparent;
  border: 1px solid var(--green-dim);
  color: var(--green);
  font-family: var(--font);
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-shadow: 0 0 6px var(--green);
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-submit:hover {
  background: var(--green-glow);
  box-shadow: 0 0 16px var(--green-glow);
}
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-response {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.form-response.success {
  display: block;
  color: var(--green);
  border: 1px solid var(--green-dim);
  background: var(--green-glow);
}
.form-response.error {
  display: block;
  color: var(--red);
  border: 1px solid var(--red);
  background: rgba(255, 71, 87, 0.08);
}

/* ── Footer ── */
.terminal-footer {
  background: #0d1220;
  border-top: 1px solid var(--dim2);
  padding: 1.5rem 0;
  text-align: center;
}
.footer-line {
  font-size: 0.82rem;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-sep { color: var(--dim2); }

/* ── Animations ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Utilities ── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */

@media (max-width: 768px) {
  .section { padding: 3rem 0; }

  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-top: 0.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.5rem 0.75rem; width: 100%; }
  .nav-inner { flex-wrap: wrap; }
  .nav-prompt { font-size: 0.75rem; }

  .ascii-art { font-size: 0.5rem; }
  .advisory-title { font-size: 1rem; }
  .advisory-divider { font-size: 0.7rem; }
  .contact-wrapper { padding: 1.25rem; }
  .security-advisory { padding: 1.25rem; }
  .footer-line { font-size: 0.75rem; gap: 0.4rem; }
  .titlebar-title { font-size: 0.7rem; }
}

@media (max-width: 480px) {
  .ascii-art { display: none; }
  .terminal-block { padding: 1rem; }
  .services-grid { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; gap: 0.2rem; }
  .news-timestamp { font-size: 0.75rem; }
}

@media (min-width: 1200px) {
  .section { padding: 6rem 0; }
}
