/* =========================================================
   natejacobs.net — Glassmorphism design system
   iOS / macOS grey base · Instagram warm-gradient accents
   Vanilla CSS · Grid + Flexbox · Custom properties
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Neutral (iOS/macOS grey) palette */
  --grey-50:  #f7f8fa;
  --grey-100: #eceef2;
  --grey-200: #d9dce2;
  --grey-300: #b9bec7;
  --grey-400: #8a909b;
  --grey-500: #5f6571;
  --grey-600: #444a55;
  --grey-700: #2d323b;
  --grey-800: #1c2026;
  --grey-900: #0f1115;

  /* Accent gradient — accent ONLY */
  --ig-1: #1a6ab4;
  --ig-2: #1a6ab4;
  --ig-3: #3f57b0;
  --ig-4: #602cb5;
  --ig-5: #602cb5;
  --ig-gradient: linear-gradient(to left, rgb(26, 106, 180), rgb(96, 44, 181));

  /* Semantic colors (light) */
  --bg: #ffffff;
  --text: var(--grey-800);
  --text-soft: var(--grey-500);
  --text-faint: var(--grey-400);

  /* Glass */
  --glass-bg: rgba(247, 248, 250, 0.7);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(20, 24, 31, 0.08);
  --glass-shadow: 0 8px 30px rgba(20, 24, 31, 0.08);
  --glass-blur: 18px;

  /* Type scale (fluid) */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --step--1: clamp(0.83rem, 0.78rem + 0.25vw, 0.95rem);
  --step-0:  clamp(1rem, 0.93rem + 0.34vw, 1.18rem);
  --step-1:  clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.2vw, 2.3rem);
  --step-3:  clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);
  --step-4:  clamp(2.8rem, 1.9rem + 4.4vw, 5.5rem);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.85rem;
  --space-md: 1.4rem;
  --space-lg: 2.4rem;
  --space-xl: 4rem;

  /* Layout */
  --maxw: 1180px;
  --radius: 22px;
  --radius-sm: 14px;
  --ring: rgba(96, 44, 181, 0.45);
  --transition: 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--grey-900);
    --text: var(--grey-100);
    --text-soft: var(--grey-300);
    --text-faint: var(--grey-400);

    --glass-bg: rgba(34, 38, 46, 0.55);
    --glass-bg-strong: rgba(40, 45, 54, 0.72);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 6px; }

/* ---------- Animated ambient background (Instagram accent orbs) ---------- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg);
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  100% { transform: translate3d(4vmax, 3vmax, 0) scale(1.12) rotate(28deg); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: min(100% - 2.4rem, var(--maxw));
  margin-inline: auto;
}
.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section-center {
  min-height: calc(100vh - 320px);
  display: grid;
  align-content: center;
}
.section-head { margin-bottom: var(--space-lg); }
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--space-xs);
}
.section-head h2 {
  font-size: var(--step-2);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head p { color: var(--text-soft); margin-top: var(--space-xs); max-width: 56ch; }

/* ---------- Glass primitive ---------- */
.glass {
  background-color: var(--glass-bg);
  background-image: linear-gradient(157deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 40%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-top: 1rem;
}
.nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.brand .logo-badge {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--ig-gradient);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(96, 44, 181, 0.3);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-links a {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: rgba(127, 127, 127, 0.12); }
.nav-links a.active { color: var(--text); background: rgba(127, 127, 127, 0.16); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(127, 127, 127, 0.12);
  cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { margin: auto; }

@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.6rem;
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    transform: scale(0.97);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .nav-links a { padding: 0.7rem 1rem; text-align: left; }
  .nav[data-open="true"] .nav-links {
    opacity: 1; visibility: visible; transform: scale(1);
  }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero-card {
  padding: clamp(1.8rem, 4vw, 3.6rem);
  display: grid;
  gap: var(--space-lg);
}
.hero .available {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: start;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  background: rgba(127, 127, 127, 0.1);
  border: 1px solid var(--glass-border);
}
.available .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2fd07a;
  box-shadow: 0 0 0 4px rgba(47, 208, 122, 0.18);
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.hero h1 .name { color: inherit; }
.hero .lede {
  font-size: var(--step-1);
  color: var(--text-soft);
  max-width: 40ch;
  font-weight: 400;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--step--1);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow); }
.btn-primary {
  color: #fff;
  border: none;
  background: var(--ig-gradient);
  box-shadow: 0 6px 20px rgba(96, 44, 181, 0.3);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(96, 44, 181, 0.45); }

/* ---------- Generic card grid ---------- */
.grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
  position: relative;
  padding: clamp(1.3rem, 2.5vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:not(.featured)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(125% 90% at 0% 0%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 46%);
  opacity: 0.85;
  transition: opacity var(--transition);
}
.card:not(.featured) > * { position: relative; }
.card:not(.featured):hover::before { opacity: 1; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(20, 24, 31, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.card .card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.12);
  color: var(--text);
}
.card h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
.card p { color: var(--text-soft); font-size: var(--step-0); }
.card .meta { margin-top: auto; color: var(--text-faint); font-size: var(--step--1); font-weight: 500; }

/* Logo tile (Halliard, Medidata) */
.card .card-logo {
  width: 100%;
  height: 120px;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.card .card-logo img {
  max-height: 72px;
  max-width: 78%;
  width: auto;
  object-fit: contain;
}

/* Photo cover (Photography) */
.card .card-media {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
}
.card .card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22,0.61,0.36,1);
}
.card-photo:hover .card-media img { transform: scale(1.06); }

