:root {
  --bg: #070b14;
  --bg-soft: #0f1629;
  --text: #ecf2ff;
  --muted: #aab7d8;
  --accent: #40f2d0;
  --accent-2: #4f7dff;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 20% 0%, #172744 0%, var(--bg) 40%, #05070d 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  scroll-behavior: smooth;
}

#background-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.45;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 1rem auto;
  width: min(1100px, calc(100% - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand span {
  color: var(--accent);
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  transition: 0.3s ease;
}

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

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: white;
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
}

main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: stretch;
  min-height: 78vh;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 0.5rem 0 1rem;
  line-height: 1.1;
}

.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #d05dff);
  -webkit-background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 200% 0;
  }
}

.lead {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  margin: 1.75rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn.primary {
  color: #051019;
  background: linear-gradient(120deg, var(--accent), #6cf2ff);
  box-shadow: 0 10px 24px rgba(64, 242, 208, 0.25);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid var(--border);
}

.stats {
  list-style: none;
  display: flex;
  gap: 1rem;
  padding: 0;
  margin: 1.5rem 0 0;
  flex-wrap: wrap;
}

.stats li {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 12px;
}

.stats strong {
  font-size: 1.2rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.25rem;
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 0;
  border-radius: 18px;
  animation: floaty 5s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-panel h2 {
  padding: 1rem 1.2rem 0.5rem;
  margin: 0;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.terminal {
  border-radius: 0;
  background: #02050c;
  border: none;
  border-top: 1px solid rgba(115, 194, 255, 0.35);
  padding: 1rem 1.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #9ad1ff;
  flex: 1;
  font-size: 0.78rem;
  line-height: 1.55;
}

.terminal p {
  margin: 0;
  white-space: pre;
}

.terminal .ok {
  color: #67ffbb;
}

.terminal .warn {
  color: #ffd86b;
}

.pulse {
  color: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.about-greeting {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.3;
}

.about-bio {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0 0 1.5rem;
}

.about-bio strong {
  color: var(--text);
}

.about-highlights {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about-highlights li {
  color: var(--muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.about-num {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  min-width: 2.5rem;
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  border-left: 3px solid var(--accent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 32px rgba(64, 242, 208, 0.1);
}

.about-card-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(64, 242, 208, 0.08);
  border-radius: 10px;
}

.about-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 700;
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Timeline strip */
.about-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  position: relative;
}

.about-timeline::before {
  content: "";
  position: absolute;
  top: 2.35rem;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), rgba(208,93,255,0.5));
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(64, 242, 208, 0.5);
  flex-shrink: 0;
}

.timeline-label {
  margin: 0;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.timeline-detail {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Featured Work ── */
.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.projects-header .section-title {
  margin-bottom: 0.4rem;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.showcase-card {
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.showcase-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(64, 242, 208, 0.1), 0 0 0 1px rgba(64, 242, 208, 0.15);
}

.showcase-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #d05dff);
}

.showcase-body {
  padding: 1.4rem 1.3rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.showcase-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.showcase-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(64, 242, 208, 0.1);
  border: 1px solid rgba(64, 242, 208, 0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.showcase-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.showcase-body h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.showcase-body > p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.showcase-metrics {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  flex-wrap: wrap;
}

.metric-chip {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.8rem;
  flex: 1;
  min-width: 90px;
}

.metric-value {
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.showcase-actions {
  margin-top: auto;
}

.btn.small {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.card {
  border-radius: 16px;
  padding: 1.1rem;
}

/* ── Contact Section ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-channel-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(64, 242, 208, 0.08);
  border: 1px solid rgba(64, 242, 208, 0.15);
  border-radius: 12px;
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-channel-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.contact-channel-value {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

a.contact-channel-value:hover {
  color: var(--accent);
}

.contact-socials {
  margin-top: 0.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.contact-socials-label {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.15rem;
  text-decoration: none;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.social-links a:hover {
  color: var(--accent);
  border-color: rgba(64, 242, 208, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(64, 242, 208, 0.12);
}

/* ── Cyber Visualization ── */
.cyber-viz {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  min-height: 380px;
}

#cyber-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.cyber-overlay {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
}

.cyber-status {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(7, 11, 20, 0.75);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(64, 242, 208, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  animation: pulse 2s ease-in-out infinite;
}

/* ── Core Capabilities ── */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.capability-group {
  border-radius: 18px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capability-group:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(64, 242, 208, 0.08);
}

.cap-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cap-icon {
  font-size: 1.5rem;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(64, 242, 208, 0.08);
  border-radius: 12px;
  flex-shrink: 0;
}

.cap-group-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.cap-items {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.cap-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.cap-item-icon {
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(64, 242, 208, 0.08);
  border: 1px solid rgba(64, 242, 208, 0.15);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.cap-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.cap-desc {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Tech tags */
.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.cap-tags span {
  background: rgba(64, 242, 208, 0.07);
  border: 1px solid rgba(64, 242, 208, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background 0.25s ease, transform 0.25s ease;
}

.cap-tags span:hover {
  background: rgba(64, 242, 208, 0.15);
  transform: translateY(-1px);
}


.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.showcase-grid--full {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Blog Page ─────────────────────────────────────── */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-header h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.blog-header .lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

.blog-section {
  margin-bottom: 4rem;
}

.blog-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.blog-section-title i {
  color: var(--accent);
}

.blog-section-desc {
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 0.97rem;
}

/* Medium Cards */
.medium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.medium-card {
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-left: 3px solid var(--accent-2);
  transition: transform 0.25s, border-color 0.3s;
}

.medium-card:hover {
  transform: translateY(-4px);
  border-left-color: var(--accent);
}

.medium-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.medium-tag {
  background: rgba(79, 125, 255, 0.12);
  color: var(--accent-2);
  padding: 0.25rem 0.65rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.medium-date {
  color: var(--muted);
  font-size: 0.8rem;
}

.medium-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.medium-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.medium-card .btn.primary.small {
  align-self: flex-start;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  gap: 0.35rem;
}

.medium-follow {
  text-align: center;
  margin-top: 2rem;
}

/* Blog Posts (Original Thinkpieces) */
.blog-posts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-post {
  border-radius: 16px;
  padding: 2rem;
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--accent), var(--accent-2)) 1;
  transition: transform 0.25s;
}

.blog-post:hover {
  transform: translateY(-3px);
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
}

.blog-post-date {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-post-tag {
  background: rgba(64, 242, 208, 0.1);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.blog-post h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.blog-post p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.blog-post-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-read-time {
  color: var(--muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

footer {
  padding: 2rem 1rem 3rem;
  text-align: center;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 900px) {
  .hero,
  .about-layout,
  .capabilities-grid,
  .showcase-grid,
  .showcase-grid--full,
  .contact-layout,
  .medium-grid {
    grid-template-columns: 1fr;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-timeline {
    grid-template-columns: 1fr 1fr;
  }

  .about-timeline::before {
    display: none;
  }

  nav {
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.5rem);
    flex-direction: column;
    background: rgba(10, 16, 30, 0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    display: none;
  }

  nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }
}
