/* ═══════════════════════════════════════════════════
   AADESH DAHAL PORTFOLIO — style.css
   Warm minimal aesthetic · Playfair Display + DM Sans
   Light mode default · Dark mode via [data-theme="dark"]
═══════════════════════════════════════════════════ */

/* ─── CSS CUSTOM PROPERTIES (variables) ─────────────
   All colours, spacing, and typography live here.
   Change a variable once — it updates everywhere.
──────────────────────────────────────────────────── */
:root {
  /* Warm cream light palette */
  --bg:           #fdf8f3;
  --bg-card:      #ffffff;
  --bg-muted:     #f5ede3;
  --bg-tag:       #f0e8de;

  --text-primary:   #2e2318;
  --text-secondary: #6a5a4a;
  --text-muted:     #9a8a7a;

  --accent:       #c9a87c;    /* warm sand/gold */
  --accent-dark:  #a8875a;
  --accent-light: #e8d5b8;

  --border:       rgba(180, 155, 120, 0.25);
  --border-hover: rgba(180, 155, 120, 0.55);

  --doodle-color: rgba(100, 78, 50, 0.06);  /* very faint */

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1100px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t-mid:  300ms;
  --t-slow: 500ms;
}

/* ─── DARK MODE VARIABLES ────────────────────────── */
[data-theme="dark"] {
  --bg:           #1a140d;
  --bg-card:      #241c13;
  --bg-muted:     #2e2318;
  --bg-tag:       #362a1c;

  --text-primary:   #f0e8d8;
  --text-secondary: #b0998a;
  --text-muted:     #7a6a5a;

  --accent:       #d4b080;
  --accent-dark:  #c9a87c;
  --accent-light: rgba(212, 176, 128, 0.15);

  --border:       rgba(212, 176, 128, 0.12);
  --border-hover: rgba(212, 176, 128, 0.3);

  --doodle-color: rgba(212, 176, 128, 0.04);
}


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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color var(--t-mid) var(--ease),
              color var(--t-mid) var(--ease);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

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


/* ─── LAYOUT UTILITIES ────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}


/* ─── SECTION HEADERS ─────────────────────────────── */
.section-header {
  margin-bottom: var(--space-lg);
}

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.25;
}


/* ─── NAVIGATION ─────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.9rem var(--space-md);
  background: rgba(253, 248, 243, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  transition: background-color var(--t-mid) var(--ease);
}

[data-theme="dark"] .navbar {
  background: rgba(26, 20, 13, 0.88);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-right: auto;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: color var(--t-fast) var(--ease);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  border: 0.5px solid var(--border);
  transition: all var(--t-fast) var(--ease);
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Show sun in dark mode, moon in light mode */
.icon-moon { display: block; }
.icon-sun  { display: none;  }
[data-theme="dark"] .icon-moon { display: none;  }
[data-theme="dark"] .icon-sun  { display: block; }

/* Nav CTA button */
.btn-nav {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast);
}

.btn-nav:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 26px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--t-fast) var(--ease);
}


/* ─── HERO SECTION ─────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 0 var(--space-lg);
  overflow: hidden;
}

/* The doodle canvas sits behind all content */
#doodleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  font-style: italic;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.highlight {
  color: var(--accent);
  font-style: italic;
  font-family: var(--font-display);
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 440px;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  transition: all var(--t-fast) var(--ease);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--accent);
  color: var(--accent);
  transition: all var(--t-fast) var(--ease);
}

.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* Photo frame */
.hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 280px;
  height: 340px;
  border-radius: 50% 50% 48% 52% / 60% 58% 42% 40%;
  overflow: hidden;
  border: 3px solid var(--accent-light);
  background: var(--bg-muted);
  position: relative;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.photo-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Floating tags around photo */
.float-tag {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
  animation: float 3s ease-in-out infinite;
}

.tag-seo    { top: 10%;  left: -20px;  animation-delay: 0s; }
.tag-design { top: 50%;  right: -20px; animation-delay: 1s; }
.tag-jhapa  { bottom: 8%; left: 0px;   animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  z-index: 1;
  animation: fadeInUp 1s 1.5s both;
}

