/* ============================================
   SEB OLIVER — The Spec Sheet
   Monospace document meets living portfolio
   ============================================ */

:root {
  --mono: 'JetBrains Mono', monospace;
  --serif: 'Newsreader', Georgia, serif;
  --bg: #f2f4f7;
  --bg-card: #e8ebf0;
  --text: #1a1a18;
  --text-mid: #606670;
  --text-light: #929aa5;
  --accent: #2563EB;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.1);
  --border: #d5d9e0;
  --radius: 6px;
  --page-max: 820px;
  --page-px: clamp(1.25rem, 4vw, 3rem);
}

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

/* Selection */
::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* Flowing s13r sea in margins */
.sea {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.4) 16%,
    transparent 25%,
    transparent 75%,
    rgba(0,0,0,0.4) 84%,
    rgba(0,0,0,1) 100%
  );
  -webkit-mask-image: linear-gradient(to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,0.4) 16%,
    transparent 25%,
    transparent 75%,
    rgba(0,0,0,0.4) 84%,
    rgba(0,0,0,1) 100%
  );
}

.sea-col {
  position: absolute;
  top: 0;
  width: 1.4em;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 2.4;
  color: var(--text-mid);
  opacity: 0.18;
  text-align: center;
  white-space: pre-line;
  animation: seaDrift linear infinite;
  will-change: transform;
}

@keyframes seaDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* Page container */
.page {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 3rem var(--page-px) 0;
  background: var(--bg);
  box-shadow: -1px 0 0 var(--border), 1px 0 0 var(--border);
  min-height: 100vh;
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes expandDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 300px;
    padding-top: 1rem;
    padding-bottom: 0.25rem;
  }
}

[data-animate] {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

[data-animate]:nth-child(1) { animation-delay: 0.05s; }
[data-animate]:nth-child(2) { animation-delay: 0.1s; }
[data-animate]:nth-child(3) { animation-delay: 0.15s; }
[data-animate]:nth-child(4) { animation-delay: 0.2s; }
[data-animate]:nth-child(5) { animation-delay: 0.25s; }
[data-animate]:nth-child(6) { animation-delay: 0.3s; }
[data-animate]:nth-child(7) { animation-delay: 0.35s; }
[data-animate]:nth-child(8) { animation-delay: 0.4s; }
[data-animate]:nth-child(9) { animation-delay: 0.45s; }
[data-animate]:nth-child(10) { animation-delay: 0.5s; }
[data-animate]:nth-child(11) { animation-delay: 0.55s; }
[data-animate]:nth-child(12) { animation-delay: 0.6s; }
[data-animate]:nth-child(13) { animation-delay: 0.65s; }
[data-animate]:nth-child(14) { animation-delay: 0.7s; }
[data-animate]:nth-child(15) { animation-delay: 0.75s; }

/* ============================================
   Header
   ============================================ */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.name {
  font-family: var(--mono);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}

.header-hint {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-light);
}

.header-hint span {
  margin-left: 0.25rem;
}

kbd {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 0.15em 0.45em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-mid);
  line-height: 1;
}

.header-right {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--text-mid);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.social-icon:hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* ============================================
   Divider
   ============================================ */

.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ============================================
   Two Column: Bio + Status
   ============================================ */

.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  padding: 2rem 0;
}

.bio-text {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text);
  max-width: 420px;
}

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.status-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ea043;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(46, 160, 67, 0.4);
}

.status-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
}

.status-list {
  list-style: none;
  font-family: var(--serif);
  font-size: 0.92rem;
}

.status-list li {
  padding: 0.2rem 0;
  color: var(--text);
}

.status-list li::before {
  content: '>';
  font-family: var(--mono);
  color: var(--text-light);
  margin-right: 0.5rem;
  font-size: 0.8rem;
}

.status-list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.status-list a:hover {
  border-bottom-color: var(--accent);
}

.accent {
  color: var(--accent);
  font-weight: 400;
}

.status-timestamp {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-light);
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 2rem 0;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  cursor: default;
  transition: color 0.3s;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.all-links-btn {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.3em 0.7em;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
}

.all-links-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title:hover::after {
  width: 100%;
}

/* ============================================
   Entries (expandable rows)
   ============================================ */

.entries {
  display: flex;
  flex-direction: column;
}

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

.entry:last-child {
  border-bottom: none;
}

.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  gap: 1rem;
  cursor: default;
}

[data-expandable] .entry-row {
  cursor: pointer;
}

