/* Copied from the Rails UI so Hugo keeps the same look & feel */
:root {
  --bg-matte: #0b0b0d;
  --surface: #121217;
  --border: #1f1f27;
  --text: #f2f2f3;
  --muted: #a7a7ae;
  --accent: #f5c400;
  --accent-muted: #d9b200;

  --container: 1120px;
  --content: 70ch;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-matte);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Helvetica,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(245, 196, 0, 0.25);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  white-space: normal;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

.site-header {
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (min-width: 768px) {
  .site-header {
    height: 100px;
  }
}

.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 100%;
}

.wordmark:hover {
  text-decoration: none;
}

.wordmark-logo {
  height: 50px;
  width: auto;
  display: block;
  object-fit: contain;
  max-height: calc(100% - 8px);
}

@media (min-width: 768px) {
  .wordmark-logo {
    height: 110px;
  }
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: var(--text);
  opacity: 0.9;
  font-size: 0.93rem;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
}

.nav-link:hover {
  text-decoration: none;
  opacity: 1;
  border-color: var(--border);
  background: rgba(18, 18, 23, 0.35);
}

.nav-link[aria-current="page"] {
  opacity: 1;
  border-color: rgba(245, 196, 0, 0.35);
  background: rgba(245, 196, 0, 0.06);
}

.nav-link.is-active {
  opacity: 1;
  border-color: rgba(245, 196, 0, 0.35);
  background: rgba(245, 196, 0, 0.06);
}

.nav-sep {
  color: var(--muted);
  opacity: 0.8;
  user-select: none;
}

.page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--border);
}

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

.accent-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--accent-muted), transparent);
}

.hero {
  padding: 32px 0 18px;
}

@media (min-width: 768px) {
  .hero {
    padding: 44px 0 22px;
  }
}

.hero h1 {
  margin: 0 0 8px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.hero p {
  margin: 0 0 14px;
  max-width: 64ch;
  color: var(--muted);
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.langswitch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 18, 23, 0.35);
  margin: 18px 0 8px;
}

.langswitch-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.langswitch-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 10px;
  background: transparent;
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

.langswitch-btn:hover {
  border-color: var(--border);
  background: rgba(18, 18, 23, 0.55);
}

.langswitch-btn.is-active {
  border-color: rgba(245, 196, 0, 0.35);
  background: rgba(245, 196, 0, 0.08);
}

.post-row {
  position: relative;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.post-row:hover::before,
.post-row:focus-within::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: var(--accent-muted);
  border-radius: 999px;
}

@media (min-width: 768px) {
  .post-row:hover::before,
  .post-row:focus-within::before {
    left: -18px;
  }
}

.post-row-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.25;
}

.post-row-title a {
  color: var(--text);
}

.post-row:hover .post-row-title a,
.post-row:focus-within .post-row-title a {
  text-decoration: underline;
  text-decoration-color: rgba(245, 196, 0, 0.45);
}

.post-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-row-excerpt {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 78ch;
}

.tag-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.65);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.85rem;
}

.tag-chip:hover {
  border-color: rgba(245, 196, 0, 0.35);
  text-decoration: none;
}

.tag-chip-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 10px;
}

.pager a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.55);
  border-radius: 10px;
  color: var(--text);
}

.pager a:hover {
  text-decoration: none;
  border-color: rgba(245, 196, 0, 0.35);
}

.pager .disabled {
  opacity: 0.5;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 10px;
}

.article-shell {
  padding: 30px 0 46px;
  max-width: var(--content);
  margin: 0 auto;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.article-title {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.article-prose {
  max-width: var(--content);
  margin: 0 auto;
}

.article-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
}

.article-prose p {
  margin: 16px 0;
}

.article-prose h1 {
  margin: 30px 0 10px;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 780;
}

.article-prose h2 {
  margin: 30px 0 10px;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 750;
}

.article-prose h3 {
  margin: 24px 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 700;
}

.article-prose ul,
.article-prose ol {
  margin: 16px 0;
  padding-left: 1.25rem;
}

.article-prose li {
  margin: 6px 0;
}

.article-prose blockquote {
  margin: 18px 0;
  padding: 8px 14px;
  border-left: 2px solid var(--accent-muted);
  color: var(--muted);
  background: rgba(18, 18, 23, 0.35);
}

.article-prose code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    "Liberation Mono",
    "Courier New",
    monospace;
  font-size: 0.95em;
}

.article-prose :not(pre) > code {
  padding: 0.12em 0.35em;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.7);
  border-radius: 8px;
}

.article-prose pre {
  margin: 18px 0;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.7);
  border-radius: 14px;
  overflow-x: auto;
  padding: 14px 16px;
}

.article-prose pre code {
  display: block;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--muted);
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.empty-state {
  padding: 28px 0 10px;
  color: var(--muted);
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.45);
  color: var(--text);
}

.icon-link:hover {
  border-color: rgba(245, 196, 0, 0.35);
  text-decoration: none;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 0 6px;
}

.social-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 10px;
}

