/* Jiten Chapagain - Professional Portfolio */

:root {
  --ink: #121417;
  --ink-soft: #2c3138;
  --muted: #5c6570;
  --line: #d7dce3;
  --surface: #f4f5f7;
  --surface-2: #e8eaee;
  --white: #ffffff;
  --accent: #b08d3a;
  --accent-deep: #8f7029;
  --hero-ink: #f5f6f8;

  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;

  --space: clamp(1rem, 2.4vw, 1.75rem);
  --max: 1140px;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--ink);
  color: var(--white);
  padding: 0.55rem 0.9rem;
  z-index: 1000;
}

.skip-link:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), backdrop-filter 0.3s;
}

.site-header.is-scrolled {
  background: rgba(244, 245, 247, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(18, 20, 23, 0.08);
}

.site-header.is-scrolled .logo,
.site-header.is-scrolled .site-nav a {
  color: var(--ink);
}

.header-inner {
  max-width: calc(var(--max) + 3.5rem);
  margin: 0 auto;
  padding: 0 var(--space);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: rgba(245, 246, 248, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.site-header.is-scrolled .site-nav a:hover {
  color: var(--accent);
}

.nav-cta {
  padding: 0.5rem 0.95rem;
  border: 1px solid rgba(245, 246, 248, 0.45);
}

.site-header.is-scrolled .nav-cta {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white) !important;
}

.site-header.is-scrolled .nav-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 1.5px;
  background: var(--white);
  margin: 0.32rem auto;
  transition: transform 0.3s var(--ease);
}

.site-header.is-scrolled .nav-toggle span,
.site-header.menu-open .nav-toggle span {
  background: var(--ink);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5.1px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5.1px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  color: var(--hero-ink);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 42%;
  transform: scale(1.03);
  animation: hero-ken 16s var(--ease) forwards;
}

@keyframes hero-ken {
  to { transform: scale(1); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(12, 14, 17, 0.9) 0%, rgba(12, 14, 17, 0.62) 42%, rgba(12, 14, 17, 0.28) 100%),
    linear-gradient(0deg, rgba(12, 14, 17, 0.88) 0%, rgba(12, 14, 17, 0.2) 48%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: calc(var(--max) + 3.5rem);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) var(--space) 5rem;
  animation: hero-in 0.9s var(--ease) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7.5vw, 5.4rem);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero-title {
  margin: 0 0 0.9rem;
  max-width: 18ch;
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  line-height: 1.35;
  color: rgba(245, 246, 248, 0.95);
}

.hero-lead {
  margin: 0 0 1.85rem;
  max-width: 38ch;
  color: rgba(245, 246, 248, 0.72);
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Trust bar */
.trust-bar {
  background: var(--ink);
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem var(--space);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.trust-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.trust-item strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-item a {
  color: #d8c07a;
  text-decoration: none;
}

.trust-item a:hover {
  color: #f0dfa5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  color: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(245, 246, 248, 0.5);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  color: var(--white);
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.btn-dark:hover {
  background: var(--ink-soft);
  border-color: var(--ink-soft);
  color: var(--white);
}

.btn-light {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}

.btn-light:hover {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-lg {
  padding: 1rem 1.6rem;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

/* Sections */
.section {
  padding: clamp(4.25rem, 9vw, 6.75rem) var(--space);
}

.section-grid,
.section-intro,
.contact-layout,
.cv-panel,
.footer-inner,
.expertise-grid {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-lead {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
}

/* About */
.about {
  background: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: center;
}

.about-copy p {
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.about-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
}

.text-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(18, 20, 23, 0.25);
}

.text-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.about-photo {
  margin: 0;
  background: var(--surface-2);
  padding: 0.65rem;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
}

/* Expertise */
.expertise {
  background:
    linear-gradient(180deg, var(--surface) 0%, #eceef2 100%);
}

.section-intro {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.expertise-card {
  background: var(--white);
  border: 1px solid rgba(18, 20, 23, 0.08);
  padding: 1.6rem 1.5rem;
}

.expertise-index {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
}

.expertise-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.12rem;
  font-weight: 700;
}

.expertise-card p {
  margin: 0;
  color: var(--muted);
  max-width: 36ch;
}

/* CV */
.cv-section {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--white);
}

.cv-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  background: linear-gradient(135deg, #15181d 0%, #232830 100%);
  color: var(--white);
}

.cv-panel .eyebrow {
  color: #d4b75d;
}

.cv-panel .section-title {
  color: var(--white);
  margin-bottom: 0.55rem;
}

.cv-copy p {
  margin: 0;
  max-width: 42ch;
  color: rgba(245, 246, 248, 0.7);
}

/* Contact */
.contact {
  background: var(--surface);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-intro .section-lead a {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 105, 20, 0.35);
}

.contact-points {
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(18, 20, 23, 0.1);
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-points li {
  padding-left: 1rem;
  position: relative;
}

.contact-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.35rem;
  height: 0.35rem;
  background: var(--accent);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--white);
  border: 1px solid rgba(18, 20, 23, 0.1);
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.85rem 0.95rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid rgba(18, 20, 23, 0.12);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.15);
}

.form-row input.is-invalid,
.form-row textarea.is-invalid {
  border-color: #a33b2d;
}

.honey {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
  pointer-events: none !important;
}

.form-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.form-status {
  margin: 0;
  min-height: 1.35em;
  font-size: 0.95rem;
  font-weight: 600;
}

.form-status.success { color: #1f6b43; }
.form-status.error { color: #a33b2d; }

/* Footer */
.site-footer {
  background: var(--white);
  border-top: 1px solid rgba(18, 20, 23, 0.08);
  padding: 2.25rem var(--space) 2.75rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: flex-end;
}

.footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}

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

/* Thank you page */
.thankyou-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(160deg, #f4f5f7 0%, #e7e9ee 100%);
}

.thankyou {
  max-width: 560px;
  margin: 2rem;
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid rgba(18, 20, 23, 0.08);
}

.thankyou h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1.15;
  font-weight: 600;
}

.thankyou p {
  color: var(--muted);
  margin: 0 0 1.75rem;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }

/* Responsive */
@media (max-width: 900px) {
  .about-grid,
  .contact-layout,
  .expertise-grid,
  .trust-inner {
    grid-template-columns: 1fr;
  }

  .about-photo {
    order: -1;
    max-width: 420px;
  }

  .trust-inner {
    gap: 1rem;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
    z-index: 120;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    color: var(--ink);
    font-size: 1.25rem;
  }

  .nav-cta {
    border-color: var(--ink);
  }

  .logo {
    font-size: 1.25rem;
  }

  .cv-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; transform: none; }
  .btn:hover { transform: none; }
}
