/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --bg: #0d1110;
  --surface: #131916;
  --surface-2: #192019;
  --border: rgba(232, 224, 208, 0.07);
  --border-strong: rgba(232, 224, 208, 0.13);
  --text: #e8e0d0;
  --text-soft: #a09890;
  --text-muted: #5a5650;
  --accent: #b87c3e;
  --accent-dim: rgba(184, 124, 62, 0.1);
  --accent-glow: rgba(184, 124, 62, 0.15);

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', 'Courier New', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--header-offset, 5.5rem);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(184, 124, 62, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(77, 124, 106, 0.04) 0%, transparent 50%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

/* =============================================
   GRAIN OVERLAY
   ============================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.1em;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.brand:hover {
  border-color: var(--accent);
  color: var(--accent);
}

nav {
  display: flex;
  gap: 0.2rem;
}

nav a {
  text-decoration: none;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: var(--text);
  background: var(--surface);
}

/* =============================================
   LAYOUT
   ============================================= */
.main-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
}

/* =============================================
   HERO
   ============================================= */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.68fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(4rem, 11vw, 9.5rem);
  font-weight: 300;
  line-height: 0.91;
  letter-spacing: -0.02em;
  animation: fadeUp 0.9s var(--ease) 0.2s both;
}

.name-first {
  display: block;
  color: var(--text);
}

.name-last {
  display: block;
  font-style: italic;
  color: var(--accent);
}

.hero-role {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.8s var(--ease) 0.35s both;
}

.hero-copy {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 52ch;
  margin-top: 1rem;
  line-height: 1.7;
  animation: fadeUp 0.8s var(--ease) 0.45s both;
}

.cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: fadeUp 0.8s var(--ease) 0.55s both;
}

.btn {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.22s var(--ease-out), color 0.22s var(--ease-out), border-color 0.22s;
}

.btn-primary {
  background: var(--accent);
  color: #0d1110;
  border-color: var(--accent);
  font-weight: 400;
}

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

.btn-ghost {
  color: var(--text-soft);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--text-soft);
  background: var(--surface);
}

/* Hero Photo */
.hero-photo {
  margin: 0;
  position: relative;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 8px var(--accent-dim),
    0 40px 80px rgba(0, 0, 0, 0.5);
  animation: fadeIn 1.1s var(--ease) 0.3s both;
  aspect-ratio: 2 / 3;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(13, 17, 16, 0.45));
  pointer-events: none;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}


/* =============================================
   SECTIONS SHARED
   ============================================= */
.about,
.focus,
.research,
.timeline,
.contact {
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  scroll-margin-top: calc(var(--header-offset, 5.5rem) + 0.4rem);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.2rem);
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--border);
}

.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.12;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* =============================================
   ABOUT
   ============================================= */
.about-body {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: start;
}

.about-body p {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 1.03rem;
  margin: 0;
  padding-top: 0.35rem;
}

/* =============================================
   FOCUS
   ============================================= */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.focus-card {
  padding: 1.5rem 1.3rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.focus-card::before {
  content: attr(data-num);
  position: absolute;
  top: -0.6rem;
  right: 0.8rem;
  font-family: var(--serif);
  font-size: 4.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--border-strong);
  line-height: 1;
  pointer-events: none;
  transition: color 0.25s;
  user-select: none;
}

.focus-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.focus-card:hover::before {
  color: var(--accent-dim);
}

.focus-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  position: relative;
  line-height: 1.3;
}

.focus-card p {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0;
  position: relative;
}

/* =============================================
   RESEARCH
   ============================================= */
.research-list {
  display: grid;
  gap: 0;
}

.research-item {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.research-item:first-child {
  padding-top: 0;
}

.research-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.research-item:hover .r-num {
  color: var(--accent);
}

.r-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 0.2rem;
  transition: color 0.2s;
  flex-shrink: 0;
}

.r-body strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

.r-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: block;
}

/* Tool card */
.tool-card {
  display: block;
  text-decoration: none;
  margin-top: 1.25rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--accent);
  border-radius: 0.6rem;
  background: var(--accent-dim);
  transition: background 0.22s var(--ease-out), border-color 0.22s;
}

.tool-card:hover {
  background: var(--accent-glow);
  border-color: color-mix(in srgb, var(--accent) 80%, white 20%);
}

.tool-card-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.tool-card-left {
  flex: 1;
  min-width: 0;
}

.tool-card-right {
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.22s var(--ease);
}

.tool-card:hover .tool-card-right {
  transform: translateX(4px);
}

.tool-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(184, 124, 62, 0.12);
  border: 1px solid rgba(184, 124, 62, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.65rem;
}

.tool-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.tool-desc {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}


/* =============================================
   TIMELINE
   ============================================= */
.timeline-list {
  display: grid;
  gap: 0;
}

.timeline-item {
  padding: 1.5rem 0 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.85rem;
  width: 1px;
  height: calc(100% - 1.85rem);
  background: var(--border-strong);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: -3.5px;
  top: 1.8rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.timeline-item:first-child {
  padding-top: 0;
}

.timeline-item:first-child::after {
  top: 0.35rem;
}

.timeline-item:first-child::before {
  top: 0.35rem;
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-item:last-child::before {
  display: none;
}

.t-period {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  display: block;
}

.t-role {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.t-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-heading {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  margin-top: 0.2rem;
}

.contact-sub {
  color: var(--text-soft);
  max-width: 54ch;
  margin-top: 0.8rem;
  line-height: 1.7;
}

.contact-links {
  margin-top: 2rem;
}

.contact-form {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
  max-width: 42rem;
}

.contact-form label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  border-radius: 0.65rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.9rem 1rem;
  font-family: var(--sans);
  line-height: 1.5;
}

.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.contact-form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.contact-helper {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.9rem 1.85rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  transition: background 0.22s var(--ease-out), color 0.22s;
}

.contact-cta:hover {
  background: var(--accent);
  color: #0d1110;
}

.contact-cta svg {
  transition: transform 0.22s var(--ease);
}

.contact-cta:hover svg {
  transform: translateX(4px);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  padding: 3rem 1rem 3.5rem;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--text-soft);
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   HERO ENTRANCE ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 760px) {
  .site-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.85rem 1.2rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem;
  }

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

  .hero-photo {
    max-width: 22rem;
    margin: 0 auto;
    order: -1;
  }

  .hero-name {
    font-size: clamp(3.5rem, 18vw, 6rem);
  }

  .about-body {
    grid-template-columns: 1fr;
  }

  .research-item {
    grid-template-columns: 2.5rem 1fr;
    gap: 0.9rem;
  }
}

@media (max-width: 480px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }
}
