:root {
  --ink: #17191c;
  --ink-soft: #4a4f57;
  --paper: #ffffff;
  --paper-alt: #edf3f7;
  --line: #e2e8ee;
  --accent: #8687fa;
  --accent-soft: #ecedff;
  --mint: #54f5a4;
  --pink: #fe5694;
  --wip: #b3641e;
  --wip-soft: #f7ece0;
  --white: #ffffff;
  --shadow: 0 1px 2px rgba(23, 25, 28, 0.04), 0 8px 24px rgba(23, 25, 28, 0.06);
  --radius: 18px;
  --serif: "Poppins", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

.wrap--narrow { max-width: 760px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--mint);
  color: var(--ink);
}
.btn-primary:hover { background: #3fe595; transform: translateY(-1px); }
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--paper-alt); }

/* Hero */
.hero { padding: 96px 0 72px; }
.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}
.hero-text { flex: 1; min-width: 0; }
.hero-avatar {
  flex-shrink: 0;
  width: clamp(160px, 32vw, 480px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--paper-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid var(--accent);
}
.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--mint);
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.18;
  margin: 0 0 24px;
  max-width: 18ch;
}
.hero h1 .highlight {
  background: var(--pink);
  color: #fff;
  padding: 2px 10px;
  border-radius: 8px;
  display: inline-block;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Sections */
.section { padding: 88px 0; }
.section--muted { background: var(--paper-alt); }
.section-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin: 0 0 14px;
}
.section-lede {
  color: var(--ink-soft);
  max-width: 62ch;
  margin: 0 0 48px;
  font-size: 1.05rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.project-card {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-card--featured {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.project-media {
  background: var(--paper-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.project-body { padding: 32px; }
.project-body--compact { padding: 28px 32px; }

.project-tags { display: flex; gap: 8px; margin-bottom: 14px; }
.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper-alt);
  color: var(--ink-soft);
}
.tag--live { background: var(--accent-soft); color: var(--accent); }
.tag--wip { background: var(--wip-soft); color: var(--wip); }

.project-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 14px;
}

.project-body p { margin: 0 0 12px; color: var(--ink-soft); }
.project-body p strong { color: var(--ink); }
.project-problem { color: var(--ink); }

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.project-stack span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.project-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.link-arrow {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; }
.link-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Device mock for What's for Dinner */
.device-frame {
  width: 220px;
  background: var(--ink);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.device-notch {
  width: 60px;
  height: 6px;
  background: #444;
  border-radius: 4px;
  margin: 4px auto 8px;
}
.device-screen {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1080 / 2424;
}
.device-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Digest mock */
.digest-mock {
  width: 100%;
  max-width: 280px;
  background: var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.digest-mock-header {
  background: #2a2d33;
  color: #d6d6d6;
  font-family: "Courier New", monospace;
  font-size: 0.72rem;
  padding: 8px 12px;
}
.digest-mock-body {
  padding: 14px;
  color: #e9e7e0;
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  line-height: 1.55;
}
.digest-section {
  color: #7fd4b8;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 10px 0 6px;
}
.digest-section:first-child { margin-top: 0; }
.digest-entry { margin: 0 0 10px; color: #c9c7bf; }
.digest-entry b { color: #fff; }
.digest-mock-caption {
  text-align: center;
  font-size: 0.68rem;
  color: var(--ink-soft);
  padding: 8px 0 0;
  margin: 0 0 0;
  font-style: italic;
}

/* Experience highlights */
.highlights {
  position: relative;
  padding-left: 100px;
}
.highlights::before {
  content: '';
  position: absolute;
  left: 76px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.highlight-item {
  position: relative;
  padding-bottom: 36px;
}
.highlight-item:last-child { padding-bottom: 0; }
.highlight-year {
  position: absolute;
  left: -100px;
  top: 0;
  width: 68px;
  text-align: right;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}
.highlight-item::after {
  content: '';
  position: absolute;
  left: -30px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--paper-alt);
  box-shadow: 0 0 0 1px var(--line);
}
.highlight-body p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}
.highlight-body p:last-child { margin-bottom: 0; }
.highlight-body strong { color: var(--ink); }

/* What I Do */
.wid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.wid-card {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.wid-card:nth-child(3n+1) .wid-icon { background: var(--mint); }
.wid-card:nth-child(3n+2) .wid-icon { background: var(--pink); }
.wid-card:nth-child(3n+3) .wid-icon { background: var(--accent); }
.wid-card--accent {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.wid-card--accent .wid-icon { background: var(--accent); }
.wid-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  margin-bottom: 16px;
}
.wid-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 10px;
}
.wid-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.skill-group {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.skill-group--accent {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.skill-group h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-family: var(--serif);
}
.skill-group p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

/* About */
.about-text {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-name { font-family: var(--serif); font-size: 1.15rem; margin: 0; }
.footer-title { margin: 4px 0 0; color: #a9adaf; opacity: 0.7; font-size: 0.9rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.92rem;
  opacity: 0.85;
}
.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* Responsive */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .project-card--featured { grid-template-columns: 1fr; }
  .project-media { padding: 24px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .wid-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .hero-inner { flex-direction: column-reverse; text-align: center; }
  .hero-actions { justify-content: center; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 64px 0 48px; }
  .section { padding: 64px 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .wid-grid { grid-template-columns: 1fr; }
  .highlights { padding-left: 56px; }
  .highlights::before { left: 32px; }
  .highlight-year {
    position: static;
    width: auto;
    text-align: left;
    display: block;
    margin-bottom: 4px;
  }
  .highlight-item::after { left: -34px; }
}

/* Mobile nav open state */
.main-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 20px 28px 28px;
  gap: 16px;
}
