/**
 * Page-specific styles for about.html
 * Extracted from inline <style> block for better organization
 */

/* Prevent horizontal scroll and enforce viewport width */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Page-specific: solid background for header */
.header {
  background: #000;
  backdrop-filter: none;
}

/* Mobile header layout fix */
@media (max-width: 480px) {
  .header {
    padding: 0 12px;
  }

  .header-left {
    flex-shrink: 1;
    min-width: 0;
  }

  .header-right {
    flex-shrink: 0;
  }

  .header-actions {
    gap: 8px;
  }

  .header-btn {
    width: 32px;
    height: 32px;
  }
}

/* ==========================================
   PAGE-SPECIFIC: BENTO GRID LAYOUT
   ========================================== */
.bento-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 112px 40px 80px;
  overflow-x: hidden;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(80px, auto);
  gap: 16px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}

/* Photo Card */
.card-photo {
  grid-column: span 5;
  grid-row: span 6;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.card-photo .photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  text-align: center;
  padding: 40px;
}

.card-photo .photo-placeholder svg,
.card-photo .photo-placeholder [data-icon] svg {
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
  opacity: 0.3;
}

.card-photo .photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

.card-photo .photo-caption {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* Name Card */
.card-name {
  grid-column: span 7;
  grid-row: span 3;
  justify-content: center;
  overflow: visible;
  position: relative;
  z-index: 10;
}

.card-name:hover {
  transform: none;
}

.card-name h1 {
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.card-name .tagline {
  font-size: 18px;
  color: var(--accent-dim);
  line-height: 1.6;
}

/* Obsession Hover Cards in Tagline */
.obsession-trigger {
  position: relative;
  display: inline-block;
  color: #fff;
  cursor: pointer;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
  transition: border-color 0.2s ease;
}

.obsession-trigger:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

.obsession-hover-card {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 8px;
  transform: translateX(-50%);
  width: 280px;
  padding: 20px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  text-align: left;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.obsession-trigger:hover .obsession-hover-card {
  opacity: 1;
  visibility: visible;
}

.obsession-hover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.obsession-hover-icon {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.obsession-hover-icon svg {
  width: 22px;
  height: 22px;
}

.obsession-hover-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.obsession-hover-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.obsession-hover-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.obsession-hover-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #76B900;
  text-decoration: none;
  transition: all 0.2s;
}

.obsession-hover-link:hover {
  color: #fff;
  transform: translateX(4px);
}

/* Bio Card */
.card-bio {
  grid-column: span 7;
  grid-row: span 3;
}

.card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
  margin-bottom: 16px;
}

.card-bio p {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
}

/* Stat Cards */
.card-stat {
  grid-column: span 3;
  grid-row: span 2;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-stat .stat-value {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-stat .stat-label {
  font-size: 13px;
  color: var(--accent-dim);
}

/* Experience Card */
.card-experience {
  grid-column: span 6;
  grid-row: span 4;
  overflow: visible;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.experience-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

a.experience-item {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  margin: -8px;
  padding: 8px;
  padding-bottom: 20px;
  transition: background 0.2s ease;
}

a.experience-item:last-child {
  padding-bottom: 8px;
}

a.experience-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Experience Hover Cards */
.experience-logo {
  position: relative;
}

.experience-hover-card {
  display: block;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  padding: 20px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.experience-logo:hover .experience-hover-card {
  opacity: 1;
  visibility: visible;
}

.experience-hover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.experience-hover-icon {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.experience-hover-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.experience-hover-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.experience-hover-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.experience-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.experience-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.experience-content {
  flex: 1;
  min-width: 0;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.experience-title {
  font-size: 15px;
  font-weight: 600;
}

.experience-date {
  font-size: 12px;
  color: var(--accent-dim);
}

.experience-company {
  font-size: 13px;
  color: var(--accent-dim);
}

/* Obsessions Card */
.card-obsessions {
  grid-column: span 6;
  grid-row: span 4;
}

.obsessions-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.obsession-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  margin: -8px;
  padding: 8px;
  padding-bottom: 20px;
  transition: background 0.2s ease;
}

.obsession-item:last-child {
  border-bottom: none;
  padding-bottom: 8px;
}

.obsession-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.obsession-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.obsession-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.obsession-logo svg {
  width: 20px;
  height: 20px;
}

.obsession-content {
  flex: 1;
  min-width: 0;
}

.obsession-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.obsession-desc {
  font-size: 13px;
  color: var(--accent-dim);
  line-height: 1.5;
}

/* Obsession Item Hover Cards (in Obsessions Card) */
.card-obsessions {
  overflow: visible;
}

.obsession-logo {
  position: relative;
}

.obsession-item-hover-card {
  display: block;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  padding: 20px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.obsession-logo:hover .obsession-item-hover-card {
  opacity: 1;
  visibility: visible;
}

.obsession-item-hover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.obsession-item-hover-icon {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.obsession-item-hover-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.obsession-item-hover-icon svg {
  width: 22px;
  height: 22px;
}

.obsession-item-hover-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.obsession-item-hover-desc {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

/* Skills Card */
.card-skills {
  grid-column: span 12;
  grid-row: span 2;
}

.skill-tag {
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
}

.skill-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Patents Card */
.card-patents {
  grid-column: span 6;
  grid-row: span 2;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
  border-color: rgba(217, 119, 6, 0.3);
}

.card-patents:hover {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15) 0%, rgba(234, 88, 12, 0.08) 100%);
  border-color: rgba(217, 119, 6, 0.5);
  transform: translateY(-4px);
}

.patents-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.patents-preview svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
  stroke: rgba(217, 119, 6, 0.8);
}

.patents-preview h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.patents-preview p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  line-height: 1.6;
}

/* Slides Card */
.card-slides {
  grid-column: span 6;
  grid-row: span 2;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-color: rgba(139, 92, 246, 0.3);
}

.card-slides:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-4px);
}

.slides-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
}

.slides-preview svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.8;
  stroke: rgba(139, 92, 246, 0.8);
}

.slides-preview h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.slides-preview p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  line-height: 1.6;
}

/* Link Cards */
.card-link {
  grid-column: span 3;
  grid-row: span 2;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.card-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.card-link svg,
.card-link [data-icon] svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.card-link .link-name {
  font-size: 14px;
  font-weight: 500;
}

.card-link .link-handle {
  font-size: 12px;
  color: var(--accent-dim);
  margin-top: 4px;
}

/* Contact Card */
.card-contact {
  grid-column: span 12;
  grid-row: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
}

.contact-text h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-text p {
  font-size: 14px;
  color: var(--accent-dim);
}

.contact-links {
  display: flex;
  gap: 12px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}

.contact-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.contact-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.contact-btn [data-icon] svg,
.contact-btn svg {
  width: 18px;
  height: 18px;
}

/* Responsive */
@media (max-width: 1200px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .card-photo {
    grid-column: span 5;
    grid-row: span 5;
  }

  .card-name {
    grid-column: span 6;
    grid-row: span 2;
  }

  .card-name h1 {
    font-size: 40px;
  }

  .card-bio {
    grid-column: span 6;
    grid-row: span 2;
  }

  .card-stat {
    grid-column: span 3;
  }

  .card-experience,
  .card-skills,
  .card-patents,
  .card-slides {
    grid-column: span 6;
    grid-row: span 3;
  }

  .card-link {
    grid-column: span 3;
  }

  .card-contact {
    grid-column: span 6;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .contact-links {
    width: 100%;
  }

  .contact-btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 840px) {
  .card-photo {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  .card-photo {
    aspect-ratio: 4/3;
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .bento-container {
    padding: 100px 20px 60px;
  }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 12px;
  }

  .card-photo,
  .card-name,
  .card-bio,
  .card-experience,
  .card-obsessions,
  .card-skills,
  .card-patents,
  .card-slides,
  .card-contact {
    grid-column: span 2;
    grid-row: auto;
  }

  .card-photo {
    aspect-ratio: 4/3;
    min-height: 200px;
  }

  .card-stat,
  .card-link {
    grid-column: span 1;
    grid-row: auto;
  }

  .card-name h1 {
    font-size: 28px;
  }

  .card-name .tagline {
    font-size: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .card-name {
    overflow: hidden;
  }

  .card-bio p {
    font-size: 14px;
  }

  .card-stat .stat-value {
    font-size: 32px;
  }

  .card-contact {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .contact-links {
    flex-direction: column;
    width: 100%;
  }

  .skills-grid {
    gap: 8px;
  }

  .skill-tag {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Hide hover cards on mobile - they don't work well with touch */
  .obsession-hover-card,
  .experience-hover-card,
  .obsession-item-hover-card {
    display: none;
  }

  /* Hide less essential icons on mobile to fit in viewport */
  .header-actions .header-btn[data-tooltip="Share"],
  .header-actions .header-btn[data-tooltip="Audio"] {
    display: none !important;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .bento-container {
    padding: 90px 16px 40px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card-photo,
  .card-name,
  .card-bio,
  .card-experience,
  .card-obsessions,
  .card-skills,
  .card-patents,
  .card-slides,
  .card-contact {
    grid-column: span 1;
    grid-row: auto;
  }

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

  .card-name h1 {
    font-size: 24px;
  }

  .bento-card {
    padding: 20px;
    border-radius: 16px;
  }

  .card-stat .stat-value {
    font-size: 28px;
  }

  .experience-item,
  .obsession-item {
    flex-direction: column;
    gap: 12px;
  }

  .experience-header {
    flex-direction: column;
    gap: 4px;
  }
}
