/* Reset and base styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fcfcfc;
  color: #111111;
  line-height: 1.6;
}

/* Main container */
main#main-content {
  width: 100%;
  padding: 2.5rem 0;             /* remove desktop inline gutters to use full width */
  color: #111111;
  box-sizing: border-box;
  scroll-margin-top: 80px;
}

/* Add small inline padding back on smaller viewports */
@media (max-width: 900px) {
  main#main-content { padding-inline: 3vw; }
}
@media (max-width: 600px) {
  main#main-content { padding-inline: 5vw; }
}

/* Section header */
.about-section h2 {
  color: #000000;
  font-weight: 900;
  font-size: 3.2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  user-select: none;
  cursor: default;
  transition: color 0.3s ease;
  position: relative;
}
.about-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #333333;
  margin: 1rem auto;
  border-radius: 2px;
}
.about-section h2:hover,
.about-section h2:focus-within { color: #444444; }

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #666666;
  margin-bottom: 3rem;
  font-style: italic;
}

/* Main content layout: now grid so the image can be centered cleanly */
.about-content {
  display: grid;                  /* switch from flex to grid */
  grid-template-columns: 1fr;     /* single column to center avatar above content */
  gap: clamp(1.5rem, 3vw, 4rem);
  width: 100%;
  margin: 0;
}

/* Photo container centered in its grid cell */
.photo-container {
  justify-self: center;           /* center the image item horizontally */
  width: clamp(220px, 22vw, 360px);
  height: clamp(220px, 22vw, 360px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  background: linear-gradient(135deg, #fff 0%, #eee 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  user-select: none;
  outline-offset: 8px;
}

.photo-container::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: linear-gradient(45deg, #000000, #666666);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-container:hover::before,
.photo-container:focus::before { opacity: 1; }

.photo-container:focus {
  outline: 4px solid #444444;
  outline-offset: 8px;
}

.photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%);
  transition: all 0.4s ease;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-overlay i { font-size: 4rem; color: #ffffff; }

.photo-container:hover img,
.photo-container:focus img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

.photo-container:hover,
.photo-container:focus {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* Text content spans full width beneath the centered image */
.about-text {
  max-width: none;
  min-width: 0;
}

/* Intro */
.intro-text { margin-bottom: 3rem; }

.intro-text p {
  font-size: 1.2rem;
  color: #222222;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.intro-text strong { font-weight: 700; color: #000000; }

/* Enhanced callout */
.callout {
  background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
  border-left: 6px solid #333333;
  padding: 1.5rem 2rem;
  font-style: italic;
  font-weight: 600;
  margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  color: #444444;
  border-radius: 0 8px 8px 0;
  position: relative;
  transition: all 0.3s ease;
}

.callout i { font-size: 1.5rem; color: #666666; margin-right: 0.5rem; }

.callout:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: #f8f8f8;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
}

.stat-item { text-align: center; transition: transform 0.3s ease; }
.stat-item:hover { transform: translateY(-3px); }

.stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: #000000;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #666666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Skills section */
.skills-section { margin-bottom: 3rem; }

.skills-section h3 {
  color: #000000;
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.skills-section h3 i { color: #333333; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-category {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  transition: all 0.3s ease;
}

.skill-category:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.skill-category h4 {
  color: #000000;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skill-category h4 i { color: #333333; }

.skills-list { list-style: none; padding: 0; }

.skills-list li {
  padding: 0.5rem 0;
  color: #444444;
  font-size: 1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 1rem;
}

.skills-list li:last-child { border-bottom: none; }

.skills-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #666666;
  transition: color 0.3s ease;
}

.skills-list li:hover {
  color: #000000;
  padding-left: 1.5rem;
}

.skills-list li:hover::before { color: #000000; }

/* Interests section */
.interests-section h3 {
  color: #000000;
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.interests-section h3 i { color: #333333; }

.interests-tags { display: flex; flex-wrap: wrap; gap: 1rem; }

.interest-tag {
  background-color: #f0f0f0;
  color: #333333;
  padding: 0.7rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: default;
}

.interest-tag:hover {
  background-color: #000000;
  color: #ffffff;
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .about-content { gap: 2rem; }
  .photo-container { width: clamp(200px, 36vw, 300px); height: clamp(200px, 36vw, 300px); }
}

@media (max-width: 600px) {
  .about-section h2 { font-size: 2.5rem; }
  .photo-container { width: 220px; height: 220px; margin-bottom: 1rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
  .interests-tags { justify-content: center; }
  .callout { margin: 1.5rem 0; padding: 1rem 1.5rem; }
}

/* Focus accessibility */
.photo-container:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 4px;
}
