:root {
  --bg: #c8cfd9;
  --bg-soft: #dde3ec;
  --panel: rgba(220, 230, 242, 0.58);
  --panel-border: rgba(120, 145, 175, 0.42);
  --text: #1a2130;
  --muted: #546070;
  --accent: #8aafc8;
  --accent-strong: #5580a0;
  --line: #b31a45;
  --ok: #8ec26f;
  --shadow: 0 12px 30px rgba(40, 55, 80, 0.18);
  --chrome-bg: rgba(190, 205, 225, 0.72);
  --chrome-border: rgba(100, 130, 165, 0.5);
  --chrome-text: #3a5068;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Barlow", sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg-soft), var(--bg));
  overflow-x: hidden;
}

h1,
h2,
h3,
.brand-text,
.eyebrow {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.04em;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 26%, rgba(220, 232, 248, 0.75) 0%, rgba(220, 232, 248, 0) 45%),
    linear-gradient(160deg, #dde4ef 0%, #c8cfd9 50%, #c2cad6 100%);
}

.bg-wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(90, 120, 160, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

.bg-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(30, 50, 80, 0.035) 2px,
    rgba(30, 50, 80, 0.035) 3px
  );
  pointer-events: none;
}

.bg-sweep {
  position: absolute;
  border: 18px solid rgba(176, 181, 184, 0.22);
  border-radius: 999px;
}

.bg-sweep-left {
  width: 112vw;
  height: 112vw;
  left: -62vw;
  top: -38vh;
  transform: rotate(-12deg);
}

.bg-sweep-right {
  width: 82vw;
  height: 82vw;
  right: -36vw;
  top: 14vh;
  border-width: 13px;
  border-color: rgba(171, 176, 179, 0.2);
  transform: rotate(8deg);
}

.bg-redline {
  position: absolute;
  width: 120vw;
  height: 120vw;
  left: -18vw;
  top: -78vw;
  border: 2px solid transparent;
  border-bottom-color: rgba(156, 18, 38, 0.85);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.bg-center-symbol {
  position: absolute;
  width: min(62vw, 760px);
  aspect-ratio: 1 / 1;
  left: 50%;
  top: 45%;
  transform: translate(-12%, -50%);
}

.sym-ring,
.sym-core,
.sym-bar {
  position: absolute;
}

.sym-ring {
  border-radius: 50%;
  border: 16px solid rgba(172, 177, 180, 0.26);
}

.sym-ring-1 {
  inset: 10% 8% 8% 16%;
}

.sym-ring-2 {
  inset: 26% 24% 24% 32%;
  border-width: 12px;
  border-color: rgba(180, 184, 186, 0.24);
}

.sym-ring-3 {
  inset: 2% 28% 42% 4%;
  border-width: 14px;
  border-color: rgba(182, 186, 189, 0.22);
}

.sym-bar {
  background: rgba(176, 181, 184, 0.24);
  border-radius: 6px;
}

.sym-bar-1 {
  width: 35%;
  height: 3.6%;
  left: 51%;
  top: 27%;
  transform: rotate(-20deg);
}

.sym-bar-2 {
  width: 26%;
  height: 3.4%;
  left: 18%;
  top: 36%;
  transform: rotate(-17deg);
}

.sym-core {
  width: 31%;
  aspect-ratio: 1 / 1;
  left: 39%;
  top: 34%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(244, 245, 246, 0.78), rgba(210, 213, 216, 0.44));
  box-shadow: inset 0 0 0 8px rgba(182, 186, 188, 0.18);
}

.bg-mark {
  position: absolute;
  left: 59%;
  top: 44%;
  transform: translate(-8%, -50%);
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.95rem, 2.4vw, 2rem);
  letter-spacing: 0.03em;
  color: rgba(56, 62, 70, 0.52);
}

