:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5c5c5c;
  --accent: #1f1f1f;
  --accent-light: #4c5fd5;
  --border: #e0e3eb;
  --shadow: 0 20px 60px rgba(31, 31, 31, 0.08);
  --project-image-width: 32%;
  --project-image-aspect-ratio: 16 / 9;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

main {
  padding-inline: 5vw;
  padding-top: 120px;
}

.section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.section-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5vw;
  background: rgba(247, 248, 250, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand__name {
  font-weight: 600;
  margin: 0;
}

.brand__title {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: 1rem;
  font-weight: 500;
}

.site-nav a {
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
}

.site-nav a.active {
  background: rgba(0, 0, 0, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero h1 {
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}

.hero__summary {
  font-size: 1.1rem;
  color: var(--muted);
}

.hero__cta {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
}

.hero__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hero__metrics dt {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.hero__metrics dd {
  margin: 0;
  color: var(--muted);
}

.hero__panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.panel__title {
  font-weight: 600;
  margin-top: 0;
}

.hero__panel ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.panel__link {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  color: var(--accent-light);
  font-weight: 600;
}

.experience {
  margin-bottom: 4rem;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.timeline article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.timeline time {
  font-weight: 600;
  color: var(--accent-light);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.timeline-column h3 {
  margin-top: 0;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline article h4 {
  margin-bottom: 100rem;
}

.timeline article h4 + p {
  margin-top: 10;
}

.timeline__logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.timeline__logo-img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: 4px;
}

.timeline article img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.projects {
  margin-bottom: 4rem;
}

.home-links {
  margin-bottom: 4rem;
}

.home-links__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.home-links article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.home-links article p {
  color: var(--muted);
}

.home-links article a {
  font-weight: 600;
  color: var(--accent-light);
}

.project-card {
  display: grid;
  grid-template-columns: var(--project-image-width) minmax(0, 1fr);
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.project-card__image {
  width: 100%;
  aspect-ratio: var(--project-image-aspect-ratio);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fff;
}

.project-card__image--contain {
  background-color: #fff;
}

.project-card__body {
  padding: 2rem;
}

.project-card__topics {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.blog-section {
  margin-bottom: 4rem;
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.blog-filter__button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-filter__button:hover,
.blog-filter__button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card.blog-card {
  display: block;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: 0;
}

.blog-grid .project-card.blog-card {
  max-width: none;
  margin-inline: 0;
}

.blog-grid .project-card.blog-card.is-hidden {
  display: none;
}

.blog-grid .project-card.blog-card .project-card__body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
  padding: 1.75rem;
  text-align: left;
}

.blog-grid .project-card.blog-card h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0.8rem 0 0.75rem;
  min-height: 3.25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-grid .project-card.blog-card p {
  color: var(--muted);
  line-height: 1.55;
  margin-top: 0;
  min-height: 5rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.blog-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-card__tags span {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.blog-grid .project-card__actions {
  margin-top: auto;
}

.page-hero {
  margin-bottom: 3rem;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero p {
  color: var(--muted);
  max-width: 720px;
  margin-inline: auto;
}

.skills {
  margin-bottom: 4rem;
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skills__grid article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.skills__grid ul {
  padding-left: 1.2rem;
  color: var(--muted);
}

.hobbies {
  margin-bottom: 4rem;
}

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.hobby-grid article {
  background: var(--card);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.hobby-grid article a {
  color: var(--accent-light);
  font-weight: 600;
}

.diary-link {
  text-align: center;
  margin-bottom: 3rem;
}

.resume {
  margin-bottom: 4rem;
}

.resume__card {
  background: var(--card);
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.resume__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 220px;
}

.contact {
  background: #111;
  color: #fff;
  padding: 3rem;
  border-radius: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.contact-card,
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-card ul {
  padding-left: 1rem;
  color: var(--muted);
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 0.75rem;
  font-family: inherit;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.contact__actions .btn {
  border-color: #fff;
  background: #fff;
  color: #111;
}

.contact__actions .btn--ghost {
  background: transparent;
  color: #fff;
}

.channel-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.channel-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.site-footer {
  padding: 2rem 5vw 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.85rem;
  }

  .site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    width: 100%;
  }

  .site-nav a {
    border: 1px solid var(--border);
    font-size: 0.88rem;
    padding: 0.35rem 0.55rem;
  }

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

  main {
    padding-inline: 1.5rem;
    padding-top: 180px;
  }

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

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

@media (max-width: 600px) {
  .hero__cta {
    flex-direction: column;
  }

  .resume__card {
    flex-direction: column;
  }

  .contact {
    flex-direction: column;
  }

  .home-links__grid {
    grid-template-columns: 1fr;
  }

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

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

  .channel-buttons {
    flex-direction: column;
  }
}
