:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --ink: #121724;
  --muted: #647084;
  --line: #dde6ed;
  --teal: #0c7c78;
  --teal-dark: #075855;
  --blue: #315f9b;
  --amber: #c7871a;
  --red: #b75145;
  --green: #4d7f56;
  --hero-ink: #121724;
  --shadow: 0 24px 70px rgba(18, 23, 36, 0.12);
  --max: 1180px;
  --radius: 8px;
  --transition: 0.25s ease;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-soft: #1c2128;
  --ink: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --teal: #39d0c8;
  --teal-dark: #2ab5ae;
  --blue: #58a6ff;
  --amber: #e3b341;
  --red: #f85149;
  --green: #56d364;
  --hero-ink: #e6edf3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
  font-family: 'Syne', 'Inter', ui-sans-serif, system-ui, sans-serif;
}

body.nav-open {
  overflow: hidden;
}

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

p a,
li a {
  color: var(--teal-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

:where(a, button, input, textarea):focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.sr-only,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  z-index: 100;
  top: 16px;
  left: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  clip: auto;
  color: var(--surface);
  background: var(--teal-dark);
  border-radius: var(--radius);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(246, 248, 251, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: background 0.3s ease;
}

[data-theme="dark"] .site-header {
  background: rgba(13, 17, 23, 0.8);
  border-bottom-color: rgba(48, 54, 61, 0.6);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, var(--max));
  min-height: 72px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-mark {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--surface);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.brand-copy span {
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--muted);
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 800;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--transition), border-color var(--transition), transform 0.2s ease;
}

.dark-toggle:hover { background: var(--surface-soft); transform: rotate(20deg); }

.dark-icon-dark  { display: none; }
.dark-icon-light { display: inline; }

[data-theme="dark"] .dark-icon-light { display: none; }
[data-theme="dark"] .dark-icon-dark  { display: inline; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: auto;
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(12, 124, 120, 0.13) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(49, 95, 155, 0.11) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 60% 80%, rgba(12, 124, 120, 0.07) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 74%, #eef5f7 100%);
  border-bottom: 1px solid var(--line);
  animation: meshPulse 9s ease-in-out infinite alternate;
}

[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse 80% 60% at 15% 50%, rgba(57, 208, 200, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(88, 166, 255, 0.07) 0%, transparent 60%),
    linear-gradient(180deg, #0d1117 0%, #0d1117 100%);
}

@keyframes meshPulse {
  from { background-position: 0% 50%, 100% 0%, 50% 100%, 0 0; }
  to   { background-position: 10% 60%, 90% 10%, 60% 90%, 0 0; }
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) 0;
}

.hero-copy {
  max-width: 770px;
}

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

.availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 7px 14px;
  background: rgba(77, 127, 86, 0.1);
  border: 1px solid rgba(77, 127, 86, 0.3);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(77, 127, 86, 0.55); }
  50%       { box-shadow: 0 0 0 7px rgba(77, 127, 86, 0); }
}

.hero .eyebrow {
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  color: var(--teal-dark);
  background: #e4f7f3;
  border: 1px solid #bfe8df;
  border-radius: var(--radius);
}

[data-theme="dark"] .hero .eyebrow {
  background: rgba(57, 208, 200, 0.08);
  border-color: rgba(57, 208, 200, 0.25);
}

.rotating-role {
  display: inline-block;
  color: var(--teal-dark);
  font-weight: 900;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.rotating-role.fade-out {
  opacity: 0;
  transform: translateY(-6px);
}

.rotating-role.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--hero-ink);
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  line-height: 1.58;
}

.hero-actions,
.social-links,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
  line-height: 1.1;
}

.button.primary {
  color: var(--surface);
  background: var(--teal-dark);
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.button:hover,
.button:focus-visible {
  color: var(--surface);
  background: var(--ink);
}

.social-links {
  margin-top: 18px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 800;
  background: var(--surface);
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--surface);
  background: var(--teal-dark);
}

