/* iammathh.com — ported from the "Portfolio SRE 3c v2" Claude Design project. */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/geist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/geist-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/geist-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/geist-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #fafafa;
  --surface: #fff;
  --fg: #111;
  --text: #333;
  --muted: #666;
  --subtle: #6e6e6e;   /* design #888, darkened for WCAG AA contrast */
  --faint: #737373;    /* design #999, darkened for WCAG AA contrast */
  --line: #e8e8e8;
  --border: #ddd;
  --chip: #e3e3e3;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Space Grotesk", var(--sans);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
a:focus-visible, button:focus-visible, select:focus-visible, .row-toggle:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 6px;
}
img { display: block; max-width: 100%; }
code, .mono { font-family: var(--mono); }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 8px 14px; background: var(--fg); color: #fff; border-radius: 6px; font-size: 14px;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
@media (max-width: 560px) { .wrap { padding-left: 16px; padding-right: 16px; } }

/* ---------- Top / hero ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav {
  padding-top: 22px; padding-bottom: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.nav .brand { font-family: var(--mono); color: var(--fg); }
.nav ul { display: flex; gap: 8px 24px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav .resume { color: var(--fg); font-weight: 500; }

.hero {
  padding-top: 64px; padding-bottom: 64px;
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
}
.hero picture { flex: none; }
.hero img {
  width: clamp(220px, 32vw, 320px); height: clamp(220px, 32vw, 320px);
  border-radius: 50%; object-fit: cover; background: #222;
}
.hero-text { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; flex: 1; min-width: min(280px, 100%); }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--fg); flex: none; }
h1 {
  margin: 0; font-family: var(--display); font-weight: 500;
  font-size: clamp(48px, 7vw, 72px); letter-spacing: -0.045em; line-height: 1;
}
.role { margin: 0; font-size: 18px; color: var(--muted); }
@media (max-width: 560px) {
  .hero { padding-top: 40px; padding-bottom: 48px; gap: 32px; }
}

/* ---------- Buttons ---------- */
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; font-size: 14px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; color: var(--fg);
}
.btn.primary { background: var(--fg); border-color: var(--fg); color: #fff; }
.btn.lg { padding: 13px 22px; font-size: 15px; }

/* ---------- About ---------- */
.about {
  padding-top: 56px; padding-bottom: 64px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 56px;
}
.about-main { display: flex; flex-direction: column; gap: 24px; }
.lead { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text); text-wrap: pretty; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; font-size: 13px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 6px 12px; background: var(--surface); border: 1px solid var(--chip); border-radius: 6px; }

/* ---------- Experience ---------- */
.section-line { border-top: 1px solid var(--line); }
.experience { padding-top: 64px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 28px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }
h2 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 36px; letter-spacing: -0.03em; line-height: 1.15; }
.intro { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 560px; text-wrap: pretty; }
.intro code { font-size: 13px; padding: 2px 6px; border: 1px solid var(--chip); border-radius: 4px; background: var(--surface); color: var(--fg); }

