/* ============================================================
   abhichrs.com — dark editorial theme
   ============================================================ */
:root {
  --bg: #131110;
  --bg-elev: #1b1815;
  --bg-card: #1e1a16;
  --text: #f3f0ea;
  --muted: #a89e8f;
  --faint: #6f665b;
  --coral: #d9603b;
  --coral-soft: rgba(217, 96, 59, 0.12);
  --gold: #c9a15e;
  --line: rgba(243, 240, 234, 0.09);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max: 1120px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5.5rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--coral); color: #fff; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

.container {
  width: min(var(--max), 100% - 3rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 3000;
  background: var(--coral);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ type ============ */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 2.5rem; }
h2 em, .hero-title em { font-style: italic; color: var(--coral); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: var(--coral);
  display: inline-block;
}

/* ============ buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.btn-solid { background: var(--coral); color: #fff; }
.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(217, 96, 59, 0.55);
}
.btn-ghost { border-color: var(--line); color: var(--text); background: rgba(243, 240, 234, 0.03); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.btn-small { padding: 0.6rem 1.15rem; font-size: 0.85rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--coral);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  margin-top: 0.9rem;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ============ nav ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(19, 17, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(var(--max), 100% - 3rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem 0;
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand-mark {
  width: 2.1rem; height: 2.1rem;
  border-radius: 0.7rem;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: #fff;
  line-height: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 255, 255, 0.05) 45%, rgba(217, 96, 59, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.45),
    inset 0 -6px 12px rgba(0, 0, 0, 0.28),
    0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease);
}
.brand:hover .brand-mark { transform: translateY(-1px) scale(1.04); }
.brand-name { font-weight: 600; letter-spacing: 0.01em; font-size: 0.98rem; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--coral);
  border-radius: 2px;
}
.nav-cta { margin-left: 0; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1.5rem;
  gap: 0.2rem;
  background: rgba(19, 17, 16, 0.97);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  text-decoration: none;
  padding: 0.7rem 0;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; color: var(--coral); }
.nav.open .mobile-menu { display: flex; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ scroll progress ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 1200;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--coral), var(--gold));
}

/* ============ hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem 0 5rem;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }

/* ---- the planet ---- */
.planet {
  position: absolute;
  right: -11rem;
  top: 50%;
  width: 34rem;
  height: 34rem;
  transform: translateY(-50%) translate(var(--px, 0px), var(--py, 0px));
  will-change: transform;
}
.planet-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e0683f, #b34a28 72%);
  opacity: 0.92;
  animation: planet-float 9s ease-in-out infinite;
}
.planet-glow {
  position: absolute;
  inset: -6rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 96, 59, 0.30), transparent 65%);
  filter: blur(30px);
  animation: planet-float 9s ease-in-out -4.5s infinite;
}
.planet-ring {
  position: absolute;
  inset: -3.5rem;
  border-radius: 50%;
  border: 2px solid rgba(201, 161, 94, 0.55);
  transform: rotate(-18deg) scaleY(0.40);
  animation: ring-tilt 14s ease-in-out infinite;
}
.planet-orbit {
  position: absolute;
  inset: -7rem;
  border-radius: 50%;
  border: 1px dashed rgba(243, 240, 234, 0.28);
  transform: rotate(-18deg) scaleY(0.40);
}
.planet-spin {
  position: absolute;
  inset: 0;
  animation: orbit-spin 18s linear infinite;
}
.planet-sat {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 3px rgba(201, 161, 94, 0.55);
}
@keyframes planet-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-1.4rem, 1.2rem); }
}
@keyframes ring-tilt {
  0%, 100% { transform: rotate(-18deg) scaleY(0.40); }
  50% { transform: rotate(-12deg) scaleY(0.45); }
}
@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}
.hero-inner { position: relative; z-index: 1; }
.hero .eyebrow { margin-bottom: 1.4rem; }
.hero-title {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  margin-bottom: 1.6rem;
}
.hero-title span { display: block; }
.hero-lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 2.4rem;
}
.hero-lede em { color: var(--text); font-style: italic; font-family: var(--serif); }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  width: 3rem; height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: hint-bob 2.4s ease-in-out infinite;
  transition: border-color 0.25s, color 0.25s;
}
.scroll-hint:hover { border-color: var(--coral); color: var(--coral); animation-play-state: paused; }
.scroll-hint svg { display: block; }
@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(9px); }
}

/* ============ ticker ============ */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  padding: 1rem 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  width: max-content;
  animation: tick 30s linear infinite;
}
.ticker-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-track i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}
@keyframes tick { to { transform: translateX(-50%); } }

/* ============ sections ============ */
.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }
.section-alt { background: var(--bg-elev); border-block: 1px solid var(--line); }

