:root {
  --ink: #101917;
  --text: #1d2f2a;
  --muted: #5d6f68;
  --panel: rgba(250, 255, 249, 0.78);
  --line: rgba(16, 25, 23, 0.14);
  --mint: #8de2bd;
  --leaf: #208565;
  --sky: #7fc8ee;
  --sun: #f5c85d;
  --peach: #ef9f86;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #f6fff7;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

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

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -5;
  background-image:
    linear-gradient(rgba(32, 133, 101, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 133, 101, 0.09) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 76%);
}

.cursor-glow {
  position: fixed;
  z-index: 3;
  width: 260px;
  height: 260px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 200, 93, 0.32), transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 8px;
  background: rgba(248, 255, 248, 0.7);
  box-shadow: 0 18px 54px rgba(25, 72, 59, 0.12);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

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

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: var(--mint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.site-nav {
  gap: 4px;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 6px;
  color: rgba(16, 25, 23, 0.72);
  font-size: 14px;
  font-weight: 750;
}

.site-nav a:hover {
  background: rgba(32, 133, 101, 0.1);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.72fr);
  gap: 42px;
  align-items: center;
  padding: 128px max(24px, calc((100vw - 1120px) / 2)) 76px;
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-image {
  z-index: -4;
  object-fit: cover;
  filter: saturate(1.04) contrast(1.02);
  transform: scale(1.04);
  -webkit-user-drag: none;
}

.hero-shade {
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(247, 255, 247, 0.96), rgba(247, 255, 247, 0.82) 42%, rgba(247, 255, 247, 0.52)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(225, 248, 237, 0.76));
}

.terminal-line {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.66);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  box-shadow: 0 14px 36px rgba(29, 86, 69, 0.1);
}

.terminal-line span {
  color: var(--leaf);
  font-weight: 800;
}

.terminal-line code {
  white-space: normal;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: clamp(44px, 7vw, 86px);
  line-height: 1.03;
}

.intro {
  max-width: 680px;
  color: #30433d;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.75;
}

.intro.typewriter::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 6px;
  background: currentColor;
  vertical-align: -0.08em;
  animation: intro-caret-blink 900ms steps(1) infinite;
}

.intro.typewriter.typewriter-done::after {
  content: none;
}

@keyframes intro-caret-blink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 850;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(24, 74, 60, 0.16);
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
}

.code-card {
  border: 1px solid rgba(16, 25, 23, 0.18);
  border-radius: 8px;
  background: rgba(12, 22, 20, 0.88);
  box-shadow: 0 26px 90px rgba(15, 58, 46, 0.28);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.window-bar {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.window-bar span:nth-child(1) { background: var(--peach); }
.window-bar span:nth-child(2) { background: var(--sun); }
.window-bar span:nth-child(3) { background: var(--mint); }

pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
}

code {
  color: #dffbed;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  line-height: 1.8;
}

.section {
  padding: 100px max(24px, calc((100vw - 1120px) / 2));
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-title span {
  color: var(--leaf);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

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

.stack-grid article,
.project-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 54px rgba(32, 91, 75, 0.1);
  backdrop-filter: blur(14px);
}

.stack-grid article {
  min-height: 190px;
  padding: 22px;
}

.stack-grid h3,
.project-item h3 {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 22px;
}

.stack-grid p,
.project-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-section {
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(235, 250, 242, 0.72)),
    radial-gradient(circle at 86% 16%, rgba(127, 200, 238, 0.28), transparent 28%);
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.social-icons a {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 42px rgba(32, 91, 75, 0.12);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 22px 54px rgba(32, 91, 75, 0.18);
  transform: translateY(-3px);
}

.social-icons img {
  width: 27px;
  height: 27px;
  pointer-events: none;
}

@media (max-width: 880px) {
  .brand span:last-child {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 108px;
  }

  .code-card {
    align-self: start;
  }

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

}

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

  .site-nav a {
    padding: 9px 8px;
    font-size: 13px;
  }

  .hero {
    padding-inline: 18px;
  }

  .terminal-line {
    display: grid;
  }

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

  .section {
    padding: 72px 18px;
  }
}

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