/* ============================================
   NEWSPAPER THEME — Vintage Parchment Style
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Source+Serif+4:wght@400;600;700&display=swap');

:root {
  --np-bg: #d4c5a0;
  --np-bg-paper: #e8dcc4;
  --np-bg-card: #efe6d0;
  --np-bg-dark: #c5b48e;
  --np-text: #2c1810;
  --np-text-soft: #4a3728;
  --np-muted: #7a6650;
  --np-accent: #6b1a2a;
  --np-accent-light: #8b2a3a;
  --np-accent-bg: #7a2030;
  --np-border: #2c1810;
  --np-border-light: #b8a88a;
  --np-border-mid: #9a8a6e;
  --np-shadow: 2px 2px 6px rgba(44, 24, 16, 0.2);
  --np-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --np-font-body: 'Source Serif 4', 'Inter', Georgia, serif;
  --np-font-ui: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--np-font-body);
  background: var(--np-bg);
  color: var(--np-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Aged paper texture via gradient noise */
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(139, 119, 80, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(100, 80, 50, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(120, 100, 60, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 10% 90%, rgba(90, 70, 40, 0.08) 0%, transparent 35%);
  background-attachment: fixed;
}

.paper {
  max-width: 1360px;
  margin: 0 auto;
  background: var(--np-bg-paper);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(44, 24, 16, 0.25);
  position: relative;
  /* Subtle aged edge effect */
  border-left: 1px solid var(--np-border-light);
  border-right: 1px solid var(--np-border-light);
}

/* ---- Header ---- */
.np-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--np-bg-paper);
  border-bottom: 3px double var(--np-border);
  padding: 0 28px;
}

.np-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.np-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.np-brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--np-accent);
  border: 1.5px solid var(--np-border);
}

.np-brand-name {
  font-family: var(--np-font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.np-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.np-nav a {
  color: var(--np-text);
  text-decoration: none;
  font-family: var(--np-font-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.np-nav a:hover {
  color: var(--np-accent);
}

.np-switch-btn {
  padding: 4px 12px;
  border: 1.5px solid var(--np-border);
  font-size: 12px !important;
  transition: background 0.2s, color 0.2s !important;
}

.np-switch-btn:hover {
  background: var(--np-border) !important;
  color: var(--np-bg-paper) !important;
}

.np-email-btn {
  padding: 5px 14px;
  border: 1.5px solid var(--np-accent);
  background: var(--np-accent);
  color: #f5ede0 !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  transition: background 0.2s !important;
}

.np-email-btn:hover {
  background: var(--np-accent-light) !important;
}

/* ---- Hero ---- */
.np-hero {
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--np-border-light);
}

.np-name {
  font-family: var(--np-font-display);
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--np-text);
  margin-bottom: 8px;
}

.np-subtitle {
  font-family: var(--np-font-body);
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 600;
  color: var(--np-muted);
  font-style: italic;
}

/* ---- Body Grid ---- */
.np-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0 28px;
}

.np-col-left {
  border-right: 2px solid var(--np-border);
  padding-right: 24px;
}

.np-col-right {
  padding-left: 24px;
}

/* ---- Sections ---- */
.np-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--np-border-light);
}

.np-section:last-child {
  border-bottom: none;
}

.np-section-title {
  font-family: var(--np-font-display);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--np-border);
  display: inline-block;
  color: var(--np-text);
}

/* ---- Intro / Profile ---- */
.np-intro {
  padding: 20px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-bottom: 1px solid var(--np-border-light);
}

.np-photo-frame {
  flex-shrink: 0;
  width: 150px;
  height: 170px;
  border: 3px solid var(--np-border);
  padding: 6px;
  background: var(--np-bg-card);
  box-shadow: var(--np-shadow);
  position: relative;
}

/* Inner aged border effect */
.np-photo-frame::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid var(--np-border-light);
  pointer-events: none;
}

.np-photo {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
  /* Sepia overlay for vintage look */
  filter: sepia(0.15) contrast(1.1);
}

