/* ==========================================================================
   ubdella — Clean Editorial Portfolio
   Colors preserved from original site:
     - Sand / Parchment: #D5CFC0
     - Deep Slate:       #414B4C
     - Soft Mist:        #F5F8FD
     - Obsidian Black:   #000000 / #0E1011
   ========================================================================== */

:root {
  --sand: #D5CFC0;
  --sand-light: #E6E1D6;
  --mist: #F5F8FD;
  --slate: #414B4C;
  --ink: #1B2021;
  --muted: #5B6566;
  --obsidian: #0E1011;
  --black: #000000;

  --line-dark: rgba(65, 75, 76, 0.18);
  --line-light: rgba(245, 248, 253, 0.16);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.container {
  width: min(1120px, 90vw);
  margin: 0 auto;
}

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   Top Navigation
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(213, 207, 192, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}

.topbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate);
}

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

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate);
  transition: color 0.2s ease;
}

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

.nav .nav-pill {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--obsidian);
  color: var(--mist);
}

.nav .nav-pill:hover {
  background: var(--slate);
  color: var(--mist);
}

.menu-btn {
  display: none;
  padding: 6px;
  color: var(--ink);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 12px 5vw 20px;
  gap: 10px;
  background: var(--sand-light);
  border-bottom: 1px solid var(--line-dark);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 8px 0;
  font-weight: 500;
  color: var(--ink);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 72px 0 88px;
  border-bottom: 1px solid var(--line-dark);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(245, 248, 253, 0.45);
  color: var(--slate);
  margin-bottom: 24px;
}

.hero-name {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(4rem, 8.5vw, 6.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.pronounce-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.pronounce-text {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--slate);
  padding-bottom: 3px;
  border-bottom: 2px solid var(--slate);
  min-width: 104px;
  display: inline-block;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.pronounce-text.is-switching {
  opacity: 0;
  transform: translateY(4px);
}

.pronounce-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(65, 75, 76, 0.1);
  border-radius: 999px;
}

.tab-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--slate);
  transition: background 0.2s ease, color 0.2s ease;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--obsidian);
  color: var(--mist);
}

.hero-bio {
  margin: 0 0 32px;
  font-size: 1.22rem;
  color: var(--slate);
  max-width: 480px;
}

.hero-bio strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--obsidian);
  color: var(--mist);
}

.btn-dark:hover {
  background: var(--slate);
}

.btn-outline {
  border: 1px solid var(--slate);
  color: var(--ink);
}

.btn-outline:hover {
  background: rgba(65, 75, 76, 0.08);
}

.btn-sand {
  background: var(--sand);
  color: var(--ink);
}

.btn-sand:hover {
  background: var(--mist);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate);
}

.social-row a:hover {
  color: var(--black);
}

.hero-card {
  background: var(--mist);
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line-dark);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.09);
}

.portrait-wrap {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 5;
  background: var(--sand-light);
}

.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portrait-footer {
  display: flex;
  justify-content: space-between;
  padding: 12px 4px 2px;
  color: var(--muted);
}

/* ==========================================================================
   Shared Section Styles
   ========================================================================== */
.section {
  padding: 88px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-tag {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
}

.section-desc {
  margin: 10px 0 0;
  max-width: 480px;
  color: var(--slate);
}

.filter-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: rgba(65, 75, 76, 0.08);
  border-radius: 999px;
}

.filter-pill {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--slate);
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--obsidian);
  color: var(--mist);
}

/* ==========================================================================
   Works Grid
   ========================================================================== */
.works-section {
  background: var(--sand-light);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--mist);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card.card-wide {
  grid-column: span 2;
}

.card.is-hidden {
  display: none;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sand);
}

.card-wide .card-media {
  aspect-ratio: 16 / 9;
}

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

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 16, 17, 0.8);
  color: var(--mist);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.card-body {
  padding: 20px 22px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.card-title-row h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--ink);
}

.arrow {
  font-size: 1.1rem;
  color: var(--slate);
}

.card-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ==========================================================================
   Languages Section
   ========================================================================== */
.languages-section {
  background: var(--obsidian);
  color: var(--mist);
}

.languages-section .section-tag {
  color: rgba(245, 248, 253, 0.65);
}

.languages-section .section-title {
  color: var(--mist);
}

.languages-section .section-desc {
  color: rgba(245, 248, 253, 0.72);
}

.lang-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.lang-box {
  background: rgba(245, 248, 253, 0.04);
  border: 1px solid var(--line-light);
  border-radius: 16px;
  padding: 26px;
}

.lang-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-light);
  color: rgba(245, 248, 253, 0.7);
}

.lang-num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--sand);
}

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

.lang-items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 248, 253, 0.08);
  font-weight: 500;
}

.lang-items li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lang-meta {
  color: var(--sand);
  font-weight: 400;
  font-size: 0.94rem;
}

.exchange-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 26px;
  background: var(--slate);
  border-radius: 16px;
  font-weight: 500;
}

/* ==========================================================================
   Bookshelf Section
   ========================================================================== */
.library-section {
  background: var(--mist);
}

.shelf-table {
  border-top: 1px solid var(--line-dark);
}

.shelf-row {
  display: grid;
  grid-template-columns: 72px 1.4fr 1.2fr 92px;
  gap: 16px;
  align-items: center;
  padding: 16px 10px;
  border-bottom: 1px solid var(--line-dark);
  transition: background 0.2s ease;
}

.shelf-row.is-hidden {
  display: none;
}

.shelf-row:hover {
  background: rgba(213, 207, 192, 0.35);
}

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

.shelf-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
}

.shelf-by {
  color: var(--slate);
  font-size: 0.95rem;
}

.shelf-badge {
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: var(--slate);
}

/* ==========================================================================
   Footer / Contact
   ========================================================================== */
.footer {
  background: var(--black);
  color: var(--mist);
  padding: 88px 0 40px;
}

.footer .section-tag {
  color: rgba(245, 248, 253, 0.65);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line-light);
}

.footer-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  max-width: 480px;
}

.footer-email-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.footer-email {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--sand);
  border-bottom: 1px solid rgba(213, 207, 192, 0.45);
}

.footer-email:hover {
  color: var(--mist);
  border-color: var(--mist);
}

.copy-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-light);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--mist);
}

.copy-btn:hover {
  background: rgba(245, 248, 253, 0.12);
}

.footer-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 36px 0;
}

.footer-meta .mono {
  color: rgba(245, 248, 253, 0.6);
}

.footer-meta p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--sand);
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line-light);
  font-size: 0.85rem;
  color: rgba(245, 248, 253, 0.65);
}

.footer-bottom a {
  color: var(--sand);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 920px) {
  .hero-layout,
  .lang-columns,
  .footer-meta {
    grid-template-columns: 1fr;
  }

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

  .card.card-wide {
    grid-column: span 2;
  }

  .hero-card {
    max-width: 380px;
  }
}

@media (max-width: 680px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

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

  .card.card-wide {
    grid-column: span 1;
  }

  .shelf-row {
    grid-template-columns: 60px 1fr;
    gap: 6px 12px;
  }

  .shelf-by,
  .shelf-badge {
    grid-column: 2;
    justify-self: start;
  }
}
