:root {
  --bg: #fff8ec;
  --ink: #141414;
  --muted: #5b5650;
  --card: #ffffff;
  --line: #141414;
  --hot: #ff5a36;
  --sun: #ffd23f;
  --mint: #3ddc97;
  --sky: #5ab0ff;
  --grape: #b388ff;
  --shadow: 5px 5px 0 var(--line);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130f; --ink: #f6f0e4; --muted: #b3aa9c; --card: #1f1c17; --line: #f6f0e4;
  }
}
:root[data-theme="dark"] {
  --bg: #15130f; --ink: #f6f0e4; --muted: #b3aa9c; --card: #1f1c17; --line: #f6f0e4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.6 "Space Grotesk", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.serif { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 2px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.logo { white-space: nowrap; font-weight: 700; font-size: 22px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo b { background: var(--hot); color: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 0 8px; transform: rotate(-4deg); display: inline-block; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0 0 0 auto; padding: 0; }
.nav ul a { text-decoration: none; font-weight: 600; font-size: 15px; padding: 6px 12px; border-radius: 999px; border: 2px solid transparent; }
.nav ul a:hover, .nav ul a[aria-current] { border-color: var(--line); background: var(--sun); color: #141414; }
.menu-btn { display: none; margin-left: auto; background: var(--sun); color: #141414; border: 2px solid var(--line); border-radius: 10px; font: 600 15px "Space Grotesk", sans-serif; padding: 6px 12px; }
.theme-btn { background: none; border: 2px solid var(--line); color: var(--ink); border-radius: 999px; width: 38px; height: 38px; font-size: 16px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav ul { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 2px solid var(--line); padding: 10px 16px 16px; }
  .nav ul.open { display: flex; }
  .theme-btn { margin-left: 0; }
}

/* type */
h1, h2, h3 { line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(44px, 8vw, 104px); font-weight: 700; }
h2 { font-size: clamp(32px, 5vw, 56px); font-weight: 700; }
h3 { font-size: 24px; }
.kicker { display: inline-block; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; background: var(--ink); color: var(--bg); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); max-width: 720px; }
.hl { background: linear-gradient(transparent 55%, var(--sun) 55%); color: inherit; padding: 0 2px; }
:root[data-theme="dark"] .hl, .hl { color: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { background: linear-gradient(transparent 55%, #8a6d00 55%); } }
:root[data-theme="dark"] .hl { background: linear-gradient(transparent 55%, #8a6d00 55%); }

section { padding-block: 72px; }
.page-head { padding-top: 64px; padding-bottom: 24px; }

/* hero */
.hero { padding-top: 56px; padding-bottom: 40px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 .rot { color: var(--hot); display: inline-block; }
.hero-photo { position: relative; }
.hero-photo img { border: 3px solid var(--line); border-radius: 28px; box-shadow: 10px 10px 0 var(--line); transform: rotate(2deg); aspect-ratio: 4/5; object-fit: cover; object-position: center 30%; width: 100%; }
.sticker { position: absolute; background: var(--sun); color: #141414; border: 2px solid #141414; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; box-shadow: 3px 3px 0 #141414; white-space: nowrap; }
.sticker.s1 { top: 18px; left: -24px; transform: rotate(-8deg); }
.sticker.s2 { bottom: 40px; right: -6px; background: var(--mint); transform: rotate(6deg); }
.sticker.s3 { bottom: -14px; left: 20px; background: var(--grape); transform: rotate(-3deg); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { max-width: 340px; margin: 0 auto; }
  .sticker.s1 { left: -6px; } .sticker.s2 { right: -6px; }
}

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; border: 2px solid var(--line); border-radius: 999px; padding: 12px 22px; background: var(--card); box-shadow: 4px 4px 0 var(--line); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.btn.primary { background: var(--hot); color: #fff; }

/* marquee */
.marquee { border-block: 2px solid var(--line); background: var(--ink); color: var(--bg); overflow: hidden; white-space: nowrap; padding: 14px 0; font-weight: 700; font-size: 22px; }
.marquee div { display: inline-block; animation: slide 40s linear infinite; }
.marquee span { margin: 0 22px; }
.marquee span:nth-child(3n+1)::after { content: " ✦"; color: var(--sun); margin-left: 22px; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee div { animation: none; } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.stat { border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--card); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 44px; line-height: 1; margin-bottom: 8px; }
.stat:nth-child(4n+1) b { color: var(--hot); } .stat:nth-child(4n+2) b { color: #1f8f5f; } .stat:nth-child(4n+3) b { color: #2f7bd8; } .stat:nth-child(4n+4) b { color: #7b4fd6; }
.stat span { color: var(--muted); font-size: 15px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--card); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; }
.card:hover { transform: translate(-3px, -3px) rotate(-.4deg); box-shadow: 9px 9px 0 var(--line); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0 0 14px; color: var(--muted); font-size: 16px; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }
.card .emoji { font-size: 34px; margin-bottom: 10px; }
.card.c-hot { background: var(--hot); color: #fff; } .card.c-hot p { color: #fff3ee; }
.card.c-sun { background: var(--sun); color: #141414; } .card.c-sun p { color: #3a3320; }
.card.c-mint { background: var(--mint); color: #141414; } .card.c-mint p { color: #12382a; }
.card.c-sky { background: var(--sky); color: #141414; } .card.c-sky p { color: #10243b; }
.card.c-grape { background: var(--grape); color: #141414; } .card.c-grape p { color: #2a1a47; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; padding: 0; list-style: none; }
.tags li { font-size: 13px; font-weight: 600; border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 10px; }
.card a.cover { position: absolute; inset: 0; z-index: 1; }
.card a:not(.cover) { position: relative; z-index: 2; }

/* feature project */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border: 2px solid var(--line); border-radius: 26px; padding: 32px; background: var(--card); box-shadow: 8px 8px 0 var(--line); margin-bottom: 28px; }
.feature .num { font-size: 15px; font-weight: 700; color: var(--hot); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; padding: 22px; } }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1.5px solid color-mix(in srgb, var(--line) 25%, transparent); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr.win td { font-weight: 700; background: color-mix(in srgb, var(--mint) 30%, transparent); }
.table-scroll { overflow-x: auto; }

/* timeline */
.timeline { border-left: 3px solid var(--line); margin-left: 10px; padding-left: 30px; }
.job { position: relative; margin-bottom: 44px; }
.job::before { content: ""; position: absolute; left: -41px; top: 8px; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: var(--hot); }
.job:nth-child(2)::before { background: var(--sun); } .job:nth-child(3)::before { background: var(--mint); } .job:nth-child(4)::before { background: var(--sky); }
.job .when { font-weight: 700; color: var(--muted); font-size: 15px; }
.job ul { padding-left: 20px; } .job li { margin-bottom: 8px; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.skills div { border: 2px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--card); font-size: 15px; }
.skills b { display: block; margin-bottom: 4px; }

/* repo list */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 24px; }
.filters button { font: 600 14px "Space Grotesk", sans-serif; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.repo { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 16px 4px; border-bottom: 1.5px solid color-mix(in srgb, var(--line) 25%, transparent); text-decoration: none; }
.repo[hidden] { display: none; }
.repo:hover { background: color-mix(in srgb, var(--sun) 25%, transparent); }
.repo b { font-size: 19px; }
.repo .meta { color: var(--muted); font-size: 14px; text-align: right; white-space: nowrap; }
.repo .desc { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.lang { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; border: 1px solid var(--line); }

/* writing */
.post-list a { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 22px 0; border-bottom: 2px solid var(--line); text-decoration: none; }
.post-list a:hover h3 { color: var(--hot); }
.post-list time { color: var(--muted); font-weight: 600; font-size: 15px; padding-top: 4px; }
.post-list p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 600px) { .post-list a { grid-template-columns: 1fr; gap: 4px; } }
article.post { max-width: 760px; margin: 0 auto; padding-top: 48px; padding-bottom: 80px; }
article.post h1 { font-size: clamp(38px, 6vw, 64px); }
article.post figure { margin: 28px 0; }
article.post figure img { border: 2px solid var(--line); border-radius: 14px; }
article.post figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }
article.post h2 { font-size: 32px; margin-top: 1.4em; } article.post h3 { margin-top: 1.4em; }
article.post table { margin: 20px 0; }
article.post blockquote { border-left: 5px solid var(--hot); margin: 24px 0; padding: 4px 20px; font-size: 20px; }
.note { border: 2px dashed var(--line); border-radius: 14px; padding: 14px 18px; font-size: 15px; color: var(--muted); margin-bottom: 28px; }

/* honey & yash */
.couple { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.polaroids { position: relative; height: 460px; }
.polaroids figure { position: absolute; margin: 0; background: #fff; padding: 12px 12px 40px; border: 2px solid #141414; box-shadow: 6px 6px 0 #141414; width: 62%; }
.polaroids figure:nth-child(1) { left: 0; top: 30px; transform: rotate(-6deg); z-index: 2; }
.polaroids figure:nth-child(2) { right: 0; top: 0; transform: rotate(5deg); }
.polaroids figure:nth-child(3) { left: 22%; bottom: 0; transform: rotate(-1deg); z-index: 3; }
.polaroids figcaption { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; color: #141414; font-family: "Instrument Serif", serif; font-style: italic; font-size: 20px; }
.polaroids img { aspect-ratio: 1; object-fit: cover; }
@media (max-width: 860px) { .couple { grid-template-columns: 1fr; } .polaroids { height: 380px; } }
.video { position: relative; aspect-ratio: 16/9; border: 3px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 8px 8px 0 var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* contact + footer */
.contact { background: var(--hot); color: #fff; border-top: 2px solid var(--line); }
.contact h2 { color: #fff; }
.contact .btn { color: #141414; background: #fff; }
.contact .btn.dark { background: #141414; color: #fff; }
footer { border-top: 2px solid var(--line); padding: 26px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* resume */
.resume { max-width: 900px; margin: 0 auto; padding-top: 40px; padding-bottom: 80px; }
.resume h1 { font-size: 56px; margin-bottom: 4px; }
.resume h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 3px solid var(--line); padding-bottom: 4px; margin-top: 36px; }
.resume .row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-weight: 700; margin-top: 18px; }
.resume ul { padding-left: 20px; margin: 6px 0; } .resume li { margin-bottom: 6px; font-size: 16px; }
.resume dl { display: grid; grid-template-columns: 190px 1fr; gap: 6px 16px; font-size: 16px; }
.resume dt { font-weight: 700; }
@media (max-width: 600px) { .resume dl { grid-template-columns: 1fr; } .resume dd { margin: 0 0 8px; } }
@media print {
  @page { margin: 14mm 14mm; }
  .nav, footer, .no-print, .contact { display: none !important; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.4; }
  .resume { padding: 0; max-width: none; }
  .resume h1 { font-size: 26pt; }
  .resume h2 { font-size: 12pt; margin-top: 14pt; border-color: #000; }
  .resume li, .resume dl { font-size: 10pt; }
  .resume .row { margin-top: 8pt; }
  a { text-decoration: none; }
}