.np-photo pre {
  margin: 0;
  padding: 0;
  font-size: 1.8px;
  line-height: 1;
  transform: scale(0.42);
  transform-origin: top left;
  width: 400px;
  height: 400px;
  position: absolute;
  top: -25px;
  left: -40px;
}

.np-summary {
  flex: 1;
}

.np-summary p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--np-text-soft);
  margin-bottom: 14px;
  font-style: italic;
}

.np-ctas {
  display: flex;
  gap: 10px;
}

.np-cta {
  display: inline-block;
  padding: 8px 20px;
  background: var(--np-bg-card);
  color: var(--np-text);
  font-family: var(--np-font-ui);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 2px solid var(--np-border);
  box-shadow: var(--np-shadow);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.np-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 8px rgba(44, 24, 16, 0.25);
  background: var(--np-bg-dark);
}

/* ---- Chips ---- */
.np-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.np-chip {
  padding: 5px 12px;
  border: 1.5px solid var(--np-border);
  border-radius: 12px;
  background: transparent;
  font-family: var(--np-font-ui);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  color: var(--np-text);
}

.np-chip:hover {
  background: var(--np-bg-dark);
}

.np-chip.active {
  background: var(--np-accent);
  color: #f5ede0;
  border-color: var(--np-accent);
}

/* ---- Expertise Grid ---- */
.np-expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.np-expertise-card {
  border: 1.5px solid var(--np-border);
  padding: 12px;
  background: var(--np-bg-card);
  transition: box-shadow 0.2s;
}

.np-expertise-card:hover {
  box-shadow: var(--np-shadow);
}

.np-expertise-card .card-title {
  font-family: var(--np-font-display);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
  color: var(--np-text);
}

.np-expertise-card .card-meta {
  font-size: 11px;
  color: var(--np-muted);
  margin-bottom: 6px;
  font-style: italic;
}

.np-expertise-card .card-body {
  font-size: 13px;
  color: var(--np-text-soft);
  line-height: 1.5;
  margin-bottom: 8px;
}

.np-expertise-card .tag-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.np-expertise-card .tag {
  font-family: var(--np-font-ui);
  font-size: 10px;
  padding: 2px 7px;
  border: 1px solid var(--np-border-mid);
  border-radius: 10px;
  font-weight: 600;
  background: var(--np-bg-paper);
  color: var(--np-text-soft);
}

.np-expertise-card .card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.np-expertise-card .expand {
  background: none;
  border: none;
  font-family: var(--np-font-ui);
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
  color: var(--np-accent);
  padding: 3px 6px;
  transition: color 0.2s;
}

.np-expertise-card .expand:hover {
  color: var(--np-accent-light);
}

.np-expertise-card .card-details {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--np-border-light);
  font-size: 12px;
  color: var(--np-text-soft);
  font-style: italic;
}

.np-expertise-card.expanded .card-details {
  display: block;
}

.np-expertise-card.expanded {
  border-color: var(--np-accent);
}

/* ---- Timeline / Experience ---- */
.np-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.np-timeline-item {
  border: 1.5px solid var(--np-border);
  background: var(--np-bg-card);
  position: relative;
  overflow: hidden;
}

.np-timeline-head {
  background: var(--np-accent-bg);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.np-timeline-title {
  font-family: var(--np-font-display);
  font-weight: 700;
  font-size: 15px;
  color: #f5ede0;
}

.np-timeline-title a {
  color: #f5ede0;
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 237, 224, 0.4);
}

.np-timeline-title a:hover {
  border-bottom-color: #f5ede0;
}

.np-timeline-meta {
  font-family: var(--np-font-ui);
  font-size: 11px;
  color: rgba(245, 237, 224, 0.75);
  font-weight: 500;
}

.np-timeline-body {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--np-text-soft);
  line-height: 1.6;
}

.np-timeline-body ul {
  padding-left: 18px;
}

