:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #111821;
  --panel-2: #f5f2eb;
  --ink: #f7f4ee;
  --ink-dark: #121417;
  --muted: #a9b2bd;
  --muted-dark: #5f6670;
  --line: rgba(255, 255, 255, 0.14);
  --line-dark: rgba(18, 20, 23, 0.12);
  --teal: #19b8a6;
  --amber: #d99a35;
  --blue: #6da9ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 11, 15, 0.74);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  font-weight: 850;
}

.brand-mark {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(25, 184, 166, 0.9), rgba(217, 154, 53, 0.9));
  color: #071014;
}

.nav {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a:hover {
  color: white;
}

.actions {
  gap: 8px;
}

button,
.download-button,
.primary-link,
.secondary-link {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 800;
}

button {
  cursor: pointer;
}

.language-button,
.download-button {
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.pdf-picker {
  position: relative;
}

.pdf-picker summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.pdf-picker summary::-webkit-details-marker {
  display: none;
}

.pdf-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 170px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 18, 24, 0.98);
  box-shadow: var(--shadow);
}

.pdf-menu button,
.pdf-actions button {
  min-height: 40px;
  padding: 8px 12px;
  border-color: rgba(25, 184, 166, 0.36);
  background: rgba(25, 184, 166, 0.12);
  color: white;
}

