/* ===================================================================
   TOKENS
=================================================================== */
:root {
  --paper: #F1F3EF;
  --paper-alt: #E7EAE4;
  --ink: #12172B;
  --ink-soft: #4A5164;
  --indigo: #4B3FF2;
  --indigo-soft: #DEDBFC;
  --amber: #E7A33E;
  --line: #D3D7CD;
  --console: #12172B;
  --console-line: #2B3350;
  --console-text: #C7CBDE;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1120px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  letter-spacing: -0.01em;
}

ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

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

/* ===================================================================
   LAYOUT HELPERS
=================================================================== */
section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 32px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--indigo);
  letter-spacing: 0.04em;
  white-space: nowrap;
  margin: 0;
}

.section-label--light { color: var(--amber); }

.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
}

/* ===================================================================
   NAV
=================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(241, 243, 239, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.nav__mark-dot { color: var(--indigo); }

.nav__links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-soft);
}

.nav__links a { transition: color 0.15s ease; }
.nav__links a:hover { color: var(--indigo); }

.nav__cta {
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__cta:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ===================================================================
   HERO
=================================================================== */
.hero {
  position: relative;
  max-width: none;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 0 32px;
  overflow: hidden;
}

#embedding-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--indigo);
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

.hero__title {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  margin-bottom: 28px;
}

.hero__tagline {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--indigo); border-color: var(--indigo); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.hero__coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.6;
}

/* ===================================================================
   ABOUT
=================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
}

.about__intro {
  display: flex;
  flex-direction: column;
}

.about__photo-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 32px;
}

.about__photo {
  position: absolute;
  inset: 65px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--paper);
  outline: 1px solid var(--indigo-soft);
  box-shadow: 0 8px 24px rgba(18, 23, 43, 0.14);
  z-index: 2;
  background: var(--paper);
}

/* Static diagonal tilt for the whole orbit path */
.orbit-frame {
  position: absolute;
  inset: 0;
  transform: rotate(45deg);
  z-index: 1;
}

/* Each badge travels this elliptical path; offset-rotate:0 keeps it from
   spinning with the path, so only position changes, never orientation.
   Radius is set well outside the 150px photo (75px radius) for clearance. */
.orbit-mover {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  offset-path: ellipse(132px 88px at 50% 50%);
  offset-rotate: 0deg;
  offset-distance: calc(100% / 6 * var(--i));
  animation: orbit-travel 18s linear infinite;
  animation-delay: calc(-18s / 6 * var(--i));
}

@keyframes orbit-travel {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(18, 23, 43, 0.10);
  transform: rotate(-45deg); /* cancels the frame's static tilt, keeps art upright */
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.badge svg {
  width: 20px;
  height: 20px;
}

.badge:hover {
  transform: rotate(-45deg) scale(1.16);
  border-color: var(--indigo-soft);
  box-shadow: 0 6px 16px rgba(18, 23, 43, 0.18);
}

.about__body {
  font-size: 18px;
  color: var(--ink-soft);
}

.about__facts {
  border-left: 2px solid var(--indigo-soft);
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fact dt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--indigo);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.fact dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
}

@media (max-width: 860px) {
  .about__grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   SKILLS
=================================================================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cluster {
  background: var(--paper);
  padding: 32px;
}

.cluster__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cluster__desc {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  background: var(--paper-alt);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.tags li:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.skills__foundation {
  margin-top: 32px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

@media (max-width: 720px) {
  .skills__grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   PROJECTS
=================================================================== */
.project {
  background: var(--console);
  color: var(--console-text);
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 24px;
}

.project__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.project__head h3 {
  color: #fff;
  font-size: 21px;
  font-weight: 600;
}

.project__link {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.project__link:hover { opacity: 0.7; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.stack li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid var(--console-line);
  border-radius: 100px;
  color: #9AA3C4;
}

.project__points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project__points li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--console-text);
  line-height: 1.55;
}

.project__points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-family: var(--font-mono);
}

/* ===================================================================
   CERTIFICATIONS
=================================================================== */
.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cert-card {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.cert-card:hover {
  border-color: var(--indigo-soft);
  transform: translateY(-2px);
}

.cert-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--indigo-soft);
  color: var(--indigo);
}
.cert-card__icon svg { width: 20px; height: 20px; }

.cert-card__body h3 {
  font-size: 16.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cert-card__issuer {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}

.cert-card__status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-soft);
  opacity: 0.7;
  margin-top: 6px;
}

.cert-card__status--filled {
  color: var(--indigo);
  opacity: 1;
}

.cert-card__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-card__view,
.cert-card__upload,
.cert-card__clear {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-align: center;
  padding: 10px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.cert-card__view {
  border-color: var(--indigo);
  color: var(--indigo);
  display: block;
}
.cert-card__view:hover { background: var(--indigo); color: #fff; }

.cert-card__upload {
  display: block;
}
.cert-card__upload:hover { border-color: var(--indigo); color: var(--indigo); }

.cert-card__clear {
  border-color: transparent;
  color: var(--ink-soft);
  font-size: 11.5px;
  padding: 4px;
}
.cert-card__clear:hover { color: #C0392B; }

.cert-card--add {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  background: transparent;
  cursor: pointer;
}
.cert-card--add .cert-card__icon {
  background: transparent;
  border-style: dashed;
}
.cert-card--add:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}
.cert-card--add h3 { font-size: 15px; }

.certs__note {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  opacity: 0.75;
}

@media (max-width: 860px) {
  .certs { grid-template-columns: 1fr; }
}

/* ===================================================================
   PROFILES / STATS
=================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: 32px;
}

.stat {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  color: var(--indigo);
}

.stat__label {
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.profiles__note {
  font-size: 14.5px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 32px;
}

.profiles__links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.profiles__links a { transition: color 0.15s ease; }
.profiles__links a:hover { color: var(--indigo); }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===================================================================
   CONTACT
=================================================================== */
.contact {
  max-width: none;
  background: var(--ink);
  color: var(--paper);
  padding: 0;
}

.contact__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 140px 32px;
  text-align: center;
}

.contact h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  max-width: 620px;
  margin: 20px auto 40px;
  color: #fff;
}

.contact__email {
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--amber);
  display: inline-block;
  margin-bottom: 36px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.contact__email:hover { border-color: var(--amber); }

.contact__phone {
  font-family: var(--font-mono);
  font-size: 14px;
  color: #B7BBD0;
  margin: 0 0 36px;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #B7BBD0;
}
.contact__links a:hover { color: #fff; }

/* ===================================================================
   FOOTER
=================================================================== */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 32px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--ink);
  border-top: 1px solid var(--console-line);
}
.footer a:hover { color: var(--amber); }