/* ============================================
   TOKENS
   ============================================ */
:root {
  --ink: #0B0E14;
  --ink-soft: #161B26;
  --paper: #F5F3ED;
  --paper-dim: #EBE8DF;
  --teal: #3D7A6B;
  --teal-bright: #4F9684;
  --terracotta: #C97B4A;
  --label-gray: #8B8579;
  --line: rgba(245, 243, 237, 0.12);
  --line-soft: rgba(11, 14, 20, 0.1);

  --font-display: 'Fraunces', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--teal-bright);
  margin-bottom: 14px;
}

.section-head { max-width: var(--container); margin: 0 auto 28px; padding: 0 32px; }
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  color: var(--paper);
}
.section-sub { color: var(--label-gray); font-size: 16px; margin-top: 12px; max-width: 560px; }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--teal-bright);
  border: 1px solid var(--teal-bright);
  padding: 4px 9px;
  border-radius: 3px;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--label-gray);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--paper); }
.nav-cta {
  color: var(--ink) !important;
  background: var(--teal-bright);
  padding: 7px 16px;
  border-radius: 3px;
}
.nav-cta:hover { background: var(--paper); }

/* ============================================
   HERO
   ============================================ */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 88px 32px 60px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal-bright);
  box-shadow: 0 0 0 0 rgba(79, 150, 132, 0.6);
  animation: pulse 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(79, 150, 132, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(79, 150, 132, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 150, 132, 0); }
}
.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--teal-bright);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 28px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--teal-bright);
  margin-bottom: 24px;
  line-height: 1.5;
}
.hero-role-sub { color: var(--label-gray); font-size: 15px; }

.hero-desc {
  max-width: 580px;
  font-size: 18px;
  line-height: 1.65;
  color: rgba(245, 243, 237, 0.78);
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 13px 26px;
  border-radius: 3px;
  display: inline-block;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--teal-bright);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: var(--paper); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--paper); }



/* ============================================
   SYSTEM TOPOLOGY
   ============================================ */
.system {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 32px 40px;
}

/* ============================================
   CAREER TIMELINE
   ============================================ */
.tl-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* Scrollable track so it works on narrow screens */
.tl-scroll {
  position: relative;
  overflow-x: auto;
  padding: 80px 0 80px;
  -webkit-overflow-scrolling: touch;
}

/* The horizontal line */
.tl-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
  transform: translateY(-50%);
}

/* Nodes row — evenly spaced */
.tl-nodes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  min-width: 640px;
}

/* Each node column */
.tl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 1;
  gap: 0;
  outline: none;
}

/* Labels above the line */
.tl-label-above {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
  min-height: 52px;
  justify-content: flex-end;
}

/* Labels below the line */
.tl-label-below {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  min-height: 52px;
  justify-content: flex-start;
}

.tl-label-title { opacity: 0.65; }
.tl-item:hover .tl-label-title,
.tl-item-active .tl-label-title { opacity: 1; }

.tl-company {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  text-align: center;
  line-height: 1.3;
  transition: color 0.2s ease;
}
.tl-item-active .tl-company { color: var(--teal-bright); }
.tl-item:hover .tl-company { color: var(--teal-bright); }

.tl-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--label-gray);
  text-align: center;
}

.tl-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--label-gray);
  text-align: center;
  line-height: 1.4;
}

.tl-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
  color: var(--teal-bright);
  border: 1px solid rgba(79,150,132,0.5);
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 2px;
}

/* The dot sitting on the line */
.tl-dot-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--label-gray);
  background: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}
.tl-item:hover .tl-dot {
  border-color: var(--teal-bright);
  transform: scale(1.2);
}
.tl-item-active .tl-dot {
  border-color: var(--teal-bright);
  background: var(--teal-bright);
  transform: scale(1.3);
  box-shadow: 0 0 0 4px rgba(79,150,132,0.2);
}

