/* ============================================================
   PRASAD K — Portfolio
   Inspired by the Kirschberg-style dark portfolio aesthetic.
   ============================================================ */

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

/* ── Design Tokens ── */
:root {
  --bg:               #080808;
  --text:             #e8e0d4;
  --text-75:          rgba(232, 224, 212, 0.75);
  --text-60:          rgba(232, 224, 212, 0.60);
  --text-40:          rgba(232, 224, 212, 0.40);
  --text-22:          rgba(232, 224, 212, 0.22);
  --text-10:          rgba(232, 224, 212, 0.10);

  --nav-bg:           rgba(14, 14, 14, 0.90);
  --nav-border:       rgba(232, 224, 212, 0.10);
  --nav-active-bg:    rgba(38, 38, 38, 1.00);

  --card-bg:          rgba(230, 221, 209, 0.028);
  --card-border:      rgba(230, 221, 209, 0.08);
  --card-hover:       rgba(230, 221, 209, 0.048);
  --card-hover-bdr:   rgba(230, 221, 209, 0.16);

  --tag-bg:           rgba(230, 221, 209, 0.06);
  --tag-border:       rgba(230, 221, 209, 0.10);

  --font-display:     'Syne', sans-serif;
  --font-body:        'Space Grotesk', sans-serif;

  --max-w:            1100px;
  --section-px:       clamp(24px, 5vw, 80px);
  --section-py:       clamp(80px, 10vw, 140px);
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hide main content while loader is active */
body.loading #main-content,
body.loading .bottom-nav,
body.loading .corner-info,
body.loading .ambient-gradient,
body.loading .cursor-glow {
  opacity: 0;
  pointer-events: none;
}

/* Subtle film grain overlay — adds texture matching the screenshot's aesthetic */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   AMBIENT GRADIENT — warm glow at the bottom of viewport
   ============================================================ */
.ambient-gradient {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70vh;
  background:
    radial-gradient(
      ellipse 100% 70% at 50% 100%,
      rgba(170, 55, 50, 0.52) 0%,
      rgba(120, 35, 32, 0.32) 25%,
      rgba(72, 18, 18, 0.16) 48%,
      transparent 68%
    );
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   CORNER INFO LABELS
   ============================================================ */
.corner-info {
  position: fixed;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.035em;
  color: var(--text-40);
  z-index: 10;
  pointer-events: none;
  font-family: var(--font-body);
}

.corner-left  { left: 28px; }
.corner-right { right: 28px; }

.corner-label  { opacity: 0.7; }
.corner-sep    { opacity: 0.35; }

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
#main-content {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--section-py) var(--section-px);
  position: relative;
}

.section-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 60px;
}

.section-label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-40);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;

  /* Glassy gradient — matches the hero name treatment */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(232, 224, 212, 0.88) 35%,
    rgba(215, 207, 196, 0.75) 70%,
    rgba(198, 190, 180, 0.60) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(232, 224, 212, 0.12));
}

/* ============================================================
   HOME / HERO
   ============================================================ */
.section--home {
  padding: 0;
  min-height: 100vh;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100vh;
  padding: 0 var(--section-px);
}

/* ── Hero name: single line, glacier weight ── */
.hero-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(52px, 11vw, 148px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: 0.06em;
  margin: 0;
  user-select: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;              /* sits above the flame */
}

/* ── Clip wrapper: the overflow boundary for the slide-up reveal ── */
.hero-name__clip {
  display: block;
  overflow: hidden;
  /* Give it a fixed line-height so clip height is predictable */
  line-height: 1.05;
  padding-bottom: 0.05em;
}

/* ── Inner text — glassy finish ── */
.hero-name__inner {
  display: block;

  /* Glass gradient: bright highlight at top, natural cream mid, softer at base */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(232, 224, 212, 0.90) 30%,
    rgba(220, 212, 200, 0.80) 65%,
    rgba(200, 192, 182, 0.65) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* Soft glow beneath letters for the frosted-glass depth */
  filter: drop-shadow(0 0 28px rgba(232, 224, 212, 0.18))
          drop-shadow(0 2px  8px rgba(232, 224, 212, 0.10));
}


