/* ═══════════════════════════════════════════════════
   shared.css  —  Global Design System
   Niranjan V Ram Portfolio
   ═══════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Custom Properties ── */
:root {
  --bg:        #050507;
  --bg-2:      #0c0d10;
  --bg-3:      #111318;
  --border:    #1c1e24;
  --border-2:  #2a2d35;
  --text:      #e8eaf0;
  --text-2:    #9ca3af;
  --text-3:    #6b7280;
  --green:     #7ee787;
  --green-dim: rgba(126,231,135,0.1);
  --blue:      #58a6ff;
  --blue-dim:  rgba(88,166,255,0.1);
  --orange:    #e8a87c;
  --purple:    #c084fc;
  --nav-h:     60px;
  --page-x:    clamp(24px, 6vw, 80px);
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::selection { background: rgba(126,231,135,0.2); color: var(--text); }

/* ── Page Transition Overlay ── */
#page-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease-in);
}
#page-overlay.covering { opacity: 1; pointer-events: auto; }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  border-color: var(--border);
  background: rgba(5,5,7,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-logo {
  font-size: 1.40rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.7); }
}
.nav-center {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 6px 14px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--bg-3);
}
.nav-link.active { color: var(--green); }
.nav-clock {
  font-size: 0.80rem;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* ── Page Shell ── */
.page {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: 72px var(--page-x) 56px;
  border-bottom: 1px solid var(--border);
}
.page-hero-eyebrow {
  font-size: 0.76rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}
.page-hero-title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.0;
  color: var(--text);
  margin-bottom: 18px;
}
.page-hero-sub {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 560px;
  font-weight: 300;
}
.page-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

/* ── Chips / Tags ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 4px;
  background: var(--bg-2);
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--border-2); color: var(--text-2); }
.chip.green { color: var(--green); border-color: rgba(126,231,135,0.25); background: var(--green-dim); }
.chip.blue  { color: var(--blue);  border-color: rgba(88,166,255,0.25);  background: var(--blue-dim); }

/* ── Section ── */
.section {
  padding: 56px var(--page-x);
  border-bottom: 1px solid var(--border);
}
.section:last-of-type { border-bottom: none; }
.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* ── Text Block ── */
.text-block {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.8;
  max-width: 68ch;
  font-weight: 300;
}
.text-block + .text-block { margin-top: 16px; }

/* ── Premium List (works-style) ── */
.premium-list { list-style: none; }
.premium-list li { border-top: 1px solid var(--border); }
.premium-list li:last-child { border-bottom: 1px solid var(--border); }
.premium-list-row {
  display: grid;
  align-items: center;
  padding: 20px 0;
  gap: 20px;
  transition: background 0.18s;
  border-radius: 4px;
}
.premium-list-row:hover { background: rgba(255,255,255,0.02); }
.list-num {
  font-size: 0.78rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.list-name {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.list-desc {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.5;
}
.list-year {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  text-align: right;
}
.list-arrow {
  font-size: 1.1rem;
  color: var(--text-3);
  transition: color 0.2s, transform 0.2s;
  text-align: right;
}
.premium-list li:hover .list-arrow {
  color: var(--green);
  transform: translateX(3px);
}

/* ── Key Points ── */
.keypoints {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.keypoints li {
  font-size: 0.97rem;
  color: var(--text-2);
  padding: 14px 16px;
  border-left: 2px solid var(--green);
  background: var(--green-dim);
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

/* ── Pill Grid (skills / tech stack) ── */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.pill:hover { border-color: var(--green); color: var(--green); }
.pill.cat-fw     { border-color: rgba(126,231,135,0.3); color: var(--green); }
.pill.cat-net    { border-color: rgba(88,166,255,0.3);  color: var(--blue); }
.pill.cat-lang   { border-color: rgba(232,168,124,0.3); color: var(--orange); }
.pill.cat-tools  { border-color: rgba(192,132,252,0.3); color: var(--purple); }

/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}
.two-col-sidebar {
  border-right: 1px solid var(--border);
  padding: 56px var(--page-x) 56px clamp(24px,6vw,80px);
  position: sticky;
  top: var(--nav-h);
  height: fit-content;
}
.two-col-main { padding: 56px var(--page-x); }

/* ── Timeline ── */
.timeline { list-style: none; display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 120px; top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline-item:first-child::before { top: 24px; }
.timeline-item:last-child::before  { bottom: calc(100% - 24px); }
.timeline-date {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding-top: 2px;
  line-height: 1.5;
}
.timeline-dot {
  position: absolute;
  left: 116px; top: 28px;
  width: 9px; height: 9px;
  background: var(--bg);
  border: 2px solid var(--green);
  border-radius: 50%;
}
.timeline-body { padding-left: 24px; }
.timeline-role {
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-org {
  font-size: 0.88rem;
  color: var(--green);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ── CTA Button ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  color: var(--text);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}
.btn:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #050507;
}
.btn-primary:hover {
  background: #a3f0ab;
  border-color: #a3f0ab;
  color: #050507;
  transform: translateY(-1px);
}

/* ── Contact links ── */
.contact-row {
  display: flex;
  flex-direction: column;
}
.contact-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  transition: color 0.2s;
}
.contact-link-item:last-child { border-bottom: 1px solid var(--border); }
.contact-link-item:hover { color: var(--green); }
.contact-link-label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  min-width: 90px;
}
.contact-link-val { font-size: 1rem; font-weight: 400; }
.contact-link-arrow { color: var(--text-3); transition: transform 0.2s; }
.contact-link-item:hover .contact-link-arrow { transform: translate(3px,-3px); color: var(--green); }

/* ── Footer ── */
.site-footer {
  padding: 32px var(--page-x);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.footer-links-row {
  display: flex;
  gap: 20px;
}
.footer-links-row a {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer-links-row a:hover { color: var(--green); }

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.gallery-img-wrap {
  overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease), filter 0.3s;
  filter: brightness(0.92);
}
.gallery-img-wrap:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(5,5,7,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  font-size: 1.2rem;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.lightbox-close:hover { color: var(--green); border-color: var(--green); }

/* ── Scroll Reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .two-col-sidebar { position: static; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 32px; }
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item::before { display: none; }
  .timeline-dot { display: none; }
  .timeline-body { padding-left: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --page-x: 20px; }
  .nav-clock { display: none; }
  .nav-center { gap: 0; }
  .nav-link { padding: 6px 10px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
}
