/* ============================================================
   Apple.com-inspired design system — light mode only
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

:root {
  --font:         -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                  "Helvetica Neue", Arial, sans-serif;
  --mono:         "SF Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --bg:           #ffffff;
  --bg-alt:       #f5f5f7;
  --text:         #1d1d1f;
  --text-muted:   #6e6e73;
  --blue:         #0071e3;
  --blue-hover:   #0077ed;
  --border:       rgba(0, 0, 0, 0.1);
  --nav-bg:       rgba(255, 255, 255, 0.85);
  --radius:       12px;
  --radius-lg:    18px;
  --max-w:        980px;
  --ease:         cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }


/* ─── NAV ─────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-brand:hover { opacity: 0.6; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.nav-links a:hover { opacity: 1; }


/* ─── HERO ─────────────────────────────────────────────────── */

.hero {
  background: var(--bg-alt);
  padding: 120px 22px 130px;
  text-align: center;
}

.hero-inner {
  max-width: 660px;
  margin: 0 auto;
}

.hero-greeting {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.hero-name {
  font-size: clamp(56px, 11vw, 104px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-sub {
  font-size: clamp(17px, 2.5vw, 21px);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 44px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ─── BUTTONS ───────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 980px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px var(--blue);
}
.btn-ghost:hover { background: var(--blue); color: #fff; }


/* ─── SECTION SCAFFOLDING ───────────────────────────────────── */

section { padding: 88px 22px; }
section.bg-alt { background: var(--bg-alt); }

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 48px;
}


/* ─── PROJECT CARDS ─────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s var(--ease),
              box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.16);
}

.card-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--text);
}

.card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 20px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  transition: gap 0.2s var(--ease);
}
.card:hover .card-link { gap: 8px; }


/* ─── PORTFOLIO MARKDOWN CONTENT ────────────────────────────── */
/* Styles the rendered Experience / Skills / Education markdown  */

.port-content h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 64px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.port-content > h2:first-child { margin-top: 0; }

/* Top-level list: each job / skill group / degree */
.port-content > ul {
  list-style: none;
  padding: 0;
}

.port-content > ul > li {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.port-content > ul > li > p {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

/* Nested bullets: responsibilities / skill items */
.port-content > ul > li > ul {
  list-style: none;
  padding: 0;
}

.port-content > ul > li > ul > li {
  position: relative;
  padding: 4px 0 4px 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.port-content > ul > li > ul > li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Triple-nested (skill values) */
.port-content > ul > li > ul > li > ul {
  list-style: none;
  padding-left: 12px;
}
.port-content > ul > li > ul > li > ul > li {
  padding-left: 0;
  font-size: 14px;
}
.port-content > ul > li > ul > li > ul > li::before { display: none; }

.port-content strong { color: var(--text); font-weight: 600; }


/* ─── CONTACT PILLS ─────────────────────────────────────────── */

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 980px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s var(--ease),
              color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
.contact-pill:hover {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.contact-pill svg { width: 18px; height: 18px; flex-shrink: 0; }


/* ─── BLOG LIST ─────────────────────────────────────────────── */

.post-list { list-style: none; }

.post-item { border-bottom: 1px solid var(--border); }
.post-item:first-child { border-top: 1px solid var(--border); }

.post-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s;
}
.post-item a:hover { color: var(--blue); }
.post-item a:hover .post-date { color: var(--blue); }

.post-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.post-summary {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
  font-weight: 400;
}

.post-date {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s;
}


/* ─── ARTICLE / PROJECT SINGLE ──────────────────────────────── */

.article-wrap {
  max-width: 740px;
  margin: 0 auto;
  padding: 64px 22px 100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 48px;
  transition: gap 0.2s var(--ease);
}
.back-link:hover { gap: 8px; }

.article-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 12px;
}

.article-wrap h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 20px;
}

.article-lead {
  font-size: 21px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.article-meta {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.article-body {
  font-size: 18px;
  line-height: 1.72;
  color: var(--text);
}

.article-body h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 2.4em 0 0.7em;
}

.article-body h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2em 0 0.6em;
}

.article-body h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 1.8em 0 0.5em;
}

.article-body p { margin-bottom: 1.4em; }

.article-body ul,
.article-body ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}
.article-body li { margin-bottom: 0.4em; }

.article-body strong { font-weight: 600; }

.article-body a { color: var(--blue); }

.article-body img {
  border-radius: var(--radius);
  margin: 2em 0;
  width: 100%;
}

.article-body code {
  background: var(--bg-alt);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  font-family: var(--mono);
}

.article-body pre {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 15px;
  font-family: var(--mono);
}

.article-body pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

.article-body blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 20px;
  color: var(--text-muted);
  font-style: italic;
  margin: 1.6em 0;
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}


/* ─── FOOTER ─────────────────────────────────────────────────── */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 44px 22px;
  text-align: center;
}

.site-footer p {
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}
.site-footer a:hover { color: var(--text); }


/* ─── 404 ────────────────────────────────────────────────────── */

.not-found {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 22px;
  gap: 16px;
}

.not-found h1 {
  font-size: 96px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.not-found p {
  font-size: 21px;
  color: var(--text-muted);
}


/* ─── ABOUT PAGE ─────────────────────────────────────────────── */


.about-name {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 20px;
}

.about-intro {
  font-size: clamp(17px, 2.5vw, 21px);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 600px;
}

/* Experience entries */
.exp-entry {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.exp-entry:first-child { border-top: 1px solid var(--border); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}

.exp-company {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 5px;
}

.exp-role {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.exp-period {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

.exp-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exp-bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}
.exp-bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Skills spec table */
.skills-table { }

.skills-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.skills-row:first-child { border-top: 1px solid var(--border); }

.skills-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
}

.skills-value {
  font-size: 17px;
  color: var(--text);
  line-height: 1.5;
}

/* Education entries */
.edu-entry {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}
.edu-entry:first-child { border-top: 1px solid var(--border); }

.edu-school {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 5px;
}

.edu-degree {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.edu-location {
  font-size: 13px;
  color: var(--text-muted);
}

.edu-period {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 4px;
}


/* ─── PROJECTS LIST ──────────────────────────────────────────── */

.proj-list { }

.proj-row {
  display: grid;
  grid-template-columns: 52px 1fr 60px;
  align-items: start;
  gap: 28px;
  padding: 44px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.proj-row:first-child { border-top: 1px solid var(--border); }

.proj-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding-top: 6px;
}

.proj-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
  margin-bottom: 10px;
}

.proj-title {
  font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 12px;
  transition: color 0.2s var(--ease);
}
.proj-row:hover .proj-title { color: var(--blue); }

.proj-summary {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
}

.proj-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.proj-year {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.proj-arrow {
  font-size: 20px;
  color: var(--blue);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.proj-row:hover .proj-arrow {
  opacity: 1;
  transform: translateX(0);
}


/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 640px) {
  section { padding: 64px 16px; }
  .hero { padding: 80px 16px 90px; }
  .nav-inner { padding: 0 16px; }
  .cards { grid-template-columns: 1fr; }
  .article-wrap { padding: 40px 16px 80px; }

  .post-item a {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .post-date { order: -1; }

  .exp-header { flex-direction: column; gap: 4px; }
  .edu-entry { flex-direction: column; gap: 8px; }
  .skills-row { grid-template-columns: 1fr; gap: 6px; }

  .proj-row {
    grid-template-columns: 36px 1fr;
    gap: 16px;
    padding: 32px 0;
  }
  .proj-right { display: none; }
}
