:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #dde3ea;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --teal: #0f766e;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  display: block;
  max-width: 100%;
}

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

button {
  color: inherit;
  font: inherit;
}

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

.section-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid rgba(221, 227, 234, 0.82);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(18px);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.site-header.on-hero {
  border-bottom-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 112px;
  height: 44px;
}

.brand-logo {
  position: absolute;
  left: 0;
  width: 112px;
  height: auto;
  transition: opacity 180ms ease;
}

.brand-logo-light {
  opacity: 0;
}

.site-header.on-hero .brand-logo-dark {
  opacity: 0;
}

.site-header.on-hero .brand-logo-light {
  opacity: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 600;
}

.site-nav a {
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-header.on-hero .site-nav {
  color: rgba(255, 255, 255, 0.82);
}

.site-header.on-hero .site-nav a:hover,
.site-header.on-hero .site-nav a:focus-visible {
  color: #ffffff;
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #11100e;
  color: #ffffff;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 44%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.34) 0%, transparent 38%);
}

.hero-content {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: end;
  padding-top: 90px;
  padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-copy {
  position: relative;
  max-width: 700px;
}

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

.hero h1,
.section-heading h2,
.contact-section h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 740px;
  color: #ffffff;
  font-size: clamp(4.4rem, 11vw, 9.5rem);
  line-height: 0.98;
}

.hero-text {
  max-width: 660px;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: #1d4ed8;
  background: #1d4ed8;
  transform: translateY(-2px);
}

.button-outline {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.button-outline:hover,
.button-outline:focus-visible {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.14);
}

.text-link {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 6px;
}

.text-link:hover,
.text-link:focus-visible {
  color: #bfdbfe;
}

.section-block {
  scroll-margin-top: 90px;
  padding: 104px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  scroll-margin-top: 90px;
  max-width: 700px;
}

.section-heading h2,
.contact-section h2 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.04;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.project-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-type {
  width: fit-content;
  margin: 0 0 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1e40af;
  font-size: 0.76rem;
  font-weight: 800;
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.project-card p:not(.project-type) {
  margin: 0;
  color: var(--muted);
}

.project-card a {
  margin-top: auto;
  padding-top: 28px;
  color: var(--accent);
  font-weight: 800;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(300px, 0.78fr);
  gap: clamp(34px, 7vw, 88px);
  align-items: start;
}

.about-panel {
  display: grid;
  gap: 24px;
}

.about-photo {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.about-copy {
  color: var(--muted);
  font-size: 1.04rem;
}

.about-copy p {
  margin: 0;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.skills-list span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.contact-section {
  scroll-margin-top: 90px;
  margin-bottom: 70px;
  padding: clamp(42px, 8vw, 76px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.contact-section p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(24px, calc((100vw - 1120px) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

@media (max-width: 820px) {
  .site-header {
    min-height: 68px;
  }

  .brand,
  .brand-logo {
    width: 94px;
  }

  .brand {
    height: 38px;
  }

  .menu-toggle {
    position: relative;
    z-index: 12;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    transition: background 180ms ease, border-color 180ms ease;
  }

  .site-header.on-hero .menu-toggle {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
  }

  .menu-toggle span:not(.sr-only) {
    position: absolute;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
    transition: transform 180ms ease;
  }

  .site-header.on-hero .menu-toggle span:not(.sr-only) {
    background: #ffffff;
  }

  .menu-toggle span:first-child {
    transform: translateY(-4px);
  }

  .menu-toggle span:nth-child(2) {
    transform: translateY(4px);
  }

  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    inset: 68px 18px auto;
    display: grid;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-header.on-hero .site-nav.open {
    background: rgba(17, 16, 14, 0.94);
    border-color: rgba(255, 255, 255, 0.18);
  }

  .site-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px 14px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-image {
    object-position: 58% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.08) 100%),
      linear-gradient(0deg, rgba(0, 0, 0, 0.42) 0%, transparent 46%);
  }

  .hero-content {
    min-height: 680px;
    align-items: end;
    padding-top: 88px;
    padding-bottom: 54px;
  }

  .project-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .section-shell {
    width: min(100% - 32px, 1120px);
  }

  .hero h1 {
    font-size: clamp(4rem, 20vw, 6.2rem);
  }

  .hero-image {
    object-position: 56% center;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .text-link {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .section-block {
    padding: 78px 0;
  }

  .project-card {
    min-height: 260px;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
