/* ================================================== */

:root {
  --bg:       #f5f4f0;
  --surface:  #eeecea;
  --border:   #dddbd6;
  --text:     #1a1916;
  --text-2:   #6b6860;
  --text-3:   #a8a6a0;

  --business: #1d4ed8;
  --cs:       #c2410c;
  --econ:     #15803d;
  --epq:      #6d28d9;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans:  'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  'Geist', monospace;

  --max-w: 860px;
  --pad:   clamp(24px, 5vw, 80px);
}

[data-theme="dark"] {
  --bg:      #141412;
  --surface: #1e1d1a;
  --border:  #2e2c28;
  --text:    #f0ede8;
  --text-2:  #8a8880;
  --text-3:  #4a4845;
}

/* ================================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ================================================== */

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--pad) 40px;
}

/* ================================================== */

.theme-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}

.theme-btn:hover { color: var(--text); background: var(--border); }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ================================================== */

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding-bottom: 64px;
  align-items: start;
}

.name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--text);
}

.descriptor {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.bio {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 14px;
}
.bio:last-of-type { margin-bottom: 28px; }

.inline-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.inline-nav a {
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 0;
  margin-right: 20px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  padding-bottom: 1px;
}
.inline-nav a:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ================================================== */

.block {
  padding: 32px 0;
}


.block__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 36px;
}

.block__intro {
  font-size: 0.9375rem;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 40px;
  margin-top: -16px;
}

/* ================================================== */

.subject-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.subject-list li {
  background: var(--bg);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  transition: background 0.15s;
}
.subject-list li:hover { background: var(--surface); }

.subject-name {
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 400;
}
.subject-meta {
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ================================================== */

.paper-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.paper {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.paper:first-child { padding-top: 0; }
.paper:last-child  { border-bottom: none; padding-bottom: 0; }

.paper__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.paper__subject {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 4px;
}
.paper__subject--business { color: var(--business); background: color-mix(in srgb, var(--business) 10%, transparent); }
.paper__subject--cs       { color: var(--cs);       background: color-mix(in srgb, var(--cs) 10%, transparent); }
.paper__subject--econ     { color: var(--econ);     background: color-mix(in srgb, var(--econ) 10%, transparent); }
.paper__subject--epq      { color: var(--epq);      background: color-mix(in srgb, var(--epq) 10%, transparent); }

.paper__date {
  font-size: 0.75rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.paper__title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}

.paper__abstract {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
  max-width: 680px;
}

.paper__link {
  font-size: 0.8125rem;
  color:rgb(10,35,66);
  transition: color 0.15s;
}
.paper__link:hover { color: var(--text); }

.paper__unavailable_link {
  font-size: 0.8125rem;
  color:rgb(152, 157, 162);
}

/* ================================================== */

.ux-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ux-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.ux-item__image {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.ux-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.ux-item:hover .ux-item__image img { transform: scale(1.03); }

.ux-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.ux-item__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.ux-item__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ux-item__desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ================================================== */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.blog-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}

.blog-item__image {
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.blog-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-item:hover .blog-item__image img { transform: scale(1.03); }

.blog-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.blog-item__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

.blog-item__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-item__desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* === EXPERIENCE ============================================= */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.exp-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child  { border-bottom: none; padding-bottom: 0; }

.exp-item__date {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  padding-top: 3px;
  line-height: 1.5;
}

.exp-item__role {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-item__org {
  font-size: 0.8125rem;
  color: var(--text-3);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.exp-item__desc {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ================================================== */
.contact-list {
  display: flex;
  gap: 6px 28px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.contact-list a {
  font-size: 0.9rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.contact-list a:hover { color: var(--text); border-color: var(--text); }

.contact-location {
  font-size: 0.9rem;
  color: var(--text-3);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.field input,
.field textarea {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-3); }
.field input:focus,
.field textarea:focus { border-color: var(--text-2); }

.send-btn {
  align-self: flex-start;
  font-size: 0.875rem;
  color: var(--text);
  padding: 9px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.send-btn:hover { background: var(--border); }

.form-note {
  font-size: 0.75rem;
  color: var(--text-3);
}
.form-note a { border-bottom: 1px solid var(--border); }
.form-note code { font-family: var(--font-mono); }

/* ================================================== */

.footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--pad) 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.8125rem;
  color: var(--text-3);
  font-family: var(--font-mono);
}

.footer__top {
  font-size: 1rem;
  color: var(--text-3);
  transition: color 0.15s;
}
.footer__top:hover { color: var(--text); }

/* === FOCUS ================================================== */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 3px;
}

/* === RESPONSIVE ============================================= */
@media (max-width: 680px) {
  .page { padding-top: 48px; }

  .intro {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 48px;
  }

  .subject-list { grid-template-columns: 1fr; }

  .ux-item {
    grid-template-columns: 1fr;
  }
  .ux-item__image { aspect-ratio: 16/9; }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .block { padding: 48px 0; }
}
/* === PERSONAL STATEMENT ====================================== */
.statement-page .descriptor,
.statement-page .block__label,
.statement-page .statement-question__count,
.statement-page .statement-summary__label,
.statement-page .statement-action,
.statement-page .statement-limit-note {
  font-family: var(--font-sans);
}

.statement-page .intro {
  padding-bottom: 44px;
}

.statement-page .bio {
  max-width: 520px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-3);
}

.statement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
}

.statement-action {
  font-size: 0.875rem;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.statement-action:hover,
.statement-action:focus-visible {
  color: var(--text);
  border-color: var(--text);
}

.statement-overview {
  padding-top: 0;
  padding-bottom: 34px;
}

.statement-progress {
  width: 100%;
  height: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}

.statement-progress__bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--text);
  opacity: 0.82;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.statement-page.is-at-limit .statement-progress__bar {
  opacity: 1;
}

.statement-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.statement-summary__item {
  background: var(--bg);
  padding: 22px 20px;
}

.statement-summary__value {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}

.statement-summary__label {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-3);
}

.statement-editor {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-top: 20px;
}

.statement-question {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px 28px;
  align-items: start;
}

.statement-question__label {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text);
  padding-top: 6px;
}

.statement-box {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.72;
  padding: 16px 18px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.statement-box::placeholder {
  color: var(--text-3);
}

.statement-box:focus {
  border-color: var(--text-2);
  background: var(--bg);
}

.statement-question__count {
  grid-column: 2;
  justify-self: end;
  margin-top: -10px;
  font-size: 0.8rem;
  color: var(--text-3);
}

.statement-page.is-at-limit .descriptor,
.statement-page.is-at-limit .statement-summary__item:nth-child(2) .statement-summary__value,
.statement-page.is-at-limit .statement-summary__item:nth-child(2) .statement-summary__label {
  color: var(--text-2);
}

@media (max-width: 680px) {
  .statement-summary {
    grid-template-columns: 1fr;
  }

  .statement-question {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .statement-question__count {
    grid-column: 1;
  }

  .statement-box {
    min-height: 230px;
  }
}