.hero-card {
  padding: clamp(22px, 3vw, 30px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-kicker {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.18;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 26px 0 0;
  color: var(--ink);
}

.hero-stats div {
  min-width: 0;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-stats dt {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 950;
  line-height: 1;
}

.hero-stats dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.hero-focus {
  margin-top: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-focus span {
  display: block;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-focus p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: clamp(72px, 9vw, 112px) 0;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 74px);
}

.align-center {
  align-items: center;
}

.section-heading {
  max-width: 830px;
  margin-bottom: 34px;
}

.section h2,
.contact-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.lead-copy {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 1.06rem;
}

.lead-copy p {
  margin: 0;
}

.service-grid,
.project-grid,
.achievement-grid,
.ai-grid {
  display: grid;
  gap: 16px;
}

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

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.service-card,
.project-card,
.achievement-card,
.experience-card,
.ai-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 42px rgba(18, 23, 36, 0.06);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover,
.achievement-card:hover,
.ai-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 64px rgba(18, 23, 36, 0.13);
  border-color: var(--teal);
}

.experience-card:hover {
  transform: translateX(6px);
  box-shadow: 0 24px 52px rgba(18, 23, 36, 0.1);
  border-left: 3px solid var(--teal);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.3);
  border-color: rgba(57, 208, 200, 0.5);
}

.service-card {
  min-height: 278px;
  padding: 26px;
}

.service-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin-bottom: 28px;
  place-items: center;
  color: var(--surface);
  background: var(--teal);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 900;
}

.service-card:nth-child(2) .service-icon {
  background: var(--blue);
}

.service-card:nth-child(3) .service-icon {
  background: var(--amber);
}

.service-card:nth-child(4) .service-icon {
  background: var(--red);
}

.service-card h3,
.project-card h3,
.achievement-card h3,
.experience-card h3,
.ai-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.25;
}

.service-card p,
.project-card p,
.achievement-card p,
.experience-card p,
.ai-card p,
.contact-section p {
  margin: 12px 0 0;
  color: var(--muted);
}

.experience-section {
  padding-bottom: 72px;
}

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

.experience-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
  padding: 26px;
}

.experience-meta {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.experience-meta strong {
  width: fit-content;
  padding: 5px 8px;
  color: var(--blue);
  background: rgba(88, 166, 255, 0.12);
  border-radius: var(--radius);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.experience-card .company {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 850;
}

.projects-section {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100vw - var(--max)) / 2));
  padding-left: max(16px, calc((100vw - var(--max)) / 2));
  background: var(--surface-soft);
}

.projects-section .section-kicker {
  color: var(--teal);
}

.projects-section h2,
.projects-section h3 {
  color: var(--ink);
}

.project-card {
  display: flex;
  min-height: 490px;
  flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(18, 23, 36, 0.06);
}

.project-card p {
  color: var(--muted);
}

.project-type {
  margin: 0 0 16px;
  color: var(--teal) !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-proof {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
}

.project-proof div {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.project-proof dt {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-proof dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 26px 0 0;
  list-style: none;
}

.tag-list li {
  padding: 7px 10px;
  color: var(--teal-dark);
  background: rgba(12, 124, 120, 0.1);
  border: 1px solid rgba(12, 124, 120, 0.22);
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 800;
  transition: background var(--transition), color var(--transition);
}

.tag-list li:hover {
  background: var(--teal-dark);
  color: #fff;
}

.achievement-card {
  min-height: 210px;
  padding: 24px;
  border-top: 5px solid var(--teal);
}

.achievement-card:nth-child(2) {
  border-top-color: var(--blue);
}

.achievement-card:nth-child(3) {
  border-top-color: var(--green);
}

.achievement-card:nth-child(4) {
  border-top-color: var(--amber);
}

.ai-section {
  padding-top: 72px;
}

.ai-card {
  min-height: 224px;
  padding: 24px;
  border-top: 5px solid var(--teal);
}

.ai-card:nth-child(2) {
  border-top-color: var(--blue);
}

.ai-card:nth-child(3) {
  border-top-color: var(--red);
}

.ai-card:nth-child(4) {
  border-top-color: var(--green);
}

.contact-section {
  width: 100%;
  padding: clamp(72px, 9vw, 112px) 16px;
  background:
    linear-gradient(135deg, rgba(49, 95, 155, 0.12), transparent 36%),
    linear-gradient(180deg, #ffffff, #eaf1f5);
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 58px);
  width: min(100%, var(--max));
  margin: 0 auto;
}

.contact-copy {
  max-width: 620px;
}

.contact-actions {
  margin-top: 30px;
}

.contact-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(18, 23, 36, 0.07);
}

.contact-actions a:hover,
.contact-actions a:focus-visible {
  color: var(--surface);
  background: var(--teal-dark);
}

.contact-meta {
  margin-top: 22px !important;
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 46px rgba(18, 23, 36, 0.08);
}

.form-field {
  display: grid;
  gap: 7px;
  text-align: left;
}

.form-field label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
}

.form-field input,
.form-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.form-field textarea {
  min-height: 142px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(12, 124, 120, 0.13);
  outline: none;
}

.contact-form .button {
  width: fit-content;
  cursor: pointer;
}

.form-honey {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.field-error {
  display: block;
  min-height: 1.2em;
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--red);
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(183, 81, 69, 0.12);
}

