/* ==========================================================================
   Jacob Salomonsen — Portfolio
   ========================================================================== */

:root {
  --bg: #0b0f14;
  --bg-soft: #111821;
  --bg-elevated: #16202c;
  --surface: #1b2733;
  --border: #243040;
  --text: #e8eef4;
  --text-soft: #aab8c4;
  --text-muted: #76859a;
  --accent: #5cc8ff;
  --accent-2: #8b7bff;
  --accent-grad: linear-gradient(135deg, #5cc8ff 0%, #8b7bff 100%);
  --accent-soft: rgba(92, 200, 255, 0.12);
  --good: #4ade80;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --font-sans: "Inter", "Helvetica Neue", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo,
    Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(139, 123, 255, 0.14), transparent 60%),
    radial-gradient(1000px 600px at 0% 0%, rgba(92, 200, 255, 0.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.page { min-height: 70vh; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 15, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-header__brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text); }
.site-header__brand:hover { text-decoration: none; }
.site-header__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-grad);
  color: #07101a;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.site-header__name { font-weight: 650; letter-spacing: -0.01em; }
.site-header__nav { display: flex; gap: 1.4rem; }
.site-header__nav a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-header__nav a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 640px) {
  .site-header__name { display: none; }
  .site-header__nav { gap: 0.9rem; }
  .site-header__nav a { font-size: 0.85rem; }
}

/* ---------------------------------------------------------------- Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__links { display: flex; gap: 1rem; margin: 0; }

/* ---------------------------------------------------------------- Layout helpers */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 5.5rem 0; }
.section--tight { padding: 3.5rem 0; }
.section__head { max-width: 720px; margin-bottom: 2.6rem; }
.section__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.6rem;
}
.section__title {
  font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  font-weight: 750;
}
.section__lead { color: var(--text-soft); margin: 0; font-size: 1.08rem; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; overflow: hidden; }
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6.5rem 1.5rem 5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero__status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
}
.hero__title {
  font-size: clamp(2.4rem, 1.4rem + 4.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
  font-weight: 800;
}
.hero__title .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  color: var(--text-soft);
  font-size: 1.18rem;
  max-width: 560px;
  margin: 0 0 2rem;
}
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary {
  background: var(--accent-grad);
  color: #07101a;
  box-shadow: 0 10px 30px -12px rgba(92, 200, 255, 0.6);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--surface); }

/* Profile card */
.profile {
  display: flex;
  justify-content: center;
}
.profile__card {
  width: 320px;
  max-width: 80vw;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-soft));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}
.profile__avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 50% 38%, rgba(92,200,255,0.25), transparent 60%),
    repeating-linear-gradient(45deg, var(--surface) 0 12px, var(--bg-elevated) 12px 24px);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.profile__body { padding: 1.4rem 1.5rem 1.8rem; }
.profile__name { font-size: 1.2rem; font-weight: 700; margin: 0; }
.profile__role { color: var(--accent); font-size: 0.92rem; margin: 0.25rem 0 0; }
.profile__meta {
  display: flex; justify-content: center; gap: 1rem;
  margin-top: 1rem; font-size: 0.82rem; color: var(--text-muted);
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; padding: 4.5rem 1.5rem 3.5rem; }
  .profile { order: -1; }
}