.layout {
  width: min(1100px, calc(100% - 2rem));
  margin: 1rem auto 3rem;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.dock {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 10vh;
  width: 80px;
  height: 80vh;
  align-self: start;
  /* container is mostly invisible — SVG arc is the visual anchor */
  background: transparent;
  border: none;
  overflow: visible;
}

/* SVG arc fills the dock bounds and provides the orbital ring visual */
.dock-arc-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.dock-toggle,
.dock-backdrop {
  display: none;
}

.content-column {
  grid-column: 2;
  min-width: 0;
}

.content-column > section {
  scroll-margin-top: 110px;
}

.content-column > section:not(.hero) {
  min-height: 60vh;
}

/*
 * Icon positions on the orbital arc.
 * Ellipse: cx=5, cy=50, rx=55, ry=50 in viewBox "0 0 80 100"
 * θ=30°: (32.5, 6.7)   θ=70°: (56.7, 32.9)
 * θ=110°: (56.7, 67.1)  θ=150°: (32.5, 93.3)
 * translate(-50%,-50%) centres the button on those coordinates.
 */
.dock-item:nth-child(1) { left: 40.6%; top:  6.7%; }
.dock-item:nth-child(2) { left: 70.9%; top: 32.9%; }
.dock-item:nth-child(3) { left: 70.9%; top: 67.1%; }
.dock-item:nth-child(4) { left: 40.6%; top: 93.3%; }

.dock-item {
  position: absolute;
  z-index: 1;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(180, 198, 218, 0.75);
  /* 3D convex sphere: specular highlight + deep shading */
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 38% 34%, #dde8f4 0%, #b5c6da 40%, #8596ae 76%, #697c96 100%);
  font-size: 0.88rem;
  color: #1c2d3f;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.72),
    inset 0 -3px 7px rgba(28, 48, 80, 0.38),
    0 0 0 3px rgba(152, 175, 206, 0.55),
    0 0 0 8px rgba(136, 160, 195, 0.26),
    0 0 0 14px rgba(118, 146, 184, 0.13),
    0 5px 14px rgba(28, 48, 80, 0.4);
  /* translate(-50%,-50%) centres the button on its arc coordinate */
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0.78;
  transition: transform 280ms ease, box-shadow 280ms ease, opacity 280ms ease;
  isolation: isolate;
}

.dock-item::before,
.dock-item::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* Spinning arc ring */
.dock-item::before {
  inset: -10px;
  border: 1.5px solid rgba(148, 170, 200, 0.82);
  border-left-color: rgba(148, 170, 200, 0.08);
  border-bottom-color: rgba(148, 170, 200, 0.22);
  animation: dock-spin 6.8s linear infinite;
}

/* Tilted orbit ring — flattened ellipse that rotates like a planet ring */
.dock-item::after {
  inset: -17px;
  border: 1px solid rgba(138, 162, 198, 0.52);
  animation: dock-orbit 11s linear infinite;
}

.dock-item:hover {
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 1;
}

.dock-item.active {
  transform: translate(-50%, -50%) scale(1.0);
  opacity: 1;
  font-size: 1.06rem;
  box-shadow:
    inset 0 2px 5px rgba(255, 255, 255, 0.85),
    inset 0 -3px 8px rgba(28, 48, 80, 0.42),
    0 0 0 3px rgba(179, 26, 69, 0.72),
    0 0 0 9px rgba(148, 172, 212, 0.3),
    0 0 0 16px rgba(130, 158, 200, 0.14),
    0 0 0 24px rgba(179, 26, 69, 0.06),
    0 8px 22px rgba(28, 48, 80, 0.55);
}

/* Active state: replace the spinning arc ring with a rotating gear ring */
.dock-item.active::before {
  inset: -18px;
  border: none;
  border-radius: 0;
  background: rgba(179, 26, 69, 0.17);
  z-index: -1;
  /* 6-tooth gear clip-path — inner radius ~30% aligns with button edge */
  clip-path: polygon(
    35% 24%,  37% 2%,  63% 2%,  65% 24%,
    85% 15%,  98% 37%, 80% 50%,
    98% 63%,  85% 85%, 65% 76%,
    63% 98%,  37% 98%, 35% 76%,
    15% 85%,  2%  63%, 20% 50%,
    2%  37%,  15% 15%
  );
  animation: dock-gear-spin 5s linear infinite;
}

@keyframes dock-gear-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes dock-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes dock-orbit {
  from { transform: scaleY(0.38) rotate(0deg); }
  to { transform: scaleY(0.38) rotate(360deg); }
}

.panel {
  margin-bottom: 1.6rem;
  padding: 0;
  overflow: hidden;
}

.win-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.32rem 0.75rem;
  background: var(--chrome-bg);
  border-bottom: 1px solid var(--chrome-border);
  user-select: none;
}

