/* ===================================================
   Tokens
=================================================== */
:root {
  --bg: #12141c;
  --panel: #1a1e29;
  --panel-2: #1f2430;
  --border: #2a2f3c;
  --text: #e8eaf0;
  --text-muted: #8890a6;
  --accent: #f2b84b;
  --accent-soft: rgba(242, 184, 75, 0.12);
  --teal: #56d9c4;
  --python-blue: #4b8bf2;
  --html-orange: #f2724b;
  --css-teal: #56d9c4;
  --js-yellow: #f2b84b;

  --font-head: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-w: 920px;
  --radius: 6px;
}

/* ===================================================
   Reset
=================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: linear-gradient(0deg, #000000 0.000%, #000000 25.000%, #211743 50.000%, #4a4a75 75.000%, #7a7686 100.000%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  margin: 0;
  line-height: 1.15;
}
p {
  margin: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* subtle dot-grid backdrop, grounded in the code-editor theme */
.grid-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    #000 40%,
    transparent 90%
  );
}

/* ===================================================
   Layout helpers
=================================================== */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.section__head h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 600;
}
.section__path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

section {
  padding: 72px 0;
}

/* ===================================================
   Nav
=================================================== */
.nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__mark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.nav__cursor {
  color: var(--text-muted);
}
.nav__links {
  display: flex;
  gap: 28px;
}
.nav__links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav__links a:hover {
  color: var(--text);
}

/* ===================================================
   Hero
=================================================== */
.hero {
  padding-top: 88px;
  padding-bottom: 56px;
}
.hero__term {
  max-width: 620px;
}
.hero__line {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.hero__prompt {
  color: var(--teal);
  margin-right: 8px;
}
.hero__name {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero__cursor {
  display: inline-block;
  width: 0.5ch;
  height: 0.85em;
  margin-left: 8px;
  background: var(--accent);
  vertical-align: -0.08em;
  animation: blink 1.1s steps(1) infinite;
}
.hero__role {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.hero__stack {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero__stack li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--panel);
}

@keyframes blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

/* ===================================================
   Skills
=================================================== */
.skills__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.skill {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}
.skill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.skill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.skill__dot--python {
  background: var(--python-blue);
}
.skill__dot--html {
  background: var(--html-orange);
}
.skill__dot--css {
  background: var(--css-teal);
}
.skill__dot--js {
  background: var(--js-yellow);
}

.skill__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
}
.skill__note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===================================================
   Projects
=================================================== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.card__file {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.card__body {
  padding: 22px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card__body h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.card__body p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card__points {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card__points li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}
.card__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}
.card__status {
  margin-top: auto;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
}

/* ===================================================
   Contact
=================================================== */
.contact__panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.contact__cmd {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.contact__number {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  direction: ltr;
  unicode-bidi: embed;
}
.contact__actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition:
    opacity 0.15s ease,
    border-color 0.15s ease;
}
.btn--primary {
  background: var(--accent);
  color: #1a1406;
}
.btn--primary:hover {
  opacity: 0.88;
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--accent);
}

/* ===================================================
   Footer
=================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 24px;
  text-align: center;
}
.footer p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===================================================
   Responsive
=================================================== */
@media (max-width: 768px) {
  .nav__links {
    gap: 18px;
  }
  .skills__list {
    grid-template-columns: repeat(2, 1fr);
  }
  .projects__grid {
    grid-template-columns: 1fr;
  }
  section {
    padding: 56px 0;
  }
  .hero {
    padding-top: 64px;
  }
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .nav__links {
    gap: 16px;
  }
  .skills__list {
    grid-template-columns: 1fr 1fr;
  }
  .contact__panel {
    padding: 24px;
  }
  .contact__actions {
    flex-direction: column;
  }
  .btn {
    width: 100%;
  }
}

/* ===================================================
   Motion preference
=================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero__cursor {
    animation: none;
    opacity: 1;
  }
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
