/* ═════════════════════════════════════════════════════
   NAHUM — Portfolio
   Aesthetic: Editorial Minimalism · Light · Typographic
   Fonts: Cormorant Garamond (display) + DM Mono (body)
   ═════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ─── TOKENS ──────────────────────────────────── */
:root {
  --cream:      #f7f4ef;
  --cream-dark: #ede9e1;
  --ink:        #111008;
  --ink-mid:    #4a4640;
  --ink-light:  #9a9590;
  --gold:       #b8903a;
  --white:      #ffffff;

  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'DM Mono', 'Courier New', monospace;

  --nav-h: 60px;
  --max-w: 1100px;
  --col:   700px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a       { color: inherit; text-decoration: none; }
img     { max-width: 100%; display: block; }
ul      { list-style: none; }
button  { font-family: var(--f-body); cursor: pointer; }

/* ─── SITE WRAPPER ────────────────────────────── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── NAV ─────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--cream);
  border-bottom: 1px solid var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.site-nav__brand {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--ink);
  transition: color 0.2s;
}
.site-nav__brand:hover { color: var(--gold); }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav__links a {
  color: var(--ink-mid);
  transition: color 0.2s;
}
.site-nav__links a:hover,
.site-nav__links a.active { color: var(--ink); }

.site-nav__cta {
  color: var(--ink) !important;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1px;
  transition: border-color 0.2s, color 0.2s !important;
}
.site-nav__cta:hover { border-color: var(--gold) !important; color: var(--gold) !important; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  position: relative;
  transition: var(--ease) 0.3s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }
.nav-toggle span.open::before { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle span.open::after  { transform: rotate(-45deg) translate(5px, -5px); }
.nav-toggle span.open { background: transparent; }

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--cream);
  z-index: 99;
  padding: 40px;
  animation: fadeIn 0.2s var(--ease);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.mobile-nav a {
  font-size: 1.8rem;
  font-family: var(--f-display);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.01em;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── MAIN ────────────────────────────────────── */
.site-main { flex: 1; }

/* ─── FOOTER ──────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--cream-dark);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer__brand {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}
.site-footer__copy {
  font-size: 0.7rem;
  color: var(--ink-light);
  flex: 1;
  text-align: center;
}
.site-footer__links {
  display: flex;
  gap: 24px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-footer__links a {
  color: var(--ink-mid);
  transition: color 0.2s;
}
.site-footer__links a:hover { color: var(--ink); }

/* ─── LAYOUT HELPERS ──────────────────────────── */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 40px;
}
.section--cta { text-align: center; }

.divider {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 1px;
  background: var(--cream-dark);
}

/* ─── HERO ────────────────────────────────────── */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 40px 72px;
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: start;
  gap: 60px;
}

.hero__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  margin-bottom: 20px;
}

.hero__name {
  font-family: var(--f-display);
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 32px;
  animation: heroReveal 0.9s var(--ease) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__tagline {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-mid);
  font-weight: 300;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

/* Aside */
.hero__aside {
  padding-top: 20px;
  animation: heroReveal 0.9s 0.2s var(--ease) both;
}
.hero__bio {
  font-size: 0.82rem;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: 24px;
}
.hero__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--ink-light);
}

/* Status dot */
.available-dot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2d7a4f;
  font-size: 0.72rem;
}
.dot-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #2d7a4f;
  animation: pulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(45,122,79,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(45,122,79,0); }
}

/* ─── LINKS ───────────────────────────────────── */
.link-arrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: 3px;
  transition: border-color 0.2s, color 0.2s;
}
.link-arrow:hover { border-color: var(--ink); }
.link-arrow span { transition: transform 0.2s; }
.link-arrow:hover span { transform: translate(2px, -2px); }

.link-subtle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  transition: color 0.2s;
}
.link-subtle:hover { color: var(--ink); }

/* ─── SECTION HEADER ──────────────────────────── */
.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}
.section__title {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.01em;
}

/* ─── PROJECTS LIST ───────────────────────────── */
.projects-list { display: flex; flex-direction: column; }

.project-row {
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  gap: 24px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--cream-dark);
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s;
}
.project-row:first-child { border-top: 1px solid var(--cream-dark); }
.project-row:hover { background: var(--white); margin: 0 -40px; padding-left: 40px + 48px; }

.project-row--alt:hover { background: var(--cream-dark); margin: 0 -40px; padding-left: 88px; }

.project-row__num {
  font-family: var(--f-display);
  font-size: 0.85rem;
  color: var(--ink-light);
  padding-top: 6px;
  letter-spacing: 0.05em;
}

.project-row__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.project-row__title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.project-row__year {
  font-size: 0.7rem;
  color: var(--ink-light);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.project-row__desc {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 14px;
}
.project-row__tags { display: flex; flex-wrap: wrap; gap: 6px; }

.project-row__arrow {
  color: var(--ink-light);
  font-size: 1.1rem;
  padding-top: 6px;
  transition: transform 0.2s, color 0.2s;
}
.project-row:hover .project-row__arrow {
  transform: translate(2px, -2px);
  color: var(--ink);
}

/* ─── PROJECTS FULL ───────────────────────────── */
.projects-list--full .project-row {
  grid-template-columns: 48px 1fr;
  cursor: default;
}
.project-row--detail { align-items: start; }
.project-row__cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-top: 4px;
  display: block;
}
.project-row__desc--full { max-width: 680px; }
.project-row__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.project-row__links { display: flex; gap: 20px; }