.win-chrome-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--chrome-text);
}

.win-chrome-btns {
  display: flex;
  gap: 0.38rem;
}

.win-chrome-btns span {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(80, 110, 145, 0.5);
  background: rgba(160, 180, 205, 0.45);
}

.win-chrome-btns span:first-child { background: rgba(179, 26, 69, 0.55); border-color: rgba(160, 20, 55, 0.5); }
.win-chrome-btns span:nth-child(2) { background: rgba(200, 170, 50, 0.55); border-color: rgba(170, 140, 30, 0.5); }

.panel-body {
  padding: 1.1rem 1.2rem;
}

.hero {
  min-height: 290px;
  margin-bottom: 2.6rem;
}

.hero .panel-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 250px;
}

.hero-ascii-row {
  display: flex;
  align-items: flex-start;
  gap: 1.3rem;
  margin: 0.3rem 0 0.2rem;
  width: 100%;
}

.profile-photo {
  width: 154px;
  height: 154px;
  margin-left: auto;
  margin-right: 0.2rem;
  border-radius: 50%;
  border: 3px solid rgba(127, 146, 170, 0.62);
  background-image:
    url("assets/profile.png"),
    url("assets/profile.jpg"),
    url("assets/profile.jpeg"),
    radial-gradient(circle at 30% 30%, #f4f7fa, #c3cdd9);
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 24px rgba(52, 64, 81, 0.26);
}

.hero h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.03;
}

