:root {
  --bg: #030306;
  --surface: #0b0b14;
  --line: #1d1d30;
  --text: #f5f5fa;
  --muted: #9a9ab2;
  --blue: #3d7bff;
  --violet: #8b5cf6;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.05rem/1.7 var(--font);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 0;
}

.wrap {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}

/* =========================================
   TEXT
   ========================================= */
h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
}

h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 62ch;
}

.lead {
  color: var(--text);
  font-size: 1.15rem;
}

/* =========================================
   NAVIGATION BAR
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 3, 6, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
}

.logo span {
  color: var(--violet);
}

.links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.links a {
  position: relative;
  color: var(--muted);
  padding: 0.4rem 0;
  transition: color 0.2s;
}

/* The animated underline */
.links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}

.links a:hover,
.links a.active {
  color: var(--text);
}

.links a:hover::after,
.links a.active::after {
  transform: scaleX(1);
}

/* The menu button (hidden on big screens) */
.burger {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Phone and small tablet menu */
@media (max-width: 860px) {
  .burger {
    display: block;
  }

  .links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, visibility 0.3s;
  }

  .links.open {
    max-height: 400px;
    visibility: visible;
  }

  .links a {
    display: block;
    padding: 1rem 1.25rem;
  }

  .links a::after {
    display: none;
  }
}

/* =========================================
   BUTTONS AND TAGS
   ========================================= */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font: 500 1rem var(--font);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--violet);
}

.btn.primary {
  background: linear-gradient(90deg, var(--blue), var(--violet));
  border-color: transparent;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.btn.small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.tag.dev {
  border-color: var(--violet);
  color: #c4b5fd;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 8vw, 6rem);
}

/* The particle cloud sits behind everything */
#cloud {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 11, 20, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* The little glowing dot in the badge */
.badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.title {
  color: #8fb2ff;
  font-size: 1.3rem;
  font-weight: 500;
}

/* =========================================
   FLOATING CODE EDITOR CARD
   ========================================= */
.editor {
  background: rgba(12, 12, 22, 0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 18px;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.3), 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  animation: floaty 7s ease-in-out infinite;
}

@keyframes floaty {
  50% {
    transform: translateY(-12px);
  }
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
}

.editor-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2a2a3d;
}

.editor-bar span:nth-child(1) {
  background: #ff5f57;
}

.editor-bar span:nth-child(2) {
  background: #febc2e;
}

.editor-bar span:nth-child(3) {
  background: #28c840;
}

.editor-bar em {
  margin-left: auto;
  font: 0.8rem var(--mono);
  color: var(--muted);
  font-style: normal;
}

.editor pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font: 0.9rem/1.7 var(--mono);
  color: #d7d7e8;
}

/* Syntax highlighting colors */
.c { color: #6b7090; } /* comment */
.k { color: #c792ea; } /* keyword */
.s { color: #a5e075; } /* string */
.n { color: #f78c6c; } /* number */
.f { color: #82aaff; } /* function */
.p { color: #7fdbca; } /* property */
.v { color: #ffcb6b; } /* variable */

/* Phone layout for the hero */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  #cloud {
    opacity: 0.5;
  }

  .editor {
    animation: none;
  }

  .editor pre {
    font-size: 0.8rem;
  }
}

/* =========================================
   CARDS AND GRIDS
   ========================================= */
.grid {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.75rem;
}

.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.three {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.four {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.15);
}

.card p {
  margin: 0;
  font-size: 0.98rem;
}

/* Skills */
.skill {
  text-align: center;
}

.ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(61, 123, 255, 0.25), rgba(139, 92, 246, 0.25));
  font: 700 1.1rem var(--mono);
  color: #b9c8ff;
}

/* Projects empty state */
.empty {
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 2rem 1.5rem;
  background: radial-gradient(circle at 50% 0, rgba(99, 102, 241, 0.12), transparent 60%);
}

.empty > p {
  color: var(--text);
  font-size: 1.15rem;
}

.idea {
  border-style: dashed;
}

.idea h3 {
  margin: 0.7rem 0 0;
}

/* Prompt Lab */
.prompt pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #05050a;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin: 1rem 0;
  font: 0.85rem/1.6 var(--mono);
  color: #cfd0e6;
}

.status {
  min-height: 1.5em;
  margin-top: 1rem;
  color: #8fb2ff;
}

/* =========================================
   LEARNING JOURNEY TIMELINE
   ========================================= */
.timeline {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1rem;
}

/* The dot on the line */
.timeline li::before {
  content: "";
  position: absolute;
  left: -2.2rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--muted);
}

/* Current activities glow blue */
.timeline .now::before {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

/* Future goals look softer */
.timeline .goal {
  opacity: 0.75;
}

.timeline .goal .tag {
  border-style: dashed;
}

.timeline h3 {
  margin: 0.4rem 0 0.2rem;
}

.timeline p {
  margin: 0;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}

.foot a:hover {
  color: var(--text);
}

.copy {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
}

/* =========================================
   SCROLL ANIMATION
   Sections only start hidden when JavaScript is running.
   ========================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.show {
  opacity: 1;
  transform: none;
}



/* Turn off motion for people who prefer less animation */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }


  .js.reveal{
    opacity:1;
    transform:none;
  }

}

.links .auth {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .links .auth {
    padding: 0.75rem 1.25rem;
  }
}

dialog {
  position: relative;
  width: min(420px, 92vw);
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.25);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

dialog h2 {
  font-size: 1.6rem;
}

.close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 40px;
  height: 40px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tabs button {
  flex: 1;
  padding: 0.6rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font: 500 0.95rem var(--font);
  cursor: pointer;
}

.tabs button.active {
  color: var(--text);
  border-color: var(--violet);
}

#authForm {
  display: grid;
  gap: 0.9rem;
}

#authForm label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

#authForm input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

#authForm input:focus {
  border-color: var(--violet);
}

.linkbtn {
  background: none;
  border: 0;
  color: #8fb2ff;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.msg {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
}

.msg.bad {
  color: #ff9b9b;
}

.msg.ok {
  color: #8fe3b0;
}

pass-wrap {
  position: relative;
  display: block;
}

#authForm .pass-wrap input {
  padding-right: 3.2rem;
}

.pass-wrap {
  position: relative;
  display: block;
}

#authForm .pass-wrap input {
  padding-right: 3.2rem;
}

.eye {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.eye:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.eye .off {
  display: none;
}

.eye.on .off {
  display: block;
}

.eye.on .open {
  display: none;
}