/* Portfolio (home page) only. */

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.mono-badge {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 800; letter-spacing: -0.02em;
}
.mono-badge svg { width: 100%; height: 100%; display: block; }
.mono-badge .mono-dot { fill: #9fe3c0; }
:root[data-theme="dark"] .mono-badge .mono-dot { fill: #0d5a37; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 720px) { .nav { display: none; } }

/* Hero */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--accent-strong);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.hero h1 { font-size: clamp(40px, 7vw, 72px); line-height: 1.02; letter-spacing: -0.035em; margin: 22px 0 18px; font-weight: 800; text-wrap: balance; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--ink-2); max-width: 640px; margin: 0 0 32px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--surface);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn svg { width: 18px; height: 18px; flex: none; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 56px; max-width: 720px; }
.stat { border-left: 2px solid var(--accent); padding: 2px 0 2px 16px; }
.stat b { display: block; font-size: 28px; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; gap: 14px; } }

/* Sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 32px; }
.section-head .num { font-family: var(--mono); color: var(--accent); font-size: 14px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.025em; margin: 0; line-height: 1.15; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.about-grid p { margin: 0 0 16px; color: var(--ink-2); font-size: 17px; }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 20px; box-shadow: var(--shadow); }
.facts dl { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* Experience */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.job-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.job h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.job .role { color: var(--accent-strong); font-weight: 600; font-size: 15px; margin-top: 2px; }
.job .when { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.job .product { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }
.job .product a { font-weight: 600; }
.job ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-2); }
.job li { margin: 6px 0; }
.job li::marker { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 6px; margin-top: 16px; padding: 0; list-style: none; }
.tags li { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin: 0; }
@media (max-width: 600px) { .job { padding: 22px 18px; } }

/* Published apps */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.app-card { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.app-top { display: flex; align-items: center; gap: 16px; }
.app-icon {
  width: 64px; height: 64px; flex: none; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%), 0 6px 16px color-mix(in srgb, var(--c2) 35%, transparent);
}
.app-icon svg { width: 30px; height: 30px; }
.app-icon-img { width: 64px; height: 64px; flex: none; border-radius: 16px; display: block; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line), 0 6px 16px rgb(15 36 25 / 12%); }
.app-card--wide { grid-column: 1 / -1; }
.app-card--wide p { max-width: 720px; }
.store-row { display: flex; flex-wrap: wrap; gap: 10px; }
.app-card h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.app-meta { color: var(--muted); font-size: 14px; }
.app-card p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.store-btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px 0 14px;
  border-radius: 12px; background: var(--ink); color: var(--bg); text-decoration: none; transition: transform .15s ease, opacity .15s ease;
}
.store-btn:hover { color: var(--bg); opacity: .88; transform: translateY(-1px); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 17px; }
.store-btn small { font-size: 11px; font-weight: 500; opacity: .8; }
@media (max-width: 720px) { .apps { grid-template-columns: 1fr; } .app-card { padding: 22px 18px; } }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease;
}
.project:hover { border-color: var(--accent); transform: translateY(-2px); }
.project .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 18px; }
.project .icon svg { width: 22px; height: 22px; }
.project h3 { margin: 0 0 4px; font-size: 19px; }
.project .kind { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.project p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.project .tags { margin-top: 18px; }
@media (max-width: 920px) { .projects { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .projects { grid-template-columns: 1fr; } }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.skill-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.skill-row h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.skill-row .tags { margin: 0; }
@media (max-width: 820px) { .skills { grid-template-columns: 1fr; } .skill-row { grid-template-columns: 1fr; gap: 8px; } }

/* Education */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.edu .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.edu h3 { margin: 0 0 4px; font-size: 18px; }
.edu p { margin: 0; color: var(--ink-2); font-size: 15px; }
.edu .when { font-family: var(--mono); font-size: 13px; color: var(--muted); display: block; margin-top: 10px; }
@media (max-width: 720px) { .edu { grid-template-columns: 1fr; } }

/* Contact */
.contact { background: var(--accent); color: var(--accent-ink); border-radius: 24px; padding: 56px 48px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.contact h2 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.contact p { margin: 0; opacity: .85; font-size: 17px; }
.contact .links { display: grid; gap: 10px; }
.contact a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent-ink) 10%, transparent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
  transition: background .15s ease;
}
.contact a:hover { background: color-mix(in srgb, var(--accent-ink) 18%, transparent); color: var(--accent-ink); }
.contact a span { opacity: .75; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; text-align: right; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; padding: 36px 22px; } }

footer.site-footer { padding: 40px 0 48px; color: var(--muted); font-size: 14px; }
footer.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
