/* ===========================================
   TAILWIND COMPONENT CLASSES
   Shared component styles extracted from
   inline Tailwind classes (5+ utilities)
   =========================================== */

/* -------------------------------------------
   TAILWIND V4 THEME CONFIGURATION
   ------------------------------------------- */

:root {
  --color-dark-bg: #0b0e14;
  --color-card-bg: #161b22;
  --color-teal-brand: oklch(0.72 0.11 178);
}

/* -------------------------------------------
   LAYOUT COMPONENTS
   ------------------------------------------- */

.tw-main-container {
  min-height: 100vh;
  background-color: var(--color-dark-bg);
  font-family: ui-sans-serif, system-ui, sans-serif;
  color: rgb(203 213 225);
}

.tw-content-wrapper {
  margin-left: auto;
  margin-right: auto;
  max-width: 72rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 768px) {
  .tw-content-wrapper {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 3rem;
  }
}

.tw-sidebar {
  position: sticky;
  top: 3rem;
}

.tw-sidebar-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .tw-sidebar-centered {
    align-items: flex-start;
    text-align: left;
  }
}

/* -------------------------------------------
   MAIN CONTENT COLUMNS
   ------------------------------------------- */

.tw-main-col {
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .tw-main-col {
    grid-column: span 8 / span 8;
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .tw-main-col {
    grid-column: span 9 / span 9;
  }
}

.tw-sidebar-col {
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .tw-sidebar-col {
    grid-column: span 4 / span 4;
    margin-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .tw-sidebar-col {
    grid-column: span 3 / span 3;
  }
}

/* -------------------------------------------
   ARTICLE CARDS
   ------------------------------------------- */

.tw-article-card {
  position: relative;
  border-radius: 2rem;
  border: 1px solid rgb(30 41 59 / 0.5);
  background-color: rgb(15 23 42 / 0.3);
  padding: 1.5rem;
  transition-property: all;
  transition-duration: 300ms;
}

.tw-article-card:hover {
  border-color: rgb(45 212 191 / 0.3);
  background-color: rgb(15 23 42 / 0.5);
}

@media (min-width: 768px) {
  .tw-article-card {
    padding: 2rem;
  }
}

.tw-article-title {
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 700;
  color: rgb(241 245 249);
  transition: color 150ms;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .tw-article-title {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

.tw-article-title:hover,
.tw-article-card:hover .tw-article-title {
  color: rgb(45 212 191);
}

.tw-article-preview {
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.625rem;
  color: rgb(148 163 184);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 768px) {
  .tw-article-preview {
    font-size: 1rem;
    line-height: 1.75rem;
  }
}

.tw-empty-state {
  border-radius: 2rem;
  border: 1px dashed rgb(30 41 59);
  background-color: rgb(15 23 42 / 0.1);
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
}

/* -------------------------------------------
   BADGES & TAGS
   ------------------------------------------- */

.tw-skill-tag {
  border-radius: 0.75rem;
  border: 1px solid rgb(45 212 191 / 0.2);
  background-color: rgb(45 212 191 / 0.05);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgb(45 212 191);
}

.tw-category-badge {
  border-radius: 0.375rem;
  border: 1px solid rgb(45 212 191 / 0.2);
  background-color: rgb(45 212 191 / 0.1);
  padding: 0.25rem 0.5rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(45 212 191);
}

.tw-date-badge {
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 0.375rem;
  border: 1px solid rgb(30 41 59);
  background-color: rgb(2 6 23);
  padding: 0.25rem 0.625rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(100 116 139);
}

.tw-hash-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(71 85 105);
}

.tw-tag-badge {
  border-radius: 9999px;
  border: 1px solid rgb(45 212 191 / 0.2);
  background-color: rgb(45 212 191 / 0.05);
  padding: 0.25rem 0.75rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(45 212 191);
}

/* -------------------------------------------
   PORTRAIT COMPONENTS
   ------------------------------------------- */

.tw-portrait-wrapper {
  border-radius: 1.5rem;
  border: 1px solid rgb(51 65 85);
  background-color: var(--color-card-bg);
  padding: 0.625rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(45 212 191 / 0.1);
}

.tw-portrait-inner {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  background-color: rgb(55 65 81);
  box-shadow: inset 0 4px 10px rgb(0 0 0 / 0.15);
}

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

.tw-portrait-container {
  position: relative;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  max-width: 240px;
}

@media (min-width: 768px) {
  .tw-portrait-container {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

.tw-status-badge {
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  display: flex;
  transform: translateX(-50%);
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 9999px;
  border: 1px solid rgb(51 65 85);
  background-color: var(--color-card-bg);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

@media (min-width: 768px) {
  .tw-status-badge {
    left: 1.5rem;
    transform: translateX(0);
  }
}

/* -------------------------------------------
   FORM COMPONENTS
   ------------------------------------------- */

.tw-input-wrapper {
  border-radius: 1rem;
  background-color: rgb(2 6 23);
  padding: 0.25rem;
  box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.4);
}

.tw-input-field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background-color: transparent;
  padding: 0.75rem 1rem;
  color: white;
  outline: none;
  transition: all 150ms;
}

.tw-input-field::placeholder {
  color: rgb(51 65 85);
}

.tw-input-field:focus {
  border-color: rgb(45 212 191 / 0.3);
  box-shadow: 0 0 0 1px rgb(45 212 191 / 0.2);
}

.tw-textarea-field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background-color: transparent;
  padding: 0.75rem 1rem;
  color: white;
  outline: none;
  transition: all 150ms;
  resize: none;
}

.tw-textarea-field::placeholder {
  color: rgb(51 65 85);
}

.tw-textarea-field:focus {
  border-color: rgb(45 212 191 / 0.3);
  box-shadow: 0 0 0 1px rgb(45 212 191 / 0.2);
}

.tw-submit-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 1rem;
  background-color: rgb(13 148 136);
  padding: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 10px 15px -3px rgb(45 212 191 / 0.2);
  transition: all 150ms;
}

.tw-submit-btn:hover {
  background-color: rgb(20 184 166);
}

.tw-submit-btn:active {
  transform: scale(0.98);
}

.tw-form-label {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(100 116 139);
}

/* -------------------------------------------
   NAVIGATION & PAGINATION
   ------------------------------------------- */

.tw-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(45 212 191);
  transition: color 150ms;
}

.tw-back-link:hover {
  color: white;
}

.tw-back-link-icon {
  margin-right: 0.5rem;
  transition: transform 150ms;
}

.tw-back-link:hover .tw-back-link-icon {
  transform: translateX(-0.25rem);
}

.tw-pager-btn {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgb(30 41 59);
  background-color: rgb(15 23 42);
  color: rgb(148 163 184);
  transition: all 150ms;
}

.tw-pager-btn:hover {
  border-color: rgb(45 212 191 / 0.5);
  color: rgb(45 212 191);
}

.tw-pager-active {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: rgb(13 148 136);
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 10px 15px -3px rgb(45 212 191 / 0.4);
}

.tw-pager-inactive {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid rgb(30 41 59);
  background-color: rgb(15 23 42);
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(100 116 139);
  transition: all 150ms;
}

.tw-pager-inactive:hover {
  border-color: rgb(51 65 85);
  color: rgb(226 232 240);
}

/* -------------------------------------------
   SOCIAL LINKS & BUTTONS
   ------------------------------------------- */

.tw-social-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  border: 1px solid rgb(30 41 59 / 0.5);
  background-color: rgb(15 23 42 / 0.4);
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: all 150ms;
}

