/* Cream light mode; dark mode is pure neutral black with only the text in cream. */
:root {
  --bg: #f4eee2;
  --text: #1a1813;
  --muted: #6b6458;
  --line: #e0d8c7;
  --icon-bg: #ebe3d2;
  --underline: #b3a993;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b;
    --text: #f1eadc;
    --muted: #9e9e9e;
    --line: #232323;
    --icon-bg: #171717;
    --underline: #4f4f4f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --text: #f1eadc;
  --muted: #9e9e9e;
  --line: #232323;
  --icon-bg: #171717;
  --underline: #4f4f4f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.7 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: inherit; }
strong { font-weight: 700; }
::selection { background: var(--text); color: var(--bg); }

/* Layout: one narrow centered column */
.nav, main, .footer { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
/* Keep the footer at the bottom of the window even when a page is short */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
main { flex: 1 0 auto; }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 20px; text-decoration: none; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--underline);
  text-underline-offset: 6px; text-decoration-thickness: 1.5px;
}
.theme-toggle {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* Intro */
.intro { padding: 72px 0 8px; }
.avatar {
  position: relative; display: grid; place-items: center;
  width: 104px; height: 104px; margin-bottom: 28px; border-radius: 50%;
  background: var(--icon-bg); color: var(--text); font-size: 34px; font-weight: 700; overflow: hidden;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.intro p { font-size: 17px; }
.intro-links { margin-top: 22px !important; color: var(--muted); }
.intro-links a, .more a {
  color: var(--text); text-decoration: underline; text-decoration-color: var(--underline);
  text-underline-offset: 4px; text-decoration-thickness: 1.5px;
}
.intro-links a:hover, .more a:hover { text-decoration-color: var(--text); }

/* Sections */
section { padding-top: 56px; }
h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; letter-spacing: .01em; }


/* List rows */
.list { margin: 0; padding: 0; list-style: none; }
.list > li { border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 0; text-decoration: none; }
a.row:hover .row-title { text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 4px; }
.icon {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; background: var(--icon-bg); color: var(--text); font-weight: 700; font-size: 16px;
}
.icon-logo { background: transparent; overflow: hidden; }
.icon-logo img { width: 100%; height: 100%; object-fit: contain; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; transition: color .15s; }
.row-sub { font-size: 14px; color: var(--muted); line-height: 1.5; }
.row-date { flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.arrow { transition: color .15s; }
a.row:hover .arrow { color: var(--text); }

.notes { margin: 4px 0 0 52px; padding: 0; list-style: none; font-size: 14.5px; color: var(--muted); }
.notes li { position: relative; padding-left: 16px; margin-bottom: 6px; }
.notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 1.5px; background: var(--underline); }

.more { margin-top: 10px !important; font-size: 14px; }

/* Skills */
.skills { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.skills dt { color: var(--muted); font-size: 14px; }
.skills dd { margin: 0; }

/* Contact */


/* Footer */
.footer { padding-top: 64px; padding-bottom: 24px; font-size: 11px; letter-spacing: .02em; color: var(--muted); text-align: center; }
.footer p { padding-top: 16px; border-top: 1px solid var(--line); }

/* Phones */
@media (max-width: 520px) {
  .nav { padding-top: 24px; flex-wrap: nowrap; }
  .nav-links { gap: 14px; }
  .intro { padding-top: 48px; }
  .row { align-items: flex-start; flex-wrap: wrap; }
  .row-main { flex-basis: calc(100% - 52px); }
  .row-date { margin-left: 52px; margin-top: -8px; }
  .notes { margin-left: 0; }
  .skills { grid-template-columns: 1fr; gap: 0; }
  .skills dd { margin-bottom: 10px; }
}

/* Theme switch animation (circle reveal is driven by script.js) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-fade, .theme-fade * { transition: background-color .4s ease, color .4s ease, border-color .4s ease !important; }
.theme-toggle.spin svg { animation: icon-in .5s cubic-bezier(.4, 0, .2, 1); }
@keyframes icon-in { from { transform: rotate(-120deg) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .theme-toggle.spin svg { animation: none; }
}

/* Rows without icon tiles (Projects) */
.plain .row { padding: 16px 0; }


/* Dates as small outlined pills (arrows like "GitHub ↗" stay plain) */
.row-date:not(.arrow) {
  padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.6;
}

@media (max-width: 520px) {
  .plain .row-main { flex-basis: 100%; }
  .plain .row-date { margin: 0; }
  .row-date:not(.arrow) { margin-top: 2px; }
}

/* LinkedIn-style profile photo: larger circle with a ring around it */
.intro .avatar {
  width: 136px; height: 136px;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, .12);
}
@media (max-width: 520px) {
  .intro .avatar { width: 112px; height: 112px; }
}

/* PG monogram next to the name in the top bar */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 40px; height: 40px; flex: none; }
@media (max-width: 520px) { .logo-mark { width: 34px; height: 34px; } }

/* Photo on the left, social icons on the right (bottom-aligned) */
.intro-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.intro-top .avatar { margin-bottom: 0; }
.socials { display: flex; align-items: center; gap: 4px; }
.socials a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  color: var(--muted); transition: color .15s, background-color .15s;
}
.socials a:hover { color: var(--text); background: var(--icon-bg); }
@media (max-width: 520px) {
  .intro-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .socials { margin-left: -9px; }
}