/* ---------------------------------------------------------------- About */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about__text p { color: var(--text-soft); margin: 0 0 1rem; }
.about__text p:last-child { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.3rem;
}
.stat__num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { color: var(--text-muted); font-size: 0.88rem; margin: 0.2rem 0 0; }
@media (max-width: 760px) { .about__grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.6rem;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #2f4156;
}
.card__media {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__media--placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(139,123,255,0.2), transparent 60%),
    var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card__tag {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); font-weight: 700;
}
.card__title { font-size: 1.25rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.card__desc { color: var(--text-soft); font-size: 0.95rem; margin: 0; }
.card__stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.4rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.18rem 0.5rem;
}
.card__link {
  margin-top: 0.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--accent);
  display: inline-flex; gap: 0.35rem; align-items: center;
}
.card, .card * { text-decoration: none; }
.card:hover .card__title { color: #fff; }

/* ---------------------------------------------------------------- Achievements */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.timeline__item { position: relative; padding: 0 0 1.8rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: -1.6rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent-grad); border: 2px solid var(--bg);
}
.timeline__when { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.timeline__title { font-weight: 700; margin: 0.15rem 0 0.35rem; }
.timeline__desc { color: var(--text-soft); margin: 0; }

.placeholder-note {
  border: 1px dashed var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- Project page */
.project { max-width: 860px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.back-link {
  display: inline-block; font-size: 0.9rem; color: var(--text-soft);
  margin-bottom: 1.6rem;
}
.project__header { margin-bottom: 2.5rem; }
.project__eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem;
  font-weight: 700; color: var(--accent); margin: 0 0 0.6rem;
}
.project__title {
  font-size: clamp(1.9rem, 1.2rem + 2.8vw, 2.8rem);
  line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 0.6rem;
}
.project__subtitle { color: var(--text-soft); font-size: 1.15rem; margin: 0; }
.project__tags { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.project__tags li {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-soft);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.25rem 0.75rem;
}
.project__header .btn { margin-top: 2rem; }
.project__cover {
  margin: 0 0 2.5rem; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.project__cover img { width: 100%; }

/* Prose */
.prose { color: var(--text); }
.prose h2 {
  font-size: 1.55rem; font-weight: 750; letter-spacing: -0.01em;
  margin: 2.8rem 0 0.9rem; padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.prose h3 { font-size: 1.2rem; font-weight: 700; margin: 1.8rem 0 0.6rem; }
.prose h4 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 0.4rem; color: var(--text-soft); }
.prose p { color: var(--text-soft); margin: 0 0 1.1rem; }
.prose ul, .prose ol { color: var(--text-soft); padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--text); }
.prose code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--surface); border: 1px solid var(--border);
  padding: 0.1rem 0.4rem; border-radius: 5px; color: #e3eaf2;
}
.prose pre {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose blockquote {
  margin: 0 0 1.2rem; padding: 0.4rem 0 0.4rem 1rem;
  border-left: 3px solid var(--accent); color: var(--text-soft);
}
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose a { color: var(--accent); }
.prose img { border-radius: 10px; border: 1px solid var(--border); margin: 1rem 0; }

/* Feature figure */
.figure { margin: 2rem 0; }
.figure img { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.figure figcaption { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.6rem; text-align: center; }

/* Full-width cover figure */
.cover-figure { margin: 2rem 0; }
.cover-figure img { border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); width: 100%; }
.cover-figure figcaption { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.6rem; text-align: center; }

/* Pipeline strip */
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.pipeline figure { margin: 0; }
.pipeline img { border-radius: 10px; border: 1px solid var(--border); height: 100%; object-fit: cover; }
.pipeline figcaption { text-align: center; color: var(--text-muted); font-size: 0.82rem; margin-top: 0.5rem; }
@media (max-width: 720px) { .pipeline { grid-template-columns: 1fr; } }

/* Screenshot strip — preserve full UI without cropping */
.pipeline--screens img { object-fit: contain; height: auto; max-height: 520px; background: var(--bg); }

/* Tech grid */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }
.tech {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
}
.tech h4 { margin: 0 0 0.5rem; color: var(--text); font-size: 0.98rem; }
.tech ul { margin: 0; padding-left: 1.05rem; color: var(--text-soft); font-size: 0.9rem; }
.tech li { margin: 0.22rem 0; }
.tech li::marker { color: var(--accent); }

/* Architecture diagram */
.arch {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem 1.5rem;
  margin: 1.5rem 0; font-family: var(--font-mono); font-size: 0.82rem;
  line-height: 1.5; overflow-x: auto; color: var(--text-soft);
}
.arch .a-accent { color: var(--accent); }
.arch .a-key { color: var(--good); }

/* Mermaid diagram */
.diagram {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  margin: 1.75rem 0; overflow-x: auto; text-align: center;
}
.diagram .mermaid { display: inline-block; min-width: 100%; }

/* Callout */
.callout {
  display: flex; gap: 0.8rem; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid rgba(92,200,255,0.25);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin: 1.5rem 0;
}
.callout::before {
  content: "\25B8"; color: var(--accent); font-size: 1rem; line-height: 1.65;
}
.callout p { margin: 0; color: var(--text-soft); }
