/* MAIN PAGE (main.html)
   Experimental interactive theme. Keep motion safe.
*/

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --stroke: rgba(255, 255, 255, 0.10);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

/* Background overlay (adds depth above canvas) */
#bg-overlay {
  background:
    radial-gradient(900px circle at 10% 0%, rgba(34, 211, 238, 0.22), transparent 55%),
    radial-gradient(800px circle at 90% 15%, rgba(236, 72, 153, 0.18), transparent 55%),
    radial-gradient(900px circle at 50% 100%, rgba(139, 92, 246, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.78), rgba(11, 18, 32, 0.96));
  pointer-events: none;
}

/* Scroll progress */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

#scroll-progress__bar {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6, #ec4899);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

/* Nav */
.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
  transition: transform 260ms var(--ease-out), background 260ms var(--ease-out);
}

.nav-shell.is-scrolled {
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(236, 72, 153, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-link {
  color: rgba(255, 255, 255, 0.72);
  transition: color 220ms ease;
}

.nav-link:hover {
  color: white;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-menu {
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.75);
  transition: background 220ms ease, color 220ms ease;
}

.mobile-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

/* Hero bits */
.badge {
  border-radius: 9999px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.6);
}

.headline-gradient {
  background: linear-gradient(135deg, rgba(34, 211, 238, 1), rgba(139, 92, 246, 1), rgba(236, 72, 153, 1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Panels */
.panel {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.55);
}

.panel-divider {
  height: 1px;
  width: 100%;
  margin: 18px 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.0), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.0));
}

/* Timeline (About > TRAJECTORY) */
.timeline {
  position: relative;
  margin-top: 18px;
  padding-left: 26px;
  display: grid;
  gap: 14px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 12px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(34, 211, 238, 0.0),
    rgba(34, 211, 238, 0.22),
    rgba(139, 92, 246, 0.18),
    rgba(236, 72, 153, 0.0)
  );
  border-radius: 9999px;
}

.timeline-item {
  position: relative;
  padding: 12px 12px 12px 0;
  border-radius: 18px;
  transition: background 220ms ease, border-color 220ms ease;
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.16);
}

.timeline-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.timeline-title {
  font-weight: 600;
}

.timeline-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.timeline-text {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
}

.about-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.about-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(139, 92, 246, 0.18), rgba(236, 72, 153, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.about-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.fact {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
}

.fact-k {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.fact-v {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

/* Mini list (About > Cybersecurity projects) */
.mini-list {
  display: grid;
  gap: 12px;
}

.mini-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.02);
}

.mini-main {
  min-width: 0;
}

.mini-title {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.mini-sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.5;
}

.mini-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.panel.soft {
  background: rgba(255, 255, 255, 0.035);
}

.panel.accent {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(236, 72, 153, 0.10));
}

.panel-top {
  padding: 18px 18px 0;
}

.panel-body {
  padding: 18px;
}

.status-orb {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow:
    0 0 22px rgba(34, 197, 94, 0.7),
    0 0 42px rgba(34, 197, 94, 0.35);
  position: relative;
}

.status-orb::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.22), transparent 60%);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(236, 72, 153, 0.16));
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 60px rgba(34, 211, 238, 0.15);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: background 220ms ease, transform 240ms var(--ease-out);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  transition: background 220ms ease;
}

.btn-chip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 240ms var(--ease-out), background 220ms ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
}

/* Chips */
.chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.78);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Stats */
.stat {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.stat-dark {
  background: rgba(255, 255, 255, 0.02);
}

.stat-value {
  font-weight: 700;
  font-size: 22px;
}

.stat-label {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
}

/* Sections */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: rgba(255, 255, 255, 0.60);
  max-width: 520px;
}

/* Cards */
.card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.30);
  transform-style: preserve-3d;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
  color: rgba(34, 211, 238, 0.95);
}

.tag-alt {
  border-color: rgba(236, 72, 153, 0.24);
  background: rgba(236, 72, 153, 0.08);
  color: rgba(236, 72, 153, 0.95);
}

.meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.card-title {
  margin-top: 16px;
  font-weight: 650;
  font-size: 18px;
}

.card-text {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.6;
}

.card-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.84);
  transition: background 220ms ease, transform 240ms var(--ease-out);
}

.btn-small:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.btn-small--primary {
  border-color: rgba(34, 211, 238, 0.22);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(236, 72, 153, 0.14));
}

.btn-small--primary:hover {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(236, 72, 153, 0.18));
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.10);
}

.status--green .status-dot {
  background: rgba(34, 197, 94, 1);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

.status--yellow .status-dot {
  background: rgba(250, 204, 21, 1);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.25);
}

.status--red .status-dot {
  background: rgba(239, 68, 68, 1);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.25);
}

/* Skill bars */
.bar {
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.95), rgba(139, 92, 246, 0.95));
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.16);
  transition: width 900ms var(--ease-out);
}

.bar-fill--alt {
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.92), rgba(34, 211, 238, 0.92));
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
}

.scramble {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.codebox {
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.10), rgba(236, 72, 153, 0.07)),
    rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
}

/* Articles skeleton */
.skeleton {
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  transform: translateX(-100%);
  animation: shimmer 1200ms linear infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
}

.skeleton-line.sm { height: 10px; }
.skeleton-line.lg { height: 18px; }

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton::after { animation: none; }
}

/* Back to top */
#back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(15, 23, 42, 0.55);
  color: white;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease, background 220ms ease;
  z-index: 60;
}

#back-to-top:hover {
  background: rgba(15, 23, 42, 0.72);
}

#back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  filter: blur(6px);
  transition:
    opacity 700ms var(--ease-out),
    transform 700ms var(--ease-out),
    filter 700ms var(--ease-out);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .nav-shell,
  .btn-primary,
  .btn-ghost,
  .icon-btn {
    transition: none;
  }
}

/* Mobile tuning */
@media (max-width: 768px) {
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
