/*
Theme Name: Noman Portfolio
Theme URI: https://github.com/noman/portfolio
Author: JA
Author URI: https://jnoman.com
Description: A dark, elegant portfolio theme with animated loading screen, HLS video backgrounds, bento project grid, parallax explorations, journal section, and full GSAP animations. Designed for creatives, designers, and full-stack founders.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: noman-portfolio
Tags: portfolio, dark, one-page, custom-colors, custom-logo, full-width-template, animation
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --bg: hsl(0 0% 4%);
  --surface: hsl(0 0% 8%);
  --text: hsl(0 0% 96%);
  --muted: hsl(0 0% 53%);
  --stroke: hsl(0 0% 12%);
  --accent-1: #89AACC;
  --accent-2: #4E85BF;
  --font-body: 'Inter', sans-serif;
  --font-display: 'Instrument Serif', serif;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.accent-gradient {
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
}

.font-display {
  font-family: var(--font-display);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* =============================================
   LOADING SCREEN
   ============================================= */
#np-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#np-loading.np-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.np-loading-label {
  position: absolute;
  top: 2rem;
  left: 2rem;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0;
  transform: translateY(-20px);
  animation: npFadeSlideDown 0.6s ease forwards 0.2s;
}

.np-loading-word {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: rgba(245, 245, 245, 0.8);
  animation: npWordFade 0.4s ease;
}

.np-loading-counter {
  position: absolute;
  bottom: 3rem;
  right: 2rem;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.np-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

.np-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
  box-shadow: 0 0 8px rgba(137, 170, 204, 0.35);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.05s linear;
}

@keyframes npFadeSlideDown {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes npWordFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
   NAVBAR
   ============================================= */
#np-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  justify-content: center;
  padding: 1.25rem 1rem;
}

.np-navbar-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--surface);
  padding: 0.4rem;
  gap: 0.25rem;
  transition: box-shadow 0.3s ease;
}

.np-navbar-pill.np-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.np-logo-ring {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  padding: 2px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.np-logo-ring:hover {
  transform: scale(1.1);
  background: linear-gradient(315deg, var(--accent-1), var(--accent-2));
}

.np-logo-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--text);
}

.np-nav-divider {
  width: 1px; height: 20px;
  background: var(--stroke);
  margin: 0 4px;
}

@media (max-width: 640px) {
  .np-nav-divider { display: none; }
}

.np-nav-link {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 9999px;
  color: var(--muted);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.np-nav-link:hover,
.np-nav-link.np-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.np-say-hi {
  position: relative;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 9999px;
  color: var(--text);
  background: var(--surface);
  isolation: isolate;
  transition: all 0.2s ease;
}

.np-say-hi::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.2s ease;
}

.np-say-hi:hover::before { opacity: 1; }

/* =============================================
   HERO SECTION
   ============================================= */
#np-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.np-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.np-video-wrap video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
}

.np-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.np-hero-fade {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 12rem;
  background: linear-gradient(to top, var(--bg), transparent);
}

.np-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 960px;
  width: 100%;
}

.np-hero-eyebrow {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  opacity: 0;
}

.np-hero-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
  opacity: 0;
}

.np-hero-role {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--muted);
  margin-bottom: 1rem;
}

.np-hero-role-word {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text);
  display: inline-block;
  animation: npRoleFadeIn 0.4s ease-out;
}

@keyframes npRoleFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.np-hero-desc {
  font-size: clamp(0.8rem, 1.5vw, 0.95rem);
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 3rem;
  line-height: 1.75;
  opacity: 0;
}

.np-hero-ctas {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
}

.np-btn-solid {
  background: var(--text);
  color: var(--bg);
  border-radius: 9999px;
  font-size: 14px;
  padding: 14px 28px;
  transition: all 0.25s ease;
  position: relative;
  isolation: isolate;
}

.np-btn-solid:hover {
  background: var(--bg);
  color: var(--text);
  transform: scale(1.05);
}

.np-btn-solid::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.np-btn-solid:hover::before { opacity: 1; }

.np-btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--stroke);
  border-radius: 9999px;
  font-size: 14px;
  padding: 12px 28px;
  transition: all 0.25s ease;
  position: relative;
  isolation: isolate;
}

.np-btn-outline:hover {
  border-color: transparent;
  transform: scale(1.05);
}

.np-btn-outline::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.np-btn-outline:hover::before { opacity: 1; }

.np-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.np-scroll-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.np-scroll-line {
  width: 1px;
  height: 40px;
  background: var(--stroke);
  position: relative;
  overflow: hidden;
}

.np-scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  animation: npScrollDown 1.5s ease-in-out infinite;
}

