/* ============================================================
   Carson Szeder — portfolio
   Clean white/blue system. Inter + JetBrains Mono accents.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-tint: #f6f8fc;
  --ink: #0b1220;
  --ink-2: #3f4d63;
  --ink-3: #67758c;
  --line: #e5eaf2;
  --line-strong: #d6dfea;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-ink: #0d2a66;
  --blue-tint: #eaf1fe;
  --navy: #0a1b3d;
  --navy-2: #0e2350;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .05);
  --shadow-md: 0 2px 6px rgba(11, 18, 32, .05), 0 12px 32px rgba(11, 18, 32, .07);
  --shadow-lg: 0 4px 10px rgba(11, 18, 32, .06), 0 24px 60px rgba(11, 18, 32, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue-tint); color: var(--blue-ink); }

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 28px;
}

section[id] { scroll-margin-top: 84px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 24px rgba(11, 18, 32, .04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.wordmark:hover { color: var(--blue); }

.nav { display: flex; align-items: center; gap: 26px; }

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  position: relative;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1.5px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-cta { margin-left: 4px; }

.nav-soon {
  color: var(--ink-3);
  opacity: .5;
  cursor: default;
  user-select: none;
}
.nav-soon::after { display: none; }
.nav-soon:hover { color: var(--ink-3); }

.soon-chip {
  display: inline-block;
  margin-left: 6px;
  transform: translateY(-1px);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--blue-deep);
  background: var(--blue-tint);
  border: 1px solid #d6e4fc;
  border-radius: 4px;
  padding: 3px 5px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease),
              box-shadow .2s var(--ease);
}
.btn .arrow {
  display: inline-block;
  transition: transform .25s var(--ease);
  font-weight: 500;
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .35), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  color: var(--blue);
  border-color: var(--blue);
  transform: translateY(-1px);
}
.btn .icon {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform .25s var(--ease);
}
.btn-ghost:hover .icon { transform: scale(1.12); }

.btn-invert {
  background: #fff;
  color: var(--navy);
  font-weight: 700;
}
.btn-invert:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(2, 8, 20, .35);
}

.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }

/* ---------- Hero ---------- */

.hero { padding: 88px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: center;
}

.hero-name {
  font-size: clamp(42px, 6vw, 58px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.04;
  margin-bottom: 18px;
  background: linear-gradient(180deg, var(--ink) 55%, #233459 130%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-role {
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 14px;
  letter-spacing: -.01em;
}
.hero-role strong { color: var(--blue); font-weight: 700; }

.hero-sub {
  font-size: 16.5px;
  color: var(--ink-3);
  max-width: 52ch;
  margin-bottom: 16px;
}
.hero-sub em { font-style: italic; color: var(--ink-2); }

.hero-expertise { margin-bottom: 30px; }
.hero-expertise strong { color: var(--ink-2); font-weight: 600; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }

.btn { white-space: nowrap; }

/* ---------- Photo ---------- */

.hero-photo { text-align: center; }

.avatar-wrap {
  position: relative;
  max-width: 190px;
  margin: 0 auto;
}

.avatar {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-tint), #dbe7fb);
  box-shadow: 0 0 0 5px #fff, 0 0 0 6.5px var(--line-strong), var(--shadow-lg);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.avatar:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong);
}
.avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: contrast(1.04) saturate(1.06);
}
.avatar.noimg img { display: none; }

.avatar-fallback {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 84px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: rgba(37, 99, 235, .42);
}
.avatar.noimg .avatar-fallback { display: flex; }

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
  animation: dot-pulse 2.2s var(--ease) infinite;
}

@keyframes dot-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .45); }
  55%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ---------- Sections ---------- */

.section { padding: 76px 0; }
.section-tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 22px;
}

.section-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 34px;
}

/* ---------- Press card ---------- */

.press-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 38px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.press-card:hover {
  border-color: #b9cdf2;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.press-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--line);
  padding-right: 36px;
}

.press-brand {
  display: block;
  width: 128px;
  height: auto;
}
.press-brand rect { fill: var(--ink); }
.press-date {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.press-body h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 10px;
  color: var(--blue-ink);
  transition: color .2s var(--ease);
}
.press-card:hover .press-body h3 { color: var(--blue); }

.press-body p {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px;
  max-width: 68ch;
}

.press-link {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--blue);
}
.press-link .arrow { transition: transform .25s var(--ease); display: inline-block; }
.press-card:hover .press-link .arrow { transform: translateX(4px); }

/* ---------- Experience ---------- */

.exp-header { margin-bottom: 30px; }
.exp-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.exp-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: .03em;
}

.exp-list { list-style: none; }
.exp-list li {
  position: relative;
  padding: 14px 0 14px 30px;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 78ch;
  border-bottom: 1px solid var(--line);
}
.exp-list li:last-child { border-bottom: none; }
.exp-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 25px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  opacity: .85;
}
.exp-list strong { color: var(--ink); font-weight: 600; }

/* ---------- Project cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards-2 .card { grid-column: span 1; }

@media (min-width: 921px) {
  .cards-2 .card:last-child {
    grid-column: 2 / 4;
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #c4d5f3;
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 10px;
  color: var(--navy);
}

.card p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 18px;
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blue-deep);
  background: var(--blue-tint);
  border: 1px solid #d6e4fc;
  padding: 3.5px 9px;
  border-radius: 999px;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.skill-col {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.skill-col:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.skill-col h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  font-family: var(--mono);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.skill-col ul { list-style: none; }
.skill-col li {
  font-size: 13.5px;
  color: var(--ink-2);
  padding: 4.5px 0;
  line-height: 1.5;
}

/* ---------- Bio ---------- */

.bio-block {
  max-width: 68ch;
  border-left: 3px solid var(--blue);
  padding-left: 30px;
}
.bio-block h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}
.bio-block p {
  font-size: 16px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.bio-line { font-style: italic; color: var(--ink); }

/* ---------- CTA panel ---------- */

#contact { padding-bottom: 96px; }

.cta-panel {
  background: linear-gradient(135deg, var(--navy), var(--navy-2) 70%);
  border-radius: 20px;
  padding: 64px 56px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(10, 27, 61, .28);
}
.cta-panel::before {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, .38), transparent 65%);
  top: -260px; right: -160px;
  pointer-events: none;
}

.cta-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9db9f5;
  margin-bottom: 16px;
}

.cta-panel h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 14px;
  max-width: 24ch;
  margin-inline: auto;
}

.cta-sub {
  color: #b6c6e8;
  font-size: 16px;
  max-width: 52ch;
  margin: 0 auto 32px;
}

.btn-invert { position: relative; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 36px;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer p {
  font-size: 13px;
  color: var(--ink-3);
}
.footer-links { display: flex; gap: 22px; }
.footer-icons { display: flex; align-items: center; gap: 18px; }
.footer-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f1419;
  opacity: .8;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.footer-icons a:hover { opacity: 1; transform: translateY(-2px); }
.footer-icons svg { width: 19px; height: 19px; }
.footer-icons img { width: 23px; height: 23px; border-radius: 6px; }

/* ---------- Scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 220px; margin: 0 auto; order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .press-card { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
  .press-left { flex-direction: row; align-items: center; border-right: none; padding-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
}

@media (max-width: 620px) {
  .container { padding: 0 20px; }
  .hero { padding: 56px 0 60px; }
  .hero-actions .btn { padding: 10px 16px; font-size: 13.5px; }
  .cards { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
  .cta-panel { padding: 44px 26px; }
  .nav-link:not(.nav-cta) { display: none; }
  .exp-list li { padding-left: 24px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