[data-expandable] .entry-row:hover .entry-name {
  color: var(--accent);
}

[data-expandable] .entry-row:hover .entry-arrow {
  color: var(--accent);
  transform: scale(1.2);
}

.entry-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.entry-name {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
  white-space: nowrap;
}

.entry-arrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-light);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.entry.expanded .entry-arrow {
  transform: rotate(45deg);
  color: var(--accent);
}

.entry-at {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-light);
}

.entry-desc {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--text-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-desc a {
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.entry-desc a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.entry-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.entry-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2em 0.6em;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 3px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.entry-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}

.entry-link-icon {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
}

.entry-link-icon:hover {
  color: var(--accent);
  background: var(--accent-glow);
}

/* Expandable detail */
.entry-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 0 0 0;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.entry.expanded .entry-detail {
  max-height: 300px;
  opacity: 1;
  padding: 0 0 1rem 0;
}

.entry-detail p {
  font-family: var(--serif);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-mid);
  max-width: 560px;
  margin-bottom: 0.75rem;
}

.entry-links {
  display: flex;
  gap: 1rem;
}

.entry-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.3em 0.7em;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 4px;
  transition: all 0.2s;
}

.entry-links a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* ============================================
   Connect grid
   ============================================ */

.connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.connect-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

a.section-title-link {
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

a.section-title-link:hover {
  color: var(--accent);
}

.connect-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.connect-card:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.connect-card:hover .connect-icon {
  color: var(--accent);
}

.connect-card:hover .connect-value {
  color: var(--accent);
}

.connect-icon {
  color: var(--text-mid);
  transition: color 0.2s;
  flex-shrink: 0;
  display: flex;
}

.connect-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.connect-value {
  font-family: var(--serif);
  font-size: 0.8rem;
  color: var(--text-light);
  margin-left: auto;
  white-space: nowrap;
  transition: color 0.2s;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Footer giant text — outside page container, full viewport width */
.footer-art {
  padding: 2rem 0 1rem;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  z-index: 2;
}

.footer-art-text {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  font-family: var(--mono);
  font-weight: 900;
  font-size: clamp(4rem, 13vw, 12rem);
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-align: center;
  user-select: none;
}

/* BUILD — outlined */
.footer-art-text .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}

/* & SHIP — solid */
.footer-art-text .solid {
  color: var(--text);
  white-space: nowrap;
}

.footer-art-text .amp {
  font-size: 0.75em;
  margin: 0 0.12em;
}

/* Ship icon inline */
.ship-icon {
  width: 0.7em;
  height: 0.7em;
  vertical-align: baseline;
  margin-left: 0.05em;
  fill: currentColor;
}

/* Info bar below art */
.footer-info {
  padding: 2rem 0;
  border-top: 2px solid var(--text);
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.footer-cols {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col-title {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin-bottom: 0.6rem;
}

.footer-col a {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  text-decoration: none;
  padding: 0.15rem 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.footer-bottom span {
  font-variant-numeric: tabular-nums;
}

/* ============================================
   Command Palette
   ============================================ */

.cmd-palette {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.cmd-palette.active {
  opacity: 1;
  visibility: visible;
}

.cmd-palette-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 24, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cmd-palette-box {
  position: relative;
  width: 90%;
  max-width: 480px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmd-palette.active .cmd-palette-box {
  transform: translateY(0) scale(1);
}

.cmd-input-row {
  display: flex;
  align-items: center;
  padding: 0.9rem 1.1rem;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.cmd-chevron {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 700;
}

.cmd-input-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text);
}

.cmd-input-row input::placeholder {
  color: var(--text-light);
}

.cmd-input-row kbd {
  font-size: 0.6rem;
}

.cmd-results {
  max-height: 240px;
  overflow-y: auto;
}

.cmd-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  transition: background 0.1s;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
}

.cmd-result:hover,
.cmd-result.active {
  background: var(--accent-glow);
  color: var(--accent);
}

.cmd-result-hint {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-light);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .header-right {
    order: -1;
  }

  .entry-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .entry-right {
    padding-left: 0;
  }

  .entry-left {
    flex-wrap: wrap;
  }

  .connect-grid {
    grid-template-columns: 1fr;
  }

  .footer-art-text {
    flex-direction: column;
    align-items: center;
    font-size: clamp(4rem, 22vw, 8rem);
    line-height: 1;
  }

  .footer-cols {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    text-align: center;
  }

  .page {
    box-shadow: none;
  }
}
