/* ===========================================================
   Personal portfolio — additions on top of the Oddology system
   =========================================================== */

/* ---------- Hero: terminal visual (replaces the octopus) ---------- */
.hero-visual { max-width: 520px; }

.term {
  position: absolute;
  left: 50%; top: 50%;
  translate: -50% -50%;
  width: 86%;
  z-index: 2;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  background: #14181f;
  animation: bobC 6s ease-in-out infinite;
}
.term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px;
  background: #1b2029;
  border-bottom: 1px solid #262c37;
}
.term-bar span { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.term-bar .r { background: #ff5f57; }
.term-bar .y { background: #febc2e; }
.term-bar .g { background: #28c840; }
.term-bar .term-title {
  width: auto; height: auto; border-radius: 0;
  margin-left: 10px;
  font-size: .76rem;
  font-weight: 500;
  color: #6b7688;
  letter-spacing: .01em;
}
.term-body {
  margin: 0;
  padding: 18px 18px 20px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(.66rem, 1.08vw, .8rem);
  line-height: 1.75;
  color: #cbd3e1;
  white-space: pre;
  overflow-x: auto;
}
.term-body .c-p  { color: #ef5f8a; font-weight: 700; }
.term-body .c-o  { color: #8b94a3; }
.term-body .c-ok { color: #35c26a; font-weight: 600; }
.term-body .c-cur { color: #efa011; }
.term-body .c-cur::after {
  content: "";
  display: inline-block;
  width: 7px; height: 1em;
  margin-left: 3px;
  vertical-align: -2px;
  background: #efa011;
  animation: caret 1.05s steps(1) infinite;
}
@keyframes caret { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* float cards sit further out around the wider terminal */
.hero-visual .float-card { cursor: default; }
.hero-visual .float-card.pos-tl { top: -2%;   left: -11%; }
.hero-visual .float-card.pos-tr { top: 4%;    right: -6%; }
.hero-visual .float-card.pos-bl { bottom: 6%; left: -13%; }
.hero-visual .float-card.pos-br { bottom: -1%; right: -5%; }

/* ---------- Featured project ---------- */
.proj-feature {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-md);
  margin-bottom: 64px;
}
.pf-copy { padding: 44px 44px 40px; }
.pf-copy h3 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 8px; }
.pf-tagline {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 16px;
}
.pf-copy p { font-size: .97rem; margin-bottom: 14px; }

.pf-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 26px 0 22px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.pf-stats div { display: flex; flex-direction: column; gap: 2px; }
.pf-stats strong {
  font-size: 1.5rem; font-weight: 800;
  color: var(--ink); letter-spacing: -.03em; line-height: 1.1;
}
.pf-stats span { font-size: .79rem; color: var(--muted); font-weight: 500; }

/* Stack is a plain line of text, not a row of chips. */
.stack {
  font-size: .87rem;
  font-weight: 500;
  color: var(--muted);
}

.pf-visual {
  position: relative;
  padding: 44px 36px;
  background: linear-gradient(155deg, #181c25 0%, #23131a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.pf-visual::before {
  content: "";
  position: absolute;
  top: -60px; right: -70px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(239,28,96,.35), transparent 65%);
  filter: blur(10px);
}
.pf-modules-label {
  position: relative;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7b8494;
  margin-bottom: 18px;
}
.pf-modules {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
}
.pf-modules li {
  font-size: .93rem;
  color: #d9dde4;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* ---------- Project cards ---------- */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}
.proj-grid.two { margin-bottom: 0; }

.proj-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 28px;
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.proj-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}
.proj-card:hover { border-color: var(--accent); box-shadow: var(--sh-hover); }
.proj-card:hover::before { transform: scaleX(1); }

.pc-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid #f7dbe3;
  display: grid; place-items: center;
  margin-bottom: 20px;
  transition: transform .4s cubic-bezier(.34,1.45,.5,1);
}
.proj-card:hover .pc-icon { transform: rotate(-7deg) scale(1.09); }
.pc-icon svg { width: 25px; height: 25px; stroke: var(--accent); }

.proj-card h4 { font-size: 1.24rem; margin-bottom: 4px; }
.pc-role {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}
.proj-card > p { font-size: .95rem; margin-bottom: 18px; }

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2) 45%, var(--line) 100%);
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -34px; top: 7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--line);
}
.tl-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 26px;
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.tl-body:hover { border-color: var(--accent); box-shadow: var(--sh); }
.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.tl-head h4 { font-size: 1.14rem; }
.tl-when {
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.tl-org {
  font-size: .9rem;
  color: var(--muted);
  font-weight: 500;
  margin: 4px 0 12px;
}
.tl-body ul { display: flex; flex-direction: column; gap: 7px; }
.tl-body li {
  position: relative;
  padding-left: 18px;
  font-size: .93rem;
  color: var(--body);
}
.tl-body li strong { color: var(--ink); font-weight: 700; }
.tl-body .stack {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.tl-body li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}

/* contact rows are links here */
a.ci-item { transition: transform .25s var(--ease); }
a.ci-item:hover { transform: translateX(3px); }
a.ci-item:hover .ci-val { color: #ef8ca8; }
.ci-item .ci-lbl, .ci-item .ci-val { display: block; }

/* Section labels read as typography, not as pills. */
.eyebrow {
  background: none;
  border: 0;
  padding: 0;
}

/* ---------- Dark theme fixes ---------- */
:root[data-theme="dark"] .pc-icon { border-color: #4a2533; }
:root[data-theme="dark"] .term { border-color: #262c37; }
:root[data-theme="dark"] .tl-dot { border-color: var(--bg); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .proj-feature { grid-template-columns: 1fr; }
  .pf-visual { padding: 32px 30px; }
  .pf-copy { padding: 34px 30px 30px; }
}
@media (max-width: 860px) {
  .hero-visual { max-width: 460px; margin-top: 30px; }
  .hero-visual .float-card.pos-tl { top: -4%; left: -2%; }
  .hero-visual .float-card.pos-tr { top: 2%; right: -2%; }
  .hero-visual .float-card.pos-bl { bottom: 4%; left: -2%; }
  .hero-visual .float-card.pos-br { bottom: -3%; right: -2%; }
  .proj-grid { grid-template-columns: 1fr; }
}
/* The hero is too cramped below this width to float cards around the terminal. */
@media (max-width: 620px) {
  .hero-visual { max-width: 100%; aspect-ratio: auto; }
  .hero-visual .float-card,
  .hero-orbit { display: none; }
  .term {
    position: static;
    translate: none;
    width: 100%;
    animation: none;
  }
  .pf-stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .timeline { padding-left: 26px; }
  .tl-dot { left: -26px; }
}

@media (prefers-reduced-motion: reduce) {
  .term { animation: none; }
  .term-body .c-cur::after { animation: none; }
}