.scroll-line {
  width: 1px;
  height: 30px;
  background: var(--accent);
  opacity: 0.4;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50%       { transform: scaleY(0.5); opacity: 0.8; }
}


/* ─── ABOUT SECTION ────────────────────────────────── */
.about { background: var(--bg-muted); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.85;
  font-size: 0.97rem;
}

.about-text strong { color: var(--text-primary); font-weight: 500; }
.about-text em     { color: var(--accent); font-style: italic; }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fact-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0.9rem 1.1rem;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--t-fast) var(--ease);
}

.fact-card:hover { border-color: var(--accent); }

.fact-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

.fact-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.fact-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.fact-value a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ─── SKILLS SECTION ──────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.skill-category {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.skill-category h3 {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-list li {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skill-name {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.skill-bar {
  height: 4px;
  background: var(--bg-muted);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0;                   /* starts at 0; JS animates it */
  transition: width 1s var(--ease);
}

.tool-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-badge {
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-tag);
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--t-fast) var(--ease);
}

.tool-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ─── PROJECTS SECTION ────────────────────────────── */
.projects { background: var(--bg-muted); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.project-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.project-card.featured {
  border-color: var(--accent-light);
  border-width: 1.5px;
}

.project-card.placeholder {
  opacity: 0.6;
  border-style: dashed;
}

.project-tag {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.project-tech span {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-tag);
  color: var(--text-muted);
  border: 0.5px solid var(--border);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--t-fast) var(--ease);
  margin-top: 4px;
}

.project-link:hover { gap: 8px; }
.project-link.muted { color: var(--text-muted); pointer-events: none; }


/* ─── TESTIMONIALS SECTION ────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.testi-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.testi-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;       /* slightly bigger — italic serif reads better larger */
  color: var(--text-primary); /* changed from text-secondary — visible in both modes */
  line-height: 1.85;
  flex: 1;
}

.testi-quote::before { content: '\201C'; color: var(--accent); font-size: 1.5em; line-height: 0; vertical-align: -0.3em; margin-right: 3px; }
.testi-quote::after  { content: '\201D'; color: var(--accent); font-size: 1.5em; line-height: 0; vertical-align: -0.3em; margin-left: 3px; }

.testi-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-dark);
  flex-shrink: 0;
}

.testi-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.testi-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.testi-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-sm);
}


/* ─── CONTACT SECTION ─────────────────────────────── */
.contact { background: var(--bg-muted); }

.contact-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.contact-intro strong { color: var(--text-primary); font-weight: 500; }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent-light);
  padding-bottom: 4px;
  margin-bottom: var(--space-lg);
  transition: all var(--t-fast) var(--ease);
}

.contact-email:hover {
  border-color: var(--accent);
  gap: 12px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.4rem;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--t-fast) var(--ease);
}

.social-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}


/* ─── FOOTER ──────────────────────────────────────── */
.footer {
  background: var(--text-primary);  /* deep brown in light, cream in dark */
  padding: var(--space-md) 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 400;
}

.footer-location {
  font-size: 0.78rem;
  /* bg flips in dark mode, so we use the opposite of bg instead of hardcoded white */
  color: var(--bg-muted);
  opacity: 0.7;
  margin-top: 2px;
}

.footer-right {
  text-align: right;
  font-size: 0.78rem;
  color: var(--bg-muted);
  opacity: 0.7;
}

.footer-built {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--bg-muted);
  opacity: 0.45;
}


/* ─── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reveal class added by Intersection Observer in script.js */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

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


/* ─── RESPONSIVE — TABLET (≤ 900px) ─────────────────── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-sub { margin: 0 auto var(--space-lg); }
  .hero-btns { justify-content: center; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: 200px; height: 240px; }
  .float-tag { display: none; }

  .about-grid       { grid-template-columns: 1fr; }
  .skills-grid      { grid-template-columns: 1fr; }
  .projects-grid    { grid-template-columns: 1fr; }
  .testimonials-grid{ grid-template-columns: 1fr; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 0.5px solid var(--border);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  .nav-toggle { display: flex; }
  .navbar { position: relative; }
}

/* ─── RESPONSIVE — MOBILE (≤ 480px) ──────────────────── */
@media (max-width: 480px) {
  .hero-name { font-size: 2.4rem; }
  .section { padding: var(--space-xl) 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}