/* ==========================================================================
   MacroSpective (@macrospective Brand Kit)
   Palette:
     Midnight Blue (Primary):   #0F172A
     Electric Cyan (Secondary): #06B6D4
     Bright Teal (Accent):      #64D2FF
     Slate Grey (Muted):        #8E8E93
   Typography:
     Headings: 'Space Grotesk', sans-serif (700)
     Body:     'Inter', sans-serif (400, 500, 600)
   Aesthetic Rules:
     - Angular chamfered polygons, crisp geometric vector precision
     - Segmented stencil dividers with angular serif spurs
     - Zero rounded bubbly cards; print-ready CV mode built in
   ========================================================================== */

:root {
  --midnight-blue: #0F172A;
  --midnight-deep: #080E1C;
  --midnight-surface: #131F38;
  --midnight-elevated: #192847;
  --electric-cyan: #06B6D4;
  --bright-teal: #64D2FF;
  --slate-grey: #8E8E93;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --border-subtle: rgba(100, 210, 255, 0.18);
  --border-strong: #06B6D4;
  --logo-primary: #F8FAFC;
  --logo-secondary: #06B6D4;
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--midnight-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
}

body {
  background-color: var(--midnight-blue);
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--bright-teal);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: #FFFFFF;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Top Status Telemetry Bar --- */
.telemetry-bar {
  background: var(--midnight-deep);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--slate-grey);
  padding: 0.5rem 0;
}

.telemetry-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--bright-teal);
}

.status-diamond {
  width: 8px;
  height: 8px;
  background: var(--electric-cyan);
  transform: rotate(45deg);
  display: inline-block;
  box-shadow: 0 0 10px var(--electric-cyan);
}

.telemetry-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.studio-trigger {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.65rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.studio-trigger:hover {
  border-color: var(--electric-cyan);
  color: var(--bright-teal);
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1.5rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  line-height: 1.05;
}

.brand-wordmark span {
  color: var(--electric-cyan);
}

.brand-domain {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-grey);
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: #FFFFFF;
  border-bottom-color: var(--electric-cyan);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--electric-cyan);
  color: #FFFFFF;
  padding: 0.45rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}

/* --- Angular Chamfered Buttons & Cards (@macrospective Guidelines: NO Rounded Corners) --- */
.btn-angular {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 0.78rem 1.45rem;
  cursor: pointer;
  border: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--electric-cyan);
  color: var(--midnight-deep);
}

.btn-primary:hover {
  background: var(--bright-teal);
  color: var(--midnight-deep);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--midnight-surface);
  color: var(--bright-teal);
  box-shadow: inset 0 0 0 1.5px var(--electric-cyan);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.16);
  color: #FFFFFF;
}

.btn-compact {
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
}

/* --- Segmented Stencil Section Divider --- */
.stencil-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 1.5rem;
}

.stencil-line {
  height: 2px;
  flex: 1;
  background: linear-gradient(90deg, var(--electric-cyan) 0%, rgba(100, 210, 255, 0.15) 85%, transparent 100%);
  position: relative;
}

.stencil-node {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--electric-cyan);
  letter-spacing: 0.1em;
}

/* --- Hero Section with Profile Frame --- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric-cyan);
  margin-bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.eyebrow::before {
  content: "<";
  color: var(--bright-teal);
  font-weight: 700;
}

.eyebrow::after {
  content: "/>";
  color: var(--bright-teal);
  font-weight: 700;
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  margin-bottom: 0.65rem;
}

.hero-role {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  color: var(--bright-teal);
  margin-bottom: 1.15rem;
}

.hero-summary {
  color: var(--text-secondary);
  font-size: 1.04rem;
  max-width: 64ch;
  margin-bottom: 1.75rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Terminal Verification Box */
.terminal-panel {
  background: var(--midnight-deep);
  border-left: 3px solid var(--electric-cyan);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.terminal-prompt {
  color: var(--bright-teal);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.terminal-lines {
  list-style: none;
  color: var(--text-secondary);
  display: grid;
  gap: 0.3rem;
}

/* Profile Portrait Card (Preserving User Profile Picture in @macrospective Style) */
.profile-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: var(--midnight-surface);
  border: 1px solid var(--electric-cyan);
  padding: 1rem;
  clip-path: polygon(22px 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%, 0 22px);
}

.profile-frame::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-top: 2px solid var(--bright-teal);
  border-right: 2px solid var(--bright-teal);
  pointer-events: none;
}

.profile-frame::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-bottom: 2px solid var(--bright-teal);
  border-left: 2px solid var(--bright-teal);
  pointer-events: none;
}

.profile-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--midnight-deep);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  border: 1px solid var(--border-subtle);
}

.profile-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-meta-bar {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--slate-grey);
}

.profile-location {
  color: var(--bright-teal);
}

/* Metrics Strip */
.metrics-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.metric-card {
  background: var(--midnight-surface);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--electric-cyan);
  padding: 1.25rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.metric-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.65rem;
  color: #FFFFFF;
  line-height: 1.15;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--slate-grey);
  margin-top: 0.25rem;
}

