:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-soft: #0d1118;
  --surface: #111722;
  --surface-strong: #151d2a;
  --border: #253044;
  --text: #f4f7fb;
  --muted: #a9b4c4;
  --muted-strong: #c7d0dd;
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 78% 8%, rgba(10, 132, 255, 0.12), transparent 28rem),
    linear-gradient(180deg, #080a0f 0%, #0b0f16 46%, #080a0f 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--max-width) + 48px);
  margin: 0 auto;
  padding: 20px 24px;
  background: rgba(8, 10, 15, 0.78);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-bottom: 1px solid rgba(37, 48, 68, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

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

.brand {
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark,
.profile-placeholder {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #5aaeff);
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.nav {
  gap: 8px;
}

.nav a {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 180ms ease, background-color 180ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  min-height: min(760px, calc(100vh - 76px));
  padding-top: 76px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3.25rem, 9vw, 6.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.lead {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--muted-strong);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.4;
}

.hero-text,
.split-section p:not(.eyebrow),
.contact-section p,
.project-card p,
.panel-text {
  color: var(--muted);
}

.hero-text {
  max-width: 740px;
  margin-bottom: 32px;
  font-size: 1.02rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.project-card a:hover,
.project-card a:focus-visible,
.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: #006cda;
  color: #ffffff;
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.profile-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  background: rgba(17, 23, 34, 0.76);
  box-shadow: var(--shadow);
}

.profile-placeholder {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  overflow: hidden;
  font-size: clamp(3rem, 7vw, 5.6rem);
  letter-spacing: 0;
}

.profile-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-label {
  margin-bottom: 5px;
  font-weight: 800;
}

.panel-text {
  margin-bottom: 0;
  font-size: 0.96rem;
}

.split-section,
.social-section,
.contact-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 52px;
  border-top: 1px solid rgba(37, 48, 68, 0.68);
}

.split-section p:not(.eyebrow) {
  margin: 0;
  font-size: 1.04rem;
}

.split-section p:not(.eyebrow) + p {
  margin-top: 16px;
}

.profile-placeholder picture {
  display: block;
  width: 100%;
  height: 100%;
}

.split-section p a {
  color: var(--accent);
  font-weight: 600;
  transition: color 180ms ease;
}

.split-section p a:hover,
.split-section p a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.split-section .project-links {
  margin-top: 18px;
}

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

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

.project-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  background: rgba(17, 23, 34, 0.72);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(10, 132, 255, 0.54);
  background: rgba(21, 29, 42, 0.9);
  transform: translateY(-3px);
}

.project-card p {
  margin-bottom: 28px;
}

.project-card > a,
.pending-link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.94rem;
  font-weight: 700;
}

.project-card a {
  transition: transform 180ms ease, color 180ms ease;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.project-links a {
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.pending-link {
  color: var(--muted);
}

.social-section,
.contact-section {
  align-items: start;
}

.social-links {
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(17, 23, 34, 0.72);
  color: var(--muted-strong);
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: rgba(10, 132, 255, 0.58);
  color: var(--text);
}

.social-links .icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}

.social-links .icon svg {
  width: 14px;
  height: 14px;
}

.contact-section p {
  max-width: 560px;
  margin-bottom: 0;
}

.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: calc(100vh - 150px);
}

.not-found-text {
  max-width: 560px;
  margin-bottom: 28px;
  color: var(--muted);
}

.not-found h1 {
  font-size: clamp(2.2rem, 9vw, 4rem);
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.contact-list div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid rgba(37, 48, 68, 0.68);
}

.contact-list dt {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.contact-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.contact-list dd a {
  transition: color 180ms ease;
}

.contact-list dd a:hover,
.contact-list dd a:focus-visible {
  color: var(--accent);
}

.contact-actions {
  display: grid;
  gap: 22px;
  justify-items: start;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 46px;
  border-top: 1px solid rgba(37, 48, 68, 0.68);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin-bottom: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

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

.project-card:nth-child(2n),
.social-links a:nth-child(2n) {
  --reveal-delay: 80ms;
}

.project-card:nth-child(3n),
.social-links a:nth-child(3n) {
  --reveal-delay: 140ms;
}

@media (max-width: 860px) {
  .site-header {
    gap: 8px;
    padding: 12px 16px;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .nav {
    flex: 1;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav a {
    flex: 0 0 auto;
    padding: 8px 5px;
    font-size: 0.84rem;
    white-space: nowrap;
  }

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

  .hero,
  .split-section,
  .social-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    min-height: auto;
    padding-top: 48px;
  }

  .profile-panel {
    max-width: 420px;
  }

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

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

@media (max-width: 560px) {
  .site-header {
    padding: 10px 12px;
  }

  .brand > span:not(.brand-mark) {
    display: none;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.9rem);
  }

  .hero-actions,
  .button,
  .social-links,
  .social-links a {
    width: 100%;
  }

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

  .contact-list div {
    grid-template-columns: 1fr;
    gap: 2px;
    align-items: start;
    padding-bottom: 14px;
  }

  .site-footer {
    width: min(100% - 32px, var(--max-width));
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
