/* Base */

:root {
  --bg: #020617;
  --bg-alt: #020617;
  --panel: #020617;
  --panel-alt: #020617;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --danger: #f97373;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.95);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  background: radial-gradient(circle at top, #0f172a 0, #020617 45%, #000 100%);
  color: var(--text);
  min-height: 100vh;
}

/* Layout */

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / Nav */

.site-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(12px);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.09), transparent 55%),
              rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.logo-mark {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
}

.logo-symbol {
  color: var(--accent);
  font-weight: 700;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.logo-text .accent {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), #22c55e);
  border-radius: 999px;
  transition: width 0.2s ease-out;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  width: 100%;
}

/* Hero */

.hero {
  padding: 4rem 0 2.5rem;
}

.hero-compact {
  padding: 3rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 2rem;
  align-items: start;
}

.hero-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--accent);
  margin: 0 0 0.85rem;
}

.hero-title {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: clamp(2.4rem, 4vw, 2.9rem);
  margin: 0 0 0.25rem;
}

.hero-subtitle {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.hero-meta {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.hero-meta a {
  color: var(--text);
  text-decoration: none;
}

.hero-meta a:hover {
  color: var(--accent);
}

.divider {
  opacity: 0.5;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* === Phone hover + glitch reveal (compact, same color, width-matched) === */

.phone-hover-wrapper {
  position: relative;
  display: inline-block; /* wrapper width = phone number width */
}

.phone-number {
  position: relative;
  display: inline-block;
  opacity: 0;                  /* hidden until hover/active */
  transition: opacity 0.15s ease-out;
  font-weight: 500;
  color: #e5e7eb;              /* same color as like email */
}

/* Glitch layers */
.phone-number::before,
.phone-number::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  clip-path: inset(0 0 0 0);
}

/* Cyan offset */
.phone-number::before {
  text-shadow: -2px 0 var(--accent);
}

/* Magenta/red offset */
.phone-number::after {
  text-shadow: 2px 0 #f472b6;
}

/* Cover overlay – same width as number (wrapper) */
.phone-cover {
  position: absolute;
  inset: -1px 0 auto 0;     /* top + left + right, height auto */
  padding: 0 0.35rem;
  font-size: 0.75rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  z-index: 5;
}

/* Hover / hold: reveal + glitch – only after captcha */
.human-verified .phone-hover-wrapper:hover .phone-cover,
.human-verified .phone-hover-wrapper:active .phone-cover {
  opacity: 0;
  transform: translateY(-1px);
}

.human-verified .phone-hover-wrapper:hover .phone-number,
.human-verified .phone-hover-wrapper:active .phone-number {
  opacity: 1;
  animation: phone-glitch 280ms steps(2, end);
}

.human-verified .phone-hover-wrapper:hover .phone-number::before,
.human-verified .phone-hover-wrapper:hover .phone-number::after,
.human-verified .phone-hover-wrapper:active .phone-number::before,
.human-verified .phone-hover-wrapper:active .phone-number::after {
  animation: phone-glitch-offset 320ms steps(2, end) forwards;
}

/* Glitch keyframes */
@keyframes phone-glitch {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-1px, -1px); }
  50%  { transform: translate(1px, 1px); }
  75%  { transform: translate(-1px, 1px); }
  100% { transform: translate(0, 0); }
}

@keyframes phone-glitch-offset {
  0%   { opacity: 1; clip-path: inset(0 0 80% 0); }
  25%  { opacity: 1; clip-path: inset(10% 0 60% 0); }
  50%  { opacity: 1; clip-path: inset(40% 0 30% 0); }
  75%  { opacity: 0.6; clip-path: inset(70% 0 5% 0); }
  100% { opacity: 0; clip-path: inset(0 0 0 0); }
}

/* Right hero panel */

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.status-card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), transparent 55%),
              rgba(15, 23, 42, 0.95);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow-soft);
}

.status-title {
  font-family: "JetBrains Mono", ui-monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.8rem;
  color: #e2e8f0;
}

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.status-list li + li {
  margin-top: 0.4rem;
}

.badge-card {
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-subtle);
  padding: 0.85rem 1.1rem;
  background: rgba(15, 23, 42, 0.85);
}

.badge-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.badge-tags {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent);
}

/* Sections */

.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 55%),
              rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.section-title {
  font-family: "JetBrains Mono", ui-monospace;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 1rem;
  color: #e2e8f0;
}

.section-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.section-grid .grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
}

/* Timeline (Experience) */

.timeline {
  border-left: 1px solid rgba(148, 163, 184, 0.4);
  margin-left: 0.6rem;
}

