:root {
  --bg: #08111c;
  --bg-2: #0e1a27;
  --panel: rgba(12, 24, 38, 0.66);
  --panel-2: rgba(18, 31, 46, 0.72);
  --text: #eaf2ff;
  --muted: #aab9cf;
  --line: rgba(121, 170, 255, 0.09);
  --accent: #73e0c3;
  --accent-2: #7ea8ff;
  --accent-3: #b28cff;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  --radius: 22px;
  --radius-sm: 16px;
  --container: 1240px;
  --heartbeat-cycle: 5.2s;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 20%, rgba(126,168,255,0.12), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(115,224,195,0.10), transparent 30%),
    linear-gradient(180deg, #08111c 0%, #0a1420 55%, #09111a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}
.container { width: min(var(--container), calc(100% - 2rem)); margin: 0 auto; position: relative; z-index: 1; }
.mono { font-family: "JetBrains Mono", monospace; }

.heartbeat-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.58), transparent 88%);
}
.heartbeat-line {
  position: absolute;
  bottom: 6vh;
  left: 0;
  width: 100%;
  height: 150px;
  opacity: 0.065;
}
.heartbeat-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(115,224,195,0.45));
  stroke-dasharray: 1800;
  stroke-dashoffset: 0;
  animation: traceBeat var(--heartbeat-cycle) ease-in-out infinite;
}
.pulse {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(115, 224, 195, 0.09);
  box-shadow: 0 0 120px rgba(115, 224, 195, 0.055);
  animation: backgroundRingBeat var(--heartbeat-cycle) ease-out infinite;
}
.pulse-1 { top: 8%; right: -120px; }
.pulse-2 { bottom: 12%; left: -160px; animation-delay: 0.19s; }
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(8, 17, 28, 0.64);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 5;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-mark {
  width: 52px;
  height: 34px;
  display: inline-block;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 13px rgba(115, 224, 195, 0.24));
}
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.brand-mark path {
  fill: none;
  stroke: url(#ate-signet-gradient);
  stroke-width: 2.45;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}
.brand strong { display: block; font-size: 0.98rem; }
.brand small { color: var(--muted); font-size: 0.78rem; }
nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
nav a {
  color: var(--muted);
  font-weight: 500;
}
nav a:hover { color: var(--text); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: 3.55rem 0 3.2rem;
  align-items: center;
  isolation: isolate;
}
.hero-copy,
.juniper-presence { position: relative; z-index: 1; }
.hero-copy { max-width: 760px; }
.eyebrow,
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 0.8rem;
  font-weight: 700;
}
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.55rem, 3.2vw, 3.75rem);
  line-height: 1.06;
  margin: 0;
}
.hero h1 span {
  display: block;
  color: #d3e3ff;
}
.lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.68;
  max-width: 58ch;
  margin: 1.05rem 0 0;
}
.internship-note {
  margin: 0.9rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #b9c8dc;
  font-size: 0.84rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}
.internship-note span {
  color: var(--accent);
  font-size: 0.6rem;
  filter: drop-shadow(0 0 7px rgba(115, 224, 195, 0.55));
}
.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.15rem 0 0.85rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08111c;
  box-shadow: 0 12px 30px rgba(126,168,255,0.22);
}
.btn-secondary {
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  background: rgba(255,255,255,0.03);
}
.hero-points {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.hero-points li {
  position: relative;
  padding-left: 1.3rem;
  color: #cddbef;
  font-size: 0.94rem;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(115,224,195,0.5);
}
.hero-card,
.card,
.skill-box,
.vita-note,
.contact-card,
.status-card,
.mini-about,
.quote-box {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}
.hero-card {
  padding: 1.2rem;
  border-radius: var(--radius);
  display: grid;
  gap: 1rem;
}
.status-card,
.mini-about {
  border-radius: 18px;
  padding: 1.2rem;
}
.status-top {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: var(--muted);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(115,224,195,0.9);
  animation: blink 1.8s infinite ease-in-out;
}
.status-main {
  font-size: 2.1rem;
  font-weight: 800;
  margin-top: 0.6rem;
}
.status-sub { color: var(--muted); margin-top: 0.2rem; }
.status-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}
.status-list div,
.contact-lines div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.status-list span,
.contact-lines span { color: var(--muted); }
.status-list strong,
.contact-lines strong { text-align: right; }
.mini-about h3,
.card h3,
.skill-box h3,
.vita-note h3,
.contact-card h3 { margin-top: 0; }
.mini-about p { color: var(--muted); margin-bottom: 0; }

