/* ==========================================================================
   Dheerajsorbit — Portfolio Design System Tokens & Global Styles
   Strictly grounded in Figma Source of Truth & Field Guide
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Arimo:wght@400;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  /* Surface Tokens */
  --surface-canvas: #FFFFFF;
  --surface-subdued: #F5F5F5;

  /* Typography / Ink Tokens */
  --text-primary: #111112;
  --text-secondary: #706F6F;
  --text-placeholder: #ABABAB;

  /* Brand Tokens */
  --brand-accent: #EB5624;
  --asset-green: #33CD94;

  /* Border / Divider Tokens */
  --border-subtle: #E9E9E9;

  /* Overlay Tokens */
  --overlay-backdrop: rgba(17, 17, 18, 0.40);

  /* Font Families */
  --font-display: 'Arimo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radius Tokens */
  --radius-square: 0px;
  --radius-logo: 2px;
  --radius-copy: 6px;
  --radius-input: 8px;
  --radius-card: 12px;
  --radius-portrait: 16px;
  --radius-pill: 100px;

  /* Elevation Tokens (Role-specific shadows) */
  --elevation-cta: 0 17px 27px 1px rgba(0, 0, 0, 0.1412), 0 5px 9px 0 rgba(0, 0, 0, 0.1255);
  --elevation-gate: 0 4px 24px 0 rgba(0, 0, 0, 0.0392), 0 1px 6px 0 rgba(0, 0, 0, 0.0314);
  --elevation-dialog: 0 24px 64px 0 rgba(0, 0, 0, 0.1412);
  --elevation-planet: -2px 4px 4px -1px rgba(0, 0, 0, 0.25);

  /* Layout Constants */
  --layout-viewport: 1440px;
  --layout-content: 1360px;
  --layout-gutter: 40px;
  --space-section-stack: 96px;
}

/* ==========================================================================
   Header Glassmorphism Floating Styles
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 88px;
  display: flex;
  align-items: center;
  background-color: transparent;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(233, 233, 233, 0.85);
  box-shadow: 0 4px 20px -2px rgba(17, 17, 18, 0.04);
}

/* Active Status Pulse Dot for Zendesk */
@keyframes activePulseRing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(235, 86, 36, 0.75);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(235, 86, 36, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(235, 86, 36, 0);
  }
}

.active-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background-color: var(--brand-accent);
  display: inline-block;
  animation: activePulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   Base Elements & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-body);
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--surface-canvas);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
}

::selection {
  background-color: var(--brand-accent);
  color: #FFFFFF;
}

/* ==========================================================================
   Typography Hierarchy (Observed Specifications)
   ========================================================================== */
.font-display {
  font-family: var(--font-display);
}

.font-body {
  font-family: var(--font-body);
}

/* Signature Display on Home */
.type-display-signature {
  font-family: var(--font-display);
  font-size: clamp(48px, 10.45vw, 158px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: clamp(-2px, -0.65vw, -10px);
  color: var(--text-primary);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

@media (max-width: 640px) {
  .type-display-signature {
    white-space: normal;
    font-size: clamp(32px, 8.8vw, 44px);
    letter-spacing: -1.5px;
    line-height: 1.05;
    word-break: break-word;
  }
}

/* Hero Heading on About */
.type-hero-about {
  font-family: var(--font-display);
  font-size: clamp(36px, 3.88vw, 56px);
  line-height: 1.0;
  font-weight: 700;
  letter-spacing: -4px;
  color: var(--text-primary);
}

/* Section Headings */
.type-heading-section {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.33vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -2px;
  color: var(--text-primary);
}

/* Dialog Headings */
.type-heading-dialog {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.77vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1.5px;
  color: var(--text-primary);
}

/* Subsection Headings */
.type-heading-subsection {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: normal;
  font-weight: 700;
  letter-spacing: normal;
  color: var(--text-primary);
}

/* Password Gate Title */
.type-heading-gate {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: normal;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

/* Header Wordmark */
.type-wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: normal;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--text-primary);
}

/* Navigation Links */
.type-navigation {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: normal;
  font-weight: 700;
  letter-spacing: normal;
}

/* Longform Body (About Story) */
.type-body-longform {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 30px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-secondary);
}

/* Hero Body Text */
.type-body-hero {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-secondary);
}

/* Default Body Copy */
.type-body-default {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-secondary);
}

