:root {
  color-scheme: light;
  --bg: #f8fbfa;
  --surface: #ffffff;
  --surface-2: #edf6f4;
  --ink: #102023;
  --muted: #5d6d70;
  --line: rgba(16, 32, 35, 0.12);
  --primary: #0f766e;
  --primary-2: #1d9a8a;
  --blue: #176b87;
  --accent: #b8df72;
  --dark: #092326;
  --shadow: 0 24px 70px rgba(16, 32, 35, 0.12);
  --radius: 8px;
  --max: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #081315;
  --surface: #102326;
  --surface-2: #132f31;
  --ink: #eef8f5;
  --muted: #a8bbbd;
  --line: rgba(238, 248, 245, 0.14);
  --primary: #3fbea8;
  --primary-2: #6fd1bd;
  --blue: #7bb6d0;
  --accent: #d5f28a;
  --dark: #061012;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* { 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.6;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  width: min(calc(100% - 32px), 1220px);
  margin: 16px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 24, 27, 0.72);
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  color: #fff;
  font-weight: 800;
}

.brand strong, .brand small { display: block; white-space: nowrap; }
.brand strong { font-size: 0.98rem; }
.brand small { color: rgba(255, 255, 255, 0.72); font-size: 0.75rem; }

.main-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.icon-button:hover, .icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.icon-button svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.theme-toggle .moon, [data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}

.hero picture, .hero-image, .hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  filter: saturate(0.96) contrast(1.05);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(4, 18, 20, 0.9), rgba(4, 18, 20, 0.5) 52%, rgba(4, 18, 20, 0.18)),
    linear-gradient(0deg, rgba(4, 18, 20, 0.52), rgba(4, 18, 20, 0.04) 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 104px 0 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 1000px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 4.8vw, 4.25rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
}

.tagline {
  max-width: 790px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.1;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 18px 38px rgba(15, 118, 110, 0.3);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.button:hover, .button:focus-visible { transform: translateY(-2px); }

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

.intro-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  max-width: none;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.metric {
  min-height: 162px;
  padding: 36px max(24px, calc((100vw - var(--max)) / 2));
  background: var(--surface);
}

.metric:nth-child(2) { padding-inline: 36px; }
.metric strong { display: block; margin-bottom: 8px; color: var(--primary); font-size: 1.05rem; }
.metric span, .section-copy p, .blog-card p, .project-content p, .timeline-item p, .contact-copy p, blockquote p, .vision p { color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 74px;
}

.section-kicker {
  position: sticky;
  top: 116px;
  align-self: start;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-copy { max-width: 820px; }
.section-copy p { font-size: 1.08rem; }
.section-heading { max-width: 780px; margin-bottom: 42px; }

.skills-grid, .project-grid, .testimonial-grid, .blog-grid {
  display: grid;
  gap: 20px;
}

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

.skill-panel, .blog-card, blockquote {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(16, 32, 35, 0.06);
}

.skill-panel { padding: 26px; }

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.panel-title svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--primary);
}

.panel-title h3 { margin: 0; }
.skill-list, .tool-cloud { margin: 0; padding: 0; list-style: none; }
.skill-list { display: grid; gap: 16px; }
.skill-list li { display: grid; gap: 8px; }

.skill-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 700;
}

progress {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
}

progress::-webkit-progress-bar { border-radius: 999px; background: var(--surface-2); }
progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--primary), var(--accent)); }
progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--primary), var(--accent)); }

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

.tool-cloud li, .chips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
}

.tool-cloud li { padding: 9px 12px; }
.project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.project-card {
  display: grid;
  grid-template-rows: 230px 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 18px;
}

.chips span { padding: 6px 10px; }
.project-content strong { display: block; margin-bottom: 4px; font-size: 0.9rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: auto;
  color: var(--primary);
  font-weight: 900;
}

.text-link::after {
  margin-left: 8px;
  content: "→";
  transition: transform 180ms ease;
}

.text-link:hover::after, .text-link:focus-visible::after { transform: translateX(4px); }
.blog-section { border-top: 1px solid var(--line); }
.blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.blog-card { padding: 24px; }

.blog-card span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vision {
  width: 100%;
  max-width: none;
  padding: 104px 20px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(18, 74, 87, 0.96)), var(--dark);
  color: #fff;
}

.vision-inner {
  width: min(100%, 900px);
  margin: 0 auto;
  text-align: center;
}

.vision p { color: rgba(255, 255, 255, 0.82); font-size: 1.12rem; }

.timeline {
  position: relative;
  display: grid;
  gap: 26px;
}

.timeline::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  width: 2px;
  background: var(--line);
  content: "";
}

.timeline-item {
  position: relative;
  padding-left: 42px;
}

.timeline-item span {
  position: absolute;
  top: 6px;
  left: 0;
  z-index: 1;
  width: 20px;
  height: 20px;
  border: 5px solid var(--bg);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--line);
}

.testimonial-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
blockquote { margin: 0; padding: 26px; }
blockquote p { position: relative; margin-bottom: 20px; font-size: 1.02rem; }
cite { color: var(--ink); font-style: normal; font-weight: 900; }

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 42px;
  align-items: start;
}

.contact-copy h2 { max-width: 720px; }

.contact-links {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.contact-links a {
  color: var(--primary);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 30px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.site-footer p { margin: 0; }
.site-footer nav, .socials { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.site-footer a { color: var(--ink); font-weight: 800; }

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary);
}

.socials svg { width: 19px; height: 19px; }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: auto 1fr auto auto; }
  .nav-toggle { display: grid; justify-self: end; }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(8, 24, 27, 0.96);
    backdrop-filter: blur(18px);
  }

  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px; }
  .hero { min-height: 82vh; }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(4, 18, 20, 0.88), rgba(4, 18, 20, 0.52)),
      linear-gradient(0deg, rgba(4, 18, 20, 0.58), rgba(4, 18, 20, 0.08) 36%);
  }

  .intro-band, .skills-grid, .project-grid, .blog-grid, .testimonial-grid, .contact-section, .split {
    grid-template-columns: 1fr;
  }

  .metric, .metric:nth-child(2) { padding: 30px 24px; }
  .split { gap: 28px; }
  .section-kicker { position: static; }
  .contact-section { gap: 28px; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header {
    width: min(calc(100% - 20px), 1220px);
    margin-top: 10px;
    gap: 10px;
    padding: 10px;
  }

  .brand small { display: none; }
  .brand-mark, .icon-button { width: 38px; height: 38px; }

  .hero-content {
    width: min(calc(100% - 28px), var(--max));
    padding: 86px 0 30px;
  }

  h1 { font-size: clamp(2rem, 9.4vw, 3.15rem); }
  h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-copy { font-size: 0.96rem; }
  .tagline { margin-bottom: 16px; font-size: 0.84rem; }
  .button { width: 100%; }
  .section { width: min(calc(100% - 28px), var(--max)); padding: 72px 0; }
  .intro-band, .vision { width: 100%; }
  .project-card { grid-template-rows: 210px 1fr; }
  .skill-panel, .project-content, .blog-card, blockquote, .contact-form { padding: 20px; }
}
