:root {
  color-scheme: dark;
  --bg: #101113;
  --surface: #17191d;
  --surface-strong: #20242a;
  --line: #2c3138;
  --text: #f5f2eb;
  --muted: #b8b0a4;
  --soft: #8c928f;
  --teal: #37c8b4;
  --amber: #e6b15d;
  --green: #7abf78;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(55, 200, 180, 0.08), transparent 32%),
    linear-gradient(240deg, rgba(230, 177, 93, 0.08), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(245, 242, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 242, 235, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.68), transparent 76%);
}

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 17, 19, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

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

.brand {
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(55, 200, 180, 0.42);
  border-radius: 8px;
  background: rgba(55, 200, 180, 0.1);
  color: var(--teal);
  font-size: 0.84rem;
}

.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-links {
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  border-radius: 8px;
  padding: 9px 13px;
  transition: background 180ms ease, color 180ms ease;
}

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

.section {
  padding: 96px 0;
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 72px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 64px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 14px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.hero-text,
.section-text,
.project-card p {
  color: var(--muted);
}

.hero-text {
  max-width: 650px;
  margin-bottom: 32px;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  background: var(--teal);
  color: #061514;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: rgba(55, 200, 180, 0.55);
}

.profile-visual {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(55, 200, 180, 0.18), transparent 45%),
    linear-gradient(330deg, rgba(230, 177, 93, 0.16), transparent 48%),
    var(--surface);
  box-shadow: var(--shadow);
  animation: floatCard 7s ease-in-out infinite;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(122, 191, 120, 0.14);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.avatar {
  position: relative;
  display: grid;
  width: min(62%, 260px);
  aspect-ratio: 1;
  margin: 42px auto 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 242, 235, 0.08), rgba(55, 200, 180, 0.14)),
    var(--surface-strong);
  color: var(--text);
  font-size: clamp(3rem, 8vw, 5.7rem);
  font-weight: 900;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.code-preview {
  display: grid;
  gap: 8px;
  margin: 0 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(16, 17, 19, 0.64);
  padding: 18px;
  color: #d7d2c8;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.88rem;
}

.hero-copy,
.section-heading,
.split-section,
.project-card,
.contact-box {
  animation: fadeUp 720ms ease both;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

.section-text {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.muted-section,
.contact-section {
  border-block: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

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

.skill-grid span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px 18px;
  color: #e8e3da;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skill-grid span:hover {
  transform: translateY(-3px);
  border-color: rgba(55, 200, 180, 0.48);
  background: rgba(55, 200, 180, 0.08);
}

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

.project-card {
  min-height: 290px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 26px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(55, 200, 180, 0.52);
  background: var(--surface-strong);
}

.accent-card:hover {
  border-color: rgba(230, 177, 93, 0.56);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 72px;
}

.project-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.contact-box h2 {
  max-width: 660px;
}

.site-footer {
  padding: 28px 0;
  color: var(--soft);
  font-size: 0.94rem;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulseDot {
  0%,
  100% {
    box-shadow: 0 0 0 6px rgba(122, 191, 120, 0.14);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(122, 191, 120, 0.04);
  }
}

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

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .section,
  .hero {
    padding: 72px 0;
  }

  .hero {
    min-height: auto;
  }

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

  .hero-grid,
  .split-section {
    gap: 38px;
  }

  .contact-box {
    display: grid;
  }

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .brand {
    font-size: 0.96rem;
  }

  .nav-links {
    gap: 4px;
    font-size: 0.9rem;
  }

  .nav-links a {
    padding: 8px 10px;
  }

  h1 {
    font-size: 2.55rem;
  }

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

  .button {
    width: 100%;
  }

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

  .project-card {
    min-height: 0;
  }

  .project-meta {
    margin-bottom: 42px;
  }
}
