/* =====================================================================
   KOMAL RAJ POUDEL — STYLESHEET
   =====================================================================
   This file controls how the site LOOKS. The HTML (index.html) holds
   the content; this file holds colour, spacing, fonts and layout.

   HOW THIS FILE IS ORGANISED (search for these section headers):
     1. Colour & design variables  <-- change colours here, in ONE place
     2. Font setup
     3. Reset & base styles
     4. Layout helpers
     5. Buttons
     6. Header / navigation
     7. Hero section
     8. Section titles (shared by most sections)
     9. About section
    10. Experience section
    11. Expertise & Projects cards
    12. Industries
    13. Skills & tools
    14. Qualifications
    15. Contact section
    16. Footer
    17. Scroll-reveal animation
    18. Responsive layout (mobile / tablet)
   ===================================================================== */


/* =====================================================================
   1. COLOUR & DESIGN VARIABLES
   -----------------------------------------------------------------
   Everything in this block is a "CSS custom property" (a variable).
   Change a value here and it updates everywhere that colour is used
   on the site. This is the ONE place to edit the colour scheme.
   ===================================================================== */
:root {
  /* --- Core palette --- */
  --primary-color: #0B1F33;      /* Deep navy — headings, nav, footer */
  /* Alternative navy, if you prefer a slightly lighter shade:
     --primary-color: #102A43; */
  --secondary-color: #34495E;    /* Slate blue-grey — secondary text, borders */
  --accent-color: #3D7A73;       /* Restrained teal/green — links, buttons, highlights */
  --background-color: #F7F7F4;   /* Warm off-white — page background */
  --text-color: #17202A;         /* Near-black — main body text */

  /* --- Supporting tones, derived from the palette above ---
     These give cards, borders and muted text a consistent feel
     without introducing new "random" colours. */
  --surface-color: #FFFFFF;             /* Card / panel background */
  --border-color: #E2E1DA;              /* Hairline borders and dividers */
  --muted-text-color: #55606B;          /* Secondary / de-emphasised text */
  --accent-soft: #E8F0EE;               /* Very light tint of the accent, for tags/chips */

  /* --- Spacing & shape --- */
  --radius: 6px;                        /* Corner rounding used across the site */
  --max-width: 1120px;                  /* Maximum content width */
  --section-spacing: 6rem;              /* Vertical space between sections */

  /* --- Motion --- */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}


/* =====================================================================
   2. FONT SETUP
   -----------------------------------------------------------------
   Two typefaces, used deliberately for different jobs:
     - Headings: Georgia, a classic serif that is installed on
       essentially every Windows, Mac, iOS and Android device — no
       download or dependency needed, ever.
     - Body text: Aptos. Aptos is a Microsoft font (the current
       default in Office/Windows) and is NOT freely available as a
       web font — it cannot be loaded from Google Fonts or a public
       CDN. Visitors who already have Aptos installed (increasingly
       common on Windows) will see it automatically; everyone else
       quietly falls back to Calibri, then Segoe UI, then a clean
       system font. No external requests are made either way, so the
       site stays fast and works offline. See README.md if you later
       obtain a licensed web-font version of Aptos.
   ===================================================================== */
:root {
  --font-heading: Georgia, 'Times New Roman', 'Liberation Serif', serif;
  --font-body: 'Aptos', 'Aptos Display', Calibri, 'Segoe UI', system-ui,
               -apple-system, 'Helvetica Neue', Arial, sans-serif;
}


/* =====================================================================
   3. RESET & BASE STYLES
   ===================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Keeps anchored sections from hiding behind the sticky header */
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--primary-color);
  line-height: 1.25;
  margin: 0 0 0.6em 0;
  font-weight: 600;
}

p {
  margin: 0 0 1em 0;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Visible keyboard focus outline — important for accessibility.
   Uses :focus-visible so it only appears for keyboard users, not
   every mouse click. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

/* Respect visitors who have asked their system to reduce motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip-to-content link: hidden until focused via keyboard (Tab key) */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--primary-color);
  color: #fff;
  padding: 0.75em 1.25em;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}


