/* ── Custom Properties ─────────────────────────────── */
:root {
  --cream:      #f5f0e8;
  --near-black: #1a1a1a;
  --accent:     #c0392b;
  --warm-gray:  #8a7a6a;
  --dim:        #aaaaaa;
  --font:       'IBM Plex Mono', 'Courier New', monospace;
  --transition-speed: 0.65s;
  --transition-ease:  cubic-bezier(0.77, 0, 0.175, 1);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--cream);
  color: var(--near-black);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* ── Slide base ─────────────────────────────────────── */
.slide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(100%);
  transition: transform var(--transition-speed) var(--transition-ease);
  will-change: transform;
}

.slide.is-active {
  transform: translateY(0);
}

.slide.is-above {
  transform: translateY(-100%);
}

/* First slide visible on load */
#slide-0 {
  transform: translateY(0);
}

/* ── Slide inner layout ─────────────────────────────── */
.slide-inner {
  width: min(720px, 90vw);
  padding: 48px 0;
  position: relative;
}

/* ── Section number ─────────────────────────────────── */
.slide-num {
  display: block;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--warm-gray);
  margin-bottom: 12px;
  opacity: 0;
  animation: none;
}

/* ── Section title ──────────────────────────────────── */
.slide-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--near-black);
  border-bottom: 3px solid var(--near-black);
  padding-bottom: 16px;
  margin-bottom: 40px;
  transform: translateX(-30px);
  opacity: 0;
}

/* ── Slide content ──────────────────────────────────── */
.slide-content {
  font-size: 14px;
  line-height: 1.8;
}

/* ── Nav Dots ────────────────────────────────────────── */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--warm-gray);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
}

.dot--active {
  background: var(--near-black);
  border-color: var(--near-black);
}

/* Hero slide has dark bg — invert dots when on slide 0 */
body.on-hero .dot {
  border-color: var(--warm-gray);
}
body.on-hero .dot--active {
  background: var(--cream);
  border-color: var(--cream);
}

/* ── Section entrance animations ───────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

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

/* Triggered when .animate is added to .slide */
.slide.animate .slide-num {
  animation: fadeIn 0.4s ease forwards;
  animation-delay: 0.1s;
}

.slide.animate .slide-title {
  animation: slideInLeft 0.5s var(--transition-ease) forwards;
  animation-delay: 0.25s;
}

/* Stagger children of .slide-content */
.slide.animate .slide-content > * {
  opacity: 0;
  animation: staggerUp 0.4s ease forwards;
}

.slide.animate .slide-content > *:nth-child(1)  { animation-delay: 0.4s; }
.slide.animate .slide-content > *:nth-child(2)  { animation-delay: 0.55s; }
.slide.animate .slide-content > *:nth-child(3)  { animation-delay: 0.7s; }
.slide.animate .slide-content > *:nth-child(4)  { animation-delay: 0.85s; }
.slide.animate .slide-content > *:nth-child(5)  { animation-delay: 1.0s; }
.slide.animate .slide-content > *:nth-child(6)  { animation-delay: 1.15s; }
.slide.animate .slide-content > *:nth-child(7)  { animation-delay: 1.3s; }
.slide.animate .slide-content > *:nth-child(8)  { animation-delay: 1.45s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slide,
  .slide.animate .slide-num,
  .slide.animate .slide-title,
  .slide.animate .slide-content > * {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Hero (§ 01) ─────────────────────────────────── */
#slide-0 {
  background: var(--near-black);
  color: var(--cream);
}

.slide-inner--hero {
  width: min(640px, 90vw);
}

.hero-terminal {
  font-size: clamp(14px, 2.5vw, 18px);
  line-height: 2;
}

.hero-line {
  display: block;
  opacity: 0;
}

.hero-line--prompt { color: var(--accent); }
.hero-line--output { color: var(--warm-gray); padding-left: 1.5ch; }
.hero-line--cursor::after {
  content: '▋';
  color: var(--cream);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav-hint {
  margin-top: 48px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--warm-gray);
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 4s;
}

/* ── Work (§ 02) ─────────────────────────────────── */
.job {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #d0c8bc;
}

.job:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.job-company {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
}

.job-period {
  font-size: 11px;
  color: var(--warm-gray);
  letter-spacing: 1px;
}

.job-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.job-role {
  font-size: 13px;
  color: var(--accent);
}

.job-location {
  font-size: 11px;
  color: var(--warm-gray);
}

.job-bullets {
  padding-left: 2ch;
  margin-bottom: 14px;
}

.job-bullets li {
  font-size: 13px;
  line-height: 1.7;
  color: #3a3a3a;
  margin-bottom: 4px;
  list-style: none;
}

.job-bullets li::before {
  content: '→ ';
  color: var(--warm-gray);
}

.stack-line {
  font-size: 11px;
}

.stack-label {
  color: var(--accent);
  margin-right: 8px;
  letter-spacing: 1px;
}

.stack-tag {
  display: inline-block;
  border: 1px solid #c8c0b5;
  padding: 1px 7px;
  margin: 2px 2px 2px 0;
  font-size: 10px;
  color: var(--warm-gray);
  letter-spacing: 0.5px;
}

/* ── Projects (§ 03) ─────────────────────────────── */
.slide-content--projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.project-card {
  border: 2px solid var(--near-black);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #d0c8bc;
  padding-bottom: 10px;
}

.project-name {
  font-weight: 700;
  font-size: 15px;
}

.project-type {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--warm-gray);
  text-transform: uppercase;
}

.project-desc {
  font-size: 12px;
  line-height: 1.8;
  color: #3a3a3a;
  flex: 1;
}

.project-tags {
  margin-top: auto;
}

@media (max-width: 600px) {
  .slide-content--projects {
    grid-template-columns: 1fr;
  }
}

/* ── Skills (§ 04) ───────────────────────────────── */
.skill-group {
  margin-bottom: 20px;
}

.skill-group-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cert-callout {
  margin-top: 8px;
  font-size: 12px;
  color: var(--warm-gray);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.cert-icon {
  color: var(--accent);
  margin-right: 6px;
}

/* ── About (§ 05) ────────────────────────────────── */
.about-para {
  font-size: 13px;
  line-height: 1.9;
  color: #3a3a3a;
  margin-bottom: 20px;
  max-width: 60ch;
}

.languages {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-item {
  font-size: 13px;
}

.lang-level {
  font-size: 11px;
  color: var(--warm-gray);
}

.lang-sep {
  color: var(--dim);
}

/* ── Contact (§ 06) ──────────────────────────────── */
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #d0c8bc;
  font-size: 15px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.contact-link:last-of-type {
  border-bottom: none;
}

.contact-link:hover {
  color: var(--accent);
}

.contact-arrow {
  color: var(--accent);
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.contact-link:hover .contact-arrow {
  transform: translateX(4px);
}

.contact-note {
  margin-top: 32px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--warm-gray);
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 480px) {
  .slide-inner {
    padding: 32px 0;
  }

  .nav-dots {
    right: 12px;
  }

  .job-header,
  .job-meta {
    flex-direction: column;
    gap: 2px;
  }

  .contact-link {
    font-size: 13px;
  }
}

/* ── Scrollbar hidden ────────────────────────────── */
html {
  scrollbar-width: none;
}
html::-webkit-scrollbar {
  display: none;
}