/* ---------- Featured project (Alien Evasion) ---------- */
.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  padding: 0;
  min-height: 320px;
}
.featured .featured-body {
  padding: clamp(1.8rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  justify-content: center;
}
.featured h3 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.featured p { color: var(--text-soft); max-width: 46ch; }
.featured .featured-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: var(--text);
}
.featured .featured-link .arrow { transition: transform var(--transition); }
.featured:hover .featured-link .arrow { transform: translateX(5px); }

.featured .featured-visual {
  position: relative;
  overflow: hidden;
  background: #0b0a14;
  min-height: 280px;
}
.featured .featured-visual .shot-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(0.22,0.61,0.36,1);
}
.featured:hover .featured-visual .shot-img { transform: scale(1.06); }
.featured .ae-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(52px, 7vw, 72px);
  aspect-ratio: 1;
  padding: 0.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.featured .ae-badge .ae-logo { width: 100%; height: auto; }

@media (max-width: 760px) {
  .featured { grid-template-columns: 1fr; }
  .featured .featured-visual { min-height: 220px; order: -1; }
}

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.photo {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: rgba(127,127,127,0.1);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22,0.61,0.36,1);
}
.photo:hover img { transform: scale(1.06); }
.photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.4rem 1rem 0.9rem;
  color: #fff;
  font-weight: 600;
  font-size: var(--step--1);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.photo:hover figcaption { opacity: 1; transform: translateY(0); }

.gallery-title { display: flex; align-items: baseline; gap: 0.75rem; margin: var(--space-lg) 0 var(--space-md); }
.gallery-title h3 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; }
.gallery-title.neon h3 {
  background: var(--ig-gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 9, 12, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  cursor: zoom-out;
}
.lightbox[data-open="true"] { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(94vw, 1100px);
  max-height: 86vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
}
.lightbox .lb-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
}

/* ---------- Contact ---------- */
.contact-card { padding: clamp(1.8rem, 4vw, 3.2rem); display: grid; gap: var(--space-lg); }
.socials { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.social {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.social:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow); }
.social .ico {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--ig-gradient);
}
.social .s-label { font-weight: 600; line-height: 1.2; }
.social .s-sub { color: var(--text-faint); font-size: var(--step--1); }

/* ---------- Coming soon ---------- */
.coming {
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  display: grid; gap: var(--space-md); justify-items: center;
}
.coming .big-emoji {
  font-size: clamp(3rem, 8vw, 5rem);
  width: 110px; height: 110px;
  display: grid; place-items: center;
  border-radius: 28px;
  background: var(--ig-gradient);
  box-shadow: 0 14px 40px rgba(96, 44, 181, 0.3);
}
.coming h2 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; }
.coming p { color: var(--text-soft); max-width: 48ch; }

/* ---------- Blog index list ---------- */
.post-list { padding: clamp(0.6rem, 1.5vw, 1rem); display: flex; flex-direction: column; }
.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: var(--space-md);
  padding: clamp(1rem, 2.4vw, 1.5rem);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.post-row + .post-row { border-top: 1px solid var(--glass-border); }
.post-row:hover { background: rgba(127, 127, 127, 0.08); }
.post-row .post-row-title { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.post-row .post-row-desc { color: var(--text-soft); font-size: var(--step-0); margin-top: 0.3rem; max-width: 60ch; }
.post-row .post-row-date { color: var(--text-faint); font-size: var(--step--1); font-weight: 500; white-space: nowrap; }
@media (max-width: 560px) {
  .post-row { grid-template-columns: 1fr; }
  .post-row .post-row-date { order: -1; }
}

/* ---------- Blog post (article) ---------- */
.post { max-width: 760px; margin-inline: auto; }
.post-back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-soft); font-weight: 500; margin-bottom: var(--space-md); }
.post-back:hover { color: var(--text); }
.post-header { margin-bottom: var(--space-lg); }
.post-header h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.post-meta { color: var(--text-faint); font-size: var(--step--1); font-weight: 500; margin-top: var(--space-sm); }
.post-figure {
  margin-block: var(--space-lg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.post-figure img { display: block; width: 100%; height: clamp(220px, 42vw, 420px); object-fit: cover; }
.post-body p { color: var(--text); font-size: var(--step-0); line-height: 1.7; margin-bottom: var(--space-md); }
.post-body ul { margin: 0 0 var(--space-md) 1.2rem; color: var(--text); }
.post-body li { margin-bottom: 0.4rem; line-height: 1.6; }
.post-body a { color: var(--ig-4); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.post-related { margin-top: var(--space-lg); padding: clamp(1.2rem, 3vw, 1.8rem); }
.post-related h2 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; margin-bottom: var(--space-sm); }
.post-related ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.post-related a { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); font-weight: 500; }
.post-related a:hover { color: var(--ig-4); }
.post-related a .arrow { color: var(--text-faint); transition: transform var(--transition); }
.post-related a:hover .arrow { transform: translateX(4px); color: var(--ig-4); }

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--space-xl) var(--space-lg); }
.footer-inner {
  padding: 0.9rem clamp(1.2rem, 3vw, 1.8rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.footer-inner .f-brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; order: 1; }
.footer-copy { color: var(--text-faint); font-size: var(--step--1); order: 2; }
.footer-social { display: flex; gap: 0.5rem; order: 3; }
.footer-social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(127,127,127,0.12);
  transition: transform var(--transition), color var(--transition), background var(--transition);
}
.footer-social a:hover { transform: translateY(-3px); color: #fff; background: var(--ig-gradient); }
.footer-copy { color: var(--text-faint); font-size: var(--step--1); white-space: nowrap; }

@media (max-width: 560px) {
  .footer-copy { display: none; }
}
