/* ============================================================
   Amber Spadafora — iOS Engineer · personal site
   Simple, text-forward. Plus Jakarta Sans / Inter / IBM Plex Mono.
   Ink on warm paper, one cobalt accent. No decorative gimmicks.
   ============================================================ */

:root {
  --ink: #0A0A0B;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --cobalt: #2D5BFF;
  --cobalt-dark: #1E45D6;
  --slate: #5E6068;
  --slate-light: #9A9CA3;
  --hairline: #E3E3DE;

  --wrap: 880px;
  --radius: 8px;

  --display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 17px; }
a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
h1 { font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.18rem; }
p { color: var(--slate); }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-weight: 500; font-size: 1rem;
  background: var(--cobalt); color: #fff; padding: 13px 24px;
  border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background .2s var(--ease);
}
.btn:hover { background: var(--cobalt-dark); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }
.arrow-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink); }
.arrow-link span { color: var(--cobalt); transition: transform .2s var(--ease); }
.arrow-link:hover span { transform: translateX(4px); }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 34px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,250,248,0.85); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.scrolled { border-bottom-color: var(--hairline); }
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; margin-right: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: #2B2D33; transition: color .2s; }
.nav-links a:hover { color: var(--cobalt); }
.nav-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: 0; padding: 6px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- shared bits ---------- */
.kicker { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.02em; color: var(--cobalt); }
.sec-label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-light); margin-bottom: 28px; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #36383E; line-height: 1.6; max-width: 680px; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 112px) 28px clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 52px; align-items: center; }
.hero h1 { margin: 16px 0 24px; }
.hero-sub { font-size: clamp(1.15rem, 1.8vw, 1.45rem); color: var(--slate); max-width: 640px; line-height: 1.5; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 84px) 28px; border-top: 1px solid var(--hairline); }

/* ---------- experience ---------- */
.role { padding: 28px 0; border-top: 1px solid var(--hairline); }
.role:first-of-type { border-top: 0; padding-top: 0; }
.role-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 18px; margin-bottom: 16px; }
.role-head h3 { font-size: 1.3rem; }
.role-co { color: var(--cobalt); }
.role-meta { font-family: var(--mono); font-size: 0.82rem; color: var(--slate-light); }
.role-meta span { color: var(--slate); }
.role-points { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.role-points li { position: relative; padding-left: 22px; color: var(--slate); font-size: 1.02rem; line-height: 1.55; }
.role-points li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt); }

/* ---------- selected work ---------- */
.work-list { display: flex; flex-direction: column; }
.proj { padding: 22px 0; border-top: 1px solid var(--hairline); }
.proj:first-child { border-top: 0; padding-top: 0; }
.proj-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 8px; }
.proj-tag { font-family: var(--mono); font-size: 0.76rem; color: var(--slate-light); letter-spacing: 0.01em; }
.proj p { font-size: 1.02rem; line-height: 1.55; max-width: 680px; }

/* ---------- skills ---------- */
.skill-groups { display: flex; flex-direction: column; gap: 26px; }
.skill-h { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; color: var(--ink); margin-bottom: 12px; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chips span { font-size: 0.9rem; color: var(--ink); background: var(--white); border: 1px solid var(--hairline); padding: 8px 14px; border-radius: 980px; }

/* ---------- contact ---------- */
.contact-line { max-width: 560px; }
.contact-sub { font-size: 1.12rem; margin-top: 16px; max-width: 520px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 30px; font-family: var(--mono); font-size: 0.95rem; }
.contact-links a { color: var(--cobalt); border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact-links a:hover { border-bottom-color: var(--cobalt); }
.contact-links span { color: var(--slate-light); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 32px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; align-items: center; font-size: 0.9rem; color: var(--slate-light); }
.footer-inner > span:first-child { font-family: var(--display); font-weight: 600; color: var(--ink); }
.footer-mono { font-family: var(--mono); }

/* ============ interactive phone: w3 / Carbon-style newsletter app ============ */
.hero-visual { display: flex; justify-content: center; }
.device { position: relative; width: clamp(244px, 30vw, 290px); aspect-ratio: 290 / 600; background: #0A0A0B; border-radius: 46px; padding: 10px; box-shadow: 0 2px 6px rgba(10,10,11,0.08), 0 36px 70px -28px rgba(10,10,11,0.4); }
.device-island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 80px; height: 24px; background: #000; border-radius: 14px; z-index: 3; }
.device-screen {
  --c-blue: #0f62fe; --c-blue-d: #0353e9; --c-ink: #161616; --c-gray: #525252; --c-gray40: #8d8d8d; --c-line: #e0e0e0; --c-bg2: #f4f4f4;
  width: 100%; height: 100%; background: #fff; border-radius: 35px; overflow: hidden;
  display: flex; flex-direction: column; font-family: "IBM Plex Sans", var(--body); color: var(--c-ink);
}
.scr-statusbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 4px; }
.sb-time { font-family: "IBM Plex Sans", var(--body); font-weight: 600; font-size: 13px; color: var(--c-ink); }

.scr-appheader { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 11px; border-bottom: 1px solid var(--c-line); }
.apph-name { font-family: "IBM Plex Sans", var(--body); font-weight: 600; font-size: 15px; color: var(--c-ink); letter-spacing: -0.01em; line-height: 1.1; }
.apph-name small { display: block; font-weight: 400; font-size: 10px; color: var(--c-gray40); margin-top: 2px; letter-spacing: 0.01em; }
.apph-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--c-blue); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; }

