/* Tokens from the Figma design "Vinutha's personal blog — Black & white" */
:root {
  --ink: #111;
  --body: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --surface: #f3f4f6;
  --surface-2: #e5e7eb;
  --white: #fff;
  --on-dark: #d1d5db;
  --dark-rule: #374151;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.08);

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 80px;
  --radius: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 12px;
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--narrow {
  max-width: calc(760px + 2 * var(--gutter));
}

.container--cover {
  max-width: calc(1040px + 2 * var(--gutter));
}

/* Shared pieces */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: normal;
}

.eyebrow--small {
  font-size: 11px;
  font-weight: 600;
}

.eyebrow__rule {
  width: 26px;
  height: 1px;
  background: var(--ink);
  flex: none;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.15;
  color: var(--ink);
}

.section-text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.text-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-color: var(--ink);
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 25px;
  line-height: normal;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

/* Header */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-header .identity {
  color: var(--white);
}

.site-header :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--white);
}

.site-header__inner {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  position: relative;
  padding: 6px 0;
  font-size: 14px;
  line-height: normal;
  color: var(--on-dark);
  text-decoration: none;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--white);
}

.nav__link.is-active {
  color: var(--white);
  font-weight: 600;
}

.nav__dot {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  display: none;
}

.nav__link.is-active .nav__dot {
  display: block;
}

/* Introduction */
.intro__inner {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-top: 64px;
  padding-bottom: 72px;
}

.intro__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.intro__headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 62px;
  line-height: 1.13;
  color: var(--ink);
}

.intro__headline span {
  display: block;
}

.intro__welcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro__greeting {
  font-size: 19px;
  font-weight: 500;
  line-height: normal;
  color: var(--ink);
}

.intro__copy {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.about-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.about-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.about-block:nth-child(even) {
  background: var(--surface-2);
}

.about-block__topic {
  font-size: 11px;
  font-weight: 600;
  line-height: normal;
  color: var(--ink);
}

.about-block__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: normal;
  color: var(--ink);
}

.about-block__text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--body);
}

.about-block:nth-child(even) .about-block__title {
  color: var(--ink);
}

.about-block:nth-child(even) .about-block__text {
  color: var(--muted);
}

.portrait {
  flex: none;
  width: 424px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.portrait__frame {
  width: 100%;
  aspect-ratio: 424 / 510;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 212px 212px var(--radius) var(--radius);
  overflow: hidden;
}

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

.portrait__caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: normal;
  color: var(--muted);
  text-align: center;
}

/* My blogs */
.blogs {
  padding: 72px 0;
}

.blogs > .container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 10px 0 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.search:focus-within {
  border-color: var(--ink);
}

.search img {
  flex: none;
}

.search input {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search button,
.filters__pill {
  font: inherit;
  cursor: pointer;
}

.search button {
  flex: none;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  line-height: normal;
  transition: background 0.15s ease;
}

.search button:hover {
  background: var(--body);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: -16px;
}

.filters__pill {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  line-height: normal;
}

.filters__pill:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.filters__pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  min-height: 445px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #9ca3af;
}

.card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card__link:focus-visible {
  outline-offset: -4px;
  border-radius: var(--radius);
}

.card__image {
  flex: none;
  aspect-ratio: 384 / 176;
  background: var(--surface-2);
  overflow: hidden;
}

.card:nth-child(even) .card__image {
  background: var(--surface);
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card__image img {
  transform: scale(1.04);
}

.card__content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.card__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card__category {
  font-size: 11px;
  font-weight: 600;
  line-height: normal;
  color: var(--ink);
}

.card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ink);
}

.card__excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  font-size: 13px;
  line-height: normal;
  color: var(--muted);
  white-space: nowrap;
}

.blogs__empty {
  color: var(--muted);
}

.blogs__more {
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--on-dark);
  padding: 48px 0;
}