/* --- Sections General --- */
.section {
  padding: 4.5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
  max-width: 740px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.section-subtitle {
  color: var(--slate-grey);
  font-size: 0.98rem;
}

/* --- Pillars / Capabilities Grid --- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar-card {
  background: var(--midnight-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--electric-cyan);
  transform: translateY(-2px);
}

.pillar-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--electric-cyan);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.pillar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.pillar-desc {
  color: var(--text-secondary);
  font-size: 0.93rem;
  margin-bottom: 1.35rem;
}

.skill-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--midnight-deep);
  color: var(--bright-teal);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.3rem 0.6rem;
}

/* --- Agentic & DevOps Projects Grid --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: linear-gradient(180deg, var(--midnight-surface) 0%, var(--midnight-deep) 100%);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--electric-cyan);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.project-tag {
  color: var(--electric-cyan);
  font-weight: 600;
}

.project-status {
  color: var(--slate-grey);
  border: 1px solid var(--border-subtle);
  padding: 0.12rem 0.45rem;
}

.project-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

.project-summary {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.project-impact {
  background: rgba(6, 182, 212, 0.08);
  border-left: 2px solid var(--bright-teal);
  padding: 0.65rem 0.8rem;
  font-size: 0.85rem;
  color: #E2E8F0;
  margin-bottom: 1.25rem;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin-top: auto;
  margin-bottom: 1.1rem;
}

.project-stack li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--slate-grey);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(142, 142, 147, 0.25);
  padding: 0.18rem 0.5rem;
}

.project-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--electric-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* --- CV / Experience Timeline --- */
.cv-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.95fr;
  gap: 2.5rem;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 1.5rem;
  border-left: 2px solid rgba(6, 182, 212, 0.35);
  padding-left: 1.5rem;
}

.role-card {
  position: relative;
  background: var(--midnight-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.role-card::before {
  content: "";
  position: absolute;
  left: -1.92rem;
  top: 1.65rem;
  width: 11px;
  height: 11px;
  background: var(--electric-cyan);
  transform: rotate(45deg);
}

.role-period {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--electric-cyan);
  letter-spacing: 0.08em;
}

.role-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: #FFFFFF;
  margin: 0.25rem 0;
}

.role-org {
  font-size: 0.9rem;
  color: var(--bright-teal);
  margin-bottom: 0.9rem;
}

.role-highlights {
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: grid;
  gap: 0.5rem;
}

.certs-panel {
  background: var(--midnight-surface);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--electric-cyan);
  padding: 1.6rem;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.certs-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 1.15rem;
  color: #FFFFFF;
}

.certs-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.cert-item {
  border-left: 2px solid var(--electric-cyan);
  padding-left: 0.85rem;
}

.cert-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--bright-teal);
}

.cert-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.96rem;
  color: #FFFFFF;
}

.cert-detail {
  font-size: 0.83rem;
  color: var(--slate-grey);
}

/* --- Contact & Footer --- */
.contact-box {
  background: linear-gradient(135deg, var(--midnight-surface) 0%, var(--midnight-deep) 100%);
  border: 1px solid var(--electric-cyan);
  padding: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 0;
  margin-top: 2rem;
  color: var(--slate-grey);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Built-In Client-Side Content Editor Drawer (?edit=1) --- */
.editor-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  background: var(--midnight-deep);
  border-left: 2px solid var(--electric-cyan);
  z-index: 200;
  display: none;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.65);
}

.editor-drawer.open {
  display: flex;
}

.editor-header {
  padding: 1rem 1.25rem;
  background: var(--midnight-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--bright-teal);
}

.editor-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-help {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(6, 182, 212, 0.08);
  border-left: 2px solid var(--electric-cyan);
  padding: 0.65rem 0.8rem;
}

.editor-textarea {
  width: 100%;
  flex: 1;
  min-height: 360px;
  background: #050914;
  color: #E2E8F0;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.85rem;
  resize: vertical;
}

.editor-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--midnight-surface);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 980px) {
  .hero-grid,
  .cv-layout {
    grid-template-columns: 1fr;
  }
  .profile-card-wrap {
    order: -1;
    align-items: flex-start;
  }
  .profile-frame {
    max-width: 260px;
  }
  .pillars-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .mobile-menu-btn {
    display: inline-block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--midnight-deep);
    border-bottom: 1px solid var(--electric-cyan);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 0.85rem;
  }
  .nav-links.open {
    display: flex;
  }
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Clean Print / PDF Resume Stylesheet --- */
@media print {
  body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 10.5pt;
  }
  .telemetry-bar,
  .mobile-menu-btn,
  .hero-cta-row,
  .editor-drawer,
  #printResumeBtn,
  .studio-trigger {
    display: none !important;
  }
  .site-header {
    position: static;
    background: #FFFFFF !important;
    border-bottom: 2px solid #0F172A;
  }
  .brand-wordmark, .hero-name, .section-title, .pillar-title, .project-title, .role-title, .certs-heading, .cert-name, .metric-value {
    color: #0F172A !important;
  }
  .hero-summary, .pillar-desc, .project-summary, .role-highlights, .section-subtitle {
    color: #1E293B !important;
  }
  .pillar-card, .project-card, .role-card, .certs-panel, .metric-card, .contact-box, .terminal-panel, .profile-frame {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    clip-path: none !important;
    break-inside: avoid;
  }
  .section {
    padding: 1.5rem 0 !important;
  }
}