.section { padding: 2.75rem 0 4.5rem; }
.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
.section h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 0;
}
.section-copy p,
.section-note,
.card p,
.skill-box p,
.vita-note p,
.contact-box p { color: var(--muted); line-height: 1.75; }
.quote-box {
  border-radius: 18px;
  padding: 1rem 1.2rem;
  margin-top: 1.2rem;
}
.quote-box p {
  margin: 0;
  color: #d8e8ff;
  font-weight: 600;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
}
.card {
  padding: 1.3rem;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}
.card p { flex: 1; }
.card-featured {
  border-color: rgba(115,224,195,0.23);
  background: linear-gradient(145deg, rgba(18,38,51,0.78), rgba(13,25,43,0.63));
}
.card-kicker {
  margin-bottom: 0.65rem;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tag {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(126,168,255,0.14);
  color: #d8e4ff;
  font-size: 0.86rem;
  font-weight: 600;
  align-self: flex-start;
  margin-top: auto;
}
.skills-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  align-items: start;
}
.skills-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.skill-box {
  padding: 1.2rem;
  border-radius: 18px;
}
.timeline {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}
.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1rem;
  align-items: start;
}
.timeline-dot {
  width: 14px;
  height: 14px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(115,224,195,0.4);
}
.timeline-item h3 { margin: 0 0 0.25rem; }
.timeline-item p { margin: 0.1rem 0; color: var(--muted); line-height: 1.7; }
.vita-note {
  border-radius: 18px;
  padding: 1.3rem;
  margin-top: 1.6rem;
}
.contact-box {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}
.contact-card {
  padding: 1.2rem;
  border-radius: 18px;
  display: grid;
  gap: 1rem;
}
.site-footer {
  padding: 0 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links a { transition: color 0.2s ease; }
.footer-links a:hover { color: var(--text); }

@keyframes traceBeat {
  0%, 18%, 100% { opacity: 0.18; }
  5% { opacity: 0.5; }
  9% { opacity: 0.25; }
  13% { opacity: 0.4; }
}
@keyframes backgroundRingBeat {
  0%, 2%, 100% { transform: scale(0.84); opacity: 0.02; }
  5% { opacity: 0.13; }
  17% { transform: scale(1.12); opacity: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.22); }
}

@media (max-width: 960px) {
  .hero,
  .two-col,
  .skills-grid,
  .contact-box { grid-template-columns: 1fr; }
  .cards,
  .skills-wrap { grid-template-columns: 1fr 1fr; }
  .section-head,
  .site-footer { flex-direction: column; align-items: start; }
}

@media (max-width: 720px) {
  nav { display: none; }
  .cards,
  .skills-wrap { grid-template-columns: 1fr; }
  .hero { padding: 2.6rem 0 3.5rem; }
  .hero h1 { max-width: none; font-size: clamp(2.15rem, 10.5vw, 2.55rem); line-height: 1.08; }
  .eyebrow { font-size: 0.7rem; letter-spacing: 0.11em; line-height: 1.45; }
  .lead { font-size: 0.98rem; }
  .status-main { font-size: 1.7rem; }
  .terminal-float { display: none; }
  .internship-note { align-items: flex-start; gap: 0.45rem; }
  .contact-lines div { flex-direction: column; gap: 0.25rem; }
  .contact-lines strong { text-align: left; }
}


