/* ═══════════════════════════════════════════════
   Resume Portal — Styles
   Gate page · Resume · Admin · Print
   ═══════════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Resume colors */
  --color-text:        #1a1a2e;
  --color-text-muted:  #3d3d5c;
  --color-accent:      #1e40af;
  --color-accent-light:#3b82f6;
  --color-border:      #cbd5e1;
  --color-border-light:#e2e8f0;
  --color-bg:          #ffffff;

  /* Gate colors */
  --gate-bg:           #0f172a;
  --gate-card:         rgba(30, 41, 59, 0.7);
  --gate-border:       rgba(59, 130, 246, 0.2);
  --gate-text:         #e2e8f0;
  --gate-muted:        #94a3b8;
  --gate-accent:       #3b82f6;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { font-size: 13.2px; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-accent); text-decoration: none; }

/* ═══════════════════════════════════════════════
   GATE PAGE
   ═══════════════════════════════════════════════ */
.gate {
  position: fixed;
  inset: 0;
  background: var(--gate-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gate.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Floating background orbs */
.gate-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.gate-bg-orb-1 {
  width: 400px; height: 400px;
  background: #3b82f6;
  top: -100px; right: -100px;
  animation: float-orb 12s ease-in-out infinite;
}

.gate-bg-orb-2 {
  width: 300px; height: 300px;
  background: #8b5cf6;
  bottom: -80px; left: -80px;
  animation: float-orb 10s ease-in-out infinite reverse;
}

.gate-bg-orb-3 {
  width: 200px; height: 200px;
  background: #06b6d4;
  top: 40%; left: 60%;
  animation: float-orb 14s ease-in-out infinite 2s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 30px); }
}

/* Card */
.gate-card {
  position: relative;
  z-index: 1;
  background: var(--gate-card);
  border: 1px solid var(--gate-border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: card-appear 0.5s ease-out;
}

@keyframes card-appear {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--gate-accent);
  margin-bottom: 1.5rem;
}

.gate-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gate-text);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.gate-subtitle {
  font-size: 0.95rem;
  color: var(--gate-muted);
  margin-bottom: 2rem;
}

/* Form */
.gate-form {
  margin-bottom: 1.5rem;
}

.gate-input-wrapper {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gate-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gate-input-wrapper:focus-within {
  border-color: var(--gate-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.gate-input {
  flex: 1;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: none;
  color: var(--gate-text);
  font-size: 1rem;
  font-family: var(--font-main);
  outline: none;
}

.gate-input::placeholder {
  color: var(--gate-muted);
}

.gate-submit {
  padding: 0.85rem 1.2rem;
  background: var(--gate-accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.gate-submit:hover {
  background: #2563eb;
}

.gate-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gate-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.gate-footer {
  font-size: 0.82rem;
  color: var(--gate-muted);
}

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

/* Loading spinner */
.gate-loading .gate-submit svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--gate-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--gate-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 1rem;
  color: var(--gate-muted);
  font-family: var(--font-main);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════
   RESUME CONTAINER
   ═══════════════════════════════════════════════ */
.resume-container {
  opacity: 0;
  transition: opacity 0.8s ease;
}

.resume-container.visible {
  opacity: 1;
}

/* Resume footer */
.resume-footer {
  text-align: center;
  padding: 0.15in 0 0.1in;
  margin-top: 0.1in;
  border-top: 1px solid var(--color-border-light);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  opacity: 0.6;
  font-style: italic;
}

/* Toolbar */
.resume-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 10;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font-main);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.toolbar-btn:hover {
  background: #1d4ed8;
}


/* ═══════════════════════════════════════════════
   RESUME PAGE
   ═══════════════════════════════════════════════ */
.page {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 0.4in 0.55in 0.35in;
}

/* ── Header ──────────────────────────────────────── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.18in;
  padding-bottom: 0.13in;
  border-bottom: 2.5px solid var(--color-accent);
}

.header-left h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.header-left .title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-top: 0.03in;
}

.header-right {
  text-align: right;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.header-right a {
  color: var(--color-text-muted);
}

/* ── Two-Column Layout ───────────────────────────── */
.content {
  display: grid;
  grid-template-columns: 1fr 2.3in;
  gap: 0 0.3in;
}

/* ── Section ─────────────────────────────────────── */
.section {
  margin-bottom: 0.16in;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  border-bottom: 1.5px solid var(--color-border-light);
  padding-bottom: 0.03in;
  margin-bottom: 0.08in;
}

/* ── Professional Summary ────────────────────────── */
.summary {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.16in;
}

/* ── Experience ───────────────────────────────────── */
.job {
  margin-bottom: 0.13in;
}

.job:last-child { margin-bottom: 0; }

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
}

.job-company {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
}

.job-location {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.job-role-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.04in;
}

.job-role {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-accent);
  font-style: italic;
}

.job-dates {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.promotion {
  font-size: 0.74rem;
  color: var(--color-accent-light);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.04in;
}

.job-bullets {
  list-style: none;
  padding: 0;
}

.job-bullets li {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.45;
  padding-left: 0.16in;
  position: relative;
  margin-bottom: 0.025in;
}

.job-bullets li::before {
  content: '\25b8';
  position: absolute;
  left: 0;
  color: var(--color-accent-light);
  font-size: 0.7rem;
  top: 0.01in;
}

.job-desc {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Projects ─────────────────────────────────────── */
.project {
  margin-bottom: 0.08in;
}

.project:last-child { margin-bottom: 0; }

.project-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-text);
}

.project-desc {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Sidebar ─────────────────────────────────────── */
.sidebar .section {
  margin-bottom: 0.15in;
}

.sidebar-list {
  list-style: none;
  padding: 0;
}

.sidebar-list li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0.02in;
}

.sidebar-tags {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ── Certifications ──────────────────────────────── */
.cert-entry {
  margin-bottom: 0.04in;
}

.cert-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.cert-date {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}

.cert-status {
  font-size: 0.76rem;
  font-style: italic;
  color: var(--color-accent-light);
}

/* ── Education ────────────────────────────────────── */
.edu-entry {
  margin-bottom: 0.06in;
}

.edu-school {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.edu-degree {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.edu-details {
  font-size: 0.76rem;
  color: var(--color-text-muted);
}


/* ═══════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════ */
@media print {
  /* Hide gate, toolbar */
  .gate,
  .no-print {
    display: none !important;
  }

  /* Force resume visible */
  .resume-container {
    display: block !important;
    opacity: 1 !important;
  }

  html { font-size: 13.2px; }
  body { background: white; }

  .page {
    padding: 0.4in 0.5in 0.3in;
    max-width: none;
  }

  a { color: inherit !important; }

  /* Prevent page breaks inside key layout elements */
  .header,
  .summary {
    break-after: avoid;
    page-break-after: avoid;
  }

  .content {
    break-before: avoid;
    page-break-before: avoid;
  }

  .job,
  .project,
  .section,
  .edu-entry,
  .cert-entry {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .job {
    break-before: auto;
    page-break-before: auto;
  }
}

@page {
  size: letter;
  margin: 0;
}