.pdf-menu button {
  justify-content: flex-start;
  text-align: left;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(8, 11, 15, 0.96) 0%, rgba(8, 11, 15, 0.78) 42%, rgba(8, 11, 15, 0.24) 100%),
    linear-gradient(0deg, #080b0f 0%, rgba(8, 11, 15, 0.04) 42%),
    radial-gradient(circle at 18% 32%, rgba(25, 184, 166, 0.24), transparent 28%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 130px 0 92px;
}

.portrait-card {
  position: absolute;
  right: clamp(18px, 5vw, 58px);
  top: clamp(112px, 16vh, 180px);
  z-index: 3;
  width: clamp(220px, 22vw, 330px);
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.portrait-card figcaption {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.portrait-card strong {
  color: white;
  line-height: 1.2;
}

.portrait-card em {
  color: #d8ece9;
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 800;
}

.portrait-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero-name {
  max-width: min(850px, calc(100vw - 560px));
  margin: 0;
  font-size: clamp(2.8rem, 4.5vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  overflow-wrap: normal;
  word-break: keep-all;
}

.hero-name span {
  display: block;
}

.hero-name .surname {
  font-size: 0.86em;
}

.thai-name {
  max-width: min(760px, calc(100vw - 450px));
  margin: 24px 0 0;
  color: #d8ece9;
  font-size: clamp(1.15rem, 2.2vw, 1.85rem);
  font-weight: 850;
}

h2 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.role {
  max-width: min(760px, calc(100vw - 450px));
  margin: 34px 0 0;
  color: #ffd18a;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 850;
}

.intro {
  max-width: min(720px, calc(100vw - 450px));
  margin: 24px 0 0;
  color: #d6dde4;
  font-size: clamp(1.04rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.print-contact {
  display: none;
}

.print-qr {
  display: none;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
}

.primary-link {
  border-color: var(--teal);
  background: var(--teal);
  color: #071014;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.signal-section {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 36px));
  margin: -74px auto 0;
}

.signal-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-panel div {
  min-height: 140px;
  padding: 26px;
  border-left: 1px solid var(--line);
}

.signal-panel div:first-child {
  border-left: 0;
}

.signal-panel span {
  display: block;
  color: white;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 900;
}

.signal-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 96px 0;
}

.intro-band,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}

.intro-band {
  padding-top: 70px;
  padding-bottom: 70px;
  align-items: center;
}

.intro-band h2 {
  max-width: 620px;
  font-size: clamp(1.6rem, 3vw, 3.2rem);
  line-height: 1.12;
}

.intro-band p:last-child,
.two-column p {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
}

.intro-band p:last-child {
  max-width: 580px;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid article {
  min-height: 180px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.metric-grid strong {
  display: block;
  margin-bottom: 18px;
  color: var(--amber);
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1;
}

.metric-grid .date-range {
  white-space: nowrap;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
}

.metric-grid span {
  color: var(--muted);
}

.dark-section {
  width: 100%;
  padding-inline: max(18px, calc((100vw - 1180px) / 2));
  background:
    linear-gradient(180deg, #0f161d 0%, #0c1218 50%, #0a1016 100%);
}

.section-heading {
  margin-bottom: 38px;
}

.section-heading::before {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  margin-bottom: 18px;
}

.section-lead {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.devops-section,
.infra-fit-section,
.devops-alignment-section,
.developer-section {
  border-top: 1px solid var(--line);
}

.devops-grid,
.infra-grid,
.alignment-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.devops-card,
.infra-grid article,
.alignment-grid article {
  min-height: 270px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.devops-card.primary {
  background:
    linear-gradient(135deg, rgba(25, 184, 166, 0.22), rgba(109, 169, 255, 0.1)),
    rgba(255, 255, 255, 0.055);
}

.devops-card span,
.infra-grid span {
  display: block;
  margin-bottom: 30px;
  color: var(--teal);
  font-weight: 900;
}

.devops-card p,
.infra-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.devops-card:hover,
.infra-grid article:hover,
.alignment-grid article:hover {
  border-color: rgba(25, 184, 166, 0.3);
  box-shadow: 0 8px 32px rgba(25, 184, 166, 0.08);
}

.infra-fit-section {
  background:
    linear-gradient(180deg, rgba(25, 184, 166, 0.08), transparent 46%),
    #0a1016;
}

.devops-alignment-section {
  padding-bottom: 48px;
  background:
    linear-gradient(180deg, rgba(217, 154, 53, 0.08), transparent 48%),
    #090d12;
}

.developer-section {
  padding-top: 58px;
}

.alignment-grid article {
  min-height: 245px;
}

.alignment-grid strong {
  display: inline-flex;
  margin-bottom: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(217, 154, 53, 0.34);
  border-radius: 999px;
  color: #ffe0a3;
  font-size: 0.78rem;
  font-weight: 900;
}

.alignment-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.alignment-note {
  max-width: 900px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 154, 53, 0.28);
  border-radius: 8px;
  background: rgba(217, 154, 53, 0.075);
  color: #f5dfbd;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.45;
}

.infra-grid article:first-child {
  background:
    linear-gradient(135deg, rgba(217, 154, 53, 0.18), rgba(25, 184, 166, 0.12)),
    rgba(255, 255, 255, 0.055);
}

.devops-stack,
.infra-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.devops-stack span,
.infra-stack span {
  padding: 8px 11px;
  border: 1px solid rgba(25, 184, 166, 0.25);
  border-radius: 999px;
  background: rgba(25, 184, 166, 0.08);
  color: #dffbf7;
  font-weight: 800;
}

.developer-section {
  background:
    linear-gradient(180deg, rgba(109, 169, 255, 0.07), transparent 42%),
    var(--bg);
}

.developer-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr);
  gap: 14px;
}

.developer-main,
.developer-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.developer-main {
  min-height: 440px;
  padding: 30px;
  background:
    linear-gradient(135deg, rgba(109, 169, 255, 0.22), rgba(25, 184, 166, 0.12)),
    rgba(255, 255, 255, 0.055);
}

.developer-main span {
  display: inline-flex;
  margin-bottom: 80px;
  padding: 7px 10px;
  border: 1px solid rgba(109, 169, 255, 0.38);
  border-radius: 999px;
  color: #dbeafe;
  font-size: 0.84rem;
  font-weight: 900;
}

.developer-main h3 {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
}

.developer-main p,
.developer-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.developer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.developer-grid article {
  min-height: 220px;
  padding: 24px;
}

.developer-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.developer-stack span {
  padding: 8px 11px;
  border: 1px solid rgba(109, 169, 255, 0.3);
  border-radius: 999px;
  background: rgba(109, 169, 255, 0.09);
  color: #e7f0ff;
  font-weight: 800;
}

.expertise-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.expertise-grid article,
.project-card,
.education-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.expertise-grid article {
  min-height: 270px;
  padding: 28px;
}

.expertise-grid span {
  display: block;
  margin-bottom: 30px;
  color: var(--teal);
  font-weight: 900;
}

.expertise-grid p,
.project-card p,
.timeline-item p,
.education-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.timeline {
  display: grid;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(20px, 4vw, 54px);
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item time {
  color: var(--amber);
  font-weight: 900;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.project-card {
  min-height: 250px;
  padding: 26px;
}

.project-card.featured {
  background:
    linear-gradient(135deg, rgba(25, 184, 166, 0.2), rgba(217, 154, 53, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.project-meta {
  margin: 0 0 24px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-groups article {
  min-height: 140px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(25, 184, 166, 0.08), rgba(109, 169, 255, 0.045)),
    rgba(255, 255, 255, 0.045);
}

.skill-groups h3 {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.95rem;
  line-height: 1.15;
}

.skill-groups p {
  margin: 0;
  color: #dfe7ef;
  font-size: 0.98rem;
  line-height: 1.55;
}

.webapp-section {
  border-top: 1px solid var(--line);
}

.portfolio-block {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.portfolio-block-head h3 {
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
}

.portfolio-block-head p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.webapp-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.webapp-card {
  display: grid;
  align-content: start;
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.webapp-card:hover {
  transform: translateY(-3px);
  border-color: rgba(25, 184, 166, 0.62);
  background: rgba(25, 184, 166, 0.1);
}

.webapp-card span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.webapp-card strong {
  margin-top: 32px;
  color: white;
  font-size: 1.08rem;
  line-height: 1.18;
}

.webapp-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.client-section {
  padding-top: 30px;
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.client-logo-card {
  display: grid;
  min-height: 116px;
  place-items: center;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #f7f7f5;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.14);
}

.client-logo-card img {
  display: block;
  width: min(100%, 176px);
  max-height: 82px;
  object-fit: contain;
}

.client-logo-card.tone-1 {
  background: linear-gradient(135deg, #fff7ed, #e0f7f4);
}

.client-logo-card.tone-2 {
  background: linear-gradient(135deg, #eef6ff, #f8ecff);
}

.client-logo-card.tone-3 {
  background: linear-gradient(135deg, #f4ffe9, #e9f3ff);
}

.client-logo-card.tone-4 {
  background: linear-gradient(135deg, #fff1f1, #edf7ff);
}

.client-logo-card.tone-5 {
  background: linear-gradient(135deg, #fffbe7, #ebf5ff);
}

.client-logo-card.tone-6 {
  background: linear-gradient(135deg, #effcf6, #f3efff);
}

.client-logo-card.tone-7 {
  background: linear-gradient(135deg, #f8f0ff, #fff7ed);
}

.client-logo-card.tone-8 {
  background: linear-gradient(135deg, #edf8ff, #f2fff4);
}

.tag-cloud span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dfe7ef;
  font-weight: 750;
}

.education-section {
  border-top: 1px solid var(--line);
}

.education-list {
  display: grid;
  gap: 14px;
}

.education-list article {
  padding: 26px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(28px, 5vw, 70px);
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 48px;
  padding: clamp(36px, 5vw, 60px);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink-dark);
}

.contact-section .section-kicker {
  color: #0a766c;
}

.contact-links {
  display: grid;
  gap: 8px;
  align-content: center;
}

.contact-links a {
  display: flex;
  min-height: 54px;
  align-items: center;
  border-bottom: 1px solid var(--line-dark);
  color: var(--ink-dark);
  font-weight: 850;
  font-size: 1.05rem;
}

.pdf-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(18, 20, 23, 0.05);
}

.pdf-actions p {
  margin: 0;
  color: var(--muted-dark);
  font-weight: 800;
}

.pdf-actions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-actions button {
  color: var(--ink-dark);
}

.footer {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 46px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .hero-content {
    padding-bottom: 360px;
  }

  .hero-name,
  .thai-name,
  .role,
  .intro {
    max-width: 100%;
  }

  .portrait-card {
    top: auto;
    right: auto;
    bottom: 246px;
    left: 18px;
    width: min(300px, calc(100% - 36px));
  }

  .signal-panel,
  .metric-grid,
  .devops-grid,
  .infra-grid,
  .alignment-grid,
  .expertise-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-panel div:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .intro-band,
  .developer-layout,
  .portfolio-block,
  .two-column,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .webapp-grid,
  .client-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 11px 14px;
  }

  .brand-text {
    display: inline;
  }

  .nav {
    overflow-x: auto;
    justify-content: flex-start;
    gap: 8px;
    font-size: 0.84rem;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .actions > .download-button {
    display: none;
  }

  .hero {
    min-height: auto;
    display: block;
    padding-bottom: 0;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
    padding: 136px 0 26px;
  }

  .hero-name {
    max-width: 100%;
    font-size: clamp(2.35rem, 12.2vw, 3.35rem);
    line-height: 0.96;
  }

  .hero-name .surname {
    font-size: 0.84em;
  }

  .role {
    margin-top: 20px;
    font-size: clamp(1.05rem, 5vw, 1.35rem);
  }

  .intro {
    font-size: 1rem;
  }

  .signal-panel,
  .metric-grid,
  .devops-grid,
  .infra-grid,
  .alignment-grid,
  .expertise-grid,
  .developer-grid,
  .project-grid,
  .webapp-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .webapp-card {
    min-height: auto;
  }

  .skill-groups article {
    min-height: 0;
    padding: 16px;
  }

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

  .client-logo-card {
    min-height: 58px;
  }

  .client-logo-card img {
    max-height: 64px;
  }

  .signal-panel {
    width: 100%;
  }

  .signal-section {
    width: calc(100% - 28px);
    margin: 14px auto 0;
  }

  .portrait-card {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: calc(100% - 28px);
    margin: 0 auto;
  }

  .portrait-card img {
    aspect-ratio: 4 / 3;
  }

  .signal-panel div {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .signal-panel div:first-child {
    border-top: 0;
  }

  .section {
    width: min(100% - 28px, 1180px);
    padding: 70px 0;
  }

  .contact-section {
    width: min(100% - 28px, 1180px);
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html,
  body {
    background: white !important;
    color: #101418 !important;
    font-size: 9.5pt;
    line-height: 1.38;
  }

  a {
    color: #101418 !important;
    text-decoration: none;
  }

  .topbar,
  .pdf-actions,
  .hero > picture,
  .hero-image,
  .hero-overlay,
  .hero-actions,
  .signal-section,
  .intro-band,
  .metric-grid,
  .client-section,
  .webapp-section,
  .contact-section,
  .footer {
    display: none !important;
  }

  .hero,
  .section,
  .contact-section,
  .dark-section,
  .devops-section,
  .infra-fit-section,
  .devops-alignment-section,
  .developer-section {
    width: 100% !important;
    min-height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    color: #101418 !important;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr 34mm;
    gap: 4mm 8mm;
    align-items: start;
    padding-bottom: 7mm !important;
    border-bottom: 1.2pt solid #101418;
  }

  .hero-content {
    grid-column: 1;
    grid-row: 1 / 3;
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .portrait-card {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    position: static;
    display: block !important;
    width: 34mm;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: white !important;
  }

  .portrait-card img {
    display: block;
    width: 34mm;
    height: 43mm;
    object-fit: cover;
    object-position: center top;
    border: 0.9pt solid #c8d0d8;
  }

  .portrait-card figcaption {
    display: none;
  }

  .print-qr {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    display: block;
    width: 22mm;
    margin: 2mm 0 0;
    text-align: center;
  }

  .print-qr img {
    display: block;
    width: 22mm;
    height: 22mm;
    border: 0.7pt solid #c8d0d8;
  }

  .print-qr figcaption {
    margin-top: 1mm;
    color: #101418;
    font-size: 5.8pt;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .eyebrow,
  .section-kicker {
    margin: 0 0 2mm;
    color: #006f67 !important;
    font-size: 7.4pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .hero-name {
    max-width: none;
    margin: 0;
    color: #101418;
    font-size: 25pt;
    line-height: 0.98;
  }

  .hero-name .surname {
    font-size: 0.9em;
  }

  .thai-name {
    max-width: none;
    margin: 2mm 0 0;
    color: #263238;
    font-size: 12pt;
    font-weight: 850;
  }

  .role {
    max-width: none;
    margin: 3mm 0 0;
    color: #101418;
    font-size: 11pt;
    font-weight: 850;
  }

  .intro {
    max-width: 180mm;
    margin: 2mm 0 0;
    color: #303840;
    font-size: 9.5pt;
  }

  .print-contact {
    display: block;
    margin: 3mm 0 0;
    color: #101418;
    font-size: 8.8pt;
    font-weight: 800;
  }

  .section,
  .contact-section {
    padding-top: 5mm !important;
    break-inside: avoid;
  }

  .section-heading::before {
    display: block;
    width: 24px;
    height: 2px;
    background: #006f67;
    margin-bottom: 2mm;
  }

  .section-heading {
    display: block;
    margin: 0 0 3mm;
  }

  h2 {
    max-width: none;
    margin: 0;
    color: #101418;
    font-size: 13.5pt;
    line-height: 1.12;
  }

  h3 {
    margin: 0 0 1mm;
    color: #101418;
    font-size: 10pt;
    line-height: 1.2;
  }

  p {
    color: #303840;
  }

  .intro-band,
  .two-column,
  .contact-section {
    display: grid;
    grid-template-columns: 38mm 1fr;
    gap: 8mm;
    align-items: start;
  }

  .intro-band h2 {
    max-width: none;
    font-size: 14.5pt;
    line-height: 1.12;
  }

  .intro-band p:last-child,
  .two-column p {
    margin: 0;
    color: #303840;
    font-size: 9.3pt;
  }

  .devops-grid,
  .infra-grid,
  .alignment-grid,
  .developer-grid,
  .expertise-grid,
  .project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }

  .devops-card,
  .infra-grid article,
  .alignment-grid article,
  .developer-main,
  .developer-grid article,
  .expertise-grid article,
  .project-card,
  .education-list article {
    min-height: 0;
    padding: 0 0 0 2.5mm;
    border: 0;
    border-left: 1.2pt solid #d6dce2;
    border-radius: 0;
    background: white !important;
    color: #101418 !important;
    break-inside: avoid;
  }

  .devops-card span,
  .infra-grid span,
  .alignment-grid strong,
  .expertise-grid article span,
  .project-meta,
  .developer-main > span {
    display: block;
    margin: 0 0 1mm;
    color: #006f67 !important;
    font-size: 7.4pt;
    font-weight: 900;
  }

  .devops-card p,
  .infra-grid p,
  .alignment-grid p,
  .developer-main p,
  .developer-grid p,
  .expertise-grid p,
  .project-card p,
  .timeline-item p,
  .education-list p {
    margin: 0;
    color: #303840;
    font-size: 8.6pt;
  }

  .devops-stack,
  .infra-stack,
  .developer-stack,
  .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5mm;
    margin-top: 3mm;
  }

  .skill-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
  }

  .skill-groups article {
    min-height: 0;
    padding: 0 0 0 2.5mm;
    border: 0;
    border-left: 1.2pt solid #d6dce2;
    border-radius: 0;
    background: white !important;
    color: #101418 !important;
    break-inside: avoid;
  }

  .skill-groups h3 {
    margin: 0 0 1mm;
    color: #006f67 !important;
    font-size: 8.2pt;
    line-height: 1.2;
  }

  .skill-groups p {
    margin: 0;
    color: #303840;
    font-size: 8.3pt;
    line-height: 1.35;
  }

  .devops-stack span,
  .infra-stack span,
  .developer-stack span,
  .tag-cloud span {
    padding: 0.8mm 1.5mm;
    border: 0.7pt solid #c8d0d8;
    border-radius: 0;
    background: white !important;
    color: #101418 !important;
    font-size: 7.1pt;
    font-weight: 750;
  }

  .developer-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr;
    gap: 3mm;
  }

  .alignment-note {
    margin-top: 3mm;
    padding: 2mm 2.5mm;
    border: 0.8pt solid #d6dce2;
    border-radius: 0;
    background: white !important;
    color: #303840;
    font-size: 8.4pt;
  }

  .timeline {
    display: grid;
    gap: 2.4mm;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: 28mm 1fr;
    gap: 4mm;
    padding: 0 0 2.4mm;
    border-bottom: 0.7pt solid #d6dce2;
    break-inside: avoid;
  }

  .timeline-item time {
    color: #006f67;
    font-size: 8.2pt;
    font-weight: 900;
  }

  .education-list {
    display: grid;
    gap: 2.5mm;
  }

  .contact-section {
    border: 0;
  }

  .contact-section h2 {
    font-size: 12pt;
  }

  .contact-links {
    gap: 1mm;
  }

  .contact-links a {
    min-height: 0;
    border: 0;
    font-size: 9pt;
    font-weight: 800;
  }
}