/* Archive (year/month sidebar) */
.archive-layout {
  display: grid;
  gap: 22px;
}

@media (min-width: 1024px) {
  .archive-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
  }
}

.archive-section {
  scroll-margin-top: 92px; /* header height + breathing room */
}

.archive-heading {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 750;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.archive-post-row {
  padding: 12px 0;
}

.archive-post-title {
  font-size: 1rem;
}

.archive-toc {
  display: none;
}

@media (min-width: 1024px) {
  .archive-toc {
    display: block;
    position: sticky;
    top: 88px;
    align-self: start;
  }
}

.archive-toc-inner {
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.35);
  border-radius: 16px;
  padding: 14px;
}

.archive-toc-title {
  font-weight: 750;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.archive-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.archive-toc-link {
  display: block;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text);
  opacity: 0.9;
}

.archive-toc-link:hover {
  opacity: 1;
  text-decoration: none;
  border-color: var(--border);
  background: rgba(18, 18, 23, 0.35);
}

/* ===== PORTFOLIO / LANDING PAGE ===== */

/* Hero Landing */
.hero-landing {
  padding: 48px 0 32px;
}

@media (min-width: 768px) {
  .hero-landing {
    padding: 72px 0 48px;
  }
}

.hero-name {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-headline {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--accent);
}

.hero-tagline {
  margin: 0 0 28px;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.65;
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions .social-row {
  padding: 0;
  justify-content: flex-start;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--bg-matte);
  background: var(--accent);
  font-weight: 650;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}

.hero-cta:hover {
  opacity: 0.85;
  text-decoration: none;
}

.hero-cta--outline {
  background: var(--accent);
  color: var(--bg-matte);
}

/* Hero layout (text + photo) */
.hero-landing-inner {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .hero-landing-inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .hero-landing-content {
    flex: 1;
  }
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(245, 196, 0, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(245, 196, 0, 0.06);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.hero-photo img:hover {
  border-color: rgba(245, 196, 0, 0.35);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 196, 0, 0.08);
}

@media (min-width: 768px) {
  .hero-photo img {
    width: 320px;
    height: 320px;
  }
}

/* Sections */
.section {
  padding: 36px 0;
  scroll-margin-top: 80px;
}

@media (min-width: 768px) {
  .section {
    padding: 48px 0;
  }
}

.section-heading {
  margin: 0 0 24px;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-link {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

/* About */
.about-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 2fr 1fr;
    gap: 40px;
  }
}

.about-text p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 18, 23, 0.35);
}

.about-detail-label {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Skills */
.skills-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.skill-category {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18, 18, 23, 0.35);
}

.skill-category-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: rgba(18, 18, 23, 0.65);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Projects */
.projects-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18, 18, 23, 0.35);
  color: var(--text);
  transition: border-color 0.15s;
}

a.project-card:hover {
  text-decoration: none;
  border-color: rgba(245, 196, 0, 0.4);
}

.project-card--placeholder {
  opacity: 0.55;
  border-style: dashed;
}

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.project-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.project-card-arrow {
  color: var(--accent);
  font-size: 1.2rem;
}

.project-card-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
  flex: 1;
}

.project-card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== RESUME PAGE ===== */

.resume-page {
  padding: 36px 0 48px;
  max-width: var(--content);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .resume-page {
    padding: 48px 0 64px;
    max-width: 880px;
  }
}

.resume-header {
  padding-bottom: 28px;
}

.resume-header-main {
  margin-bottom: 20px;
}

.resume-name {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.resume-title {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.resume-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.resume-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.93rem;
}

.resume-contact-item a {
  color: var(--muted);
}

.resume-contact-item a:hover {
  color: var(--text);
}

.resume-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.resume-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.resume-contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
}

.resume-contact-links a:hover {
  border-color: rgba(245, 196, 0, 0.35);
  text-decoration: none;
}

.resume-contact-links .resume-icon {
  width: 14px;
  height: 14px;
}

/* Resume Sections */
.resume-section {
  padding: 24px 0;
}

.resume-section-title {
  margin: 0 0 20px;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.resume-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

/* Resume Entries (Experience, Education, etc.) */
.resume-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.resume-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resume-entry:first-child {
  padding-top: 0;
}

.resume-entry-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .resume-entry-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
  }
}

.resume-entry-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
}

.resume-entry-company {
  color: var(--muted);
  font-size: 0.93rem;
}

.resume-entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .resume-entry-meta {
    align-items: flex-end;
    text-align: right;
  }
}

.resume-entry-list {
  margin: 0;
  padding-left: 1.2rem;
}

.resume-entry-list li {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.93rem;
}

.resume-entry-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.93rem;
}

/* Resume Skills */
.resume-skills-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .resume-skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.resume-skill-group {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(18, 18, 23, 0.35);
}

.resume-skill-label {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Resume CTA */
.resume-cta-section {
  text-align: center;
  padding: 36px 0;
}

.resume-cta-text {
  margin: 0 0 18px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--muted);
}