/* Juniper Heartbeat sphere */
.juniper-presence {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  transform: translateY(-0.35rem);
}
.juniper-sphere-wrap {
  position: relative;
  width: min(100%, 410px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.juniper-sphere {
  position: relative;
  z-index: 2;
  width: 196px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(225,255,249,0.96) 0%,
    rgba(164,248,230,0.92) 19%,
    rgba(77,217,200,0.8) 43%,
    rgba(67,165,196,0.58) 66%,
    rgba(104,112,205,0.25) 83%,
    rgba(112,93,218,0) 100%);
  box-shadow:
    0 0 30px rgba(115,224,195,0.28),
    0 0 72px rgba(72,201,197,0.2),
    0 0 126px rgba(112,93,218,0.1);
  animation: juniperSphereBeat var(--heartbeat-cycle) cubic-bezier(0.22, 0.75, 0.28, 1) infinite;
}
.juniper-sphere::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(92,225,207,0.2) 0%,
    rgba(79,181,202,0.13) 48%,
    rgba(112,93,218,0.05) 66%,
    transparent 76%);
  filter: blur(16px);
  animation: juniperSphereHalo var(--heartbeat-cycle) ease-in-out infinite;
}
.juniper-heartbeat-addon {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 57%;
  width: 100%;
  height: 56px;
  transform: translateY(-50%);
  overflow: visible;
  opacity: 0;
}
.juniper-heartbeat-addon path {
  fill: none;
  stroke: rgba(115,224,195,0.52);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  filter: drop-shadow(0 0 5px rgba(115,224,195,0.25));
  animation: juniperHeartbeatAddon var(--heartbeat-cycle) ease-in-out infinite;
}
.juniper-label {
  margin-top: -1.45rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(213,233,255,0.46);
}
.juniper-label strong {
  color: rgba(179,241,227,0.7);
  font-weight: 600;
}
.juniper-status-detail { max-width: 340px; margin: .65rem 0; padding: 0 .6rem; text-align: center; font-size: .75rem; color: var(--muted); }
.juniper-chat-link { color: var(--accent); font-size: .75rem; padding: .6rem; }
.juniper-label { flex-wrap: wrap; justify-content: center; }
@keyframes juniperSphereBeat {
  0%, 3%, 20%, 100% { transform: scale(0.965); opacity: 0.84; }
  6% { transform: scale(1.055); opacity: 1; }
  10% { transform: scale(0.985); opacity: 0.9; }
  14% { transform: scale(1.035); opacity: 0.97; }
  18% { transform: scale(0.965); opacity: 0.84; }
}
@keyframes juniperSphereHalo {
  0%, 3%, 20%, 100% { transform: scale(0.94); opacity: 0.58; }
  6% { transform: scale(1.08); opacity: 0.9; }
  10% { transform: scale(0.98); opacity: 0.66; }
  14% { transform: scale(1.045); opacity: 0.82; }
  18% { transform: scale(0.94); opacity: 0.58; }
}
@keyframes juniperHeartbeatAddon {
  0%, 3% { stroke-dashoffset: 480; opacity: 0; }
  6% { stroke-dashoffset: 270; opacity: 0.2; }
  10% { stroke-dashoffset: 205; opacity: 0.035; }
  14% { stroke-dashoffset: 80; opacity: 0.14; }
  18% { stroke-dashoffset: 0; opacity: 0; }
  20%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

.legal-page { min-height: 100vh; }
.legal-main {
  min-height: calc(100vh - 180px);
  padding: 5rem 0 4rem;
}
.legal-main h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
}
.legal-card {
  width: min(100%, 680px);
  margin-top: 2rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.legal-card h2 {
  margin: 1.75rem 0 0.6rem;
  font-size: 1rem;
  color: #dbe8fa;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card address,
.legal-card p {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.75;
}
.legal-card a,
.back-link { color: #bdf4e6; }
.back-link {
  display: inline-flex;
  margin-top: 1.5rem;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 960px) {
  .juniper-presence { min-height: 370px; transform: none; }
  .juniper-sphere-wrap { width: min(100%, 360px); }
  .juniper-sphere { width: 184px; }
}

@media (max-width: 720px) {
  .juniper-presence { min-height: 340px; }
  .juniper-sphere-wrap { width: min(100%, 330px); }
  .juniper-sphere { width: 172px; }
  .juniper-label { margin-top: -1.1rem; }
  .legal-main { padding-top: 3.5rem; }
  .legal-card { border-radius: 18px; }
}