.np-timeline-body li {
  margin-bottom: 3px;
}

.np-timeline-body strong {
  color: var(--np-text);
}

.np-timeline-body a {
  color: var(--np-accent);
  text-decoration: none;
  font-weight: 700;
}

.np-timeline-body a:hover {
  text-decoration: underline;
}

/* Green dot indicator */
.np-timeline-item::before {
  content: '';
  position: absolute;
  top: 14px;
  left: -8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--np-accent);
  border: 2px solid var(--np-bg-paper);
  z-index: 1;
}

/* ---- Projects ---- */
.np-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.np-project-card {
  border: 1.5px solid var(--np-border);
  padding: 12px;
  background: var(--np-bg-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow 0.2s;
}

.np-project-card:hover {
  box-shadow: var(--np-shadow);
}

.np-project-title {
  font-family: var(--np-font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--np-text);
}

.np-project-meta {
  font-family: var(--np-font-ui);
  font-size: 11px;
  color: var(--np-muted);
  font-style: italic;
}

.np-project-desc {
  font-size: 13px;
  color: var(--np-text-soft);
  line-height: 1.5;
  flex: 1;
}

.np-project-link {
  display: inline-block;
  padding: 4px 12px;
  background: var(--np-bg-paper);
  color: var(--np-text);
  font-family: var(--np-font-ui);
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  border: 1.5px solid var(--np-border);
  align-self: flex-start;
  transition: background 0.2s;
}

.np-project-link:hover {
  background: var(--np-bg-dark);
}

/* ---- Skills ---- */
.np-skills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.np-skill {
  padding: 6px 14px;
  border: 1.5px solid var(--np-accent);
  border-radius: 14px;
  font-family: var(--np-font-ui);
  font-weight: 600;
  font-size: 13px;
  color: var(--np-accent);
  background: var(--np-bg-card);
  transition: background 0.2s, color 0.2s;
}

.np-skill:hover {
  background: var(--np-accent);
  color: #f5ede0;
}

/* ---- Languages ---- */
.np-languages {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.np-language {
  padding: 6px 14px;
  border: 1.5px solid var(--np-border);
  border-radius: 14px;
  background: var(--np-bg-card);
  font-family: var(--np-font-ui);
  font-size: 14px;
}

.np-language-name {
  font-weight: 700;
  color: var(--np-text);
}

.np-language-fluency {
  color: var(--np-accent);
  font-size: 12px;
  margin-left: 4px;
  font-weight: 600;
}

/* ---- Footer ---- */
.np-footer {
  border-top: 3px double var(--np-border);
  padding: 0 28px;
}

.np-footer-inner {
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.np-footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.np-footer-left strong {
  font-family: var(--np-font-display);
  font-size: 14px;
}

.np-footer-left span {
  font-size: 13px;
  color: var(--np-muted);
  font-style: italic;
}

.np-footer-links {
  display: flex;
  gap: 16px;
}

.np-footer-links a {
  color: var(--np-accent);
  text-decoration: none;
  font-family: var(--np-font-ui);
  font-weight: 600;
  font-size: 13px;
  transition: color 0.2s;
}

.np-footer-links a:hover {
  color: var(--np-text);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .np-body {
    grid-template-columns: 1fr;
  }
  .np-col-left {
    border-right: none;
    padding-right: 0;
    border-bottom: 2px solid var(--np-border);
    padding-bottom: 8px;
  }
  .np-col-right {
    padding-left: 0;
    padding-top: 8px;
  }
  .np-projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .np-nav a:not(.np-switch-btn):not(.np-email-btn) {
    display: none;
  }
  .np-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .np-ctas {
    justify-content: center;
  }
  .np-expertise-grid {
    grid-template-columns: 1fr;
  }
  .np-projects-grid {
    grid-template-columns: 1fr;
  }
  .np-header-inner {
    height: 48px;
  }
  .paper {
    border-left: none;
    border-right: none;
  }
  .np-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