.timeline-item {
  position: relative;
  padding-left: 1.6rem;
  padding-bottom: 1.6rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.44rem;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(56, 189, 248, 0.18);
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  align-items: baseline;
  margin-bottom: 0.45rem;
}

.item-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

.item-org {
  font-size: 0.85rem;
  color: var(--accent);
}

.item-dates {
  font-size: 0.8rem;
  color: var(--muted);
}

.item-list {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.item-list li + li {
  margin-top: 0.3rem;
}

/* Info Lists */

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.info-list li + li {
  margin-top: 0.75rem;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Links list */

.links-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.85rem;
}

.links-list li + li {
  margin-top: 0.25rem;
}

.links-list a {
  color: var(--accent);
  text-decoration: none;
}

.links-list a:hover {
  text-decoration: underline;
}

/* Subheading */

.subheading {
  margin: 1.35rem 0 0.6rem;
  font-size: 0.9rem;
}

/* Skills (pills) */

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
              rgba(15, 23, 42, 0.95);
}

/* CTA row */

.cta-row {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.6);
  cursor: pointer;
  white-space: nowrap;
}

.primary-btn {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 65%),
              linear-gradient(135deg, #38bdf8, #22c55e);
  border-color: transparent;
  color: #0b1120;
  font-weight: 600;
}

.primary-btn:hover {
  filter: brightness(1.07);
}

.ghost-btn {
  background: transparent;
  color: var(--text);
}

.ghost-btn:hover {
  background: rgba(15, 23, 42, 0.95);
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.3rem;
}

.project-card {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 1.3rem 1.25rem;
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%),
              rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow-soft);
}

.project-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.project-title {
  margin: 0;
  font-size: 1rem;
}

.project-meta {
  margin: 0.15rem 0 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.project-summary {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.project-bullets {
  margin: 0 0 0.8rem;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-bullets li + li {
  margin-top: 0.25rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.project-link {
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--accent);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  background: var(--accent-soft);
}

.project-link:hover {
  text-decoration: underline;
}
/* Blog layout */

.blog-hero {
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.blog-meta {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.blog-layout {
  max-width: 760px;
}

.blog-article {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}

.blog-article h2 {
  font-family: "JetBrains Mono", ui-monospace;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e2e8f0;
  margin: 2.0rem 0 0.85rem;
}

.blog-article h2:first-of-type {
  margin-top: 0;
}

.blog-article p {
  margin: 0 0 0.9rem;
}

.blog-article strong {
  color: var(--text);
}

/* Table styling inside blog */

.blog-table {
  margin: 1.1rem 0;
  overflow-x: auto;
}

.blog-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.blog-table th,
.blog-table td {
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.55rem 0.6rem;
  vertical-align: top;
}

.blog-table th {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 60%),
              rgba(15, 23, 42, 0.98);
  text-align: left;
  font-weight: 600;
  color: #e2e8f0;
}

.blog-table td {
  background: rgba(15, 23, 42, 0.9);
}

/* Blog expand / collapse */

.blog-toggle-row {
  margin-top: 1rem;
}

.blog-toggle-btn {
  font-size: 0.85rem;
  padding: 0.35rem 0.9rem;
}

/* Collapsed: show nothing */
.blog-expand-wrapper {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

/* Optional hook class – no fixed max-height here anymore */
.blog-expand-wrapper.expanded {
  /* max-height is set dynamically via JS */
}

/* No gradient overlay */
.blog-fade-overlay {
  display: none !important;
}

/* Simple captcha modal */

.captcha-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.captcha-backdrop.active {
  display: flex;
}

.captcha-modal {
  width: 100%;
  max-width: 360px;
  background: rgba(15, 23, 42, 0.98);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.6);
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-soft);
}

.captcha-title {
  margin: 0 0 0.5rem;
  font-family: "JetBrains Mono", ui-monospace;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.captcha-text {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.captcha-question {
  margin: 0 0 0.8rem;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.captcha-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #020617;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.captcha-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

.captcha-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.captcha-error {
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1em;
}


/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  margin-top: 1.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 840px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    order: -1;
  }

  .section-grid .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  /* Keep header layout similar to desktop but with more padding */
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem; /* adds safe space from screen edge */
    gap: 0.5rem;
  }

  /* Make sure logo isn’t hugging the edge */
  .logo-mark {
    display: flex;
    align-items: baseline;
  }

  /* Slightly tighter nav gap on small screens */
  .main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-link {
    padding: 0.25rem 0;
  }

  .hero {
    padding-top: 3rem;
  }

  .footer-inner {
    flex-direction: column;
  }
}