/* ── Hero tagline: word-by-word reveal ── */
.hero-tagline {
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-40);
  line-height: 2.2;
  margin-bottom: 52px;
  max-width: 560px;
  min-height: 2.2em;              /* reserve space while typing */
}

/* Each word injected by JS */
.hero-tagline .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  margin-right: 0.3em;
}

.hero-tagline .word.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Typing cursor appended to tagline */
.hero-tagline .type-cursor {
  display: inline-block;
  width: 1px;
  height: 1em;
  background: var(--text-40);
  margin-left: 2px;
  vertical-align: middle;
  animation: cursorBlink 0.9s step-end infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-22);
  cursor: pointer;
  transition: color 0.25s, opacity 0.6s ease, transform 0.6s ease;
  animation: nudgeDown 2.4s ease-in-out infinite;
  /* Hidden until word typing completes */
  opacity: 0;
}

.scroll-hint:hover { color: var(--text-40); }

@keyframes nudgeDown {
  0%, 100% { transform: translateY(0);   opacity: 0.55; }
  50%       { transform: translateY(5px); opacity: 0.80; }
}

/* ============================================================
   WORK SECTION
   ============================================================ */
.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  padding: 44px 0;
  border-top: 1px solid var(--card-border);
  /* animation initial state */
  opacity: 0;
  transform: translateY(28px);
  transition: border-color 0.35s ease;
}

.work-item:last-child {
  border-bottom: 1px solid var(--card-border);
}

.work-item:hover {
  border-top-color: rgba(232, 224, 212, 0.16);
}

.work-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 18px;
}

.work-item__company {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 5px;
  color: var(--text);
}

.work-item__role {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-40);
  letter-spacing: 0.05em;
}

.work-item__meta {
  text-align: right;
  flex-shrink: 0;
}

.work-item__location {
  display: block;
  font-size: 11.5px;
  color: var(--text-40);
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}

.work-item__period {
  display: block;
  font-size: 11.5px;
  color: var(--text-22);
  letter-spacing: 0.04em;
}

.work-item__body {
  max-width: 700px;
  margin-bottom: 22px;
}

.work-item__body p {
  font-size: 14px;
  line-height: 1.80;
  color: var(--text-75);
  margin-bottom: 9px;
}

.work-item__body p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   TAGS (shared)
   ============================================================ */
.work-item__tags,
.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-40);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  padding: 4px 11px;
  border-radius: 100px;
  white-space: nowrap;
}

/* ============================================================
   PROJECTS SECTION
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 30px;
  transition:
    border-color 0.30s ease,
    background   0.30s ease,
    transform    0.30s ease;
  /* animation initial state */
  opacity: 0;
  transform: translateY(22px);
}

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

.project-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 13px;
}

.project-card__name {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.55vw, 19px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.project-card__links {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.project-link {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-40);
  transition: color 0.2s;
  white-space: nowrap;
}

.project-link:hover { color: var(--text); }

.project-card__desc {
  font-size: 13px;
  line-height: 1.72;
  color: var(--text-75);
  margin-bottom: 20px;
  /* clamp long descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-para {
  font-size: 15px;
  line-height: 1.90;
  color: var(--text-75);
  margin-bottom: 22px;
}

.about-para:last-child { margin-bottom: 0; }

.about-skills {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.skills-group__title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 6px;
}

.skills-group__items {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-40);
}

/* ============================================================
   SCHEDULE / CTA SECTION
   Change 2: properly centred, both title lines aligned
   ============================================================ */
.section--schedule {
  min-height: 85vh;
}

.schedule-content {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.schedule-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 14px 0 20px;
  text-align: center;
  white-space: nowrap;
}

.schedule-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-40);
  margin: 0 auto 36px;
  text-align: center;
  white-space: nowrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 16px 34px;
  border-radius: 100px;
  transition: background 0.28s ease, gap 0.28s ease, transform 0.28s ease;
  margin-bottom: 34px;
  cursor: pointer;
}

