/* ===========================
   Aviv Yovel — avivyovel.com
   =========================== */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-alt: #141414;
  --text: #f0f0f0;
  --text-secondary: #888888;
  --accent: #c8a96e;
  --border: #222222;
  --max-width: 720px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Ambient top glow — gives the page depth and a light source */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 480px;
  background: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(200, 169, 110, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

main, footer {
  position: relative;
  z-index: 1;
}


/* ===========================
   Layout
   =========================== */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 80px 0;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, var(--border) 0%, transparent 100%) 1;
}

section:last-of-type {
  border-bottom: none;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 40px;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

/* ===========================
   Hero
   =========================== */

#hero {
  padding-top: 96px;
  padding-bottom: 96px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, var(--border) 0%, transparent 100%) 1;
}

.hero-name {
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 30%, #c8a96e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-dot {
  color: var(--border);
}

.hero-links {
  display: flex;
  gap: 16px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hero-link:hover {
  color: var(--accent);
  border-color: rgba(200, 169, 110, 0.4);
  background: rgba(200, 169, 110, 0.05);
}

.hero-link svg {
  flex-shrink: 0;
}

/* ===========================
   Experience
   =========================== */

.exp-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  border-left: 1px solid var(--border);
}

.exp-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  gap: 12px;
  padding: 14px 0 14px 20px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, var(--border) 0%, transparent 100%) 1;
  transition: background 0.2s, border-left-color 0.2s;
  margin-left: -1px;
  border-left: 1px solid transparent;
}

.exp-row:last-child {
  border-bottom: none;
}

.exp-row:hover {
  border-left-color: rgba(200, 169, 110, 0.5);
  background: rgba(200, 169, 110, 0.025);
}

.exp-co {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.exp-ro {
  font-size: 13px;
  color: var(--text-secondary);
}

.exp-yr {
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ===========================
   Projects & Side Gigs
   =========================== */

.side-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  border-left: 1px solid var(--border);
}

.side-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0 13px 20px;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(to right, var(--border) 0%, transparent 100%) 1;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: background 0.2s, border-left-color 0.2s;
}

.side-row:last-child {
  border-bottom: none;
}

.side-row:hover {
  border-left-color: rgba(200, 169, 110, 0.5);
  background: rgba(200, 169, 110, 0.025);
}

.side-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.side-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.side-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.side-link:hover {
  opacity: 0.7;
}

.side-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #555;
  white-space: nowrap;
}

/* Writing intro reuse */
.mentorship-intro {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 32px;
  line-height: 1.7;
}

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

footer {
  border-top: 1px solid transparent;
  border-image: linear-gradient(to right, var(--border) 0%, transparent 100%) 1;
  padding: 48px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text);
}

.footer-meta {
  font-size: 12px;
  color: #444;
}

.footer-cv {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-cv:hover {
  opacity: 0.75;
}

/* ===========================
   Writing / Substack Notes
   =========================== */

.writing-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

/* Override Substack embed to match dark theme */
.substack-post-embed {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Targets the rendered table/div Substack injects */
.substack-post-embed table,
.substack-post-embed td,
.substack-post-embed th {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

.substack-post-embed p,
.substack-post-embed span,
.substack-post-embed div {
  color: var(--text-secondary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  background: transparent !important;
}

.substack-post-embed a {
  color: var(--accent) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.substack-post-embed a:hover {
  opacity: 0.75 !important;
}

/* Substack renders an author line — mute it slightly */
.substack-post-embed p:last-of-type {
  color: #555 !important;
  font-size: 12px !important;
}

.writing-more {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

.writing-more:hover {
  opacity: 0.75;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 640px) {
  header {
    padding: 0 16px;
  }

  nav {
    gap: 18px;
  }

  nav a {
    font-size: 10px;
  }

  main {
    padding: 0 16px;
  }

  section {
    padding: 60px 0;
  }

  #hero {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .hero-meta-dot {
    display: none;
  }

  .exp-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }

  .exp-ro {
    grid-column: 1;
    grid-row: 2;
  }

  .exp-yr {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  footer {
    padding: 40px 16px;
  }
}