/* ─── TAGS / PILLS ────────────────────────────── */
.tag {
  font-size: 0.68rem;
  padding: 3px 10px;
  border: 1px solid var(--cream-dark);
  border-radius: 20px;
  color: var(--ink-mid);
  letter-spacing: 0.04em;
  background: var(--white);
}

.skill-pill {
  font-size: 0.72rem;
  padding: 5px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: 20px;
  color: var(--ink-mid);
  background: var(--white);
  white-space: nowrap;
}

/* ─── SKILLS COMPACT ──────────────────────────── */
.skills-compact .section__title { margin-bottom: 28px; }
.skills-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ─── SKILLS TABLE ────────────────────────────── */
.skills-table { display: flex; flex-direction: column; gap: 0; }
.skills-table__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.skills-table__row:first-child { border-top: 1px solid var(--cream-dark); }
.skills-table__cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  padding-top: 6px;
}
.skills-table__items { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── XP PREVIEW (HOME) ───────────────────────── */
.xp-preview { }
.xp-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
}
.xp-card__left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.xp-card__badge {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 2px 9px;
  width: fit-content;
}
.xp-card__period { font-size: 0.7rem; color: var(--ink-light); letter-spacing: 0.06em; }
.xp-card__header { margin-bottom: 10px; }
.xp-card__header strong { font-size: 1rem; font-family: var(--f-display); font-weight: 500; display: block; }
.xp-card__company { font-size: 0.72rem; color: var(--ink-light); text-transform: uppercase; letter-spacing: 0.08em; }
.xp-card__desc { font-size: 0.8rem; color: var(--ink-mid); line-height: 1.8; margin-bottom: 16px; }
.xp-card__highlights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.xp-card__highlights li {
  font-size: 0.78rem;
  color: var(--ink-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.7;
}
.xp-card__highlights li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-light);
}

/* ─── PAGE INTRO ──────────────────────────────── */
.page-intro {
  border-bottom: 1px solid var(--cream-dark);
  padding: 60px 0 52px;
}
.page-intro__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}
.page-intro__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-light);
  margin-bottom: 16px;
}
.page-intro__title {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}
.page-intro__sub {
  font-size: 0.82rem;
  color: var(--ink-mid);
  max-width: 520px;
  line-height: 1.8;
}

/* ─── FILTER ROW ──────────────────────────────── */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--cream-dark);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mid);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
.filter-count {
  font-size: 0.62rem;
  opacity: 0.6;
}

/* ─── TIMELINE ────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-bottom: 1px solid var(--cream-dark);
}
.timeline-item:first-child { border-top: 1px solid var(--cream-dark); }

.timeline-item__aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}
.timeline-item__period { font-size: 0.72rem; color: var(--ink-light); letter-spacing: 0.08em; }
.timeline-item__period-end { font-size: 0.72rem; color: var(--ink-light); }
.timeline-item__now {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 2px 9px;
  width: fit-content;
}

.timeline-item__position {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 4px;
}
.timeline-item__company {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-light);
  display: block;
  margin-bottom: 14px;
}
.timeline-item__desc {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 16px;
}
.timeline-item__highlights {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.timeline-item__highlights li {
  font-size: 0.78rem;
  color: var(--ink-mid);
  padding-left: 16px;
  position: relative;
  line-height: 1.7;
}
.timeline-item__highlights li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--ink-light);
}

/* ─── CTA BLOCK ───────────────────────────────── */
.cta-block {
  max-width: 520px;
  margin: 0 auto;
}
.cta-block__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.cta-block__sub {
  font-size: 0.8rem;
  color: var(--ink-mid);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* ─── BUTTON ──────────────────────────────────── */
.btn-primary {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cream);
  background: var(--ink);
  padding: 14px 32px;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-primary:hover { background: #2a2620; }

/* ─── 404 ─────────────────────────────────────── */
.not-found {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 40px;
  text-align: center;
}
.not-found__code {
  font-family: var(--f-display);
  font-size: 8rem;
  font-weight: 300;
  color: var(--cream-dark);
  display: block;
}
.not-found p { color: var(--ink-mid); margin: 8px 0 24px; font-size: 0.85rem; }
.not-found a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ─── RESPONSIVE ──────────────────────────────── */
@media (max-width: 860px) {
  .site-nav { padding: 0 24px; }
  .site-nav__links { display: none; }
  .nav-toggle { display: block; }

  .hero {
    grid-template-columns: 1fr;
    padding: 52px 24px 48px;
    gap: 32px;
  }
  .hero__aside { padding-top: 0; }

  .section { padding: 52px 24px; }
  .divider { margin: 0 24px; }
  .page-intro__inner { padding: 0 24px; }

  .project-row {
    grid-template-columns: 36px 1fr 24px;
    gap: 16px;
  }
  .project-row__num { font-size: 0.72rem; }

  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .timeline-item__aside { flex-direction: row; align-items: center; gap: 12px; }

  .skills-table__row { grid-template-columns: 1fr; gap: 12px; }
  .skills-table__cat { padding-top: 0; }

  .xp-card { grid-template-columns: 1fr; gap: 16px; }
  .xp-card__left { flex-direction: row; align-items: center; }

  .site-footer { padding: 24px; }
  .site-footer__copy { display: none; }
}

@media (max-width: 500px) {
  .hero__name { font-size: 4.5rem; }
  .project-row:hover { margin: 0; }
}
