/* ---- Variables ---- */
:root {
  --bg: #1a1a1a;
  --bg-elevated: #222222;
  --bg-card: #252525;
  --text: #e0e0e0;
  --text-muted: #9a9a9a;
  --accent: #00ff00;
  --accent-dim: rgba(0, 255, 0, 0.35);
  --border: rgba(0, 255, 0, 0.22);
  --font-mono: "JetBrains Mono", "Share Tech Mono", "Consolas", monospace;
  --header-h: 4rem;
  --radius: 4px;
  --shadow-glow: 0 0 24px rgba(0, 255, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor-blink {
    animation: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 255, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 0, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  padding-top: var(--header-h);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(26, 26, 26, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.prompt {
  color: var(--accent);
}

.prompt-tail {
  color: var(--text-muted);
}

.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: lowercase;
}

.site-nav a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 1.25rem;
  margin: 0 auto;
  background: var(--accent);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .nav-list {
    flex-direction: column;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.5rem;
  }
}

/* ---- Layout sections ---- */
.section {
  padding: 4rem 1.25rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2rem;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hash {
  color: var(--accent);
  margin-right: 0.25rem;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- Hero ---- */
.hero {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.hero-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo-wrap {
    justify-self: center;
  }
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.cursor-blink {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-title {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-role {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--text-muted);
}

.hero-grid .hero-lead {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 901px) {
  .hero-grid .hero-lead {
    margin-left: 0;
    margin-right: 0;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}

.btn-ghost:hover {
  text-decoration: none;
  border-color: var(--accent);
  background: rgba(0, 255, 0, 0.06);
}

.hero-photo-wrap {
  margin: 0;
}

.hero-photo-frame {
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-glow);
}

.hero-photo {
  border-radius: 2px;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}

.photo-caption {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.hint {
  color: var(--accent-dim);
}

/* ---- Cards ---- */
.terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-glow);
}

.terminal-card p:last-child {
  margin-bottom: 0;
}

.terminal-line {
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 0.65rem;
}

.terminal-line code {
  font-family: inherit;
}

.sobre-card p {
  margin-top: 0;
  color: var(--text-muted);
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.15rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.skill-item:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.skill-icon {
  filter: drop-shadow(0 0 6px rgba(0, 255, 0, 0.25));
}

.skill-name {
  font-weight: 600;
  font-size: 0.82rem;
}

.skill-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- Projects ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-head {
  margin-bottom: 0.75rem;
}

.project-tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 0.35rem;
}

.project-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.project-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---- Certs ---- */
.certs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.cert-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.cert-abbr {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 3.5rem;
}

.cert-full {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ---- Courses ---- */
.courses-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.courses-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.courses-abbr {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 3.5rem;
}

.courses-full {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Contact ---- */
.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.contact-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.contact-card img {
  flex-shrink: 0;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  background: var(--bg-elevated);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-code {
  font-family: inherit;
  color: var(--accent);
  background: rgba(0, 255, 0, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.to-top {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
}

.to-top:hover {
  border-color: var(--accent);
}
