/* Portfolio — clean mobile-first layout (v3) */

:root {
  --bg: #f4f7f9;
  --bg-alt: #e7eef3;
  --ink: #12202a;
  --ink-2: #2c3d49;
  --muted: #667884;
  --line: #d5dee6;
  --teal: #0b7a6d;
  --teal-2: #2fad9d;
  --navy: #123040;
  --white: #ffffff;
  --display: "Outfit", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --header: 3.5rem;
  --space: 1.25rem;
  --max: 44rem;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: var(--teal);
}

a:hover {
  color: #086257;
}

strong {
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.wrap {
  width: min(100% - (var(--space) * 2), var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(244, 247, 249, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-row {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border: 1.5px solid var(--ink);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  width: 0.95rem;
  height: 1.5px;
  background: var(--ink);
}

.site-nav {
  display: none;
  position: absolute;
  top: var(--header);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--space) 1rem;
  flex-direction: column;
}

.site-nav.is-open {
  display: flex;
}

.site-nav a {
  padding: 0.75rem 0;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.nav-cta {
  margin-top: 0.75rem;
  text-align: center;
  background: var(--ink);
  color: var(--white) !important;
  border: none !important;
  padding: 0.75rem !important;
}

/* Hero */
.hero {
  padding: 2.5rem 0 2.75rem;
  background:
    linear-gradient(180deg, #dce8ef 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  line-height: 1.4;
}

.kicker-light {
  color: var(--teal-2);
}

.hero-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title span {
  display: block;
}

.hero-summary {
  margin: 1.1rem 0 0;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 36rem;
}

.hero-tags {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hero-tags span {
  display: inline-block;
  width: fit-content;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 0.4rem 0.7rem;
  line-height: 1.3;
}

.btn-row {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-row-tight {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.1rem;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  border: 1.5px solid transparent;
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--teal);
  color: var(--white);
}

.btn-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-line:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-teal {
  background: var(--teal-2);
  color: var(--navy);
}

.btn-teal:hover {
  background: #45c4b3;
  color: var(--navy);
}

.btn-line-light {
  background: transparent;
  color: #e8f2f5;
  border-color: rgba(232, 242, 245, 0.45);
}

.btn-line-light:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: #fff;
}

/* Blocks */
.block {
  padding: 3rem 0;
  border-bottom: 1px solid var(--line);
}

.block-alt {
  background: var(--bg-alt);
}

.block-dark {
  background: var(--navy);
  color: #e8f2f5;
  border-bottom-color: transparent;
}

.block-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: inherit;
}

.block-dark .block-title {
  color: #fff;
}

.meta-line {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.meta-line.light,
.lead.light {
  color: rgba(232, 242, 245, 0.78);
}

.lead {
  margin: 1.1rem 0 0;
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-layout {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.25rem;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  border-left: 3px solid var(--teal-2);
  padding-left: 1rem;
}

.facts li {
  display: grid;
  gap: 0.15rem;
}

.facts span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

.facts strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.facts a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* Job list — always stacked, no overlap */
.job-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 0;
}

.job-item {
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

.job-item:last-child {
  border-bottom: 1px solid var(--line);
}

.job-item h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.job-item p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Pktana */
.bullet-list {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.bullet-list li {
  position: relative;
  padding-left: 1rem;
  line-height: 1.45;
  color: rgba(232, 242, 245, 0.88);
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  background: var(--teal-2);
}

/* Skills */
.skill-grid {
  margin-top: 1.35rem;
  display: grid;
  gap: 1.25rem;
}

.skill-grid h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal);
  line-height: 1.3;
}

.skill-grid p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.5;
}

/* Work / pubs */
.subhead {
  margin: 1.5rem 0 0.7rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.plain-list li {
  color: var(--ink-2);
  line-height: 1.5;
  padding-left: 0.95rem;
  position: relative;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--teal);
}

.pub-stack {
  display: grid;
  gap: 0.65rem;
}

.pub {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.pub:last-child {
  border-bottom: 1px solid var(--line);
}

.pub-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

.pub-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
}

.pub:hover .pub-name {
  color: var(--teal);
}

/* Education */
.edu-stack {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.25rem;
}

.edu {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.edu-year {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--teal);
  line-height: 1.3;
}

.edu h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.edu p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.4;
}

.muted {
  color: var(--muted) !important;
  font-size: 0.92rem !important;
  margin-top: 0.25rem !important;
}

/* Contact */
.contact-stack {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.65rem;
}

.contact-stack a {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 242, 245, 0.14);
  text-decoration: none;
  color: inherit;
}

.contact-stack span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-2);
  line-height: 1.3;
}

.contact-stack strong {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.break {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Footer */
.site-footer {
  background: #0b1a22;
  color: rgba(232, 242, 245, 0.55);
  padding: 1.25rem 0;
}

.footer-row {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.footer-row p {
  margin: 0;
  line-height: 1.4;
}

/* Goals */
.goal-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.goal-list li {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.goal-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.goal-list strong {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.3;
}

.goal-list span {
  color: var(--ink-2);
  line-height: 1.5;
}

/* Pktana terminal demo */
.demo-label {
  margin: 1.75rem 0 0.7rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.terminal {
  margin: 0;
  padding: 1rem;
  background: #07141c;
  border: 1px solid rgba(232, 242, 245, 0.14);
  color: #b7ecdf;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: pre;
}

.terminal code {
  font-family: inherit;
  font-size: inherit;
}

/* Open source repos */
.repo-grid {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.repo {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  color: inherit;
}

.repo:hover {
  border-color: var(--teal);
}

.repo-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.repo-top strong {
  font-family: var(--display);
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.3;
}

.stars {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.repo p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Tablet */
@media (min-width: 640px) {
  :root {
    --space: 1.5rem;
    --header: 4rem;
    --max: 52rem;
  }

  .hero {
    padding: 3.5rem 0 3.75rem;
  }

  .hero-title {
    font-size: 3.25rem;
    line-height: 1.12;
  }

  .hero-tags {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  .block {
    padding: 3.75rem 0;
  }

  .block-title {
    font-size: 2rem;
  }

  .about-layout {
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
  }

  .skill-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }

  .contact-stack {
    grid-template-columns: 1fr 1fr;
  }

  .repo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .goal-list {
    grid-template-columns: 1fr;
  }

  .terminal {
    font-size: 0.85rem;
    padding: 1.15rem 1.25rem;
  }

  .footer-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
  }
}

/* Desktop */
@media (min-width: 900px) {
  :root {
    --max: 60rem;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
    border: none;
    background: transparent;
  }

  .site-nav a {
    padding: 0;
    border: none;
    font-size: 0.88rem;
  }

  .nav-cta {
    margin-top: 0;
    padding: 0.4rem 0.75rem !important;
  }

  .hero-title {
    font-size: 4rem;
  }

  .skill-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .repo-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero-title {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
  }
}