/* Home Intro Copy */
.type-intro-home {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 21px;
  font-weight: 500;
  letter-spacing: -0.35px;
  color: var(--text-primary);
}

/* Primary Button Text */
.type-button {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: normal;
}

/* Form Inputs & Button */
.type-form {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: normal;
  font-weight: 400;
  letter-spacing: normal;
}

/* Eyebrows */
.type-eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: normal;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand-accent);
}

/* Footer Copyright */
.type-footer {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: normal;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-secondary);
}

/* ==========================================================================
   Elevations / Shadows
   ========================================================================== */
.shadow-cta {
  box-shadow: var(--elevation-cta);
}

.shadow-gate {
  box-shadow: var(--elevation-gate);
}

.shadow-dialog {
  box-shadow: var(--elevation-dialog);
}

.shadow-planet {
  box-shadow: var(--elevation-planet);
}

/* ==========================================================================
   Component Specific Rules
   ========================================================================== */

/* Primary Action Button (111 x 50, pill, dark fill) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 111px;
  height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background-color: var(--text-primary);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  box-shadow: var(--elevation-cta);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: #000000;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 20px 32px 2px rgba(0, 0, 0, 0.18), 0 6px 12px 0 rgba(0, 0, 0, 0.14);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
}

/* Password Gate Card (458 x 392.154, radius 12, border 1) */
.password-card {
  width: 100%;
  max-width: 458px;
  min-height: 392px;
  padding: 48px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-canvas);
  box-shadow: var(--elevation-gate);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

@media (max-width: 500px) {
  .password-card {
    padding: 36px 20px;
    min-height: auto;
  }
}

.password-input {
  width: 100%;
  max-width: 362px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-input);
  background-color: var(--surface-subdued);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.password-input::placeholder {
  color: var(--text-placeholder);
}

.password-input:focus {
  background-color: #FFFFFF;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(17, 17, 18, 0.08);
}

.password-submit-btn {
  width: 100%;
  max-width: 362px;
  height: 48px;
  margin-top: 12px;
  border-radius: var(--radius-pill);
  background-color: var(--text-primary);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease;
}

.password-submit-btn:hover {
  background-color: #000000;
  transform: translateY(-1px);
}

.password-submit-btn:active {
  transform: translateY(1px);
}

.password-submit-btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
}

/* Shake Animation for Invalid Password */
@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-input {
  animation: gateShake 0.4s ease-in-out;
  border-color: #EF4444 !important;
}

/* ==========================================================================
   Contact Modal Dialog (480 x 395, padding 40, gap 32, radius 12)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background-color: var(--overlay-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 395px;
  padding: 40px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
  background-color: var(--surface-canvas);
  box-shadow: var(--elevation-dialog);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@media (max-width: 500px) {
  .modal-dialog {
    padding: 32px 20px;
    min-height: auto;
  }
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
  background-color: var(--surface-subdued);
  transform: scale(1.08);
}

.modal-close-btn:focus {
  outline: none;
}

.modal-close-btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.modal-email-btn {
  width: 100%;
  max-width: 400px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--text-primary);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-email-btn:hover {
  background-color: #000000;
  transform: translateY(-1px);
}

.modal-copy-row {
  width: 100%;
  max-width: 400px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}

.modal-copy-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-copy);
  border: 1px solid var(--border-subtle);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.modal-copy-btn:hover {
  background-color: var(--surface-subdued);
  border-color: #D0D0D0;
}

.modal-copy-btn:active {
  transform: scale(0.95);
}

/* Toast message for email copied */
.toast-msg {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: var(--text-primary);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 200;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   About Page Layout Tokens
   Left Column: 536px | Gap: 48px | Right Column: 760px
   Total Content: 1344px
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .about-grid {
    grid-template-columns: 536px 760px;
    gap: var(--layout-gutter);
  }
}

.about-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-subtle);
  border: none;
  margin: var(--space-section-stack) 0;
}

.experience-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .experience-row {
    display: grid;
    grid-template-columns: 220px 516px;
    gap: 24px;
  }
}

.interests-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .interests-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
  }
}

/* Orange Planet Sphere Gradient */
.planet-sphere {
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background: radial-gradient(circle at 35% 35%, #FF7A45 0%, #EB5624 60%, #C23A0E 100%);
  box-shadow: var(--elevation-planet);
}
