/* ===== Base styles ===== */

:root {
  --bg: #020617; /* very dark slate */
  --bg-alt: #020617;
  --surface: #020617;
  --accent: #ef4444; /* red accent */
  --accent-soft: rgba(239, 68, 68, 0.22);
  --text-main: #e5e7eb; /* light text */
  --text-muted: #94a3b8;
  --border-subtle: #1f2937;
  --radius-lg: 18px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.8);
}

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

html {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(circle at top left, #111827, #020617 60%);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  background: transparent;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Lock background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Links */

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

a:hover {
  text-decoration: underline;
}

/* ===== Layout helpers ===== */

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

.section {
  padding: 3.5rem 0 4rem;
}

/* ===== Header & nav ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

/* Logo */

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

/* Gentle float + glow for logo mark */
@keyframes floatGlow {
  0% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(239, 68, 68, 0.3),
      0 12px 26px rgba(248, 113, 113, 0.6);
  }
  50% {
    transform: translateY(-2px);
    box-shadow:
      0 0 0 1px rgba(239, 68, 68, 0.7),
      0 20px 40px rgba(248, 113, 113, 0.95);
  }
  100% {
    transform: translateY(0);
    box-shadow:
      0 0 0 1px rgba(239, 68, 68, 0.3),
      0 12px 26px rgba(248, 113, 113, 0.6);
  }
}

.logo-mark-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  background: conic-gradient(
    from 180deg,
    #f97316,
    #ef4444,
    #ec4899,
    #f97316
  );
  color: white;
  border: 2px solid rgba(15, 23, 42, 0.9);
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.18),
    0 12px 26px rgba(248, 113, 113, 0.7);
  transform: translateY(0);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  animation: floatGlow 6s ease-in-out infinite;
}

.logo:hover .logo-mark-circle {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 0 0 1px rgba(248, 250, 252, 0.8),
    0 22px 48px rgba(248, 113, 113, 1);
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  gap: 1rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(30, 64, 175, 0.8);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fee2e2;
  background: var(--accent-soft);
  border-color: rgba(248, 113, 113, 0.9);
}

/* ===== Hero ===== */

.hero {
  padding: 4rem 0 4.5rem;
}

.hero-small {
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-kicker {
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: #f97373;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.15rem, 4vw, 2.7rem);
  margin: 0 0 0.6rem;
}

.hero-subtitle {
  margin: 0.6rem 0 1.6rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

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

/* Hero side "snapshot" card */

.hero-card {
  border-radius: 1.2rem;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, #111827, #020617 70%);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.5rem;
}

.hero-card-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #f97373;
  margin: 0 0 0.9rem;
}

.hero-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-card-list li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.7rem;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(51, 65, 85, 0.95);
}

.hero-card-list li:last-child {
  border-bottom: none;
}

.hero-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.hero-value {
  color: var(--text-main);
}

/* ===== CISO section ===== */

.section-ciso h2 {
  margin-top: 0;
}

.section-intro {
  margin-top: 0.6rem;
  max-width: 42rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.ciso-card p {
  margin-bottom: 0.8rem;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), #020617);
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn.primary {
  background: linear-gradient(135deg, #ef4444, #fb923c);
  color: white;
  box-shadow: 0 14px 30px rgba(248, 113, 113, 0.75);
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 40px rgba(248, 113, 113, 1);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  border-color: rgba(51, 65, 85, 0.9);
}

.btn.ghost:hover {
  background: rgba(30, 64, 175, 0.3);
  border-color: rgba(248, 113, 113, 0.8);
  transform: translateY(-1px);
}

/* ===== Cards / grid ===== */

.grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1.5rem;
}

.card {
  background: radial-gradient(circle at top left, #111827, #020617 70%);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

/* subtle sheen on hover */
.card::before {
  content: "";
  position: absolute;
  inset: -150%;
  background: radial-gradient(circle at 0 0, rgba(248, 113, 113, 0.18), transparent 55%);
  opacity: 0;
  transform: translate3d(-40%, -40%, 0);
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.9);
  border-color: var(--accent-soft);
  background: radial-gradient(circle at top left, #1f2937, #020617 80%);
}

.card:hover::before {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== About page layout ===== */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
  gap: 2.2rem;
}

.about-text h2 {
  margin-top: 0;
}

.about-text p {
  color: var(--text-muted);
  line-height: 1.6;
}

.about-text ul {
  padding-left: 1.1rem;
  color: var(--text-muted);
}

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

/* About photo card */

.about-photo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.profile-photo {
  width: 160px;
  height: 160px;
  object-fit: cover;
  object-position: center top;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
}

/* ===== Resume layout ===== */

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
  gap: 2rem;
}

.resume-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resume-contact a {
  color: var(--accent);
}

.resume-section-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f97373;
  margin-bottom: 0.75rem;
}

.resume-item {
  margin-bottom: 1.4rem;
}

.resume-item-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.15rem;
}

