/* === HOME.CSS — Homepage only === */

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 4rem;
}

.hero-terminal {
  width: 100%;
}

.hero-terminal .terminal-body {
  padding: 3rem;
}

.hero-prompt {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

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

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 1.5rem 0;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--phosphor);
  text-shadow: 0 0 40px var(--phosphor-glow);
}

.hero-output {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 1.5rem 0 2.5rem;
  max-width: 600px;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

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

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.65s forwards;
}

/* Background grid */
.hero-grid {
  position: absolute;
  right: -5%;
  top: 10%;
  width: 600px;
  height: 600px;
  opacity: 0.025;
  background-image:
    linear-gradient(var(--phosphor) 1px, transparent 1px),
    linear-gradient(90deg, var(--phosphor) 1px, transparent 1px);
  background-size: 32px 32px;
  transform: rotate(15deg);
  pointer-events: none;
}

/* --- SIGNAL BAR --- */
.signal-bar {
  border-top: 1px solid rgba(232, 100, 58, 0.08);
  border-bottom: 1px solid rgba(232, 100, 58, 0.08);
  padding: 2.5rem 0;
  background: var(--bg-elevated);
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.signal-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.signal-number {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--phosphor);
  text-shadow: 0 0 30px var(--phosphor-glow);
}

.signal-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* --- CASE STUDIES --- */
.case-study {
  background: var(--bg-card);
  border: 1px solid rgba(232, 100, 58, 0.1);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  transition: all 0.4s var(--ease);
  position: relative;
}

.case-study::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: 0 0 40px var(--phosphor-faint);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.case-study:hover::before { opacity: 1; }

.case-study:hover {
  border-color: rgba(232, 100, 58, 0.25);
}

.case-study-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}

.case-study-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-study-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--phosphor);
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.case-study-tag::before {
  content: '> ';
  color: var(--text-dim);
}

.case-study h3 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.case-study p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.case-study-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.stack-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.3rem 0.7rem;
  background: var(--phosphor-faint);
  border: 1px solid rgba(232, 100, 58, 0.12);
  border-radius: 3px;
  color: var(--text-muted);
}

.case-study-metrics {
  display: flex;
  gap: 2rem;
  margin-top: auto;
}

.metric { display: flex; flex-direction: column; gap: 0.15rem; }

.metric-value {
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
}