/* =====================================================================
   4. LAYOUT HELPERS
   ===================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-spacing) 0;
}

/* Alternating a very subtle background tone between sections adds
   rhythm without needing borders or drop shadows everywhere. */
.section-alt {
  background-color: #F1F1EC;
}

.section-title {
  font-size: 1.9rem;
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--muted-text-color);
  max-width: 60ch;
  margin-top: -0.5rem;
  margin-bottom: 2.5rem;
}


/* =====================================================================
   5. BUTTONS
   ===================================================================== */
.btn {
  display: inline-block;
  padding: 0.8em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #FFFFFF;
  border-color: var(--primary-color);
}


/* =====================================================================
   6. HEADER / NAVIGATION
   -----------------------------------------------------------------
   A solid navy bar, matching the footer. This gives the primary
   colour a stronger, more deliberate presence throughout the site
   (it's visible on every scroll position, since the header is
   sticky) while the page body stays light and easy to read.
   ===================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--primary-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent-soft);
}

.primary-nav ul {
  display: flex;
  gap: 2rem;
}

.primary-nav a {
  color: #C9D2D8;
  font-weight: 500;
  font-size: 0.95rem;
}

.primary-nav a:hover {
  color: #FFFFFF;
  text-decoration: none;
}

/* Hamburger button — hidden on desktop, shown on mobile (see section 18) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 100%;
  height: 2px;
  background-color: #FFFFFF;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}


/* =====================================================================
   7. HERO SECTION
   -----------------------------------------------------------------
   Centered layout: photo, then name, headline, intro and buttons,
   all on one vertical axis. The photo is given a proper, deliberate
   presence (with a simple accent-coloured ring) rather than being
   tucked to one side — but stays a clean circular portrait rather
   than a large banner-style image, keeping the tone understated.
   ===================================================================== */
.hero {
  padding: 5rem 0 4.5rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
}

.hero-name {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 0.1em;
}

.hero-headline {
  font-size: 1.15rem;
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 0;
}

.hero-intro {
  max-width: 58ch;
  color: var(--text-color);
  margin: 0 auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* The photo: shown first (above the name), sized to feel like a
   genuine portrait rather than a small icon, with a soft accent
   ring that gives it a finished, intentional look. */
.hero-photo {
  order: -1;
  display: flex;
  justify-content: center;
}

.hero-photo-frame {
  position: relative;
  width: clamp(168px, 22vw, 208px);
  height: clamp(168px, 22vw, 208px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--surface-color);
  box-shadow: 0 0 0 1px var(--border-color), 0 0 0 9px var(--accent-soft);
  background-color: var(--surface-color);
}

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

/* Shown by the onerror attribute on the <img> if images/profile.jpg is missing */
.hero-photo-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-color);
  background-color: #ECECE6;
}

.hero-photo-frame.no-image img {
  display: none;
}

.hero-photo-frame.no-image .hero-photo-fallback {
  display: flex;
}


/* =====================================================================
   9. ABOUT SECTION
   ===================================================================== */
.about-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  max-width: 62ch;
}

.about-languages {
  color: var(--muted-text-color);
  font-size: 0.95rem;
}

.highlights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-color);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.highlight-title {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.95rem;
}


/* =====================================================================
   10. EXPERIENCE SECTION
   ===================================================================== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.experience-org {
  margin-bottom: 0.2em;
  font-size: 1.2rem;
}

.experience-role {
  color: var(--accent-color);
  font-weight: 600;
  margin: 0;
}

.experience-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  color: var(--muted-text-color);
  font-size: 0.9rem;
}

.experience-description {
  color: var(--text-color);
}

.experience-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.experience-group h4 {
  font-size: 0.95rem;
  color: var(--primary-color);
  margin-bottom: 0.5em;
}

.experience-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience-group li {
  font-size: 0.92rem;
  color: var(--text-color);
  padding-left: 1rem;
  position: relative;
}

.experience-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-color);
}

.experience-achievements {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border-color);
}

.experience-achievements h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4em;
}

.placeholder-text {
  color: var(--muted-text-color);
  font-style: italic;
  font-size: 0.92rem;
}


/* =====================================================================
   11. EXPERTISE & PROJECT CARDS (shared card-grid pattern)
   ===================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.expertise-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.expertise-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
}

.expertise-card p {
  color: var(--muted-text-color);
  font-size: 0.93rem;
  margin: 0;
}

.project-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.project-industry {
  display: inline-block;
  background-color: var(--accent-soft);
  color: var(--accent-color);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25em 0.7em;
  border-radius: 999px;
  margin-bottom: 0.8em;
}

.project-card h3 {
  font-size: 1.05rem;
}

.project-type {
  color: var(--secondary-color);
  font-size: 0.88rem;
  font-weight: 500;
}

.project-card p {
  font-size: 0.93rem;
  color: var(--text-color);
}

.project-skills {
  color: var(--muted-text-color);
  font-size: 0.88rem;
  margin-top: 1em;
}


/* =====================================================================
   12. INDUSTRIES
   ===================================================================== */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.industries-grid li {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--primary-color);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.industries-grid li:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
}


