:root {
  --bg: #050712;
  --bg-alt: #070a18;
  --accent: #4af2c5;
  --accent-soft: rgba(74, 242, 197, 0.2);
  --accent-2: #6c5ce7;
  --text-main: #f5f7ff;
  --text-muted: #9aa0c2;
  --card-bg: rgba(10, 14, 35, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --danger: #ff7675;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: radial-gradient(circle at top, #151b3a 0, #050712 55%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* BACKGROUND GRID */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px
    );
  background-size: 40px 40px;
  opacity: 0.35;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  animation: grid-pan 40s linear infinite;
  z-index: -3;
}

@keyframes grid-pan {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-80px, -80px, 0); }
}

/* ORBS */
.orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.7;
  pointer-events: none;
  z-index: -2;
  mix-blend-mode: screen;
}

.orb.orb-1 {
  background: radial-gradient(circle, #4af2c5, transparent 60%);
  top: -80px;
  left: -40px;
}

.orb.orb-2 {
  background: radial-gradient(circle, #6c5ce7, transparent 60%);
  bottom: -120px;
  right: -40px;
}

.orb.orb-3 {
  background: radial-gradient(circle, #ff7675, transparent 60%);
  top: 40%;
  right: 20%;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 18, 0.92),
    rgba(5, 7, 18, 0.6),
    transparent
  );
  border-bottom: 1px solid var(--border-subtle);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0, #ffffff 0, #4af2c5 18%, #151b3a 60%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 24px rgba(74, 242, 197, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 210deg,
    rgba(255, 255, 255, 0.2),
    transparent 40%,
    rgba(255, 255, 255, 0.2),
    transparent 80%
  );
  mix-blend-mode: soft-light;
  opacity: 0.7;
}

.logo-mark span {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #050712;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.logo-text-main {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo-text-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.2rem;
  transition: color 0.2s ease;
}

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

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

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

/* MAIN LAYOUT */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;

  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 60%),
    rgba(5, 7, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.metric-value {
  font-size: 0.75rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.metric-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.metric-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 1.2s ease;
}

.metric-pill {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.65rem;
  border-radius: 999px;
  background: rgba(74, 242, 197, 0.12);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.metric-pill.danger {
  background: rgba(255, 118, 117, 0.12);
  color: var(--danger);
}

/* SECTION BASE */
section {
  margin-top: 5rem;
}

.section-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.section-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
  position: relative;
  overflow: hidden;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

/* TIMELINE */
.timeline {
  display: grid;
  gap: 1.8rem;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.timeline-item {
  position: relative;
  padding-left: 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(74, 242, 197, 0.9);
}

.timeline-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.timeline-content-title {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.timeline-content-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* STACK LAYOUT */
.stack-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
}

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

/* PROJECT CARDS */
.project-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.project-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}
  margin-bottom: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.project-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* AUTOMATION GRID */
.automation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.automation-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
}

.automation-title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.automation-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.automation-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* LAB LOG */
.lablog-terminal {
  background: #050712;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.85rem;
  color: var(--text-main);
  max-height: 260px;
  overflow-y: auto;
}

.lablog-line {
  margin-bottom: 0.3rem;
  white-space: nowrap;
}

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

.lablog-line span.cmd {
  color: #ffffff;
}

/* CONTACT PANEL */
.contact-panel {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
  max-width: 600px;
}

.contact-title {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.contact-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--text-main);
}

.contact-method-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

/* FOOTER */
footer {
  margin-top: 5rem;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(74, 242, 197, 0.4);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 242, 197, 0.6);
}

/* MOBILE TWEAKS */
@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

.hero {
  position: relative;
  padding: 9rem 1.5rem 6rem;
  text-align: center;
  z-index: 5;
}

.hero-glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(74, 242, 197, 0.35), transparent 70%);
  filter: blur(140px);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}

.hero-title {
  position: relative;
  display: inline-block;
}

.hero-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(74, 242, 197, 0.8);
  animation: hero-underline 1.4s ease forwards;
}

@keyframes hero-underline {
  to {
    width: 80%;
  }
}
  .section-title {
    font-size: 1.8rem;
  }
}
/* SIGNAL BUTTON */
.signal-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, #ffffff, #4af2c5 40%, #6c5ce7 100%);
  color: #050712;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border: none;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 0 32px rgba(74, 242, 197, 0.9);
  overflow: hidden;
  position: relative;
}

.signal-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.5),
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.4)
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  transform: translateX(-40%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.signal-button:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* CONTACT SECTION */
#contact {
  margin-top: 6rem;
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-box {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(74, 242, 197, 0.12);
}

.contact-box h3 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.contact-box p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1rem;
  color: var(--text-main);
}

.contact-link-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

/* FOOTER */
footer {
  margin-top: 6rem;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  animation: slideUp 0.9s ease forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* TERMINAL SCROLLBAR */
.terminal-body::-webkit-scrollbar {
  width: 6px;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(74, 242, 197, 0.4);
  border-radius: 999px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 242, 197, 0.6);
}

/* LABLOG SCROLLBAR */
.lablog-terminal::-webkit-scrollbar {
  width: 6px;
}

.lablog-terminal::-webkit-scrollbar-thumb {
  background: rgba(74, 242, 197, 0.4);
  border-radius: 999px;
}

.lablog-terminal::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 242, 197, 0.6);
}

/* FULL-WIDTH HERO */
.hero {
  width: 100%;
  padding: 8rem 1.5rem 6rem;
  text-align: center;
  position: relative;
  z-index: 5;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-shadow: 0 0 28px rgba(74, 242, 197, 0.55);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* MOBILE */
@media (max-width: 600px) {
  .hero {
    padding: 4rem 1.2rem 3rem;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}
.orb-hero {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, #4af2c5, transparent 60%);
  filter: blur(120px);
  opacity: 0.55;
  z-index: -1;
}

/* EXTRA POLISH — HOVER GLOWS */
.card:hover,
.project-card:hover,
.automation-card:hover,
.contact-box:hover {
  border-color: rgba(74, 242, 197, 0.25);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(74, 242, 197, 0.25),
    0 0 22px rgba(74, 242, 197, 0.35);
  transform: translateY(-3px);
  transition: all 0.25s ease;
}

/* BUTTON GLOW FIX */
.btn-primary:hover,
.signal-button:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 0 40px rgba(74, 242, 197, 1);
}

/* PANEL HOVER */
.panel:hover {
  box-shadow:
    0 22px 70px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(74, 242, 197, 0.25);
  transition: box-shadow 0.25s ease;
}

/* TAG HOVER */
.tag:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-main);
  transition: all 0.2s ease;
}

/* TIMELINE DOT GLOW */
.timeline-item:hover::before {
  box-shadow: 0 0 18px rgba(74, 242, 197, 1);
}

/* CONTACT LINK HOVER */
.contact-link:hover {
  color: var(--accent);
  transition: color 0.2s ease;
}

/* FOOTER GLOW */
footer:hover .footer-accent {
  text-shadow: 0 0 12px rgba(74, 242, 197, 0.8);
}

/* FINAL TOUCH — SMOOTH TRANSITIONS */
* {
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