.metric-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* --- CASE STUDY VISUALS --- */
.case-study-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.visual-suppertime { background: linear-gradient(135deg, #12100e 0%, #1a1510 100%); }
.visual-mai { background: linear-gradient(135deg, #0e1014 0%, #12161e 100%); }
.visual-adaptive { background: linear-gradient(135deg, #0e120f 0%, #101c14 100%); }
.visual-birthbuild { background: linear-gradient(135deg, #12110e 0%, #1a1714 100%); }

.visual-mockup {
  width: 80%;
  max-width: 320px;
  aspect-ratio: 9/16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 40px var(--phosphor-faint);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  border: 1px solid rgba(232, 100, 58, 0.1);
}

.visual-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-terminal {
  width: 85%;
  max-width: 360px;
  background: #0a0a0a;
  border-radius: 8px;
  border: 1px solid rgba(232, 100, 58, 0.15);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px var(--phosphor-faint);
  font-family: var(--mono);
  font-size: 0.65rem;
  transform: perspective(1000px) rotateY(4deg) rotateX(2deg);
}

.visual-terminal .t-bar {
  height: 30px;
  background: var(--bg-bezel);
  display: flex;
  align-items: center;
  padding: 0 0.8rem;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.visual-terminal .dot { width: 8px; height: 8px; border-radius: 50%; }
.visual-terminal .dot.r { background: #ff5f56; }
.visual-terminal .dot.y { background: #ffbd2e; }
.visual-terminal .dot.g { background: #27c93f; }

.visual-terminal .t-body {
  padding: 1rem;
  line-height: 1.9;
  color: var(--text-dim);
}

.visual-terminal .cmd { color: var(--green); }
.visual-terminal .flag { color: var(--blue); }
.visual-terminal .output { color: var(--text-muted); }
.visual-terminal .agent { color: var(--phosphor); }

.visual-desktop {
  width: 92%;
  max-width: 420px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 30px var(--phosphor-faint);
  transform: perspective(1000px) rotateY(4deg) rotateX(2deg);
  border: 1px solid rgba(232, 100, 58, 0.1);
}

.visual-desktop .desktop-bar {
  height: 28px;
  background: var(--bg-bezel);
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  gap: 0.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.visual-desktop img {
  width: 100%;
  display: block;
}

/* --- ABOUT --- */
.about-section { background: var(--bg-elevated); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.about-aside {
  background: var(--bg-screen);
  border: 1px solid rgba(232, 100, 58, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.about-aside-chrome {
  height: 32px;
  background: var(--bg-bezel);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.about-aside-chrome .dot { width: 8px; height: 8px; border-radius: 50%; }
.about-aside-chrome .dot.r { background: #ff5f56; }
.about-aside-chrome .dot.y { background: #ffbd2e; }
.about-aside-chrome .dot.g { background: #27c93f; }

.about-aside-chrome .title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-right: 40px;
}

.about-aside-body {
  padding: 2rem;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.stack-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(232, 100, 58, 0.06);
}

.stack-list li:last-child { border-bottom: none; }

.stack-list .stack-name {
  color: var(--phosphor);
  font-weight: 400;
}

.stack-list .stack-name::before {
  content: '├─ ';
  color: var(--text-dim);
}

.stack-list li:last-child .stack-name::before {
  content: '└─ ';
}

.stack-list .stack-detail {
  color: var(--text-dim);
  font-size: 0.75rem;
}

/* --- TIMELINE RIBBON --- */
.timeline-section {
  padding: 4rem 0;
  border-top: 1px solid rgba(232, 100, 58, 0.06);
}

.timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--phosphor) 0%, var(--text-dim) 50%, var(--phosphor) 100%);
  opacity: 0.3;
}

.timeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 15px var(--phosphor-glow);
}

.timeline-dot.dim {
  background: var(--text-dim);
  box-shadow: none;
}

.timeline-year {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--phosphor);
  font-weight: 500;
}

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

.timeline-event {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 100px;
  line-height: 1.4;
}

/* --- CONTACT --- */
.contact-section {
  padding: 8rem 0;
  text-align: center;
}

.contact-terminal {
  max-width: 600px;
  margin: 0 auto;
}

.contact-terminal .terminal-body {
  padding: 3rem;
  text-align: center;
}

.contact-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.contact-title em {
  font-style: italic;
  color: var(--phosphor);
  text-shadow: 0 0 40px var(--phosphor-glow);
}

.contact-text {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 460px;
  margin: 0 auto 2.5rem;
}

.contact-prompt {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--phosphor);
  text-decoration: none;
  padding: 1rem 2.5rem;
  border: 1px solid rgba(232, 100, 58, 0.3);
  border-radius: 3px;
  transition: all 0.3s var(--ease);
  background: var(--phosphor-faint);
}

.contact-email:hover {
  background: var(--phosphor);
  color: var(--bg);
  border-color: var(--phosphor);
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--phosphor-glow), 0 12px 40px rgba(0,0,0,0.3);
}

.contact-email svg {
  width: 18px;
  height: 18px;
}

/* --- INTERACTIVE TERMINAL --- */
.interactive-terminal {
  box-shadow:
    0 0 60px rgba(232, 100, 58, 0.06),
    0 30px 80px rgba(0,0,0,0.4);
}

.terminal-input-row {
  display: flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-top: 1px solid rgba(232, 100, 58, 0.08);
  background: rgba(0,0,0,0.3);
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}

.input-prompt {
  color: var(--text-dim);
  white-space: nowrap;
  font-size: 0.8rem;
}

#terminal-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  caret-color: var(--phosphor);
}

#terminal-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.t-line {
  line-height: 1.8;
  font-size: 0.8rem;
}

.t-line.user-msg {
  color: var(--text);
}

.t-line.user-msg::before {
  content: '> ';
  color: var(--phosphor);
}

.t-line.ai-msg {
  color: var(--text-muted);
  padding-left: 0;
}

.t-line.ai-thinking {
  color: var(--text-dim);
}

.t-line.ai-thinking .dots::after {
  content: '...';
  animation: ellipsis 1.5s steps(4, end) infinite;
}

@keyframes ellipsis {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

#terminal-output::-webkit-scrollbar {
  width: 6px;
}

#terminal-output::-webkit-scrollbar-track {
  background: transparent;
}

#terminal-output::-webkit-scrollbar-thumb {
  background: rgba(232, 100, 58, 0.2);
  border-radius: 3px;
}

/* --- WRITING SECTION --- */
.writing-list {
  list-style: none;
  max-width: 700px;
}

.writing-list li {
  border-bottom: 1px solid rgba(232, 100, 58, 0.06);
}

.writing-list li:last-child {
  border-bottom: none;
}

.writing-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.2rem 0;
  text-decoration: none;
  transition: all 0.3s;
  gap: 2rem;
}

.writing-list a:hover {
  padding-left: 0.5rem;
}

.writing-list .writing-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  transition: color 0.3s;
}

.writing-list a:hover .writing-title {
  color: var(--phosphor);
}

.writing-list .writing-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

/* --- RESPONSIVE (homepage) --- */
@media (max-width: 900px) {
  .case-study-inner { grid-template-columns: 1fr; }
  .case-study-visual { min-height: 300px; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .timeline { flex-wrap: wrap; gap: 1.5rem; justify-content: center; }
  .timeline::before { display: none; }
}

@media (max-width: 600px) {
  .hero { min-height: 90vh; }
  .hero-terminal .terminal-body { padding: 1.5rem; }
  .case-study-content { padding: 2rem; }
  .case-study-metrics { flex-direction: column; gap: 1rem; }
  .hero-grid { display: none; }
  .signal-grid { grid-template-columns: 1fr 1fr; }
}
