/* =========================================================
ABOUT â€” 3Ã—3 square grid + Orbital Tech Stack
========================================================= */

/* ---------- Smooth scroll + sticky header offset ---------- */
html, body,
main, .page, #page, #app, .app,
[data-scroll-root]{
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html, body,
  main, .page, #page, #app, .app,
  [data-scroll-root]{ scroll-behavior: auto; }
}
:target { scroll-margin-top: var(--header-h, 56px); }
#contact { scroll-margin-top: var(--header-h, 56px); }

.about{
  padding: 32px 16px 64px;
  --ease-move: cubic-bezier(.22,.61,.36,1);
  --ease-fade: cubic-bezier(.4,0,.2,1);
  --dur-in: 900ms;
  --dur-out: 800ms;
}

/* ---------- Square grid container (3Ã—3) ---------- */
.about-grid{
  --about-gap: 12px;
  --about-cell: 280px;
  width: calc(3 * var(--about-cell) + 2 * var(--about-gap));
  height: calc(3 * var(--about-cell) + 2 * var(--about-gap));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, var(--about-cell));
  grid-template-rows: repeat(3, var(--about-cell));
  gap: var(--about-gap);
}

/* ---------- Base tile look ---------- */
.about-box{
  background: var(--about-tile-bg);
  border: 2px solid var(--about-tile-border);
  color: var(--about-tile-text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  overflow: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
}

/* ---------- Tile placements ---------- */
.about-top { grid-column:1 / span 2; grid-row:1; }
.about-contact{ grid-column:3; grid-row:1 / span 2; }
.about-tech { grid-column:1; grid-row:2 / span 2; }
.about-photo { grid-column:2; grid-row:2; }
.about-time { grid-column:2 / span 2; grid-row:3; }

/* ---------- Section title ---------- */
.section-title{
  margin: 0 auto 18px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.2px;
}

/* ---------- Intro ---------- */
.about-top { align-items: stretch; justify-content: stretch; text-align: left; }
.about-top__inner { display:flex; flex-direction:column; width:100%; height:100%; }
.about-top__title { 
  margin: 0 0 10px; 
  font-weight: 800; 
  font-size: clamp(1.3rem, 1rem + 2vw, 2rem);
  line-height: 1.15;
}
.about-top__text { margin-top:auto; line-height:1.5; }

/* ---------- Center Photo ---------- */
.about-photo{
  padding:0;
  margin:0;
  display:block;
  align-self:stretch;
  justify-self:stretch;
  width:var(--about-cell);
  height:var(--about-cell);
  border-radius: 12px;
  overflow: hidden;
}
.about-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}

/* =========================================================
   ORBITAL TECH STACK
   
   â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
   â•‘  CHANGE ORBIT SIZES HERE - THIS IS THE ONLY PLACE!   â•‘
   â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ========================================================= */

.about-tech {
  /* ===== ORBIT CONFIG - EDIT THESE VALUES ===== */
  --orbit-1: 125px;   /* Innermost orbit */
  --orbit-2: 250px;   /* Second orbit */
  --orbit-3: 375px;   /* Third orbit */
  --orbit-4: 500px;   /* Outermost orbit */
  --icon-size: 45px;  /* Size of tech icons */
  --center-size: 50px; /* Size of center hub */
  /* ===== END ORBIT CONFIG ===== */
  
  padding: 8px;
  flex-direction: column;
  position: relative;
  overflow: hidden; /* Clip orbits to stay inside container */
}

.tech-heading {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-weight: 800;
  font-size: var(--heading-4);
  letter-spacing: 0.2px;
  color: var(--text-primary);
  z-index: 20;
}

.tech-orbit-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center hub */
.tech-orbit-center {
  position: absolute;
  width: var(--center-size);
  height: var(--center-size);
  border-radius: 50%;
  background: var(--about-tile-bg);
  border: 2px solid var(--about-tile-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  box-shadow: 
    0 0 20px var(--accent-light),
    0 0 40px rgba(255, 0, 0, 0.15);
}

.tech-orbit-center::before {
  content: '</>';
  font-weight: 800;
  font-size: 10px;
  color: var(--text-primary);
  font-family: monospace;
}

/* Orbit rings (visual dashed circles) - uses CSS variables */
.orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dotted var(--about-orbit-line);
  opacity: 0.5;
  pointer-events: none;
}

.orbit-ring-1 { width: var(--orbit-1); height: var(--orbit-1); }
.orbit-ring-2 { width: var(--orbit-2); height: var(--orbit-2); }
.orbit-ring-3 { width: var(--orbit-3); height: var(--orbit-3); }
.orbit-ring-4 { width: var(--orbit-4); height: var(--orbit-4); }

