/* ─────────────────────────────────────────────
   gerobw.com — Styles
   ───────────────────────────────────────────── */

:root {
  --bg:           #F8F6EF;
  --text:         #0A0A08;
  --muted:        #6C6C69;
  --border:       #E0DDCF;
  --hover-bg:     #F1EFE6;
  --nav-bg:       rgba(248, 246, 239, 0.96);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 64px;
}

/* ─────────────────────────────────────────────
   NAV
   ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

nav.nav--scrolled {
  border-color: var(--border);
}

.nav-logo {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* ─────────────────────────────────────────────
   SECTION HEADER
   ───────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 64px;
}

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Sections ── */
section {
  padding: 140px 0;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────── */
.hero {
  border-top: none;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 96px;
  padding-top: 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-end;
  gap: 80px;
  width: 100%;
}

.hero-name {
  font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  font-size: clamp(72px, 11.5vw, 168px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 10px;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.14s both;
}

.hero-sub {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

.hero-desc {
  font-size: 16px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}

.hero-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ─────────────────────────────────────────────
   WORK TIMELINE
   ───────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 48px;
  padding: 52px 64px;
  margin: 0 -64px;
  border-top: 1px solid var(--border);
  transition: background 0.2s ease;
  cursor: default;
}

.timeline-item:last-child {
  border-bottom: 1px solid var(--border);
}

.timeline-item:hover {
  background: var(--hover-bg);
}

.timeline-year {
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Mono', 'Menlo', monospace;
  color: var(--muted);
  padding-top: 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.timeline-content .role {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.timeline-content .company {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.timeline-content ul {
  list-style: none;
  padding: 0;
}

.timeline-content ul li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  padding-left: 18px;
  position: relative;
  margin-bottom: 2px;
}

.timeline-content ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--muted);
  opacity: 0.5;
}

/* ─────────────────────────────────────────────
   RESEARCH
   ───────────────────────────────────────────── */
.research-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 0;
  transition: opacity 0.2s ease;
}

.research-card:hover {
  opacity: 0.75;
}

.research-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 36px;
}

.research-left {
  flex: 1;
}

.research-pub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.research-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.research-tags {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.research-right {
  flex-shrink: 0;
  padding-top: 4px;
}

.research-arrow {
  font-size: 30px;
  color: var(--muted);
  display: block;
  transition: color 0.2s ease, transform 0.25s ease;
}

.research-card:hover .research-arrow {
  color: var(--text);
}

.research-footer {
  display: flex;
  gap: 32px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-top: 32px;
}

/* ─────────────────────────────────────────────
   EDUCATION
   ───────────────────────────────────────────── */
.edu-list {
  display: flex;
  flex-direction: column;
}

.edu-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 48px;
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.edu-item:last-child {
  border-bottom: 1px solid var(--border);
}

.edu-year {
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Mono', monospace;
  color: var(--muted);
  padding-top: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.edu-degree {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.35;
}

.edu-detail {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────
   SKILLS
   ───────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.skills-item {
  padding: 44px 36px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.skills-cat {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
}

.skills-list {
  font-size: 14px;
  color: var(--text);
  line-height: 2;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.45;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

/* ─────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────────────────────────
   DARK MODE
   ───────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #13100C;
    --text:     #F8F4EE;
    --muted:    #EDE8DC;
    --border:   #2A2420;
    --hover-bg: #1E1A15;
    --nav-bg:   rgba(19, 16, 12, 0.96);
  }
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav {
    padding: 18px 24px;
  }

  .nav-links {
    gap: 20px;
  }

  /* Hide section nav links on mobile */
  .nav-links a[href="#work"],
  .nav-links a[href="#research"],
  .nav-links a[href="#education"] {
    display: none;
  }

  .container {
    padding: 0 24px;
  }

  section {
    padding: 96px 0;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .hero {
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 80px;
    align-items: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 40px 24px;
    margin: 0 -24px;
  }

  .timeline-year {
    padding-top: 0;
  }

  .edu-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .edu-year {
    padding-top: 0;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    border: none;
  }

  .skills-item {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
  }

  .skills-item:first-child {
    border-top: 1px solid var(--border);
  }

  .research-card-inner {
    flex-direction: column;
    gap: 16px;
  }

  .research-right {
    display: none;
  }

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