/* Portfolio Web Light Theme Custom Styling */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #fafafa;
  --border-primary: #dbdbdb;
  --border-secondary: #efefef;
  --text-primary: #000000;
  --text-secondary: #737373;
  --link-color: #00376b;
  --accent-color: #0095f6;
  --accent-hover: #1877f2;
  --btn-bg: #efefef;
  --btn-hover: #dbdbdb;
  
  --system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --header-font: 'Outfit', sans-serif;
  --code-font: 'Space Grotesk', monospace;
  
  --sidebar-width: 380px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--system-font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  height: 100vh;
}

/* App Container Layout */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Left & Center Profile Feed Page */
.profile-section {
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  background-color: var(--bg-primary);
  display: flex;
  justify-content: center;
  padding-bottom: 50px;
}

.profile-content {
  width: 100%;
  max-width: none;
  padding: 30px 96px 0;
}

/* Profile Header */
.profile-header {
  display: flex;
  flex-direction: column;
  max-width: 935px;
  width: 100%;
  margin: 0 auto 44px;
}

.profile-main-row {
  display: flex;
  align-items: center;
  width: 100%;
}

.avatar-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 30px;
}

.avatar-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-svg {
  width: 90px;
  height: 90px;
}

.profile-picture {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 35%;
}

.profile-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.username-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

/* Action Buttons Row (Below PFP and Username info) */
.profile-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 20px 0 16px;
}

.profile-buttons-row .btn {
  flex: 1;
  padding: 10px 16px; /* Slightly taller for a more premium tap area */
}

.profile-bio-details {
  width: 100%;
  margin-top: 4px;
}

.username {
  font-family: var(--header-font);
  font-size: 28px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: 0;
  margin-right: 12px;
  overflow-wrap: anywhere;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.btn-following {
  background-color: var(--btn-bg);
  color: var(--text-primary);
}

.btn-following:hover {
  background-color: var(--btn-hover);
}

.arrow-down-svg {
  width: 12px;
  height: 12px;
  margin-left: 6px;
  fill: currentColor;
}

.btn-message {
  background-color: var(--btn-bg);
  color: var(--text-primary);
}

.btn-message:hover {
  background-color: var(--btn-hover);
}

.btn-social {
  flex: 0 0 44px !important;
  width: 44px;
  min-width: 44px;
  padding: 10px !important;
  background-color: var(--btn-bg);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-social:hover {
  background-color: var(--btn-hover);
}

.social-icon {
  width: 19px;
  height: 19px;
  display: block;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.more-options-svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Stats Row */
.stats-row {
  display: flex;
  list-style: none;
  margin-bottom: 20px;
  gap: 40px;
  font-size: 16px;
}

.stat-count {
  font-weight: 600;
}

/* Bio */
.full-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.bio-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

.bio-text span {
  color: var(--text-secondary);
}

/* Tabs */
.feed-tabs {
  display: flex;
  justify-content: center;
  border-top: 1px solid var(--border-secondary);
  margin-bottom: 0;
  gap: 60px;
}

.tab-item {
  background: none;
  border: none;
  border-top: 1px solid transparent;
  padding: 18px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  margin-top: -1px;
  transition: color 0.2s ease;
}

.tab-item.active {
  border-top: 1px solid var(--text-primary);
  color: var(--text-primary);
}

.tab-icon {
  width: 12px;
  height: 12px;
}

/* Grid Layout */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding-bottom: 60px;
}

.grid-post-card {
  position: relative;
  aspect-ratio: 1 / 1;
  background-color: var(--bg-secondary);
  cursor: pointer;
  overflow: hidden;
  transition: filter 0.2s ease;
}

.grid-post-card::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 17px;
  height: 17px;
  border: 2px solid #ffffff;
  border-radius: 3px;
  box-shadow: -4px 4px 0 -1px #ffffff;
  opacity: 0.95;
  pointer-events: none;
}

/* Overlay on Hover */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #ffffff;
  font-weight: 600;
}

