/* Root + Theme
   -------------------------------------------------------------------------- */
:root {
  --bg-main: #050508;
  --bg-elevated: rgba(15, 15, 22, 0.9);
  --bg-elevated-soft: rgba(20, 20, 30, 0.85);
  --accent: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.25);
  --accent-strong: #38bdf8;
  --accent-secondary: #a855f7;
  --text-main: #f9fafb;
  --text-soft: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.65);
  --radius-xl: 22px;
  --radius-full: 999px;
  --navbar-height: 72px;
  --transition-fast: 180ms ease-out;
  --transition-med: 260ms ease-out;
}

.theme-light {
  --bg-main: #f3f4f6;
  --bg-elevated: rgba(255, 255, 255, 0.96);
  --bg-elevated-soft: rgba(255, 255, 255, 0.9);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.14);
  --accent-strong: #2563eb;
  --accent-secondary: #6366f1;
  --text-main: #0f172a;
  --text-soft: #6b7280;
  --border-subtle: rgba(148, 163, 184, 0.4);
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.16);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Inter",
    sans-serif;
  background: radial-gradient(circle at top, #020617 0, #020617 24%, #020617 40%, #020617 100%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.background-gradient {
  position: fixed;
  inset: -40%;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0, rgba(56, 189, 248, 0.18), transparent 50%),
    radial-gradient(circle at 90% 0, rgba(168, 85, 247, 0.18), transparent 55%),
    radial-gradient(circle at 50% 90%, rgba(56, 189, 248, 0.16), transparent 55%);
  opacity: 0.9;
  filter: blur(12px);
  z-index: -2;
}

/* Layout
   -------------------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.glassy {
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.84),
    rgba(15, 23, 42, 0.78),
    rgba(15, 23, 42, 0.72)
  );
}

.theme-light .glassy {
  background: linear-gradient(
    to bottom,
    rgba(248, 250, 252, 0.96),
    rgba(241, 245, 249, 0.9),
    rgba(241, 245, 249, 0.85)
  );
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.nav-logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #e5e7eb, #38bdf8);
  box-shadow:
    0 0 0 5px rgba(56, 189, 248, 0.16),
    0 10px 22px rgba(56, 189, 248, 0.42);
}

.nav-title {
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  position: relative;
  padding-bottom: 0.25rem;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transition: width var(--transition-med);
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.theme-toggle {
  width: 46px;
  height: 26px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.25), transparent 60%),
    rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  padding: 2px;
  cursor: pointer;
  position: relative;
  transition: background var(--transition-med), border-color var(--transition-med);
}

.theme-toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 30% 30%, #fefce8, #facc15);
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.2),
    0 8px 18px rgba(15, 23, 42, 0.7);
  transform: translateX(0);
  transition: transform var(--transition-med);
}

.theme-light .theme-toggle {
  background: radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.3), transparent 60%),
    rgba(248, 250, 252, 0.96);
}

.theme-light .theme-toggle-knob {
  background: radial-gradient(circle at 30% 30%, #93c5fd, #1d4ed8);
  transform: translateX(18px);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.75rem 4rem;
}

section {
  margin-bottom: 4rem;
}

/* Hero
   -------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.18rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.2), transparent 55%),
    rgba(15, 23, 42, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.theme-light .hero-kicker {
  background: radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.18), transparent 55%),
    rgba(255, 255, 255, 0.96);
}

.hero-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, 0.28),
    0 0 22px rgba(34, 197, 94, 0.8);
}

.hero-title {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-title span.highlight {
  background: linear-gradient(120deg, var(--accent-strong), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-soft);
  max-width: 32rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.hero-meta-value {
  font-weight: 500;
  color: var(--text-main);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-primary,
.btn-ghost {
  border-radius: var(--radius-full);
  padding: 0.58rem 1.3rem;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: #0b1120;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-secondary));
  box-shadow:
    0 12px 30px rgba(56, 189, 248, 0.45),
    inset 0 0 0 0 rgba(15, 23, 42, 0.4);
  font-weight: 600;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.35), transparent 55%);
  opacity: 0;
  transform: translateX(-40%);
  transition: opacity 260ms ease, transform 260ms ease;
}

.btn-primary:hover::after {
  opacity: 1;
  transform: translateX(10%);
}

.btn-ghost {
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.4), transparent 60%),
    rgba(15, 23, 42, 0.8);
}

.hero-right {
  position: relative;
}

.hero-card {
  position: relative;
  border-radius: 26px;
  padding: 1.4rem 1.3rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.theme-light .hero-card {
  background: linear-gradient(150deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.pill {
  border-radius: var(--radius-full);
  padding: 0.18rem 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.signal-dots {
  display: flex;
  gap: 0.32rem;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.7);
}

.signal-dot.primary {
  background: var(--accent-strong);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 0 20px rgba(56, 189, 248, 0.8);
}

.hero-badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.badge-card {
  padding: 0.7rem 0.7rem;
  border-radius: 18px;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.24), transparent 70%),
    var(--bg-elevated-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.badge-card:nth-child(2) {
  background: radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.22), transparent 70%),
    var(--bg-elevated-soft);
}

.badge-card:nth-child(3) {
  background: radial-gradient(circle at 0 100%, rgba(52, 211, 153, 0.22), transparent 70%),
    var(--bg-elevated-soft);
}

.badge-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
}

.badge-main {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.badge-sub {
  margin-top: 0.25rem;
  font-size: 0.74rem;
  color: var(--text-soft);
}

.hero-orbit {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0.6;
}

.hero-orbit-ring {
  position: absolute;
  inset: 18%;
  border-radius: 999px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
}

.hero-orbit-chip {
  position: absolute;
  width: 120px;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.6);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-soft);
}

.hero-orbit-chip span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-orbit-chip.chip-1 {
  top: 4%;
  left: 8%;
}
.hero-orbit-chip.chip-2 {
  bottom: 6%;
  right: 5%;
}

/* Sections
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.4rem;
  gap: 1rem;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-soft);
  max-width: 26rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  border-radius: 20px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  padding: 1rem 1rem 0.95rem;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.6);
  position: relative;
  overflow: hidden;
}

.theme-light .card {
  box-shadow: 0 14px 40px rgba(148, 163, 184, 0.22);
}

.card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.26), transparent 55%);
  opacity: 0;
  transition: opacity var(--transition-med), transform var(--transition-med);
}

.card:hover::before {
  opacity: 1;
  transform: translate3d(2px, -2px, 0);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 500;
}

.card-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
}

.card-body {
  font-size: 0.8rem;
  color: var(--text-soft);
  margin-bottom: 0.7rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pill-small {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.7rem;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.7);
}

.link-inline {
  font-size: 0.75rem;
  color: var(--accent-strong);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.link-inline::after {
  content: "↗";
  font-size: 0.7rem;
}

/* Skills
   -------------------------------------------------------------------------- */
