/* Extracted from index.html inline <style> — new design */

:root[data-theme="dark"] {
      --bg: #0e0e0c;
      --bg2: #181714;
      --bg3: #1f1d18;
      --border: #2a2822;
      --border-soft: #221f1a;
      --text: #d4cdb8;
      --hi: #f5ecdc;
      --dim: #6b6356;
      --dim2: #8c8270;
      --acc: #e89373;
      --acc-hover: #f0a684;
      --acc2: #87a3d3;
      --acc3: #95b889;
      --quote-bg: #181714;
      --photo-bg: #2a2620;
    }
    :root[data-theme="light"] {
      --bg: #fdfaf3;
      --bg2: #f4ede0;
      --bg3: #efe7d6;
      --border: #d8cfbe;
      --border-soft: #ebe4d4;
      --text: #2c2823;
      --hi: #14110d;
      --dim: #8a7d6d;
      --dim2: #6b5f52;
      --acc: #b54f1c;
      --acc-hover: #8a3e2c;
      --acc2: #4b6fa5;
      --acc3: #5c8050;
      --quote-bg: #f4ede0;
      --photo-bg: #ebe4d4;
    }

    * { box-sizing: border-box; }

    html { -webkit-text-size-adjust: 100%; }

    body {
      margin: 0;
      font-family: "JetBrains Mono", "Fira Code", monospace;
      background: var(--bg);
      color: var(--text);
      font-size: 13px;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      transition: background 0.2s ease, color 0.2s ease;
    }

    .sans { font-family: "Inter", system-ui, sans-serif; }

    a { color: var(--acc); text-decoration: none; }
    a:hover { color: var(--acc-hover); text-decoration: underline; text-underline-offset: 3px; }

    ::selection { background: var(--acc); color: var(--bg); }

    .container {
      max-width: 780px;
      margin: 0 auto;
      padding: 56px 36px 56px;
    }

    /* Theme toggle */
    .theme-toggle {
      position: fixed;
      top: 18px;
      right: 18px;
      width: 36px; height: 36px;
      border-radius: 4px;
      border: 1px solid var(--border);
      background: var(--bg2);
      color: var(--text);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-family: inherit;
      z-index: 100;
      transition: all 0.15s ease;
    }
    .theme-toggle:hover { border-color: var(--acc); color: var(--acc); }
    .theme-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    [data-theme="dark"] .theme-icon-light { display: none; }
    [data-theme="light"] .theme-icon-dark { display: none; }

    /* HERO — asymmetric, photo on left as a "stamp" */
    .hero {
      display: grid;
      grid-template-columns: 170px 1fr;
      gap: 28px;
      padding: 0 0 32px;
      border-bottom: 1px dashed var(--border);
      margin-bottom: 32px;
      align-items: center;
    }
    .photo-frame {
      position: relative;
      width: 170px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .photo {
      position: relative;
      display: block;
      width: 170px;
      height: 170px;
      object-fit: cover;
      border-radius: 3px;
      filter: grayscale(0.35) contrast(1.05);
      background: var(--photo-bg);
      transition: filter 0.2s ease;
    }
    .photo-cap {
      font-family: "JetBrains Mono", monospace;
      font-size: 10px;
      color: var(--dim);
      letter-spacing: 0.04em;
      line-height: 1.5;
      padding-left: 2px;
    }
    .photo-cap .arrow { color: var(--acc); margin-right: 4px; }
    .photo-frame:hover .photo { filter: grayscale(0) contrast(1); }
    .hero-info { min-width: 0; }
    .hero-meta {
      font-size: 10.5px;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color: var(--dim);
      margin: 0 0 10px;
    }
    .hero-meta .k { color: var(--acc); }
    h1.name {
      font-family: "JetBrains Mono", monospace;
      font-size: 38px;
      line-height: 1.05;
      letter-spacing: -0.02em;
      font-weight: 700;
      color: var(--hi);
      margin: 0 0 6px;
    }
    .name .dot { color: var(--acc); }
    .hangul {
      font-family: "Inter", sans-serif;
      font-size: 13px;
      color: var(--dim2);
      margin-left: 12px;
      font-weight: 400;
      vertical-align: 8px;
      letter-spacing: 0;
    }
    .role {
      font-size: 12.5px;
      color: var(--dim2);
      margin: 6px 0 0;
      line-height: 1.6;
    }
    .role .k { color: var(--acc2); }
    .role .sep { color: var(--dim); margin: 0 6px; }
    .role a { color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 1px; }
    .role a:hover { color: var(--acc); border-color: var(--acc); text-decoration: none; }

    .quote {
      margin: 18px 0 0;
      max-width: 540px;
      font-size: 13px;
      color: var(--text);
      line-height: 1.7;
      padding: 12px 16px;
      background: var(--quote-bg);
      border-left: 2px solid var(--acc);
      border-radius: 0 2px 2px 0;
    }

    .links {
      list-style: none;
      padding: 0;
      margin: 18px 0 0;
      display: flex;
      flex-wrap: wrap;
      gap: 4px 18px;
      font-size: 11.5px;
    }
    .links a { color: var(--acc); }
    .links a::before { content: "→ "; color: var(--dim); }

    /* Section */
    .section { margin: 36px 0 0; }
    .section h2 {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 11px;
      color: var(--dim2);
      letter-spacing: 0.06em;
      margin: 0 0 14px;
      font-weight: 400;
    }
    .section h2 .num { color: var(--acc); }
    .section h2 .label { color: var(--hi); font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; font-size: 10.5px; }
    .section h2 .sec-link {
      font-family: "JetBrains Mono", monospace;
      font-size: 9.5px;
      letter-spacing: 0.04em;
      color: var(--dim);
      border-bottom: 1px dotted var(--border);
      padding-bottom: 1px;
      transition: color 0.15s ease, border-color 0.15s ease;
    }
    .section h2 .sec-link:hover {
      color: var(--acc);
      border-bottom-color: var(--acc);
      text-decoration: none;
    }
    .section h2 .rule { flex: 1; border-top: 1px dashed var(--border); }

    /* About */
    .about { font-size: 13px; line-height: 1.75; max-width: 680px; }
    .about p { margin: 0 0 10px; }
    .about .hi { color: var(--hi); }

    /* Interests */
    .tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .tags span {
      font-size: 11.5px;
      color: var(--hi);
      border: 1px solid var(--border);
      padding: 3px 10px;
      border-radius: 2px;
      background: var(--bg2);
    }

    /* News */
    .news { font-size: 12.5px; line-height: 1.7; padding: 0; margin: 0; list-style: none; }
    .news li {
      display: grid;
      grid-template-columns: 90px 1fr;
      gap: 18px;
      padding: 5px 10px;
      border-radius: 2px;
      align-items: baseline;
    }
    .news li:hover { background: var(--bg2); }
    .news .ts { color: var(--dim); }
    .news .msg { color: var(--text); }
    .news .msg strong { color: var(--hi); font-weight: 600; }
    .news .new {
      display: inline-block;
      font-size: 9.5px;
      font-weight: 700;
      letter-spacing: 0.1em;
      background: rgba(232, 147, 115, 0.18);
      color: var(--acc);
      padding: 2px 6px;
      border-radius: 2px;
      margin-right: 8px;
      vertical-align: 1px;
      text-transform: uppercase;
    }
    [data-theme="light"] .news .new { background: rgba(181, 79, 28, 0.14); }

    /* Publications */
    .pubs-head {
      display: flex;
      justify-content: flex-end;
      gap: 0;
      margin-bottom: 14px;
      font-family: "JetBrains Mono", monospace;
      font-size: 10px;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }
    .pubs-head button {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--dim);
      padding: 5px 10px;
      cursor: pointer;
      font-family: inherit;
      font-size: inherit;
      letter-spacing: inherit;
      text-transform: inherit;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    .pubs-head button:first-child { border-right: none; border-radius: 3px 0 0 3px; }
    .pubs-head button:last-child { border-radius: 0 3px 3px 0; }
    .pubs-head button:hover { color: var(--text); }
    .pubs-head button.active {
      color: var(--acc);
      border-color: var(--acc);
      background: rgba(232, 147, 115, 0.06);
      z-index: 1;
    }
    [data-theme="light"] .pubs-head button.active { background: rgba(181, 79, 28, 0.08); }

    /* List view = horizontal slider of big cards */
    .pubs-slider {
      position: relative;
    }
    .pubs-track {
      display: flex;
      gap: 14px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      scroll-behavior: smooth;
      padding: 2px 2px 12px;
      margin: 0 -2px;
      scrollbar-width: thin;
      scrollbar-color: var(--border) transparent;
    }
    .pubs-track::-webkit-scrollbar { height: 6px; }
    .pubs-track::-webkit-scrollbar-track { background: transparent; }
    .pubs-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    .pubs-track::-webkit-scrollbar-thumb:hover { background: var(--dim); }
    .pub {
      flex: 0 0 calc(50% - 7px);
      min-width: 0;
      scroll-snap-align: start;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 3px;
      padding: 16px;
      transition: border-color 0.15s, transform 0.15s;
      box-sizing: border-box;
    }
    .pub:hover { border-color: var(--acc); transform: translateY(-1px); }
    .pub .v { font-size: 10.5px; letter-spacing: 0.08em; color: var(--hi); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; }
    .pub.icml .v { color: var(--acc); }
    .pub.emnlp .v { color: var(--acc2); }
    .pub.sigmod .v { color: var(--acc3); }
    .pub .v .sub { color: var(--dim2); font-weight: 400; text-transform: none; letter-spacing: 0.02em; margin-left: 6px; }
    .pub h3 {
      font-family: "Inter", sans-serif;
      font-size: 14.5px;
      font-weight: 600;
      line-height: 1.3;
      margin: 0 0 6px;
      color: var(--hi);
      letter-spacing: -0.005em;
    }
    .pub .a { font-size: 11.5px; color: var(--dim2); margin: 0 0 8px; line-height: 1.5; font-family: "Inter", sans-serif; }
    .pub .a .me { color: var(--hi); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .pub .abs { font-size: 12px; color: var(--dim2); line-height: 1.55; margin: 0 0 10px; font-family: "Inter", sans-serif; }
    .pub .links-row { display: flex; gap: 12px; font-size: 10.5px; flex-wrap: wrap; }
    .pub .thumb {
      width: 100%;
      height: 96px;
      object-fit: cover;
      border-radius: 2px;
      margin-bottom: 12px;
      opacity: 0.9;
      filter: grayscale(0.15);
      transition: filter 0.15s, opacity 0.15s;
    }
    .pub:hover .thumb { opacity: 1; filter: grayscale(0); }

    .slider-nav {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 10px;
      font-family: "JetBrains Mono", monospace;
      font-size: 10px;
      color: var(--dim);
      letter-spacing: 0.05em;
    }
    .slider-nav .pos {
      display: flex;
      gap: 6px;
    }
    .slider-nav .dot {
      width: 16px;
      height: 2px;
      background: var(--border);
      transition: background 0.15s;
      cursor: pointer;
      border: none;
      padding: 0;
      display: block;
    }
    .slider-nav .dot.active { background: var(--acc); }
    .slider-nav .arrows { display: flex; gap: 4px; }
    .slider-nav .arrow-btn {
      background: transparent;
      border: 1px solid var(--border);
      color: var(--dim);
      width: 24px;
      height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      border-radius: 3px;
      font-family: inherit;
      font-size: 12px;
      transition: color 0.15s, border-color 0.15s;
    }
    .slider-nav .arrow-btn:hover:not(:disabled) { color: var(--acc); border-color: var(--acc); }
    .slider-nav .arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }

    /* Index view */
    .pubs-idx { display: none; }
    .pubs-idx .yr-group { margin-bottom: 14px; }
    .pubs-idx .yr-group:last-child { margin-bottom: 0; }
    .pubs-idx .yr {
      font-family: "JetBrains Mono", monospace;
      font-size: 11px;
      letter-spacing: 0.1em;
      color: var(--acc);
      padding: 6px 0;
      border-bottom: 1px solid var(--border);
      margin-bottom: 4px;
      display: flex;
      align-items: baseline;
      gap: 10px;
    }
    .pubs-idx .yr .count { color: var(--dim); font-size: 10px; }
    .pubs-idx ul { padding: 0; margin: 0; list-style: none; }
    .pubs-idx li {
      display: grid;
      grid-template-columns: 88px 1fr auto;
      gap: 14px;
      padding: 7px 8px;
      align-items: baseline;
      border-bottom: 1px dotted transparent;
    }
    .pubs-idx li:hover { background: var(--bg2); }
    .pubs-idx .v {
      font-family: "JetBrains Mono", monospace;
      font-size: 10px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 600;
      color: var(--acc3);
    }
    .pubs-idx li.icml .v { color: var(--acc); }
    .pubs-idx li.emnlp .v { color: var(--acc2); }
    .pubs-idx li.sigmod .v { color: var(--acc3); }
    .pubs-idx .ti {
      font-family: "Inter", sans-serif;
      color: var(--hi);
      font-size: 12.5px;
      font-weight: 500;
      line-height: 1.4;
    }
    .pubs-idx .au {
      font-family: "Inter", sans-serif;
      font-size: 10.5px;
      color: var(--dim);
      line-height: 1.4;
      display: block;
      margin-top: 2px;
    }
    .pubs-idx .au .me { color: var(--dim2); font-weight: 600; }
    .pubs-idx .lnk {
      display: flex;
      gap: 10px;
      font-size: 10px;
      align-self: center;
    }

    /* View switching */
    .pubs-wrap[data-view="list"] .pubs-slider { display: block; }
    .pubs-wrap[data-view="list"] .pubs-idx { display: none; }
    .pubs-wrap[data-view="index"] .pubs-slider { display: none; }
    .pubs-wrap[data-view="index"] .pubs-idx { display: block; }

    /* Projects */
    .proj { font-size: 12.5px; }
    .proj .row {
      display: grid;
      grid-template-columns: 28px 280px 1fr;
      gap: 14px;
      padding: 11px 10px;
      border-bottom: 1px dotted var(--border);
      align-items: baseline;
    }
    .proj .t { line-height: 1.4; }
    .proj .row:hover { background: var(--bg2); }
    .proj .ico { font-size: 14px; }
    .proj .t { font-family: "Inter", sans-serif; color: var(--hi); font-weight: 600; font-size: 13px; }
    .proj .b { color: var(--dim2); font-family: "Inter", sans-serif; font-size: 12px; line-height: 1.55; }

    /* Posts */
    .posts { padding: 0; margin: 0; list-style: none; }
    .posts li { border-bottom: 1px dotted var(--border); }
    .posts li:last-child { border: none; }
    .posts a {
      display: grid;
      grid-template-columns: 110px 1fr auto;
      gap: 14px;
      padding: 10px 10px;
      align-items: baseline;
      color: inherit;
      text-decoration: none;
    }
    .posts a:hover { background: var(--bg2); text-decoration: none; }
    .posts .cat { font-size: 9.5px; letter-spacing: 0.12em; color: var(--acc2); text-transform: uppercase; }
    .posts .pt { font-family: "Inter", sans-serif; color: var(--hi); font-size: 13px; font-weight: 500; }
    .posts .pd { font-size: 10.5px; color: var(--dim); }

    /* CV grids */
    .cv {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 24px 36px;
      font-size: 12px;
    }
    .cv h4 {
      font-size: 10.5px;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--acc);
      margin: 0 0 10px;
      font-weight: 600;
    }
    .cv ul { list-style: none; padding: 0; margin: 0; }
    .cv li {
      display: grid;
      grid-template-columns: 76px 1fr;
      gap: 12px;
      padding: 4px 0;
      align-items: baseline;
      line-height: 1.55;
    }
    .cv .yr { color: var(--dim); font-size: 11.5px; }
    .cv .t { color: var(--hi); font-family: "Inter", sans-serif; font-weight: 500; font-size: 12.5px; }
    .cv .sub { color: var(--dim2); display: block; font-family: "Inter", sans-serif; font-size: 11.5px; }

    /* Honors single column */
    .honors-list { font-size: 12px; padding: 0; margin: 0; list-style: none; }
    .honors-list li {
      display: grid;
      grid-template-columns: 76px 1fr;
      gap: 12px;
      padding: 4px 0;
      align-items: baseline;
      line-height: 1.55;
    }
    .honors-list .yr { color: var(--dim); font-size: 11.5px; }
    .honors-list .t { color: var(--text); font-family: "Inter", sans-serif; font-size: 12px; }

    /* Teaching */
    .teaching { padding: 0; margin: 0; list-style: none; font-family: "Inter", sans-serif; font-size: 12.5px; }
    .teaching li { padding: 4px 0; line-height: 1.55; color: var(--text); }
    .teaching strong { color: var(--hi); font-weight: 600; }
    .teaching .when { color: var(--dim); font-family: "JetBrains Mono", monospace; font-size: 11px; margin-left: 4px; }

    /* Footer */
    .foot {
      margin-top: 48px;
      padding-top: 14px;
      border-top: 1px dashed var(--border);
      font-size: 10.5px;
      color: var(--dim);
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }

    /* Responsive */
    @media (max-width: 680px) {
      .container { padding: 36px 20px 36px; }
      .hero { grid-template-columns: 110px 1fr; gap: 18px; align-items: start; }
      .photo-frame { width: 110px; }
      .photo { width: 110px; height: 110px; min-height: 0; }
      h1.name { font-size: 28px; }
      .pub { flex: 0 0 calc(100% - 4px); }
      .pubs-idx li { grid-template-columns: 1fr; gap: 2px; padding: 10px 8px; border-bottom: 1px dotted var(--border); }
      .pubs-idx .lnk { margin-top: 4px; }
      .cv { grid-template-columns: 1fr; }
      .proj .row { grid-template-columns: 24px 1fr; gap: 8px; }
      .proj .b { grid-column: 1 / -1; padding-left: 32px; }
      .posts a { grid-template-columns: 1fr; gap: 2px; }
    }