/* Orbit paths - sized by CSS variables, NO CSS animation */
.orbit-path {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-path-1 { width: var(--orbit-1); height: var(--orbit-1); }
.orbit-path-2 { width: var(--orbit-2); height: var(--orbit-2); }
.orbit-path-3 { width: var(--orbit-3); height: var(--orbit-3); }
.orbit-path-4 { width: var(--orbit-4); height: var(--orbit-4); }

/* Individual tech icons - JS positions these, they NEVER rotate */
.orbit-icon {
  position: absolute;
  width: var(--icon-size);
  height: var(--icon-size);
  background: #ffffff;
  border: 2px solid var(--about-tile-border);
  border-radius: 10px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--shadow-light);
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  /* Icons are positioned by JS using top/left, NO rotation ever */
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.orbit-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Tooltip - always upright since icon never rotates */
.orbit-icon::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--text-primary, #fff);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  border: 1px solid var(--border-primary, #333);
  box-shadow: 0 4px 12px var(--shadow-light);
  z-index: 100;
}

/* Show tooltip on hover */
.orbit-icon:hover::after {
  opacity: 1;
}

/* Icon hover effects */
.orbit-icon:hover {
  border-color: var(--accent);
  box-shadow: 
    0 0 20px var(--accent-glow-intense),
    0 8px 24px var(--shadow-heavy);
  z-index: 50;
}

/* Paused state */
.orbit-path.is-paused .orbit-icon {
  border-color: var(--accent);
}

/* ---------- Availability with Globe ---------- */
.about-time{ align-items:stretch; text-align:left; }
.about-time__inner{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%; 
  height: 100%;
  padding: 12px;
  position: relative;
}

.about-time__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-time__title{ font-weight:800; font-size: var(--heading-4); margin:0 0 6px 0; }

/* Globe container - bottom right, bigger and moved up */
.about-time__globe {
  width: 500px;
  height: 500px;
  flex-shrink: 0;
  align-self: flex-end;
  position: absolute;
  right: -110px;
  bottom: -160px;
}

/* Invert globe colors in light mode (keeps red marker red via hue-rotate) */
:root[data-theme="light"] .about-time__globe canvas,
:root[data-theme="light"] #cobe-globe {
  filter: invert(1) hue-rotate(180deg);
}

/* ---------- Contact / Socials ---------- */
.about-contact{ align-items:stretch; }
.about-contact__col{
  display:grid;
  grid-template-rows: auto 1fr auto auto;
  row-gap:12px;
  width:100%; height:100%;
  text-align:left;
  padding: 8px;
}
.about-socials__title{ margin:0; font-weight:800; font-size: var(--heading-4); }
.about .btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px; padding:10px 14px; font-weight:800;
  border: 2px solid var(--about-btn-border);
  background: var(--about-btn-bg);
  color: var(--about-btn-text);
  text-decoration:none;
  border-radius: 8px;
}
.socials__list{ display:grid; gap:8px; margin:0; padding:0; list-style:none; }
.socials__item a{
  display:grid; grid-template-columns:28px 1fr; align-items:center;
  gap:10px; padding:8px 10px; text-decoration:none; color:inherit;
  border: 0px dashed var(--about-socials-border);
  background: var(--about-socials-bg);
  border-radius: 8px;
}
.socials__logo{ width:28px; height:28px; object-fit:contain; }

/* Visually-hidden utility */
.visually-hidden{
  position:absolute !important; width:1px; height:1px; margin:-1px;
  padding:0; border:0; clip:rect(0 0 0 0); overflow:hidden; white-space:nowrap;
}

/* =========================================================
   SCROLL ANIMATIONS
========================================================= */
.about-top,
.about-contact,
.about-tech,
.about-time{
  --dist: 72px;
  --slideX: 0px;
  --slideY: 0px;
  transform: translate3d(var(--slideX), var(--slideY), 0);
  opacity: 0;
  transition-property: transform, opacity;
  transition-duration: var(--dur-out), var(--dur-out);
  transition-timing-function: var(--ease-move), var(--ease-fade);
  transition-delay: 0ms, 0ms;
  will-change: transform, opacity;
}
.about-top { --slideX: calc(-1 * var(--dist)); }
.about-contact { --slideY: calc(-1 * var(--dist)); }
.about-tech { --slideY: var(--dist); }
.about-time { --slideX: var(--dist); }

.about.is-inview .about-top,
.about.is-inview .about-contact,
.about.is-inview .about-tech,
.about.is-inview .about-time{
  transform: translate3d(0,0,0);
  opacity: 1;
  transition-duration: var(--dur-in), var(--dur-in);
}

.about.is-inview .about-top { transition-delay: 0ms, 40ms; }
.about.is-inview .about-contact { transition-delay: 80ms, 120ms; }
.about.is-inview .about-time { transition-delay: 160ms, 200ms; }
.about.is-inview .about-tech { transition-delay: 240ms, 280ms; }

/* =========================================================
   MOBILE RESPONSIVE - Smaller orbit sizes
========================================================= */
@media (max-width: 720px){
  .socials__logo{ width:24px; height:24px; }
  .socials__item a{ grid-template-columns:24px 1fr; }
  
  .about-tech {
    --orbit-1: 80px;
    --orbit-2: 130px;
    --orbit-3: 190px;
    --orbit-4: 260px;
    --icon-size: 30px;
    --center-size: 36px;
  }
  
  /* Smaller globe on mobile */
  .about-time__globe {
    width: 280px;
    height: 280px;
    right: -50px;
    bottom: -70px;
  }
}