/* reveal on scroll — only hidden when JS is available to reveal them */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ============ about ============ */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about-photo { position: relative; }
.about-photo img {
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  width: 100%;
  position: relative;
  z-index: 1;
}
.about-photo-frame {
  position: absolute;
  inset: 1.2rem -1.2rem -1.2rem 1.2rem;
  border: 1px solid rgba(201, 161, 94, 0.5);
  border-radius: var(--radius);
}
.about-text p { color: var(--muted); margin-bottom: 1.2rem; }
.about-text h2 { margin-bottom: 1.6rem; }
.about-facts {
  list-style: none;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.about-facts li {
  display: flex;
  gap: 1.5rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.about-facts strong { min-width: 7rem; font-weight: 600; color: var(--text); }
.about-facts span { color: var(--muted); }

/* ============ timeline ============ */
.timeline { list-style: none; position: relative; margin-top: 1rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.timeline li { position: relative; padding: 0 0 2.2rem 2.8rem; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--faint);
}
.tl-featured .tl-dot { border-color: var(--coral); box-shadow: 0 0 0 5px var(--coral-soft); }
.tl-body {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.tl-body:hover { border-color: rgba(217, 96, 59, 0.4); transform: translateX(4px); }
.tl-featured .tl-body { border-color: rgba(217, 96, 59, 0.35); background: linear-gradient(180deg, rgba(217,96,59,0.07), var(--bg-card) 60%); }
.tl-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.tl-head h3 { font-size: 1.25rem; }
.tl-date { font-size: 0.82rem; color: var(--faint); font-weight: 500; white-space: nowrap; }
.tl-body p { color: var(--muted); font-size: 0.95rem; }

/* ============ case study ============ */
.case {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.case::before {
  content: "";
  position: absolute;
  top: -7rem; right: -7rem;
  width: 20rem; height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 96, 59, 0.16), transparent 65%);
  pointer-events: none;
}
.case-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.2rem;
  position: relative;
}
.case-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 0.7rem;
}
.case-top h3 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.6rem; }
.case-sub { color: var(--muted); max-width: 34rem; }
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 2rem;
  position: relative;
}
.case-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: rgba(243, 240, 234, 0.02);
}
.case-block h4 {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.case-block p { font-size: 0.93rem; color: var(--muted); }
.tag-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  position: relative;
}
.tag-row li {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  transition: border-color 0.25s, color 0.25s;
}
.tag-row li:hover { border-color: var(--coral); color: var(--text); }

/* ============ skills ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.skill-card:hover { transform: translateY(-5px); border-color: rgba(217, 96, 59, 0.4); }
.skill-card h3 { font-size: 1.3rem; margin-bottom: 1.1rem; }
.skill-card h3::after {
  content: "";
  display: block;
  width: 2.2rem; height: 3px;
  background: var(--coral);
  border-radius: 3px;
  margin-top: 0.7rem;
}
.skill-card ul { list-style: none; }
.skill-card li {
  color: var(--muted);
  font-size: 0.94rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.skill-card li:last-child { border-bottom: 0; }
.skill-card li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}

.edu-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; max-width: 42rem; }
.edu-card {
  border-left: 2px solid var(--coral);
  padding: 0.4rem 0 0.4rem 1.6rem;
}
.edu-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.6rem;
}
.edu-card h3 { font-family: var(--sans); font-size: 1.02rem; font-weight: 600; margin-bottom: 0.25rem; }
.edu-card p { color: var(--muted); font-size: 0.92rem; }

/* ============ contact ============ */
.contact { text-align: center; position: relative; overflow: hidden; }
.contact::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 40rem; height: 40rem;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(217, 96, 59, 0.1), transparent 60%);
  pointer-events: none;
}
.contact-inner { position: relative; max-width: 44rem; margin-inline: auto; }
.contact-inner .eyebrow { justify-content: center; }
.contact-inner .eyebrow::before { display: none; }
.contact h2 { margin-bottom: 1.2rem; }
.contact p { color: var(--muted); margin-bottom: 2.2rem; }
.contact .hero-ctas { justify-content: center; }
.contact-loc { color: var(--faint); font-size: 0.9rem; }

/* ============ footer ============ */
.footer { border-top: 1px solid var(--line); padding: 2rem 0; }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--faint);
}
.footer-note { margin-left: auto; }
.to-top {
  width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.to-top:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-3px); }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .planet { width: 22rem; height: 22rem; right: -16rem; opacity: 0.55; }
  .planet-ring { inset: -2.5rem; }
  .planet-orbit { inset: -5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 26rem; }
  .case-grid, .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; }
  .nav.open { background: rgba(19, 17, 16, 0.97); }
  .hero { padding-top: 6rem; }
  .tl-head { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
  .footer-note { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
