/* ==========================================================================
   Hamza Khalid — PEAK Lannino.com 1:1 Awwwards Portfolio
   Heavy GSAP Animations, Scroll Reveals, Magnetic Hovers, Parallax, Tilt
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&amp;family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&amp;display=swap');

:root {
  --bg: #FFF2E0;
  --bg-card: #FFFFFF;
  --ink: #2b170e;
  --primary: #c2410c;
  --primary-strong: #9a3412;
  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-dim: #a8a29e;
  --border: rgba(43, 23, 14, 0.12);
  --border-strong: rgba(43, 23, 14, 0.25);
  --title-font: 'Playfair Display', Georgia, serif;
  --body-font: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-full: 9999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--body-font);
  background: var(--bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

body {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
  cursor: none;
}

a, button, input { cursor: none; }

/* ===================== PRELOADER ===================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preloader-bg {
  position: absolute;
  inset: 0;
  background: var(--ink);
}

.preloader-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--bg);
}

.preloader-counter {
  font-family: var(--title-font);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 1.5rem;
}

.preloader-bar {
  width: 160px;
  height: 2px;
  background: rgba(255, 242, 224, 0.15);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 2px;
}

.preloader-fill {
  height: 100%;
  width: 0%;
  background: var(--bg);
  border-radius: 2px;
}

.preloader-name {
  font-family: var(--title-font);
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2rem;
  opacity: 0.5;
}

/* ===================== CUSTOM CURSOR ===================== */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(194, 65, 12, 0.3);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), border-color 0.3s ease, opacity 0.3s ease;
}

.cursor span {
  font-size: 12px;
  opacity: 0;
  color: #fff;
  transition: opacity 0.2s ease;
}

body.cursor-hover .cursor {
  width: 60px;
  height: 60px;
  background: rgba(194, 65, 12, 0.8);
  mix-blend-mode: normal;
}

body.cursor-hover .cursor span { opacity: 1; }

body.cursor-hover .cursor-follower {
  width: 80px;
  height: 80px;
  border-color: rgba(194, 65, 12, 0.1);
}

/* ===================== CLICK RIPPLE ===================== */
.click-ripple {
  position: fixed;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(194, 65, 12, 0.15);
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
}