.grid-post-card:hover .card-overlay {
  opacity: 1;
}

.overlay-stat {
  display: flex;
  align-items: center;
  gap: 7px;
}

.overlay-stat-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.stat-val {
  font-size: 16px;
}

/* Project Themed Media Cards */
.card-media {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.project-tag {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ScoreShift Visual Theme */
.music-theme {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}

.score-card-bg {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.stave-lines {
  position: absolute;
  width: 80%;
  height: 40px;
  border-top: 1px solid rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.stave-lines::before, .stave-lines::after {
  content: '';
  height: 1px;
  background-color: rgba(0,0,0,0.15);
}

.musical-note {
  font-size: 64px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.1));
}

.c-note {
  transform: translate(-20px, -10px);
}

.f-note {
  transform: translate(25px, 15px) rotate(15deg);
}

/* HVAC Model Visual Theme */
.model-theme {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.model-card-bg {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-line {
  position: absolute;
  width: 70%;
  height: 4px;
  background-color: var(--accent-color);
  transform: rotate(-15deg);
  box-shadow: 0 4px 10px rgba(0, 149, 246, 0.4);
}

.chart-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: #ffffff;
  border: 3px solid var(--accent-color);
  border-radius: 50%;
}

.chart-dot.d1 { transform: translate(-60px, 15px); }
.chart-dot.d2 { transform: translate(0, 0); }
.chart-dot.d3 { transform: translate(60px, -15px); }

.r2-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-primary);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--code-font);
}

/* HVAC RAG Visual Theme */
.rag-theme {
  background: linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%);
}

