/* ============================================================
   ABE KHALEELI — Personal Site
   Design: Dark navy (fellows.fund aesthetic) +
           Chronological timeline (karpathy.ai structure)
   No frameworks. Pure HTML + CSS.
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0a0e1a;
  --navy-mid:    #0f1628;
  --navy-light:  #16203a;
  --border:      rgba(255,255,255,0.07);
  --border-mid:  rgba(255,255,255,0.12);
  --white:       #f5f5f0;
  --muted:       rgba(245,245,240,0.45);
  --accent:      #c8a96e;          /* warm gold */
  --accent-soft: rgba(200,169,110,0.15);
  --tag-bg:      rgba(255,255,255,0.06);

  --font-sans:   'Inter', 'Helvetica Neue', sans-serif;
  --font-serif:  'Cormorant Garamond', 'Georgia', serif;
  --font-display:'Space Grotesk', 'Inter', sans-serif;

  --max-w: 860px;
  --gutter: clamp(20px, 5vw, 60px);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.75; }

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  height: 60px;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); opacity: 1; }

/* ── HERO ─────────────────────────────────────────────────── */
header#about {
  padding: 120px var(--gutter) 80px;
  max-width: 1080px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

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

.hero-photo-wrap {
  position: relative;
  height: 420px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: grayscale(15%) contrast(1.04);
}

/* gradient bleed: left edge fades into navy, bottom fades too */
.hero-photo-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,  var(--navy) 0%, transparent 28%),
    linear-gradient(to top,    var(--navy) 0%, transparent 18%);
  z-index: 1;
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

h1 {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.0;
  color: var(--white);
  margin-bottom: 28px;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(245,245,240,0.7);
  line-height: 1.5;
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.8;
  margin-bottom: 36px;
}

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

.pill {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  transition: background 0.2s, border-color 0.2s;
}
.pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--white);
  opacity: 1;
}

/* ── SECTION LABEL ────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 56px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ── EXPERIENCE / TIMELINE ────────────────────────────────── */
main#experience {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter);
}

.entry {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0 36px;
  margin-bottom: 72px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--border);
}
.entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 5px;
}

.entry-year {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.6;
}
.entry-year.muted { color: var(--muted); }

.entry-header {
  margin-bottom: 14px;
}

.entry-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 6px;
}

.entry-company {
  display: block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 3px;
}

.entry-location {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.entry-summary {
  font-size: 0.92rem;
  color: rgba(245,245,240,0.72);
  margin-bottom: 18px;
  line-height: 1.75;
}

.entry-highlights {
  list-style: none;
  margin-bottom: 20px;
}

.entry-highlights li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 16px;
  position: relative;
  margin-bottom: 8px;
}
.entry-highlights li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 5px;
}
.entry-highlights li strong {
  color: var(--white);
  font-weight: 500;
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.entry-tags span {
  display: inline-block;
  padding: 4px 12px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-family: var(--font-display);
}

/* ── COMPETENCIES ─────────────────────────────────────────── */
#competencies {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter);
  border-top: 1px solid var(--border);
}

.competencies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
}

.competency-block {
  padding: 28px 24px;
  background: var(--navy-mid);
  border: 1px solid var(--border);
  transition: background 0.2s;
}
.competency-block:hover { background: var(--navy-light); }

.competency-block h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.competency-block p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── EDUCATION ────────────────────────────────────────────── */
#education {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--gutter);
  border-top: 1px solid var(--border);
}

.education-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-item {
  display: flex;
  flex-direction: column;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.edu-item:last-child { border-bottom: none; }

.edu-degree {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 4px;
}
.edu-school {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  margin-top: 0;
}

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

.footer-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); opacity: 1; }

.footer-location {
  font-size: 0.78rem;
  color: rgba(245,245,240,0.25);
  letter-spacing: 0.04em;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }

  h1 { font-size: 2.8rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-photo-wrap {
    height: 280px;
    order: -1;   /* photo above text on mobile */
  }
  .hero-photo-fade {
    background:
      linear-gradient(to bottom, var(--navy) 0%, transparent 18%),
      linear-gradient(to top,    var(--navy) 0%, transparent 18%);
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }
  .entry-meta {
    flex-direction: row;
    gap: 6px;
  }

  .competencies-grid {
    grid-template-columns: 1fr;
  }

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

  .br-desktop { display: none; }
}

@media (min-width: 641px) and (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr 240px;
    gap: 36px;
  }
  .hero-photo-wrap { height: 340px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .entry {
    grid-template-columns: 80px 1fr;
    gap: 0 24px;
  }
}

@media (min-width: 801px) and (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr 280px;
    gap: 44px;
  }
  .hero-photo-wrap { height: 380px; }
}