.tw-social-link:hover {
  border-color: rgb(45 212 191 / 0.5);
  background-color: rgb(30 41 59);
}

.tw-social-link-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(203 213 225);
  transition: color 150ms;
}

.tw-social-link:hover .tw-social-link-text {
  color: rgb(45 212 191);
}

.tw-cta-btn {
  margin-top: 0.5rem;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 1rem;
  background-color: rgb(45 212 191);
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  box-shadow: 0 10px 15px -3px rgb(45 212 191 / 0.2);
  text-decoration: none;
  transition: all 150ms;
}

.tw-cta-btn:hover {
  background-color: rgb(20 184 166);
}

.tw-cta-btn:active {
  transform: scale(0.95);
}

.tw-btn-primary {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgb(45 212 191);
  color: white;
  border-radius: 0.25rem;
  font-weight: 600;
  transition: background-color 150ms;
}

.tw-btn-primary:hover {
  background-color: rgb(20 184 166);
}

/* -------------------------------------------
   CARD COMPONENTS (Bootstrap replacements)
   ------------------------------------------- */

.tw-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  overflow: hidden;
}

.tw-card-img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
}

.tw-card-body {
  padding: 1.5rem;
}

.tw-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tw-card-text {
  color: rgb(55 65 81);
  margin-bottom: 1rem;
}

/* -------------------------------------------
   ALERT COMPONENTS (Bootstrap replacement)
   ------------------------------------------- */

.tw-alert-success {
  background-color: rgb(220 252 231);
  border: 1px solid rgb(74 222 128);
  color: rgb(22 101 52);
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  position: relative;
  margin-bottom: 0;
}

.tw-alert-close {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  padding: 0.75rem 1rem;
  cursor: pointer;
  color: rgb(22 101 52);
  opacity: 0.5;
  transition: opacity 150ms;
}

.tw-alert-close:hover {
  opacity: 1;
}

/* -------------------------------------------
   IMAGE GRID (Bootstrap replacement)
   ------------------------------------------- */

.tw-image-row {
  display: flex;
  flex-wrap: wrap;
}

.tw-image-col {
  width: 100%;
  padding-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .tw-image-col {
    width: 50%;
  }
}

.tw-block-image {
  height: auto;
  width: 100%;
}

/* -------------------------------------------
   DECORATIVE ELEMENTS
   ------------------------------------------- */

.tw-section-bar {
  height: 1.5rem;
  width: 0.375rem;
  border-radius: 9999px;
  background-color: rgb(45 212 191);
  box-shadow: 0 0 8px rgb(45 212 191 / 0.6);
}

.tw-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  margin-left: 0.5rem;
}

.tw-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
}

/* -------------------------------------------
   UTILITY CLASSES
   ------------------------------------------- */

.tw-text-muted {
  color: rgb(100 116 139);
}

.tw-read-more {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.tw-read-more-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(100 116 139);
}

.tw-read-more-link:hover {
  color: rgb(148 163 184);
}