.ascii-name {
  margin: 0.03rem 0 0;
  font-family: "Consolas", "Courier New", monospace;
  font-size: clamp(0.24rem, 0.58vw, 0.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  white-space: pre;
  color: #1f2a37;
  text-shadow: 0 0 8px rgba(118, 152, 183, 0.2);
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  color: var(--accent-strong);
}

.lead {
  max-width: 60ch;
  font-size: 1.05rem;
}

.status-strip {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-strip span {
  padding: 0.32rem 0.6rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--panel-border);
  font-size: 0.78rem;
  color: #3f5062;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.45rem;
}

.panel-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.muted {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 0.8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-card h3 {
  margin-top: 0;
}

.tag-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag-row span {
  font-size: 0.76rem;
  background: rgba(129, 156, 177, 0.25);
  border: 1px solid rgba(129, 156, 177, 0.35);
  padding: 0.2rem 0.42rem;
  border-radius: 999px;
}

.timeline {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  border-left: 2px solid rgba(130, 148, 169, 0.35);
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.5rem;
  padding: 0.2rem 0 1rem 0.6rem;
}

.timeline .dot {
  width: 10px;
  height: 10px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(142, 194, 111, 0.2);
}

.timeline h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.company-badge {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  border-radius: 0.24rem;
  display: inline-grid;
  place-items: center;
  font-family: "Orbitron", sans-serif;
  font-size: 0.68rem;
  line-height: 1;
  color: #f4f8fb;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 3px 8px rgba(35, 43, 56, 0.24);
  overflow: hidden;
  position: relative;
}

.company-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f5f7fa;
}

.badge-fallback {
  display: none;
}

.company-logo[style*="display: none"] + .badge-fallback {
  display: inline;
  position: relative;
  z-index: 1;
}

.badge-alignerr {
  background: #f5f7fa;
  color: #262b33;
  border-color: rgba(41, 49, 62, 0.45);
}

.badge-handshake {
  background: linear-gradient(145deg, #b9ee39, #91ce20);
  color: #243107;
  border-color: rgba(43, 65, 8, 0.34);
}

.badge-amazon {
  background: linear-gradient(145deg, #ff9a3d, #ef7f1c);
}

.badge-asu {
  background: linear-gradient(145deg, #8c1d40, #6b1530);
  border-color: rgba(140, 29, 64, 0.55);
}

.badge-ciee {
  background: #f5f7fa;
  color: #262b33;
  border-color: rgba(41, 49, 62, 0.45);
}

.meta {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.link-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.link-list a,
.site-footer a {
  color: #234a67;
  font-weight: 700;
  text-underline-offset: 2px;
}

.site-footer {
  margin-top: 1.2rem;
  border-top: 1px solid rgba(131, 148, 166, 0.35);
  padding-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  position: relative;
}

/* Corner bracket decorations */
.glass::before,
.glass::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 1;
}
.glass::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--line);
  border-left: 2px solid var(--line);
}
.glass::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--accent-strong);
  border-right: 2px solid var(--accent-strong);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .bg-sweep-left {
    width: 160vw;
    height: 160vw;
    left: -104vw;
    top: -30vh;
  }

  .bg-sweep-right {
    width: 120vw;
    height: 120vw;
    right: -64vw;
    top: 20vh;
  }

  .bg-redline {
    width: 175vw;
    height: 175vw;
    left: -68vw;
    top: -128vw;
  }

  .bg-center-symbol {
    width: min(95vw, 520px);
    left: 57%;
    top: 44%;
  }

  .bg-mark {
    left: 68%;
    top: 44%;
    font-size: clamp(0.72rem, 4vw, 1.1rem);
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .dock-toggle {
    display: grid;
    place-items: center;
    position: fixed;
    left: 50%;
    bottom: 0.55rem;
    transform: translateX(-50%);
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(128, 145, 165, 0.48);
    background: rgba(233, 239, 246, 0.35);
    color: #2f435a;
    font-size: 0.86rem;
    z-index: 25;
    cursor: pointer;
    backdrop-filter: blur(8px);
  }

  .dock-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(38, 47, 60, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 18;
  }

  .dock {
    grid-column: 1;
    position: fixed;
    left: 50%;
    bottom: 1.1rem;
    top: auto;
    width: min(260px, calc(100vw - 1.2rem));
    height: auto;
    z-index: 22;
    padding: 0.55rem 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(131, 149, 171, 0.44);
    background: rgba(233, 240, 247, 0.45);
    backdrop-filter: blur(9px);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    overflow: hidden;
    transform: translate(-50%, 140%);
    opacity: 0;
    pointer-events: none;
    transition: transform 240ms ease, opacity 240ms ease;
  }

  .dock-arc-track { display: none; }

  /* Reset desktop arc positioning for mobile flex row */
  .dock-item,
  .dock-item:nth-child(1),
  .dock-item:nth-child(2),
  .dock-item:nth-child(3),
  .dock-item:nth-child(4) {
    position: relative;
    left: auto;
    top: auto;
    transform: scale(0.72);
    opacity: 0.84;
  }

  .dock-item:hover,
  .dock-item.active {
    transform: scale(0.98);
    opacity: 1;
  }

  .dock-item.active::before {
    clip-path: none;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(148, 170, 200, 0.82);
    border-left-color: rgba(148, 170, 200, 0.08);
    border-bottom-color: rgba(148, 170, 200, 0.22);
    inset: -10px;
    animation: dock-spin 6.8s linear infinite;
  }

  body.dock-open .dock {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
  }

  body.dock-open .dock-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .dock-item {
    width: 54px;
    height: 54px;
    transform: scale(0.72);
    opacity: 0.84;
  }

  .dock-item.active {
    transform: scale(0.98);
  }

  .content-column > section:not(.hero) {
    min-height: 44vh;
  }

  .win-chrome-title {
    font-size: 0.52rem;
  }

  .hero-ascii-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-photo {
    width: 112px;
    height: 112px;
    margin-left: 0;
  }

  .content-column {
    grid-column: 1;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