@keyframes npScrollDown {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* =============================================
   SECTION COMMON
   ============================================= */
.np-section {
  padding: 5rem 0;
  background: var(--bg);
}

.np-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.np-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.np-eyebrow-line {
  width: 32px; height: 1px;
  background: var(--stroke);
}

.np-eyebrow-text {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

.np-section-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

.np-section-heading em {
  font-family: var(--font-display);
  font-style: italic;
}

.np-section-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 0.75rem;
  max-width: 400px;
  line-height: 1.65;
}

.np-view-all {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s ease;
  position: relative;
  isolation: isolate;
}

@media (min-width: 768px) {
  .np-view-all { display: inline-flex; }
}

.np-view-all::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.np-view-all:hover::before { opacity: 1; }
.np-view-all:hover { border-color: transparent; }

/* =============================================
   BENTO GRID — WORKS
   ============================================= */
.np-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .np-bento { grid-template-columns: repeat(12, 1fr); }
  .np-col-7 { grid-column: span 7; }
  .np-col-5 { grid-column: span 5; }
}

.np-project-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.np-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.np-card-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.np-project-card:hover .np-card-inner img {
  transform: scale(1.06);
}

.np-halftone {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #000 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.2;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.np-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.72);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.np-project-card:hover .np-card-hover { opacity: 1; }

.np-card-label {
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 13px;
}

.np-card-label em {
  font-family: var(--font-display);
  font-style: italic;
}

/* =============================================
   JOURNAL
   ============================================= */
.np-journal-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.np-journal-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--stroke);
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.np-journal-item:hover {
  background: var(--surface);
}

.np-journal-thumb {
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.np-journal-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  flex: 1;
}

.np-journal-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* =============================================
   EXPLORATIONS
   ============================================= */
#np-explorations {
  padding: 5rem 0;
  background: var(--bg);
}

.np-explorations-header {
  text-align: center;
  margin-bottom: 4rem;
}

.np-eyebrow-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.np-exploration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .np-exploration-grid { grid-template-columns: repeat(3, 1fr); }
}

.np-exp-card {
  aspect-ratio: 1;
  border-radius: 1.25rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease;
}

.np-exp-card:hover { transform: scale(0.97) rotate(-1deg); }

.np-exp-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* =============================================
   STATS
   ============================================= */
#np-stats {
  padding: 5rem 0;
  background: var(--bg);
}

.np-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .np-stats-grid { grid-template-columns: repeat(3, 1fr); }
}

.np-stat {
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid var(--stroke);
  border-radius: 1.5rem;
}

.np-stat-number {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(3rem, 6vw, 5rem);
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.np-stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* =============================================
   CONTACT / FOOTER
   ============================================= */
#np-contact {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
  background: var(--bg);
}

.np-contact-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.np-contact-video-wrap video {
  position: absolute;
  top: 50%; left: 50%;
  min-width: 100%; min-height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%) scaleY(-1);
}

.np-contact-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.np-contact-inner {
  position: relative;
  z-index: 10;
}

.np-marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  padding: 1rem 0;
  margin-bottom: 5rem;
}

.np-marquee-track {
  display: flex;
  white-space: nowrap;
  animation: npMarquee 35s linear infinite;
}

@keyframes npMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.np-marquee-item {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: rgba(255, 255, 255, 0.12);
  padding-right: 2rem;
  flex-shrink: 0;
}

.np-contact-body {
  text-align: center;
  margin-bottom: 5rem;
}

.np-contact-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 4rem);
  margin-bottom: 2.5rem;
  line-height: 1.1;
}

.np-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 9999px;
  padding: 14px 28px;
  font-size: 15px;
  font-family: var(--font-body);
  transition: all 0.25s ease;
  position: relative;
  isolation: isolate;
}

.np-email-btn::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.np-email-btn:hover::before { opacity: 1; }
.np-email-btn:hover { border-color: transparent; }

.np-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stroke);
}

.np-social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.np-social-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.np-social-link:hover { color: var(--text); }

.np-available {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.np-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  animation: npPulse 2s ease-in-out infinite;
}

@keyframes npPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.np-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.np-reveal.np-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =============================================
   RESPONSIVE HELPERS
   ============================================= */
@media (max-width: 640px) {
  .np-section { padding: 3rem 0; }
  .np-hero-ctas { gap: 0.75rem; }
  .np-journal-title { font-size: 13px; }
  .np-exploration-grid { gap: 0.75rem; }
}

/* =============================================
   WORDPRESS BLOCK EDITOR COMPAT
   ============================================= */
.wp-block-image img { border-radius: 0.5rem; }

.wp-caption { max-width: 100%; }

.alignleft  { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem;  margin-bottom: 1rem; }
.aligncenter { display: block; margin: 1rem auto; }
