/* John Luke Santia — personal site
   Dark operator layout inspired by the two-column personal homepage pattern. */

:root {
  --bg: #050505;
  --bg-elevated: #0c0c0c;
  --bg-card: #0f0f10;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f2f1ef;
  --text-muted: #8a8884;
  --text-soft: #b7b4ae;
  --accent: #c4a574;
  --accent-dim: rgba(196, 165, 116, 0.14);
  --active: #3d9a6a;
  --active-glow: rgba(61, 154, 106, 0.55);
  --live: #c4a574;
  --past: #4a4946;
  --radius: 14px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1080px;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(196, 165, 116, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(61, 154, 106, 0.04), transparent 50%);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.page {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

.mobile-header {
  display: none;
  margin-bottom: 1.75rem;
  align-items: center;
  gap: 0.9rem;
}

.mobile-portrait {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 3px rgba(196, 165, 116, 0.12);
}

.mobile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.mobile-title {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 3.5rem 4rem;
  align-items: start;
}

/* ——— Left panel ——— */

.goals-panel {
  position: sticky;
  top: 2.5rem;
}

.card {
  background: linear-gradient(165deg, #121214 0%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 0.85rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.portrait {
  margin: -1.35rem -1.35rem 1.15rem;
  position: relative;
  aspect-ratio: 4 / 3.15;
  background: #1a1a1c;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
  pointer-events: none;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-meta-right {
  color: var(--accent);
  opacity: 0.85;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.card-lede {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 1.15rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

.goal-list {
  display: flex;
  flex-direction: column;
}

.goal-item {
  border-bottom: 1px solid var(--border);
}

.goal-item:last-child {
  border-bottom: none;
}

.goal-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  text-align: left;
  transition: color 0.15s ease;
}

.goal-toggle:hover {
  color: var(--accent);
}

.goal-label {
  font-size: 0.92rem;
  font-weight: 500;
}

.goal-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.15s ease;
  flex-shrink: 0;
  margin-top: -3px;
}

.goal-item.is-open .goal-chevron {
  transform: rotate(225deg);
  margin-top: 3px;
  border-color: var(--accent);
}

.goal-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}

.goal-item.is-open .goal-body {
  grid-template-rows: 1fr;
}

.goal-body > p {
  overflow: hidden;
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.55;
  padding-bottom: 0;
  opacity: 0;
  transition: opacity 0.2s ease, padding 0.28s ease;
}

.goal-item.is-open .goal-body > p {
  padding-bottom: 0.95rem;
  opacity: 1;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-dim);
}

/* ——— Timeline ——— */

.timeline-panel {
  padding-top: 0.15rem;
  min-width: 0;
}

.year-block {
  margin-bottom: 1.75rem;
}

.year-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  padding-left: 1.35rem;
}

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

.project {
  display: grid;
  grid-template-columns: 10px 22px minmax(0, 1fr);
  gap: 0.65rem 0.75rem;
  align-items: start;
  padding: 0.55rem 0.65rem 0.55rem 0.35rem;
  border-radius: 10px;
  transition: background 0.15s ease;
}

a.project:hover {
  background: rgba(255, 255, 255, 0.03);
}

a.project[aria-disabled="true"] {
  cursor: default;
  pointer-events: none;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-top: 0.45rem;
  background: var(--past);
  box-shadow: none;
}

.project[data-status="active"] .dot {
  background: var(--active);
  box-shadow: 0 0 0 3px rgba(61, 154, 106, 0.18), 0 0 10px var(--active-glow);
}

.project[data-status="live"] .dot {
  background: var(--live);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.project-icon {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 0.15rem;
  color: var(--text-muted);
  text-align: center;
}

.project-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

a.project:hover .project-name {
  color: var(--accent);
}

.project-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 36rem;
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-left: 1.35rem;
}

.footer p {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ——— Responsive ——— */

@media (max-width: 860px) {
  .page {
    width: min(100% - 1.75rem, var(--max));
    padding: 2rem 0 3.5rem;
  }

  .mobile-header {
    display: flex;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .goals-panel {
    position: static;
  }
}

@media (max-width: 420px) {
  .card {
    padding: 1.15rem 1.1rem 0.7rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .project {
    grid-template-columns: 8px 18px minmax(0, 1fr);
    gap: 0.5rem 0.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .goal-body,
  .goal-body > p,
  .goal-chevron,
  .pill,
  .project {
    transition: none;
  }
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
