/* ayushgupta.net — shared styles */

:root {
  --navy-950: #06122E;
  --navy-900: #0A1A3F;
  --navy-800: #0B2257;
  --duke-navy: #012169;
  --duke-blue: #00539B;
  --sky: #6FA8E6;
  --ivory: #F3F1EA;

  /* light surfaces (bio page) */
  --page: #EDF1F7;
  --card: #FFFFFF;
  --ink: #012169;
  --text: #1B2B4F;
  --muted: #5A688C;
  --line: #DCE3EF;
  --chip: #E3EBF6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #06122E;
    --card: #0D1C42;
    --ink: #EAF0FA;
    --text: #D3DCEE;
    --muted: #9AA9C7;
    --line: #1E2D52;
    --chip: #15295A;
    --duke-blue: #6FA8E6;
  }
}
:root[data-theme="dark"] {
  --page: #06122E;
  --card: #0D1C42;
  --ink: #EAF0FA;
  --text: #D3DCEE;
  --muted: #9AA9C7;
  --line: #1E2D52;
  --chip: #15295A;
  --duke-blue: #6FA8E6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
a:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }

/* ---------- Homepage: the monogram ---------- */

body.home {
  background: radial-gradient(ellipse at 50% 42%, var(--navy-800) 0%, var(--navy-950) 64%) fixed, var(--navy-950);
  color: var(--ivory);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}
.home main { display: grid; justify-items: center; }

.mark { width: min(80vw, 440px); height: auto; display: block; overflow: visible; }
.mark .letter { fill: var(--ivory); }
.mark .swoosh { fill: var(--sky); }

/* 1. letters reveal left to right */
.mark .wipe {
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  animation: ag-wipe 1.5s cubic-bezier(.7, 0, .25, 1) .2s forwards;
}
/* 2. the swoosh draws through them */
.mark .swoosh-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ag-draw 1.1s cubic-bezier(.55, 0, .2, 1) 1.05s forwards;
}
/* 3. one pass of light */
.mark .sheen {
  transform: translateX(-260px);
  opacity: 0;
  animation: ag-sheen 1.4s ease-in-out 2.3s forwards;
}

.wordmark {
  margin-top: 6px;
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-weight: 500;
  font-size: clamp(15px, 3.6vw, 21px);
  letter-spacing: .9em;
  padding-left: .9em; /* keeps tracked text optically centered */
  text-transform: uppercase;
  opacity: 0;
  animation: ag-word 1.3s cubic-bezier(.2, .7, .2, 1) 1.9s forwards;
}
.rule {
  width: 0;
  height: 1px;
  margin-top: 22px;
  background: var(--sky);
  opacity: .7;
  animation: ag-rule 1s cubic-bezier(.2, .7, .2, 1) 2.4s forwards;
}
.enter {
  margin-top: 28px;
  font-family: "Cormorant Garamond", Garamond, Georgia, serif;
  font-size: 17px;
  font-style: italic;
  color: #A9B6D6;
  text-decoration: none;
  opacity: 0;
  animation: ag-fade .8s ease 2.9s forwards;
}
.enter:hover { color: var(--ivory); }

@keyframes ag-wipe  { to { transform: scaleX(1); } }
@keyframes ag-draw  { to { stroke-dashoffset: 0; } }
@keyframes ag-sheen { 15% { opacity: .5; } 85% { opacity: .5; } to { transform: translateX(660px); opacity: 0; } }
@keyframes ag-word  { to { opacity: 1; letter-spacing: .42em; padding-left: .42em; } }
@keyframes ag-rule  { to { width: 56px; } }
@keyframes ag-fade  { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .mark .wipe, .mark .swoosh-draw, .mark .sheen, .wordmark, .rule, .enter { animation: none; }
  .mark .wipe { transform: none; }
  .mark .swoosh-draw { stroke-dashoffset: 0; }
  .wordmark { opacity: 1; letter-spacing: .42em; padding-left: .42em; }
  .rule { width: 56px; }
  .enter { opacity: 1; }
}

/* ---------- Bio page (/me) ---------- */

body.bio {
  background: var(--page);
  color: var(--text);
  font-family: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  padding: 0 16px;
}

.topbar {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.topbar .brand svg { width: 36px; height: 36px; display: block; }
.topbar .brand span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .32em;
  text-transform: uppercase;
}

.bio main { max-width: 880px; margin: 0 auto; padding-bottom: 72px; display: grid; gap: 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.card-body { padding: 24px 28px; }
.card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
}

/* header card */
.banner {
  height: 196px;
  position: relative;
  background:
    radial-gradient(ellipse at 78% 30%, rgba(111, 168, 230, .28) 0%, transparent 55%),
    linear-gradient(120deg, var(--navy-950) 0%, var(--duke-navy) 60%, #00418A 100%);
  overflow: hidden;
}
.banner svg { position: absolute; right: -30px; top: -36px; height: 280px; width: 410px; opacity: .14; }
.banner .banner-swoosh {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;
}

.profile { position: relative; padding: 0 28px 26px; }
.avatar {
  width: 152px;
  height: 152px;
  border-radius: 50%;
  border: 4px solid var(--card);
  margin-top: -88px;
  background: var(--duke-navy);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.avatar .initials {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 54px;
  color: var(--ivory);
  letter-spacing: .04em;
}

.profile-grid { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; margin-top: 14px; }
.name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.name h1 { font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
.name .pronouns { color: var(--muted); font-size: 15px; }
.headline { font-size: 18px; color: var(--text); margin-top: 2px; }
.meta { color: var(--muted); font-size: 15px; margin-top: 4px; }

.orgs { list-style: none; display: grid; gap: 10px; align-content: start; }
.orgs li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); font-size: 15px; }

.tile {
  width: 40px; height: 40px;
  border-radius: 6px;
  display: grid; place-items: center;
  flex: none;
  background: var(--duke-navy);
  color: var(--ivory);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .04em;
}
.tile.small { width: 32px; height: 32px; font-size: 13px; border-radius: 5px; }
.tile.alt { background: #00539B; }
.tile.sky { background: #3C6FB0; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1.5px solid var(--duke-blue);
  color: var(--duke-blue);
}
.btn.primary { background: var(--duke-blue); color: #fff; }
.btn:hover { text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .btn.primary { color: var(--navy-950); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: var(--navy-950); } }

/* about */
.about p { max-width: 68ch; }
.about p + p { margin-top: 12px; }

/* experience / education entries */
.entry { display: grid; grid-template-columns: 48px 1fr; gap: 0 14px; }
.entry + .entry { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.entry .tile { width: 48px; height: 48px; font-size: 16px; }
.entry h3 { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.entry .org { font-size: 15px; color: var(--text); }
.entry .when, .entry .where { font-size: 14px; color: var(--muted); }
.entry .desc { margin-top: 8px; max-width: 66ch; }
.entry .deal {
  display: inline-block; margin-top: 10px; padding: 3px 10px;
  border-radius: 999px; background: var(--chip); color: var(--ink);
  font-size: 13px; font-weight: 500;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.bio footer { max-width: 880px; margin: 0 auto; padding: 0 0 40px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 640px) {
  .banner { height: 120px; }
  .avatar { width: 112px; height: 112px; margin-top: -62px; }
  .avatar .initials { font-size: 40px; }
  .profile, .card-body { padding-left: 18px; padding-right: 18px; }
  .profile-grid { grid-template-columns: 1fr; }
  .name h1 { font-size: 25px; }
  .two-up { grid-template-columns: 1fr; }
  .topbar .brand span { display: none; }
}