.resume-item-role {
  font-weight: 600;
}

.resume-item-company {
  color: var(--text-main);
  font-size: 0.95rem;
}

.resume-item-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resume-item ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.resume-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Fortinet + company logos on resume */

.resume-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 0.4rem;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

/* ===== Blog list ===== */

.blog-grid {
  margin-top: 2rem;
}

.blog-preview {
  display: flex;
  flex-direction: column;
}

.blog-thumb {
  width: 100%;
  border-radius: 0.9rem;
  object-fit: cover;
  max-height: 190px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(30, 64, 175, 0.6);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.9);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.blog-preview:hover .blog-thumb {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 1);
}

.blog-meta {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.blog-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.btn.blog-readmore {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  padding: 0.45rem 0.95rem;
}

/* ===== Modal (popup) ===== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 50;
  padding: 2rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  display: flex;
}

/* Pop-in animation for modals */
@keyframes modal-pop {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.94);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal {
  background: radial-gradient(circle at top, #020617, #020617 70%);
  border-radius: 1.1rem;
  padding: 1.5rem 1.7rem;
  max-width: 650px;
  width: 100%;
  border: 1px solid rgba(55, 65, 81, 1);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 1);
  position: relative;
  color: var(--text-main);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.modal-overlay.active .modal {
  animation: modal-pop 0.26s ease-out forwards;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.modal-image {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 0.9rem;
  margin: 0.75rem 0 1rem;
  border: 1px solid rgba(55, 65, 81, 1);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.9);
}

/* Close button fixed in viewport so it's always visible */
.modal-close {
  position: fixed;
  top: 1.1rem;
  right: 1.2rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(55, 65, 81, 1);
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 60; /* above overlay and modal content */
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.modal-close:hover {
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.05);
}

/* ===== Scroll reveal animations ===== */

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(4px);
  transition:
    opacity 0.55s ease-out,
    transform 0.55s ease-out,
    filter 0.55s ease-out;
}

[data-reveal].reveal-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ===== Footer ===== */

.site-footer {
  margin-top: auto;
  border-top: 1px solid rgba(30, 64, 175, 0.7);
  background: radial-gradient(circle at top, #020617, #020617 70%);
}

.footer-inner {
  padding: 1rem 0 1.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-note {
  margin-top: 0.25rem;
}

/* ===== Responsive tweaks ===== */

@media (max-width: 800px) {
  .hero-inner,
  .about-layout,
  .resume-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }

  .nav-container {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

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

  .container {
    padding: 0 1.25rem;
  }

  .hero-card {
    margin-top: 1.5rem;
  }

  .about-photo-card {
    justify-content: flex-start;
  }
}

/* Stack header/nav better on small screens */
@media (max-width: 700px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: auto;
    gap: 0.4rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .main-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 0.35rem;
  }

  .nav-link {
    padding-inline: 0.6rem;
  }

  .hero-inner {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-card {
    margin-top: 1rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .resume-contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-overlay {
    padding: 1.5rem 1rem;
  }

  .modal-close {
    top: 0.8rem;
    right: 0.9rem;
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
  }

  .profile-photo {
    width: 140px;
    height: 140px;
  }
}