.scr-stage { position: relative; flex: 1; min-height: 0; }
.scr-page { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 14px 16px 16px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); }
.scr-page::-webkit-scrollbar { width: 0; height: 0; display: none; }
.scr-page.is-active { opacity: 1; transform: none; pointer-events: auto; }
.pg-title { font-family: "IBM Plex Sans", var(--body); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; color: var(--c-ink); margin-bottom: 14px; }

/* news */
.nw-post { padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.nw-post:last-child { border-bottom: 0; }
.nw-post.featured { background: #edf5ff; border: 1px solid #d0e2ff; border-radius: 2px; padding: 13px; margin-bottom: 12px; }
.nw-tag { display: inline-block; font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-blue); background: #fff; border: 1px solid #d0e2ff; padding: 3px 8px; border-radius: 2px; }
.nw-post:not(.featured) .nw-tag { background: var(--c-bg2); border-color: var(--c-line); color: var(--c-gray); }
.nw-post h3 { font-family: "IBM Plex Sans", var(--body); font-size: 15px; font-weight: 600; color: var(--c-ink); letter-spacing: -0.01em; margin: 9px 0 3px; line-height: 1.2; }
.nw-date { font-size: 11px; color: var(--c-gray40); margin-bottom: 7px; }
.nw-excerpt { font-size: 12px; line-height: 1.5; color: var(--c-gray); }
.nw-read { display: inline-block; margin-top: 9px; font-size: 11.5px; font-weight: 600; color: var(--c-blue); }

/* work */
.wk-intro { font-size: 12.5px; color: var(--c-gray); line-height: 1.5; margin-bottom: 16px; }
.wk-item { padding: 12px 0; border-top: 1px solid var(--c-line); }
.wk-item:first-of-type { border-top: 0; padding-top: 0; }
.wk-top { display: flex; justify-content: space-between; align-items: baseline; }
.wk-co { font-family: "IBM Plex Sans", var(--body); font-weight: 600; font-size: 14px; color: var(--c-ink); }
.wk-yr { font-size: 11px; color: var(--c-gray40); }
.wk-role { font-size: 12px; color: var(--c-blue); font-weight: 500; margin: 1px 0 5px; }
.wk-desc { font-size: 11.5px; line-height: 1.45; color: var(--c-gray); }
.wk-sublabel { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-gray40); margin: 16px 0 9px; }
.wk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-tags span { font-size: 10.5px; color: var(--c-ink); background: var(--c-bg2); padding: 5px 9px; border-radius: 2px; }

/* contact */
.ct-intro { font-size: 12.5px; color: var(--c-gray); line-height: 1.5; margin-bottom: 16px; }
.ct-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; margin-bottom: 9px; border: 1px solid var(--c-line); border-radius: 2px; font-family: "IBM Plex Sans", var(--body); font-size: 13px; font-weight: 500; color: var(--c-ink); background: #fff; transition: background .15s; }
.ct-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.ct-btn .ct-arrow { margin-left: auto; color: var(--c-gray40); }
.ct-btn:hover { background: var(--c-bg2); }
.ct-btn.primary { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.ct-btn.primary:hover { background: var(--c-blue-d); }
.ct-btn.primary .ct-arrow { color: rgba(255,255,255,0.75); }
.ct-loc { font-size: 11px; color: var(--c-gray40); margin-top: 12px; text-align: center; }

/* tabs */
.scr-tabs { display: flex; border-top: 1px solid var(--c-line); }
.scr-tabs .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 5px; background: none; border: 0; cursor: pointer; color: var(--c-gray40); font-family: "IBM Plex Sans", var(--body); font-size: 9.5px; font-weight: 500; transition: color .15s; }
.scr-tabs .tab svg { width: 20px; height: 20px; }
.scr-tabs .tab.active { color: var(--c-blue); }
.scr-homebar { width: 110px; height: 5px; border-radius: 3px; background: #0A0A0B; opacity: 0.85; margin: 5px auto 8px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: 2; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(250,250,248,0.98); backdrop-filter: blur(14px); padding: 6px 28px 18px; border-bottom: 1px solid var(--hairline);
  }
  .nav.menu-open .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 1.05rem; }
  .role-head, .proj-top { flex-direction: column; gap: 4px; }
}