/* ===================== CONTAINER ===================== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===================== HEADER ===================== */
.site-header {
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-title {
  font-family: var(--title-font);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.01em;
  opacity: 0;
}

/* ===================== MENU TRIGGER ===================== */
.menu-trigger {
  position: fixed;
  top: 20px;
  right: clamp(20px, 3vw, 40px);
  z-index: 8010;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.3s ease;
}

.menu-trigger:hover {
  transform: scale(1.12);
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(194, 65, 12, 0.25);
}

.menu-trigger:hover .menu-bars span { background: #fff; }

.menu-bars { display: flex; gap: 6px; }

.menu-bars span {
  display: block;
  width: 2px;
  height: 18px;
  background: var(--text-main);
  border-radius: 1px;
  transition: transform 0.45s var(--ease), background 0.3s ease;
}

.menu-trigger.active {
  background: var(--primary);
  border-color: var(--primary);
}

.menu-trigger.active .menu-bars span { background: #fff; }
.menu-trigger.active .menu-bars span:first-child { transform: translateX(4px) rotate(45deg); }
.menu-trigger.active .menu-bars span:last-child { transform: translateX(-4px) rotate(-45deg); }

/* ===================== SLIDE MENU ===================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.menu-overlay.open { visibility: visible; opacity: 1; }

.menu-scrim {
  position: absolute;
  inset: 0;
  background: rgba(43, 23, 14, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.55s ease, backdrop-filter 0.55s ease, -webkit-backdrop-filter 0.55s ease;
}

.menu-overlay.open .menu-scrim {
  background: rgba(43, 23, 14, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 85vw);
  background: var(--ink);
  color: var(--bg);
  padding: 4rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.65s var(--ease);
  box-shadow: -20px 0 60px rgba(0,0,0,0.4);
}

.menu-overlay.open .menu-panel { transform: translateX(0); }

.menu-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 242, 224, 0.4);
  margin-bottom: 2.5rem;
}

.menu-nav { display: flex; flex-direction: column; gap: 0; }

.menu-nav-line {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 242, 224, 0.08);
}

.menu-nav-item {
  font-family: var(--title-font);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  color: var(--bg);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  position: relative;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease), color 0.3s ease;
}

.menu-overlay.open .menu-nav-line .menu-nav-item {
  transform: translateY(0);
}

.menu-overlay.open .menu-nav-line:nth-child(1) .menu-nav-item { transition-delay: 0.15s; }
.menu-overlay.open .menu-nav-line:nth-child(2) .menu-nav-item { transition-delay: 0.22s; }
.menu-overlay.open .menu-nav-line:nth-child(3) .menu-nav-item { transition-delay: 0.29s; }

.menu-nav-item .num {
  font-family: var(--body-font);
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.menu-nav-item::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0.5rem;
  width: 100%;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.menu-nav-item:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-nav-item:hover { color: var(--primary); }

.menu-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 242, 224, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 242, 224, 0.6);
  line-height: 1.8;
}

/* ===================== HERO ===================== */
.hero {
  padding: 5rem 0 7rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero-name-wrap { position: relative; margin-bottom: 3.5rem; }

.hero-line { overflow: hidden; }

.hero-name-text {
  font-family: var(--title-font);
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text-main);
  text-transform: uppercase;
  display: block;
  transform: translateY(110%);
}

.hero-name-text.italic {
  margin-left: clamp(2rem, 10vw, 10rem);
  color: var(--primary);
  font-style: italic;
}

.hero-divider {
  position: absolute;
  top: 10%;
  left: clamp(0.5rem, 3vw, 3rem);
  width: 2px;
  height: 0;
  background: var(--primary);
  opacity: 0.35;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.hero-bio {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.65;
  opacity: 0;
  transform: translateY(40px);
}

/* Reveal helper */
.reveal {
  opacity: 0;
  transform: translateY(50px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Quality pills */
.qualities-list { display: flex; flex-direction: column; gap: 0.85rem; }

.quality-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 0.65rem 1.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  opacity: 0;
  transform: translateX(40px);
  transition: transform 0.4s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease;
}

.quality-item:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(194, 65, 12, 0.08);
  transform: translateX(8px) !important;
}

.quality-dot {
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

/* ===================== SECTIONS ===================== */
.section {
  padding: 7rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.section-header {
  margin-bottom: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--title-font);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.1;
}

/* ===================== BROWSER FRAMES ===================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.browser-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(43, 23, 14, 0.05);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.5s var(--ease), border-color 0.4s ease;
  will-change: transform;
}

.browser-frame:hover {
  box-shadow: 0 30px 60px rgba(43, 23, 14, 0.14);
  border-color: var(--border-strong);
}

.browser-chrome {
  background: #fbf6ef;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chrome-dots { display: flex; gap: 6px; }

.chrome-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d6c7b5;
  transition: transform 0.3s var(--ease);
}

.browser-frame:hover .chrome-dot { transform: scale(1.3); }
.chrome-dot.red { background: #ef4444; }
.chrome-dot.yellow { background: #f59e0b; }
.chrome-dot.green { background: #10b981; }

.chrome-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.browser-body {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.project-title {
  font-family: var(--title-font);
  font-size: 1.75rem;
  font-weight: 400;
  margin-bottom: 0.85rem;
  color: var(--text-main);
  transition: color 0.3s ease;
}

.browser-frame:hover .project-title { color: var(--primary); }

.project-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.project-meta {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-meta a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: letter-spacing 0.3s var(--ease);
}

.project-meta a:hover { letter-spacing: 0.05em; }

/* ===================== EXPERIENCE ===================== */
.exp-list { display: flex; flex-direction: column; gap: 0; }

.exp-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.4s ease, padding 0.4s var(--ease);
}

.exp-row:hover {
  background: rgba(255, 255, 255, 0.4);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  border-radius: var(--radius-md);
}

.exp-row:last-child { border-bottom: none; }

@media (max-width: 640px) {
  .exp-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

.exp-date {
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.exp-role {
  font-family: var(--title-font);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.exp-company {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.exp-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===================== CALCULATOR ===================== */
.calc-window-body {
  background: var(--bg-card);
  padding: 2.5rem;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) { .calc-grid { grid-template-columns: 1fr; } }

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  display: block;
}

.form-input {
  width: 100%;
  background: #faf6f0;
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s var(--ease);
}

.form-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.1);
  transform: scale(1.02);
}

.calc-result {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1.75rem 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-val {
  font-family: var(--title-font);
  font-size: 2.5rem;
  font-weight: 400;
  color: #60a5fa;
  transition: transform 0.3s var(--ease);
}

/* ===================== BUTTONS ===================== */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.3s ease;
}

.btn-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255,255,255,0.15);
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}

.btn-pill:hover::before { transform: translateY(0); }
.btn-pill:hover { transform: translateY(-3px); }

.btn-dark {
  background: var(--ink);
  color: var(--bg);
}

.btn-dark:hover { box-shadow: 0 12px 30px rgba(43, 23, 14, 0.25); }

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 8px 25px rgba(194, 65, 12, 0.1);
}

/* ===================== CONTACT ===================== */
.contact-section {
  padding: 8rem 0;
  text-align: center;
  position: relative;
}

.contact-pills {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.contact-pill {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: all 0.4s var(--ease);
}

.contact-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(194, 65, 12, 0.12);
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.35s var(--ease);
}

.toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ===================== FOOTER ===================== */
.footer {
  padding: 4rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===================== SCROLL PROGRESS BAR ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary);
  z-index: 9000;
  transition: none;
}

/* ===================== SMOOTH SECTION DIVIDER LINES ===================== */
.section-divider {
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
}

/* ===================== PARALLAX SHAPES ===================== */
.parallax-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.04;
  background: var(--primary);
  pointer-events: none;
}
