/* ============================================
   TOKENS
   ============================================ */
:root {
  --paper: #F7F5F1;
  --paper-raised: #FFFFFF;
  --ink: #1A1A1F;
  --ink-soft: #46474D;
  --slate: #5B6470;
  --line: #D9D4C8;
  --accent: #E8552E;
  --accent-soft: #FBE2D8;
  --tan: #C9C2B4;

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --maxw: 1180px;
  --radius: 2px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Faint background grid - the "design system" texture */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(26,26,31,0.035) 1px, transparent 1px);
  background-size: calc((100% - 2 * var(--gutter)) / 12) 100%;
  background-position: center top;
  max-width: var(--maxw);
  margin: 0 auto;
  left: 0; right: 0;
}

.spec-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: lowercase;
  display: inline-block;
  margin-bottom: 14px;
}

section { position: relative; z-index: 1; }

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 241, 0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.mark {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink);
  position: relative;
  z-index: 2;
  display: inline-block;
}
.mark-dot { color: var(--accent); }

.topnav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.topnav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}
.topnav a:hover { color: var(--ink); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 8px 16px;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--accent) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(48px, 8vw, 90px);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(32px, 6vw, 72px);
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.hero-portrait {
  flex-shrink: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 180px;
}

.portrait-frame {
  width: 180px;
  height: 180px;
  border: 1px solid var(--ink);
  padding: 8px;
  background: var(--paper-raised);
  position: relative;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.portrait-frame::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

.portrait-spec {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--slate);
}

.portrait-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.portrait-spec-row span:first-child {
  color: var(--tan);
}

.portrait-spec-row span:last-child {
  color: var(--ink-soft);
  text-align: right;
}

.hero-name {
  font-size: clamp(56px, 10vw, 128px);
  line-height: 0.96;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--slate);
  margin-bottom: 28px;
}

.hero-tagline {
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--ink-soft);
  max-width: 640px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 48px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-value {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.meta-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  font-weight: 400;
  margin-left: 4px;
}

.meta-label {
  font-size: 13px;
  color: var(--slate);
  margin-top: 6px;
}

.meta-divider {
  width: 1px;
  height: 36px;
  background: var(--line);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-large {
  padding: 16px 32px;
  font-size: 15px;
}

.hero-coordinate {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tan);
  letter-spacing: 0.03em;
  display: none;
}

@media (min-width: 720px) {
  .hero-coordinate { display: block; }
}

/* ============================================
   SHARED SECTION HEAD
   ============================================ */
.section-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) var(--gutter) 0;
}

.section-head h2 {
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  max-width: 680px;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--line);
}

.about-body {
  padding: 32px var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 760px;
}

.about-lead {
  font-size: 19px;
  color: var(--ink);
  font-weight: 500;
}

.about-body p:not(.about-lead) {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ============================================
   TOKENS / PRINCIPLES SECTION
   ============================================ */
.tokens {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--line);
}

.tokens-intro {
  max-width: 600px;
  color: var(--slate);
  font-size: 15px;
  margin-top: 18px;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  margin: 40px var(--gutter) 0;
  border: 1px solid var(--line);
}

.token-card {
  background: var(--paper-raised);
  padding: 28px;
  display: flex;
  gap: 18px;
}

.token-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--swatch);
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}

.token-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 4px;
}

.token-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 10px;
}

.token-meta p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================
   EXPERIENCE TIMELINE
   ============================================ */
.experience {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--line);
}

.timeline {
  margin: 44px var(--gutter) 0;
  border-top: 1px solid var(--line);
}

.role {
  display: grid;
  grid-template-columns: 140px 24px 1fr;
  gap: 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.role-period {
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}

.role-years {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.role-duration {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  margin-top: 4px;
}

.role-line {
  position: relative;
  display: flex;
  justify-content: center;
}
.role-line::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--tan);
  margin-top: 5px;
}

.role-current .role-line::before {
  background: var(--accent);
  border-color: var(--accent);
}

.role-body { padding-right: 8px; }

.role-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.role-body h3 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 4px;
}

.role-company {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 12px;
}

.role-body p:not(.role-company) {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 620px;
  margin-bottom: 0;
}

.role-earlier { opacity: 0.86; }

/* ============================================
   EDUCATION
   ============================================ */
.education {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 96px) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.education-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.education-mark h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 8px;
}

.edu-school {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--slate);
}

.edu-detail {
  color: var(--ink-soft);
  max-width: 620px;
  font-size: 15px;
}

@media (min-width: 860px) {
  .education-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ============================================
   CLIENTS
   ============================================ */
.clients {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-bottom: clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--line);
}

.client-list {
  margin: 36px var(--gutter) 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.client-list li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  transition: color 0.15s ease, background 0.15s ease;
}

.client-list li:hover {
  color: var(--ink);
  background: var(--paper-raised);
}

@media (min-width: 640px) {
  .client-list { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  max-width: var(--maxw);
  margin: 0 auto;
}

.contact-inner {
  padding: clamp(64px, 11vw, 130px) var(--gutter);
  text-align: left;
}

.contact-inner h2 {
  font-size: clamp(34px, 6vw, 60px);
  margin-bottom: 18px;
}

.contact-inner p {
  max-width: 480px;
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 32px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 720px) {
  .hero-inner {
    flex-direction: column-reverse;
  }
  .hero-portrait {
    width: 120px;
    align-self: flex-start;
  }
  .portrait-frame {
    width: 120px;
    height: 120px;
    padding: 6px;
  }
  .portrait-spec {
    display: none;
  }

  .topnav {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px var(--gutter) 28px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
  }
  .topnav.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-cta { width: 100%; justify-content: center; }

  .br-desktop { display: none; }

  .role {
    grid-template-columns: 20px 1fr;
    gap: 4px 14px;
  }
  .role-period {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 6px;
  }
  .role-line { grid-row: 2; }
  .role-line::before { margin-top: 6px; }

  .token-grid { grid-template-columns: 1fr; margin-left: 16px; margin-right: 16px; }
  .client-list { margin-left: 16px; margin-right: 16px; }
}

@media (max-width: 480px) {
  .hero-meta { gap: 18px; }
  .meta-divider { display: none; }
}
