/* =========================================================
   style.css  —  Ofek Yarom Web Site
   Dark mode · minimal portfolio · subtle cyberpunk accents
   ========================================================= */

:root {
  --bg:        #0b0f14;
  --bg-soft:   #10161f;
  --bg-card:   #121a24;
  --border:    #1e2a38;
  --text:      #d7e2ee;
  --muted:     #7d8ea0;
  --green:     #00ff9c;
  --blue:      #4da3ff;
  --purple:    #b78bff;
  --danger:    #ff5c72;
  --mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- Scanline overlay (subtle) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
}

/* ---------- Page fade-in ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeUp 0.7s ease both; }
.delay-1 { animation-delay: 0.10s; }
.delay-2 { animation-delay: 0.22s; }
.delay-3 { animation-delay: 0.34s; }
.delay-4 { animation-delay: 0.46s; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 24px; }
main  { flex: 1; padding: 56px 0 72px; }
section { margin-top: 56px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 15, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 2px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 0 rgba(0, 255, 156, 0);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.logo:hover {
  box-shadow: 0 0 18px rgba(0, 255, 156, 0.5);
  transform: translateY(-1px);
}
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  position: relative;
  padding: 4px 2px;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--blue);
  transition: width 0.25s ease;
  box-shadow: 0 0 8px var(--blue);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--green); }
.nav-links a .lock { font-size: 0.78rem; opacity: 0.7; }

/* ---------- Hero ---------- */
.hero { padding-top: 20px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.hero .prompt {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.hero .prompt .tick { color: var(--green); }

.subname {
  font-family: var(--mono);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--blue);
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.tagline {
  font-family: var(--mono);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  margin-top: 20px;
  color: var(--green);
  text-shadow: 0 0 14px rgba(0, 255, 156, 0.35);
}
.tagline .caret {
  display: inline-block;
  width: 10px;
  background: var(--green);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.lead { color: var(--muted); max-width: 62ch; margin-top: 18px; }

/* ---------- Boot-sequence log (homepage intro) ---------- */
.bootlog {
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.9;
  margin-top: 20px;
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 12px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.bootlog span {
  display: block;
  opacity: 0;
  animation: bootLine 0.4s ease forwards;
}
.bootlog .boot-sys { color: var(--muted); }
.bootlog .boot-ok  { color: var(--green); text-shadow: 0 0 8px rgba(0, 255, 156, 0.25); }
.bootlog span:nth-child(1) { animation-delay: 0.15s; }
.bootlog span:nth-child(2) { animation-delay: 0.40s; }
.bootlog span:nth-child(3) { animation-delay: 0.80s; }
.bootlog span:nth-child(4) { animation-delay: 1.05s; }
.bootlog span:nth-child(5) { animation-delay: 1.30s; }
.bootlog span:nth-child(6) { animation-delay: 1.55s; }
.bootlog span:nth-child(7) { animation-delay: 1.80s; }
@keyframes bootLine {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Headings ---------- */
h2 {
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2::before {
  content: "//";
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
}

/* ---------- Interest cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 10px 30px rgba(0, 255, 156, 0.10);
}
.card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--blue);
  margin-bottom: 8px;
}
.card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--bg);
  background: var(--green);
  border: 1px solid var(--green);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.15s ease, background 0.2s ease;
}
.btn:hover { box-shadow: 0 0 22px rgba(0, 255, 156, 0.55); transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--green);
}
.btn.ghost:hover { box-shadow: 0 0 22px rgba(0, 255, 156, 0.35); }

/* ---------- Password gate (events) ---------- */
.gate {
  max-width: 440px;
  margin: 40px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 30px;
  text-align: center;
}
.gate .lockicon {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(0, 255, 156, 0.5));
}
.gate h2 { justify-content: center; margin-top: 10px; }
.gate p { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }
.gate form { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.field {
  display: flex;
  gap: 8px;
}
.field input {
  flex: 1;
  font-family: var(--mono);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(77, 163, 255, 0.15);
}
.gate .msg {
  min-height: 20px;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--danger);
}
.gate .msg.ok { color: var(--green); }
.shake { animation: shake 0.4s; }
@keyframes shake {
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

.hidden { display: none !important; }

/* ---------- Event cards ---------- */
.events-list { display: grid; gap: 16px; margin-top: 22px; }
.event {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 12px;
  padding: 20px 22px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.event:hover {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 10px 28px rgba(77, 163, 255, 0.12);
}
.event .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.event h3 { font-size: 1.1rem; }
.event .date {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
  white-space: nowrap;
}
.event p { color: var(--muted); font-size: 0.93rem; margin-top: 8px; }

/* ---------- Event modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 6, 10, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 14px;
  padding: 26px 26px 24px;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.modal-overlay.open .modal { transform: scale(1); opacity: 1; }
.modal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.modal h3 { font-size: 1.25rem; }
.modal .date { font-family: var(--mono); font-size: 0.85rem; color: var(--green); white-space: nowrap; }
.modal p { color: var(--muted); margin-top: 14px; }
.modal .close {
  margin-top: 22px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--green);
  background: transparent;
  border: 1px solid var(--green);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: box-shadow 0.25s ease;
}
.modal .close:hover { box-shadow: 0 0 18px rgba(0, 255, 156, 0.4); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; font-family: var(--mono); }
footer .diag {
  opacity: 0.55;
  transition: color 0.25s ease, opacity 0.25s ease, text-shadow 0.25s ease;
}
footer .diag:hover {
  color: var(--green);
  opacity: 1;
  text-shadow: 0 0 10px rgba(0, 255, 156, 0.5);
}

/* =========================================================
   Console (terminal) page
   ========================================================= */
body.terminal {
  background: #000;
  font-family: var(--mono);
}
body.terminal::after { opacity: 0.7; }

.term {
  flex: 1;
  padding: 26px 20px 40px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.term-head {
  color: var(--green);
  font-size: 0.85rem;
  border-bottom: 1px solid #113022;
  padding-bottom: 12px;
  margin-bottom: 16px;
  text-shadow: 0 0 8px rgba(0, 255, 156, 0.4);
}
.term-head a { color: var(--muted); text-decoration: none; }
.term-head a:hover { color: var(--green); }

#output { white-space: pre-wrap; word-break: break-word; font-size: 0.92rem; }
#output .line { margin: 2px 0; }
#output .cmd    { color: var(--blue); }
#output .green  { color: var(--green); }
#output .purple { color: var(--purple); }
#output .muted  { color: var(--muted); }
#output .warn   { color: var(--danger); }
#output .egg {
  color: var(--green);
  text-shadow: 0 0 12px rgba(0, 255, 156, 0.6);
  font-size: 1.05rem;
}

.term-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.term-input .ps1 { color: var(--green); }
.term-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  caret-color: var(--green);
}
.tcaret {
  display: inline-block;
  width: 9px; height: 1.1em;
  background: var(--green);
  animation: blink 1s steps(1) infinite;
  vertical-align: -2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.85rem; }
  main { padding: 36px 0 56px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