/* ── Detail panel below the timeline ── */
.tl-detail {
  margin-top: 8px;
  min-height: 180px;
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal-bright);
  border-radius: 6px;
  padding: 28px 32px;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tl-detail-head { margin-bottom: 20px; }

.tl-detail-company {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 6px;
}

.tl-detail-role {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tl-detail-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--label-gray);
}

.tl-detail-period {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal-bright);
}

.tl-bullets { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.tl-bullets li {
  display: flex;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(245,243,237,0.8);
  line-height: 1.6;
}
.tl-bullets li::before {
  content: '→';
  color: var(--teal-bright);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 32px 90px;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.service-card {
  background: var(--ink);
  padding: 32px 28px;
  transition: background 0.2s ease;
}
.service-card:hover { background: var(--ink-soft); }
.service-card-ai { background: rgba(201, 123, 74, 0.06); }
.service-card-ai:hover { background: rgba(201, 123, 74, 0.1); }

.service-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  color: var(--teal-bright);
  border: 1px solid rgba(79, 150, 132, 0.35);
  padding: 4px 9px;
  border-radius: 3px;
  margin-bottom: 18px;
}
.service-tag-accent {
  color: var(--terracotta);
  border-color: rgba(201, 123, 74, 0.4);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}
.service-card p {
  font-size: 14.5px;
  color: rgba(245,243,237,0.7);
  line-height: 1.6;
}

/* ============================================
   STACK
   ============================================ */
.stack {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 90px;
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}
.stack-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--label-gray);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.stack-col li {
  font-size: 14px;
  color: rgba(245,243,237,0.82);
  padding: 4px 0;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px 100px;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px 28px;
}
.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.project-card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.project-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--teal-bright);
  border: 1px solid rgba(79,150,132,0.4);
  padding: 3px 8px;
  border-radius: 3px;
}
.project-stack {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--terracotta);
  margin-bottom: 14px;
}
.project-card p { font-size: 14.5px; color: rgba(245,243,237,0.72); line-height: 1.6; }

/* ============================================
   CONTACT / FOOTER
   ============================================ */
.contact {
  background: var(--paper);
  color: var(--ink);
  padding: 100px 32px 0;
}
.contact-inner { max-width: var(--container); margin: 0 auto; }
.contact .eyebrow { color: var(--teal); }
.contact h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 52px);
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.contact-desc {
  font-size: 18px;
  color: rgba(11,14,20,0.65);
  max-width: 520px;
  margin-bottom: 44px;
}
.contact-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line-soft);
}
.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line-soft);
  transition: padding-left 0.2s ease;
}
.contact-link:nth-child(odd) { border-right: 1px solid var(--line-soft); padding-right: 24px; }
.contact-link:nth-child(even) { padding-left: 24px; }
a.contact-link:hover { padding-left: 12px; }
a.contact-link:nth-child(odd):hover { padding-right: 12px; padding-left: 4px; }
.contact-link-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--teal);
}
.contact-link-value { font-size: 14.5px; font-weight: 500; }

.contact-footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 4px 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(11,14,20,0.5);
}
.uptime-green { color: var(--teal); font-weight: 600; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .nav-links { gap: 18px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .service-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .contact-link:nth-child(odd) { border-right: none; padding-right: 4px; }
  .contact-link:nth-child(even) { padding-left: 4px; }
  .contact-footer { flex-direction: column; gap: 8px; }

  /* Timeline: hint at horizontal scroll on mobile */
  .tl-scroll { padding: 60px 0; }
  .tl-company { font-size: 13px; }
  .tl-title { font-size: 10px; }
  .tl-detail { padding: 20px; }
  .tl-detail-company { font-size: 20px; }
  .tl-bullets li { font-size: 13.5px; }
}

@media (max-width: 480px) {
  .hero { padding-top: 64px; }
  .section-head, .system, .services, .stack, .projects { padding-left: 20px; padding-right: 20px; }
  .nav-inner { padding: 16px 20px; }
}

/* Focus visibility */
a:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 3px; }