.cta-btn:hover {
  background: rgba(230, 221, 209, 0.84);
  gap: 18px;
  transform: scale(1.025);
}

.cta-btn__arrow {
  font-size: 16px;
  transition: transform 0.28s ease;
}

.cta-btn:hover .cta-btn__arrow {
  transform: translateX(4px);
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.contact-link {
  font-size: 13px;
  color: var(--text-40);
  letter-spacing: 0.04em;
  transition: color 0.22s;
}

.contact-link:hover { color: var(--text); }

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  border-radius: 100px;
  padding: 5px 5px;
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.65),
    0 4px  16px rgba(0, 0, 0, 0.40),
    0 1px  0    rgba(255, 255, 255, 0.06) inset;
}

.nav-item {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-40);
  padding: 8px 18px;
  border-radius: 100px;
  transition: color 0.22s ease, background 0.22s ease;
  cursor: pointer;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text-60);
}

.nav-item.active {
  color: var(--text);
  background: var(--nav-active-bg);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.70),
    0 0   0 1px rgba(255, 255, 255, 0.07) inset;
}

/* ============================================================
   CURSOR GLOW — soft radial light that follows the mouse
   ============================================================ */
.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(190, 80, 70, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.4s;
  will-change: transform;
}

/* Page padding to prevent content hiding behind bottom nav */
#main-content > .section:last-child {
  padding-bottom: calc(var(--section-py) + 80px);
}

/* ============================================================
   SCROLL PROGRESS BAR — thin line at top of page
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 1.5px;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(170, 55, 50, 0.0)  0%,
    rgba(210, 90, 75, 0.70) 40%,
    rgba(230, 221, 209, 0.50) 100%
  );
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ============================================================
   SECTION TRANSITION — slide-reveal panel effect
   Each section's content starts clipped/hidden and reveals on enter
   ============================================================ */
.section-inner,
.schedule-content,
.hero {
  will-change: transform, opacity;
}

/* Section reveal: content fades + rises on enter */
.section--about  .section-inner,
.section--work   .section-inner,
.section--projects .section-inner {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section--about  .section-inner.in-view,
.section--work   .section-inner.in-view,
.section--projects .section-inner.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   CORNER DOT (availability indicator)
   ============================================================ */
.corner-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;   /* soft green */
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.60);
  animation: dotPulse 2.8s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%       { opacity: 0.55; transform: scale(0.80); }
}

/* ============================================================
   TERMINAL LOADER
   ============================================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__terminal {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(13px, 1.5vw, 16px);
  color: var(--text-60);
  line-height: 2.0;
  min-width: 320px;
  max-width: 520px;
  padding: 0 24px;
}

.loader__line {
  display: block;
  min-height: 1.5em;
  white-space: pre;
  /* typed content injected via JS */
}

.loader__cursor {
  display: inline-block;
  color: var(--text-40);
  animation: blink 0.8s step-end infinite;
  font-size: 14px;
  line-height: 1;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 960px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 52px;
  }

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

  .work-item__header {
    flex-direction: column;
    gap: 8px;
  }

  .work-item__meta {
    text-align: left;
  }

  .corner-info {
    display: none;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --section-px: 20px;
    --section-py: 72px;
  }

  .hero-name {
    font-size: clamp(52px, 16vw, 80px);
    letter-spacing: 0.02em;
  }

  .hero-tagline {
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .nav-item {
    font-size: 12px;
    padding: 7px 13px;
  }

  .schedule-title {
    font-size: clamp(24px, 6vw, 40px);
    white-space: normal;
    letter-spacing: -0.02em;
  }

  .schedule-desc {
    white-space: normal;
  }

  .project-card {
    padding: 22px;
  }

  .project-card__desc {
    -webkit-line-clamp: unset;
  }
}

/* Very narrow screens — collapse nav text */
@media (max-width: 440px) {
  .nav-item {
    font-size: 11px;
    padding: 7px 10px;
    letter-spacing: 0;
  }
}
