@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #f5f5f2;
  --surface: rgba(245, 245, 242, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #111110;
  --muted: #6b6b67;
  --faint: #a8a8a3;
  --line: rgba(17, 17, 16, 0.1);
  --line-strong: rgba(17, 17, 16, 0.22);
  --accent: #111110;
  --radius: 16px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: url("https://media.giphy.com/media/zFujLTc7z4GvC/giphy.gif");
  background-size: min(720px, 80vw) auto;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.38;
  filter: grayscale(1) contrast(1.2) brightness(0.9);
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(245, 245, 242, 0.35) 0%,
    rgba(245, 245, 242, 0.55) 40%,
    rgba(245, 245, 242, 0.85) 75%,
    rgba(245, 245, 242, 0.97) 100%
  );
}

::selection {
  color: var(--bg);
  background: var(--text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: rgba(245, 245, 242, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.site-header-inner {
  width: min(var(--max-width), calc(100% - 44px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
}

.page-shell,
.footer {
  width: min(var(--max-width), calc(100% - 44px));
  margin: 0 auto;
}

.brand,
.nav,
.section-kicker,
.overline,
.row-index,
.row-tags,
.award-card span,
.footer {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.brand::before {
  content: "~/";
  color: var(--faint);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
  color: var(--faint);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.section-split {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(34px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}

.hero {
  min-height: calc(100vh - 62px);
  align-items: center;
  padding: clamp(72px, 12vw, 150px) 0;
}

.content-section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section-kicker {
  position: sticky;
  top: 82px;
  align-self: start;
  color: var(--faint);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overline {
  color: var(--faint);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1,
.section-body h2 {
  max-width: 860px;
  font-size: clamp(46px, 9vw, 112px);
  line-height: 0.91;
  letter-spacing: -0.085em;
  font-weight: 800;
  color: var(--text);
}

.hero h1 {
  margin-top: 24px;
}

.lead {
  max-width: 780px;
  margin-top: 32px;
  color: var(--text);
  font-size: clamp(20px, 2.8vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.05em;
  font-weight: 600;
}

.summary,
.section-body > p {
  max-width: 680px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.8;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}

.hero-links a,
.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hero-links a {
  gap: 8px;
}

.link-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}

.link-icon-kaggle {
  width: 15px;
  height: 15px;
  transform: translateY(-1px);
}

.link-icon-contact {
  width: 17px;
  height: 17px;
  transform: translateY(-1px);
}

.hero-links a:first-child .link-icon {
  filter: brightness(0) invert(1);
}

.hero-links a:first-child {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.hero-links a:hover,
.small-link:hover {
  color: var(--text);
  border-color: var(--text);
  background: transparent;
}

.hero-links a:first-child:hover {
  background: #2a2a28;
  border-color: #2a2a28;
  color: var(--bg);
}

.section-body h2 {
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 0.96;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.small-link {
  flex: 0 0 auto;
  min-height: 34px;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.list-stack {
  border-top: 1px solid var(--line-strong);
}

.project-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 230px;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.row-index,
.row-tags {
  color: var(--faint);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
}
.row-index {
  font-size: 15px;
  font-weight: 500;
}

.row-main h3 {
  font-size: clamp(22px, 2.8vw, 38px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.row-main p {
  max-width: 630px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.award-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--bg);
  transition: background 0.15s ease;
  border-radius: 0;
}

.award-card:hover {
  background: #fff;
}

.award-card span {
  color: var(--faint);
  font-size: 15px;
  letter-spacing: 0.05em;
}

.award-card h3 {
  margin-top: auto;
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 700;
}

.award-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.skills-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.skills-grid > div,
.contact-grid a {
  min-height: 140px;
  padding: 22px;
  background: var(--bg);
}

.skills-grid h3,
.contact-grid strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.skills-grid p,
.contact-grid span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.contact-grid a {
  min-height: 100px;
  transition: background 0.15s ease;
}

.contact-grid a:hover {
  background: #fff;
}

.contact-grid a::after {
  content: "↗";
  float: right;
  color: var(--faint);
  font-size: 14px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--faint);
  font-size: 15px;
  letter-spacing: 0.03em;
}

.footer a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .section-split {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .section-kicker {
    position: static;
  }

  .hero {
    min-height: auto;
  }

  .section-heading-row,
  .project-row {
    grid-template-columns: 1fr;
  }

  .project-row {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .site-header-inner,
  .page-shell,
  .footer {
    width: min(100% - 28px, var(--max-width));
  }

  .nav {
    gap: 16px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: clamp(42px, 15vw, 72px);
  }

  .lead {
    font-size: 20px;
  }

  .award-grid,
  .skills-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .award-card,
  .skills-grid > div,
  .contact-grid a {
    min-height: 120px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