.rag-card-bg {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.retrieval-query {
  font-family: var(--code-font);
  font-size: 14px;
  font-weight: 500;
  background: #ffffff;
  color: #333333;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-primary);
  box-shadow: 0 6px 15px rgba(0,0,0,0.06);
}

/* Othello Visual Theme */
.othello-theme {
  background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

.othello-card-bg {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.othello-board {
  display: grid;
  grid-template-columns: repeat(2, 45px);
  grid-template-rows: repeat(2, 45px);
  gap: 3px;
  background-color: #0b3d2c;
  padding: 6px;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.ob-cell {
  background-color: #1e6d4f;
  border-radius: 2px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.ob-cell::after {
  content: '';
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: inset -1px -2px 4px rgba(0,0,0,0.4);
}

.ob-cell.val-w::after {
  background-color: #ffffff;
}

.ob-cell.val-b::after {
  background-color: #111111;
}

/* About Me */
.about-section {
  padding: 34px 0 64px;
}

.about-intro {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 26px;
}

.about-info-list {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.about-info-row {
  border-top: 1px solid var(--border-secondary);
  padding-top: 18px;
}

.about-info-row h3 {
  font-family: var(--header-font);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.about-info-row p {
  max-width: 760px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-skills span {
  border: 1px solid var(--border-secondary);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
}

.hidden {
  display: none !important;
}

/* Footer Section */
.site-footer {
  margin-top: 40px;
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copyright {
  display: flex;
  justify-content: center;
  gap: 20px;
  align-items: center;
}

.language-dropdown {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chevron-down-small {
  width: 14px;
  height: 14px;
}

/* RIGHT: Direct Message (DM) Chat Panel */
.chat-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: var(--sidebar-width);
  max-width: 420px;
  height: 100vh;
  border-left: 1px solid var(--border-primary);
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  z-index: 120;
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-sidebar.open {
  right: 0;
}

.chat-drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 119;
}

.chat-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.chat-header {
  height: 75px;
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.header-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.header-username {
  font-weight: 600;
  font-size: 16px;
}

.header-status {
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 0 2px var(--bg-primary);
  flex-shrink: 0;
}

.dm-action-icon {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

/* Messages Stream */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Welcome Card in Chat */
.chat-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border-secondary);
}

.chat-card-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.chat-profile-card h3 {
  font-family: var(--header-font);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}

.sub-profile-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.chat-badge {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.btn-chat-action {
  border: none;
  background-color: var(--btn-bg);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-chat-action:hover {
  background-color: var(--btn-hover);
}

.chat-time-divider {
  align-self: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 12px 0;
  letter-spacing: 0.5px;
}

/* Bubbles */
.message {
  display: flex;
  gap: 8px;
  max-width: 85%;
}

.msg-received {
  align-self: flex-start;
}

.msg-sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.msg-avatar .avatar-svg {
  width: 18px;
  height: 18px;
}

.msg-bubble {
  padding: 12px 16px;
  border-radius: 22px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.msg-received .msg-bubble {
  background-color: var(--border-secondary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-sent .msg-bubble {
  background: linear-gradient(135deg, var(--accent-color) 0%, #1d82f6 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* DM Input Bar */
.chat-input-bar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-primary);
}

.input-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.input-svg-icon {
  width: 24px;
  height: 24px;
}

#chat-input-field {
  flex: 1;
  border: 1px solid var(--border-primary);
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  background-color: transparent;
  color: var(--text-primary);
}

#chat-input-field:focus {
  border-color: var(--btn-hover);
}

.input-right-actions {
  display: flex;
  gap: 12px;
}

/* Floating Emoji Picker */
.emoji-picker {
  position: fixed;
  width: min(426px, calc(100vw - 16px));
  max-height: min(460px, calc(100vh - 24px));
  background-color: var(--bg-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
  z-index: 220;
  overflow: hidden;
}

.emoji-picker::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 28px;
  width: 16px;
  height: 16px;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-secondary);
  border-bottom: 1px solid var(--border-secondary);
  transform: rotate(45deg);
}

.emoji-search-wrap {
  margin: 14px 10px 10px;
  height: 48px;
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  background-color: #f6f7f8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.emoji-search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

#emoji-search {
  flex: 1;
  border: none;
  outline: none;
  background-color: transparent;
  color: var(--text-primary);
  font-size: 16px;
}

.emoji-section-label {
  padding: 6px 4px 8px;
  color: #7a828e;
  font-size: 14px;
  font-weight: 700;
}

.emoji-scroll {
  max-height: 318px;
  overflow-y: auto;
  padding: 0 14px 12px;
}

.emoji-section {
  margin-bottom: 8px;
}

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

.emoji-option {
  height: 42px;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-option:hover {
  background-color: var(--border-secondary);
}

.emoji-empty {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 28px 0;
  text-align: center;
}

/* Typing Indicator Animation */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}


/* OVERLAY MODAL: Portfolio Detail Panel */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 40px;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  z-index: 101;
}

.post-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.94);
  color: #111111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  z-index: 101;
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.post-nav-btn:hover {
  background-color: #ffffff;
  transform: translateY(-50%) scale(1.06);
}

.post-nav-prev {
  left: 32px;
}

.post-nav-next {
  right: 32px;
}

.post-nav-svg {
  width: 26px;
  height: 26px;
}

.modal-wrapper {
  background-color: var(--bg-primary);
  width: 100%;
  max-width: 935px;
  height: 100%;
  max-height: 600px;
  display: flex;
  border-radius: 4px;
  overflow: hidden;
}

/* Left Media Slider Panel */
.modal-media-panel {
  flex: 1.4;
  background-color: #000000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.carousel-container {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.3s ease-out;
}

.carousel-slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  position: relative;
}

/* Carousel controls */
.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: #111111;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 5;
  transition: opacity 0.2s ease;
}

.carousel-nav-btn:hover {
  background-color: #ffffff;
}

.carousel-nav-btn.nav-left { left: 16px; }
.carousel-nav-btn.nav-right { right: 16px; }

.carousel-nav-btn.disabled {
  display: none !important;
}

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

.carousel-indicator-dots {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 6px;
  z-index: 5;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  transition: background-color 0.2s ease;
}

.dot.active {
  background-color: #ffffff;
}

/* Interactive Project Slide Designs inside Modal */

/* Slide 1 Cover Graphic Layouts */
.slide-cover-root {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.slide-cover-title {
  font-family: var(--header-font);
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.slide-cover-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
  max-width: 400px;
}

.slide-tech-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tech-badge {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Code Viewer Slide */
.code-viewer-panel {
  width: 100%;
  height: 100%;
  background-color: #0b0f19;
  font-family: var(--code-font);
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.code-title {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-window-dots {
  display: flex;
  gap: 6px;
}

.cwd {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cwd.red { background-color: #ff5f56; }
.cwd.yellow { background-color: #ffbd2e; }
.cwd.green { background-color: #27c93f; }

.code-content-block {
  flex: 1;
  overflow: auto;
  color: #a9b1d6;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
}

.code-comment { color: #565f89; font-style: italic; }
.code-keyword { color: #bb9af3; }
.code-function { color: #7de0f2; }
.code-string { color: #9ece6a; }

/* HVAC Diagram Slide */
.slide-diagram-root {
  width: 100%;
  height: 100%;
  background-color: #1a202c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  gap: 20px;
}

.flow-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 80%;
}

.flow-node {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 16px;
  text-align: center;
  font-size: 13px;
  position: relative;
}

.flow-node::after {
  content: '↓';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 14px;
}

.flow-node:last-child::after {
  display: none;
}

.flow-node strong {
  color: var(--accent-color);
}

/* RAG Visual DB Slide */
.slide-database-root {
  width: 100%;
  height: 100%;
  background-color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  gap: 30px;
}

.db-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 90%;
}

.db-cell {
  background-color: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
  font-size: 11px;
}

.db-cell.matched {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.db-match-label {
  color: #10b981;
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Stave Notation Slide */
.slide-stave-root {
  width: 100%;
  height: 100%;
  background-color: #f7f9fa;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.stave-wrapper {
  width: 90%;
  background-color: #ffffff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.notation-stave {
  position: relative;
  height: 60px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  margin-bottom: 20px;
}

.notation-stave::before, .notation-stave::after {
  content: '';
  height: 1px;
  background-color: #000;
}

.clef-symbol {
  position: absolute;
  left: 10px;
  font-size: 36px;
  top: 50%;
  transform: translateY(-50%);
}

.notation-note {
  position: absolute;
  font-size: 24px;
  top: 40%;
}

.notation-note.n1 { left: 80px; top: 30%; }
.notation-note.n2 { left: 140px; top: 50%; }
.notation-note.n3 { left: 200px; top: 20%; }

/* Right Details Info Panel */
.modal-details-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  border-left: 1px solid var(--border-secondary);
  min-height: 0;
}

.details-header {
  height: 60px;
  border-bottom: 1px solid var(--border-secondary);
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 12px;
}

.header-user-avatar .avatar-svg {
  width: 20px;
  height: 20px;
}

.header-username-info {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.dt-username {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.bullet-dot {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1;
  align-self: center;
}

.btn-inline-follow {
  background: none;
  border: none;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transform: translateY(2px);
}

.btn-inline-follow:hover {
  color: var(--text-secondary);
}

/* Scrollable Comments Feed inside Modal */
.details-comments-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.approved-comments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-row {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--border-secondary);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.comment-avatar .avatar-svg {
  width: 20px;
  height: 20px;
}

.comment-avatar-text {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 1px 2px rgba(0, 0, 0, 0.12);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.avatar-theme-0 { background: linear-gradient(135deg, #f97316, #fb7185); }
.avatar-theme-1 { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.avatar-theme-2 { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.avatar-theme-3 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.avatar-theme-4 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.avatar-theme-5 { background: linear-gradient(135deg, #6366f1, #0ea5e9); }
.avatar-theme-6 { background: linear-gradient(135deg, #10b981, #84cc16); }
.avatar-theme-7 { background: linear-gradient(135deg, #64748b, #a855f7); }

.comment-content {
  flex: 1;
}

.comment-user {
  font-weight: 600;
  margin-right: 6px;
}

.comment-body {
  word-break: break-word;
}

.comment-body p {
  margin-bottom: 8px;
}

.comment-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Interactions & Stats inside Modal */
.details-interactions {
  padding: 12px 16px;
  border-top: 1px solid var(--border-secondary);
  border-bottom: 1px solid var(--border-secondary);
}

.action-buttons-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.action-left {
  display: flex;
  gap: 16px;
}

.btn-icon-interact {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  transition: transform 0.1s ease;
}

.btn-icon-interact:active {
  transform: scale(1.15);
}

.heart-svg, .comment-svg, .share-svg, .bookmark-svg {
  width: 24px;
  height: 24px;
}

.likes-count {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.post-date {
  font-size: 10px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-details-spacer {
  flex: 1 1 auto;
  min-height: 16px;
}

/* Write comment field inside Modal */
.comment-author-row {
  padding: 6px 16px 0 52px;
  border-top: 1px solid var(--border-secondary);
}

#modal-comment-author {
  width: min(158px, 100%);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  outline: none;
  font-size: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: 5px 8px;
}

#modal-comment-author:focus {
  border-color: var(--border-primary);
  background-color: var(--bg-primary);
}

.details-comment-input {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.comment-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.smiley-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  flex-shrink: 0;
}

.smiley-svg {
  width: 28px;
  height: 28px;
  display: block;
}

#modal-comment-field {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background-color: transparent;
  color: var(--text-primary);
}

.post-comment-btn {
  background: none;
  border: none;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.post-comment-btn.active {
  opacity: 1;
}

.post-comment-btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.comment-submit-status {
  min-height: 0;
  padding: 0 16px 0 52px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.comment-submit-status:not(:empty) {
  padding-bottom: 6px;
}

.comment-submit-status.success {
  color: #15803d;
}

.comment-submit-status.error {
  color: #b91c1c;
}


/* RESPONSIVE LAYOUT STYLING */

/* Tablet & Mobile Layout Rules */
@media (max-width: 991px) {
  .app-container {
    flex-direction: column;
  }

  .profile-section {
    height: calc(100vh - 60px); /* Leave room for floating chat button on mobile */
  }

  .chat-sidebar {
    width: 100%;
  }

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

/* Mobile Portrait Layout Adjustments */
@media (max-width: 767px) {
  .emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .emoji-option {
    height: 38px;
    font-size: 27px;
  }

  .profile-content {
    padding: 15px 12px 0;
  }

  .profile-header {
    margin-bottom: 24px;
  }

  .avatar-container {
    margin-right: 15px;
  }

  .avatar-circle {
    width: 86px;
    height: 86px;
  }

  .avatar-svg {
    width: 50px;
    height: 50px;
  }

  .username-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .username {
    font-size: 22px;
  }

  .stats-row {
    display: none; /* Hide follower count rows on mobile portrait like real IG */
  }

  .posts-grid {
    gap: 1px;
  }

  .about-section {
    padding: 26px 2px 48px;
  }

  .about-intro {
    font-size: 15px;
  }

  .about-skills {
    gap: 6px;
  }
  
  .project-tag {
    display: none; /* Hide project text labels on tiny mobile grid covers */
  }

  /* Detailed Post Modal becomes full-width scrollable sheet on mobile */
  .modal-overlay {
    padding: 0;
  }

  .post-nav-btn {
    top: 20vh;
    width: 38px;
    height: 38px;
  }

  .post-nav-prev {
    left: 12px;
  }

  .post-nav-next {
    right: 12px;
  }

  .post-nav-svg {
    width: 22px;
    height: 22px;
  }

  .modal-wrapper {
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-media-panel {
    flex: none;
    height: 40vh;
  }

  .modal-details-panel {
    flex: 1;
    overflow-y: auto;
  }
}
