@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&display=swap");

:root {
  --primary: #FBBF24;
  --octa: #3b82f6;
  --bg: #080808;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --text: #f7f7f7;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family:
    "Ubuntu",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.22), transparent 34%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.container {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.35);
}
.brand-mark img{
  width: 36px;
  height: 36px;
  max-width: 100%;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a:hover {
  color: var(--text);
}
.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  border-radius: 14px;
  padding: 10px 12px;
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: 84px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
h1 {
  font-size: clamp(2.75rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  margin: 18px 0 24px;
}
.hero p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 650px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 20px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  transition:
    transform 0.2s ease,
    border 0.2s ease,
    background 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
}
.btn.primary {
  border-color: transparent;
  background: var(--primary);
  color: white;
  box-shadow: 0 16px 46px rgba(251, 191, 36, 0.28);
}

.hero-photo-wrap {
  position: relative;
}
.hero-photo-wrap::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 36px;
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.55),
    transparent 45%,
    rgba(255, 255, 255, 0.12)
  );
  filter: blur(0);
  z-index: -1;
}
.hero-photo {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 44% center;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-card {
  position: absolute;
  left: -22px;
  bottom: 32px;
  width: min(320px, 84%);
  padding: 18px;
  border-radius: 22px;
  background: rgba(18, 18, 18, 0.86);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.hero-card strong {
  display: block;
  margin-bottom: 4px;
}
.hero-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 92px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 34px;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 8px 0 0;
}
.section-head p {
  color: var(--muted);
  max-width: 560px;
  margin: 0;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.skills span {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 9px 13px;
  border-radius: 999px;
  color: #e5e5e5;
}
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 26px;
}
.info-card,
.text-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.025)
  );
  padding: 28px;
}
.info-card ul {
  padding-left: 20px;
  color: var(--muted);
}
.text-card p {
  color: var(--muted);
  margin-top: 0;
}
.octa-eyebrow {
  color: #06B6D4;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.octa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 20px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  transition:
    transform 0.2s ease,
    border 0.2s ease,
    background 0.2s ease;
}
.octa-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 33, 237, 0.55);
  background: rgba(0, 33, 237, 0.12);
}
.octa-btn.primary {
  border-color: transparent;
  background: var(--octa);
  color: white;
  box-shadow: 0 16px 46px rgba(0, 33, 237, 0.28);
}
.octa-section {
  padding: 82px 0;
}
.octa-panel {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 34px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(
    135deg,
    var(--octa) 0%,
    var(--octa) 36%,
    #121212 78%
  );
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.octa-panel::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  right: -120px;
  top: -160px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(4px);
}
.octa-logo-box {
  border-radius: 28px;
  background: linear-gradient(
    135deg,
    #121212 0%,
    #121212 36%,
    #183564 78%
  );
  padding: 28px;
  position: relative;
  z-index: 1;
}
.octa-logo-box img {
  margin: 0 auto;
}
.octa-copy {
  position: relative;
  z-index: 1;
}
.octa-copy h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin: 10px 0 18px;
}
.octa-copy p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 650px;
}
.octa-copy .btn {
  margin-top: 18px;
  background: rgba(0, 0, 0, 0.32);
}

.timeline {
  display: grid;
  gap: 18px;
}
.timeline-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 24px;
}
.timeline-card h3 {
  margin: 6px 0 2px;
  font-size: 1.35rem;
}
.timeline-card p {
  color: var(--muted);
  margin: 0;
}
.timeline-card small {
  color: #d7d7d7;
  display: block;
  margin-top: 12px;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.course-card {
  min-height: 218px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.025)
  );
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.2s ease,
    border 0.2s ease;
}
.course-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.45);
}
.course-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 10px;
  margin-bottom: 18px;
}
.course-logo img {
  max-height: 42px;
  width: 100%;
  object-fit: contain;
}
.course-card span {
  color: var(--primary);
  font-weight: 700;
}
.course-card h3 {
  margin: 8px 0 4px;
  line-height: 1.15;
}
.course-card p {
  margin: 0;
  color: var(--muted);
}
.course-card em {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 10px;
  font-style: normal;
  color: #f1f1f1;
  font-size: 0.85rem;
  margin-top: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.project-card,
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 24px;
}
.project-card span,
.post-card span {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.92rem;
}
.project-card p,
.post-card p {
  color: var(--muted);
}
.project-card small {
  color: #ddd;
}