.log { background: var(--surface); border: 1px solid var(--chip); border-radius: 10px; overflow: hidden; }
.log-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid #eee;
}
.log-head .path { font-family: var(--mono); font-size: 13px; }
.log-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.count { font-size: 13px; color: var(--subtle); }
.log select {
  font-family: var(--sans); font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--fg); cursor: pointer;
}
.rows { position: relative; list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 88px minmax(0, 1fr);
  border-bottom: 1px solid #f0f0f0; transition: opacity .2s;
}
.row.dim { opacity: .25; }
.row:has(.row-toggle):hover { background: #fcfcfc; }
.graph { position: relative; min-height: 64px; }
.graph span { position: absolute; }
.entry { padding: 13px 20px 13px 0; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row-toggle {
  all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.msg-line { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; }
.msg { font-size: 15px; color: var(--fg); }
.ref { font-family: var(--mono); font-size: 11px; border-radius: 4px; padding: 2px 8px; border: 1px solid transparent; white-space: nowrap; }
.ref.head { padding: 3px 8px; background: var(--fg); color: #fff; border: 0; }
.ref.work { border-color: var(--fg); color: var(--fg); }
.ref.project { border-color: #bbb; color: var(--muted); }
.meta { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.detail { margin: 6px 0 4px; font-size: 14px; line-height: 1.6; color: #555; max-width: 620px; }
.fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none;
  background: linear-gradient(rgba(255,255,255,0), #fff);
}
.log-more { display: flex; justify-content: center; padding: 16px; border-bottom: 1px solid #eee; }
.log-more button {
  font-family: var(--sans); font-size: 14px; padding: 10px 18px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--fg); cursor: pointer;
}
.log-more button:hover { background: #f5f5f5; }
.legend {
  display: flex; gap: 10px 24px; flex-wrap: wrap; padding: 14px 20px;
  font-size: 12px; color: var(--subtle); align-items: center; list-style: none; margin: 0;
}
.legend li { display: flex; align-items: center; gap: 8px; }
.lg-commit { width: 9px; height: 9px; border-radius: 50%; background: var(--fg); }
.lg-merge { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--fg); }
.lg-branch { width: 16px; height: 2px; background: #8a8a8a; }
.lg-head { font-family: var(--mono); font-size: 10px; padding: 2px 6px; background: var(--fg); color: #fff; border-radius: 4px; }
.noscript-log { margin: 0; padding: 16px 20px; font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .row { grid-template-columns: 80px minmax(0, 1fr); }
  .log-head, .legend { padding-left: 16px; padding-right: 16px; }
  .entry { padding-right: 16px; }
}

/* ---------- Contact ---------- */
.contact-bg { background: var(--surface); }
.contact { padding-top: 80px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 28px; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--subtle); }
.contact h2 { font-size: clamp(36px, 5.5vw, 56px); letter-spacing: -0.04em; line-height: 1.05; max-width: 720px; text-wrap: balance; }
.book { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.book h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; }
.book p { margin: 0; font-size: 15px; color: var(--muted); }
.book p a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.cal {
  width: 100%; min-height: 0; border-radius: 10px; overflow: hidden;
}
.cal.loading { min-height: 480px; border: 1px solid var(--chip); background: var(--bg); }
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--chip); padding-top: 24px; margin-top: 40px;
  font-size: 14px; color: var(--subtle);
}
.foot ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 560px) { .contact { padding-top: 56px; } }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-top: 64px; padding-bottom: 64px; }
.notfound pre { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: pre-wrap; }

/* ---------- Languages (About side column) ---------- */
.about-side { display: flex; flex-direction: column; gap: 28px; }
.langs { display: flex; flex-direction: column; gap: 10px; }
.langs .eyebrow { margin: 0; font-weight: 400; letter-spacing: 0; line-height: 1.5; }
.langs ul { display: flex; flex-wrap: wrap; gap: 6px 20px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text); }
.langs li span { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-left: 4px; }

/* ---------- Mobile: centered layout ---------- */
@media (max-width: 640px) {
  .nav { flex-direction: column; justify-content: center; text-align: center; }
  .nav ul { justify-content: center; }
  .hero { flex-direction: column; justify-content: center; text-align: center; }
  .hero picture { align-self: center; }
  .hero-text { align-items: center; min-width: 0; width: 100%; }
  .about { text-align: center; gap: 40px; }
  .about .btns, .chips, .langs ul { justify-content: center; }
  .langs { align-items: center; }
  .section-head { align-items: center; text-align: center; }
  .intro { margin-left: auto; margin-right: auto; }
  .contact { align-items: center; text-align: center; }
  .contact h2 { margin-left: auto; margin-right: auto; }
  .contact .btns { justify-content: center; }
  .book { align-items: center; width: 100%; }
  .foot { flex-direction: column; align-items: center; width: 100%; }
  .foot ul { justify-content: center; }
}