.skills-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.4fr);
  gap: 1.75rem;
}

.skills-groups {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.skills-group {
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
}

.skills-group-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.skills-group-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-chip {
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.6), transparent 65%),
    rgba(15, 23, 42, 0.88);
  color: #e5e7eb;
}

.theme-light .skill-chip {
  background: radial-gradient(circle at 0 0, rgba(148, 163, 184, 0.36), transparent 65%),
    rgba(255, 255, 255, 0.94);
  color: #0f172a;
}

.skills-timeline {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(15, 23, 42, 0.97),
    rgba(15, 23, 42, 0.9),
    rgba(15, 23, 42, 0.94)
  );
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.theme-light .skills-timeline {
  background: linear-gradient(
    145deg,
    rgba(248, 250, 252, 0.97),
    rgba(241, 245, 249, 0.96),
    rgba(241, 245, 249, 0.96)
  );
}

.timeline-row {
  display: grid;
  grid-template-columns: 0.15fr minmax(0, 1.85fr);
  gap: 1.1rem;
  position: relative;
}

.timeline-rail {
  position: relative;
}

.timeline-rail-line {
  position: absolute;
  left: 50%;
  top: 0.6rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(148, 163, 184, 0.1),
    rgba(148, 163, 184, 0.6),
    rgba(148, 163, 184, 0.1)
  );
}

.timeline-node {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow:
    0 0 0 5px var(--accent-soft),
    0 0 16px rgba(56, 189, 248, 0.7);
  margin: 0.9rem auto 0;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.timeline-item {
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.5);
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.timeline-title-role {
  font-weight: 500;
}

.timeline-title-meta {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.timeline-body {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

/* Experience / Certificates / Contact
   -------------------------------------------------------------------------- */
.list-vertical {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.theme-light .list-item {
  background: rgba(255, 255, 255, 0.96);
}

.list-main {
  font-size: 0.85rem;
  font-weight: 500;
}

.list-sub {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.list-meta {
  font-size: 0.75rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 1.75rem;
}

.contact-card {
  border-radius: 20px;
  padding: 1rem 1rem 0.9rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: var(--shadow-soft);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}

.contact-value {
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-value a {
  color: inherit;
  text-decoration: none;
}

.contact-meta {
  margin-top: 0.8rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.contact-cta {
  font-size: 0.8rem;
  color: var(--text-soft);
}

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.field label {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.field input,
.field textarea {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-main);
  font-size: 0.8rem;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.theme-light .field input,
.theme-light .field textarea {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.75),
    0 0 0 8px rgba(56, 189, 248, 0.22);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.75rem 1.5rem;
  font-size: 0.72rem;
  color: var(--text-soft);
}

/* Scroll Animations
   -------------------------------------------------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition:
    opacity 520ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 520ms cubic-bezier(0.19, 1, 0.22, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

[data-animate="fade-right"] {
  transform: translateX(-22px);
}

[data-animate="fade-right"].is-visible {
  transform: translateX(0);
}

[data-animate="fade-left"] {
  transform: translateX(22px);
}

[data-animate="fade-left"].is-visible {
  transform: translateX(0);
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-right {
    order: -1;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 768px) {
  main {
    padding-inline: 1.25rem;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-meta {
    white-space: normal;
  }
}