.contact-card {
  border: 1px solid var(--border);
  border-radius: 32px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.025)
  );
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}
.contact-card p {
  color: var(--muted);
}
.footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding: 26px 0;
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-body {
  background: #0b0b0b;
}
.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.admin-nav strong {
  color: #fff;
  letter-spacing: -0.02em;
}
.admin-nav-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 24px;
  padding: 34px 0;
  align-items: start;
}
.admin-panel {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.admin-summary-panel {
  position: sticky;
  top: 98px;
}
.admin-panel h1 {
  font-size: clamp(1.9rem, 2.2vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  margin: 0 0 18px;
  word-break: normal;
  overflow-wrap: anywhere;
}
.admin-panel h2 {
  color: #fff;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.admin-panel p,
.logo-help,
.admin-tip span {
  color: #d0d0d6;
}
.admin-tip-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.admin-tip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 14px 16px;
}
.admin-tip strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}
.form-stack {
  display: grid;
  gap: 12px;
}
.form-stack input,
.form-stack textarea,
.form-stack select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: #0b0b0b;
  color: #f8f8f8;
  padding: 12px 14px;
  min-height: 46px;
  font-family: inherit;
}
.form-stack textarea {
  min-height: 112px;
  resize: vertical;
}
.form-stack input::placeholder,
.form-stack textarea::placeholder {
  color: #a8a8b3;
  opacity: 1;
}
.form-stack input:focus,
.form-stack textarea:focus,
.form-stack select:focus {
  outline: 2px solid rgba(251, 191, 36, 0.32);
  border-color: rgba(251, 191, 36, 0.7);
}
.table-wrap {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: #0c0c0c;
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.admin-table th {
  color: #c9c9d1;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-table tbody tr:last-child td {
  border-bottom: 0;
}
.admin-table td {
  color: #f5f5f5;
  font-size: 0.98rem;
}
.admin-table td.nowrap,
.admin-table .nowrap {
  white-space: nowrap;
}
.table-experiences th:nth-child(1),
.table-experiences td:nth-child(1) {
  width: 17%;
}
.table-experiences th:nth-child(2),
.table-experiences td:nth-child(2) {
  width: 18%;
}
.table-experiences th:nth-child(3),
.table-experiences td:nth-child(3) {
  width: 16%;
}
.table-experiences th:nth-child(4),
.table-experiences td:nth-child(4) {
  width: 31%;
}
.table-experiences th:nth-child(5),
.table-experiences td:nth-child(5) {
  width: 18%;
}
.table-courses th:nth-child(1),
.table-courses td:nth-child(1) {
  width: 30%;
}
.table-courses th:nth-child(2),
.table-courses td:nth-child(2) {
  width: 22%;
}
.table-courses th:nth-child(3),
.table-courses td:nth-child(3) {
  width: 14%;
}
.table-courses th:nth-child(4),
.table-courses td:nth-child(4) {
  width: 14%;
}
.table-courses th:nth-child(5),
.table-courses td:nth-child(5) {
  width: 20%;
}
.table-posts th:nth-child(1),
.table-posts td:nth-child(1) {
  width: 28%;
}
.table-posts th:nth-child(2),
.table-posts td:nth-child(2) {
  width: 14%;
}
.table-posts th:nth-child(3),
.table-posts td:nth-child(3) {
  width: 14%;
}
.table-posts th:nth-child(4),
.table-posts td:nth-child(4) {
  width: 26%;
}
.table-posts th:nth-child(5),
.table-posts td:nth-child(5) {
  width: 18%;
}
.table-projects th:nth-child(1),
.table-projects td:nth-child(1) {
  width: 18%;
}
.table-projects th:nth-child(2),
.table-projects td:nth-child(2) {
  width: 14%;
}
.table-projects th:nth-child(3),
.table-projects td:nth-child(3) {
  width: 22%;
}
.table-projects th:nth-child(4),
.table-projects td:nth-child(4) {
  width: 28%;
}
.table-projects th:nth-child(5),
.table-projects td:nth-child(5) {
  width: 18%;
}
.actions-cell {
  width: 1%;
}
.action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 110px;
}
.action-group button,
.admin-panel button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #1d1d1d;
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}
.action-group button:hover,
.admin-panel button:hover {
  border-color: #FBBF24;
  background: rgba(251, 191, 36, 0.12);
  transform: translateY(-1px);
}
button.danger,
#reset-data {
  color: #ffd3ca;
}
.logo-help code,
.admin-tip code {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
}
.admin-auth {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 6, 0.82);
  backdrop-filter: blur(10px);
}
.admin-auth[hidden] {
  display: none;
}
.admin-auth-card {
  width: min(440px, 100%);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  padding: 28px;
  box-shadow: var(--shadow);
}
.admin-auth-card h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 8px 0 12px;
}
.admin-login-error {
  color: #ffb4a7;
  font-size: 0.92rem;
}
.admin-locked {
  overflow: hidden;
}
.admin-locked #admin-content,
.admin-locked .admin-header {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

@media (max-width: 1180px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-summary-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .octa-panel,
  .contact-card,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .section-head {
    flex-direction: column;
    align-items: start;
  }
  .course-grid {
    grid-template-columns: 1fr 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .timeline-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  h1 {
    font-size: clamp(2.5rem, 12vw, 4.5rem);
  }
  .hero {
    padding-top: 54px;
  }
  .section,
  .octa-section {
    padding: 72px 0;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .contact-card {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-nav-actions {
    width: 100%;
  }
  .admin-nav-actions .btn,
  .admin-nav .btn {
    width: 100%;
  }
  .admin-table,
  .admin-table thead,
  .admin-table tbody,
  .admin-table th,
  .admin-table td,
  .admin-table tr {
    display: block;
  }
  .admin-table thead {
    display: none;
  }
  .admin-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 0;
  }
  .admin-table td {
    width: 100% !important;
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 0;
  }
  .admin-table td::before {
    content: attr(data-label);
    color: #bcbcc4;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .action-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Blog e leitura de artigo */
.post-link-card {
  display: block;
  color: inherit;
}
.post-link-card .post-meta,
.article-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 8px 0 0;
}
.post-link-card .post-author,
.article-author strong {
  color: var(--text);
}
.post-link-card .read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
}
.post-link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.45);
}
.article-page {
  min-height: calc(100vh - 76px);
  padding: 78px 0 96px;
}
.article-container {
  max-width: 860px;
}
.back-link {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--muted);
  font-weight: 700;
}
.back-link:hover {
  color: var(--text);
}
.article-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 30px;
  margin-bottom: 34px;
}
.article-header h1 {
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.96;
  margin: 16px 0 20px;
}
.article-header p {
  color: var(--muted);
  font-size: 1.15rem;
}
.article-author {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: var(--muted);
}
.article-author::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), rgba(251, 191, 36, 0.28));
  border: 1px solid var(--border);
}
.article-content {
  color: #e7e7e7;
  font-size: 1.08rem;
  line-height: 1.85;
}
.article-content p {
  margin: 0 0 24px;
}
.article-loading {
  color: var(--muted);
}
.admin-save-status {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #fff;
}
.admin-save-status.success {
  border-color: rgba(74,222,128,.35);
  color: #bbf7d0;
}
.admin-save-status.error {
  border-color: rgba(248,113,113,.35);
  color: #fecaca;
}

/* Ajuste das colunas do blog no painel após inclusão de autor */
.table-posts th:nth-child(1),
.table-posts td:nth-child(1) { width: 24%; }
.table-posts th:nth-child(2),
.table-posts td:nth-child(2) { width: 16%; }
.table-posts th:nth-child(3),
.table-posts td:nth-child(3) { width: 13%; }
.table-posts th:nth-child(4),
.table-posts td:nth-child(4) { width: 12%; }
.table-posts th:nth-child(5),
.table-posts td:nth-child(5) { width: 22%; }
.table-posts th:nth-child(6),
.table-posts td:nth-child(6) { width: 13%; }