.site-footer > .container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.site-footer__brand {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.site-footer .identity {
  color: var(--white);
}

.site-footer__brand p {
  font-size: 15px;
  line-height: 1.7;
}

.site-footer__links {
  display: flex;
  gap: 64px;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  line-height: normal;
  white-space: nowrap;
}

.site-footer__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--on-dark);
}

.site-footer__col a {
  font-size: 14px;
  color: var(--white);
  text-decoration: none;
}

.site-footer__col a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__divider {
  height: 1px;
  background: var(--dark-rule);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  font-size: 13px;
  line-height: normal;
}

/* Single post */
.post {
  padding: 56px 0 88px;
}

.post__back {
  display: inline-block;
  font-size: 14px;
}

.post__header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 32px 0 40px;
}

.post__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 50px;
  line-height: 1.15;
  color: var(--ink);
  text-wrap: balance;
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 13px;
  line-height: normal;
  color: var(--muted);
}

.post__cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 48px;
}

.prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--body);
}

.prose > * + * {
  margin-top: 1.4em;
}

.prose h2,
.prose h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
  margin-top: 2em;
}

.prose h2 {
  font-size: 32px;
}

.prose h3 {
  font-size: 24px;
}

.prose a {
  color: var(--ink);
  text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--muted);
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 24px 28px;
  background: var(--surface);
  border-radius: var(--radius);
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink);
}

.prose img {
  border-radius: var(--radius);
  height: auto;
}

.prose code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.4em 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.post__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.post__nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  font-size: 13px;
  color: var(--muted);
}

.post__nav-link strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
}

.post__nav-link:hover strong {
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 4px;
}

.post__nav-link--next {
  grid-column: 2;
  text-align: right;
  align-items: flex-end;
}

/* Simple pages */
.page-intro {
  padding: 64px 0 24px;
}

.page-intro > .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-intro__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 62px;
  line-height: 1.13;
  color: var(--ink);
}

.page-intro__text {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 1100px) {
  :root {
    --gutter: 40px;
  }

  .intro__inner {
    gap: 40px;
  }

  .intro__headline,
  .page-intro__title {
    font-size: 50px;
  }

  .portrait {
    width: 340px;
  }

  .portrait__frame {
    border-radius: 170px 170px var(--radius) var(--radius);
  }

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

  .card {
    min-height: 0;
  }
}

@media (max-width: 860px) {
  .intro__inner {
    flex-direction: column;
    align-items: stretch;
    padding-top: 40px;
    padding-bottom: 56px;
  }

  .portrait {
    width: min(300px, 100%);
    align-self: center;
  }

  .portrait__frame {
    border-radius: 150px 150px var(--radius) var(--radius);
  }

  .blogs {
    padding: 56px 0;
  }

  .section-title {
    font-size: 34px;
  }

  .post__title {
    font-size: 38px;
  }

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

@media (max-width: 640px) {
  :root {
    --gutter: 20px;
  }

  .site-header__inner {
    min-height: 0;
    padding-top: 20px;
    padding-bottom: 22px;
    flex-wrap: wrap;
  }

  .identity {
    font-size: 21px;
  }

  .nav {
    gap: 24px;
  }

  .intro__text {
    gap: 24px;
  }

  .intro__headline,
  .page-intro__title {
    font-size: 38px;
  }

  .intro__greeting {
    font-size: 17px;
  }

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

  .about-block {
    padding: 24px;
  }

  .about-block__title {
    font-size: 23px;
  }

  .blogs > .container {
    gap: 28px;
  }

  .filters {
    margin-top: -8px;
  }

  .section-title {
    font-size: 30px;
  }

  .post {
    padding: 36px 0 64px;
  }

  .post__title {
    font-size: 32px;
  }

  .prose {
    font-size: 16px;
  }

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

  .post__nav-link--next {
    grid-column: 1;
    text-align: left;
    align-items: flex-start;
  }

  .site-footer__links {
    gap: 48px;
  }
}

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

  .card,
  .card__image img {
    transition: none;
  }

  .card:hover,
  .card:focus-within {
    transform: none;
  }

  .card:hover .card__image img {
    transform: none;
  }
}
