/* ============================================================
   MAIN.CSS — Design Tokens, Reset, Global Typography
   Sri Harshita Pilla Portfolio
   ============================================================ */

:root {
  --side-padding: 40px;
  --color-bg:            #0D0D0D;
  --color-surface:       #161616;
  --color-surface-2:     #1C1C1C;
  --color-nav-bg:        #2C1A0E;
  --color-accent-orange: #E8612D;
  --color-accent-green:  #3D8B6E;
  --color-text-primary:  #FFFFFF;
  --color-text-secondary:#9A9A9A;
  --color-text-muted:    #555555;
  --color-border:        #2A2A2A;
  --color-border-hover:  #3A3A3A;
  --color-footer-bg:     #0D1A14;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1rem;
  --text-lg: 1.125rem; --text-xl: 1.25rem; --text-2xl: 1.5rem;
  --text-3xl: 1.875rem; --text-4xl: 2.25rem; --text-5xl: 3rem;
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;
  --max-width: 1200px;
  --content-padding: clamp(1.5rem, 5vw, 4rem);
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px;
  --radius-xl: 24px; --radius-full: 9999px;
  --transition-fast: 150ms ease; --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --z-topbar: 100;
  --z-nav: 200;
  --bp-desktop: 1200px;
  --bp-tablet-landscape: 900px;
  --bp-tablet-portrait: 600px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; font-weight: 700; }
p { max-width: 65ch; }

/* ════════════════════════════════════════════════════
   TOP BAR — fixed, name left, location+time right
   ════════════════════════════════════════════════════ */
header.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: opacity 0.3s ease, transform 0.3s ease;
  height: 60px;
}

.topbar__left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.topbar__avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--color-accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.topbar__name {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.topbar__right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}

.topbar__location,
.topbar__time {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

header.topbar.topbar--hidden {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

/* ════════════════════════════════════════════════════
   NAV — pill, HIDDEN on load, appears on scroll
   ════════════════════════════════════════════════════ */
nav.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  z-index: var(--z-nav);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

nav.nav.nav--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav__orange-bar {
  width: 100vw;
  height: 4px;
  background: var(--color-accent-orange);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 201;
  opacity: 0;
  transition: opacity 0.35s ease;
}

nav.nav.nav--visible .nav__orange-bar {
  opacity: 1;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--color-nav-bg);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 10px 20px;
  margin-top: 4px;
  position: relative;
  z-index: 202;
}

.nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.nav__link:hover,
.nav__link--active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav__icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.nav__calendly {
  background: var(--color-accent-orange);
  color: #fff;
  flex-direction: row;
  gap: 0;
  font-size: 13px;
  padding: 8px 16px;
  margin-left: 8px;
}

.nav__calendly:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* ─── Scrollbar & selection ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: var(--radius-full); }
::selection { background: rgba(232, 97, 45, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--color-accent-orange); outline-offset: 3px; }

@media (max-width: 899px) {
  header.topbar { padding: 12px 20px; height: 52px; }
  .topbar__right { gap: 16px; }
  .topbar__location, .topbar__time { font-size: 12px; }
  .topbar__name { font-size: 13px; }
}

@media (max-width: 599px) {
  header.topbar { padding: 10px 16px; height: 48px; }
  .topbar__time { display: none; }
  .topbar__location { display: none; }
  .topbar__right { gap: 16px; }
  .hamburger { display: flex !important; }
  .nav-mobile { display: block !important; }
  .nav { display: none !important; }
  .nav__link { padding: var(--space-2) var(--space-3); font-size: 10px; }
  .nav__icon { width: 16px; height: 16px; }
}

/* Hamburger menu active state */
.nav-mobile.active {
  transform: translateX(0) !important;
}