.form-field input.is-valid,
.form-field textarea.is-valid {
  border-color: var(--green);
}

.form-status {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
}

.form-status.status-success {
  color: #2d5c35;
  background: #eaf7ec;
  border: 1px solid #b6e4be;
}

.form-status.status-error {
  color: #7a2c25;
  background: #fff0ee;
  border: 1px solid #f5c0bb;
}

.button.is-loading {
  opacity: 0.75;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: middle;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.site-footer {
  padding: 22px 16px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.form-response {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(49, 95, 155, 0.12), transparent 36%),
    linear-gradient(180deg, #ffffff, #eaf1f5);
}

.form-response-card {
  width: min(100%, 620px);
  padding: clamp(24px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-response-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
}

.form-response-card p:not(.section-kicker) {
  margin: 14px 0 24px;
  color: var(--muted);
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    justify-content: center;
  }

  .hero-stats,
  .service-grid,
  .project-grid,
  .achievement-grid,
  .ai-grid,
  .section-grid,
  .contact-inner {
    grid-template-columns: 1fr 1fr;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 40px;
  }

  .experience-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 720px) {
  .nav-shell {
    width: min(100% - 24px, var(--max));
    min-height: 66px;
  }

  .brand-copy small {
    display: none;
  }

  .nav-links {
    inset: 66px 12px auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    width: min(100% - 24px, var(--max));
    padding: 36px 0;
    gap: 28px;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 12vw, 3.7rem);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .button,
  .contact-actions a,
  .contact-form .button {
    width: 100%;
  }

  .contact-actions a,
  .button,
  .contact-form .button {
    justify-content: center;
  }

  .social-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-links a {
    justify-content: center;
  }

  .service-grid,
  .project-grid,
  .achievement-grid,
  .ai-grid,
  .section-grid,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .hero-stats div {
    padding: 14px;
  }

  .hero-card {
    padding: 18px;
    box-shadow: 0 14px 36px rgba(18, 23, 36, 0.1);
  }

  .hero-card h2 {
    font-size: 1.2rem;
  }

  .hero-focus {
    display: block;
    padding: 14px;
  }

  .section {
    width: min(100% - 24px, var(--max));
    padding: 66px 0;
  }

  .projects-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .service-card,
  .project-card,
  .achievement-card,
  .experience-card,
  .ai-card {
    min-height: auto;
    padding: 20px;
  }
}

@media (max-width: 360px) {
  .brand-copy span {
    max-width: 178px;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.55rem;
  }
}

/* ── Skill tag cloud ─────────────────────────────────────────── */
.skill-groups {
  display: grid;
  gap: 24px;
}

.skill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.skill-group-label {
  min-width: 110px;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.skill-tags li {
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  cursor: default;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.2s ease;
}

.skill-tags li:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Scroll fade-up animation ────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for grid siblings */
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }


/* ── Dark mode surface adjustments ──────────────────────────── */
[data-theme="dark"] .hero-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .experience-card,
[data-theme="dark"] .achievement-card,
[data-theme="dark"] .ai-card,
[data-theme="dark"] .contact-form {
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] .hero-stats div {
  background: var(--surface-soft);
  border-color: var(--line);
}

.tech-section {
  width: 100%;
  max-width: none;
  padding: clamp(72px, 9vw, 112px) max(16px, calc((100vw - var(--max)) / 2));
  background: var(--surface-soft);
}

[data-theme="dark"] .tag-list li {
  color: var(--teal);
  background: rgba(57, 208, 200, 0.1);
  border-color: rgba(57, 208, 200, 0.22);
}

[data-theme="dark"] .contact-section {
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.06), transparent 36%),
              linear-gradient(180deg, var(--bg), var(--surface-soft));
}

[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .button.secondary {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .skill-group-label {
  background: var(--ink);
  color: var(--bg);
}

[data-theme="dark"] .skill-tags li {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .social-links a,
[data-theme="dark"] .contact-actions a {
  background: var(--surface);
  border-color: var(--line);
}

[data-theme="dark"] .nav-links a {
  color: var(--muted);
}

[data-theme="dark"] .nav-links a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

[data-theme="dark"] .form-field input.is-invalid,
[data-theme="dark"] .form-field textarea.is-invalid {
  background: rgba(248, 81, 73, 0.08);
}

[data-theme="dark"] .form-status.status-success {
  color: #7ee2a8;
  background: rgba(46, 160, 67, 0.12);
  border-color: rgba(46, 160, 67, 0.3);
}

[data-theme="dark"] .form-status.status-error {
  color: #f85149;
  background: rgba(248, 81, 73, 0.1);
  border-color: rgba(248, 81, 73, 0.3);
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }
}