/* =====================================================================
   13. SKILLS & TOOLS
   ===================================================================== */
.skills-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.skills-column h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-list li {
  background-color: var(--accent-soft);
  color: var(--primary-color);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.45em 0.95em;
  font-size: 0.87rem;
}

.tag-placeholder {
  background-color: transparent;
  border: 1px dashed var(--border-color);
  color: var(--muted-text-color);
  font-style: italic;
}


/* =====================================================================
   14. QUALIFICATIONS
   ===================================================================== */
.qualifications-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.qualification-card {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.qualification-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}

.qualification-card p {
  color: var(--muted-text-color);
  margin: 0;
  font-size: 0.92rem;
}


/* =====================================================================
   15. CONTACT SECTION
   ===================================================================== */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

.contact-details {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-text-color);
  margin-bottom: 0.2em;
}

.contact-details a {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-color);
}

.contact-details a:hover {
  color: var(--accent-color);
}

.contact-form {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-field {
  margin-bottom: 1.2rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4em;
  color: var(--primary-color);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.7em 0.9em;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-color);
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent-color);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--muted-text-color);
}


/* =====================================================================
   16. FOOTER
   ===================================================================== */
.site-footer {
  background-color: var(--primary-color);
  color: #E4E7EA;
  padding: 3rem 0;
}

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

.footer-name {
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.2em;
}

.footer-tagline {
  color: #B7C0C7;
  font-size: 0.9rem;
  margin: 0;
}

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

.footer-links a {
  color: #E4E7EA;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-copyright {
  width: 100%;
  color: #8FA0AB;
  font-size: 0.82rem;
  margin: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.5rem;
}


/* =====================================================================
   17. SCROLL-REVEAL ANIMATION
   -----------------------------------------------------------------
   js/script.js adds the "reveal" class (and later "is-visible") to
   each section using JavaScript. If JavaScript is disabled, the
   "reveal" class is never added, so this rule never applies and every
   section is simply visible from the start — nothing is hidden
   permanently.
   ===================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* =====================================================================
   18. RESPONSIVE LAYOUT
   -----------------------------------------------------------------
   Mobile-first adjustments. Breakpoints: 900px (tablet), 600px (phone).
   ===================================================================== */
@media (max-width: 900px) {
  :root {
    --section-spacing: 4rem;
  }

  .card-grid,
  .experience-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-content,
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .skills-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-photo {
    justify-content: flex-start;
    order: -1;
  }

  .hero-photo-frame {
    width: 88px;
    height: 88px;
  }

  /* --- Mobile navigation: hamburger + slide-down panel --- */
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }

  .primary-nav.is-open {
    max-height: 400px;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }

  .primary-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .primary-nav a {
    display: block;
    padding: 0.9rem 0;
  }
}

@media (max-width: 600px) {
  .section-title {
    font-size: 1.6rem;
  }

  .card-grid,
  .experience-details,
  .industries-grid,
  .qualifications-list {
    grid-template-columns: 1fr;
  }

  .experience-card {
    padding: 1.4rem;
  }

  .experience-header {
    flex-direction: column;
  }

  .experience-meta {
    align-items: flex-start;
    text-align: left;
  }

  .contact-form {
    padding: 1.4rem;
  }

  .footer-inner {
    text-align: left;
  }
}
