/* ===================================================================
   Linus Lee — Portfolio   (dark/blue theme)
   =================================================================== */
:root{
  --bg: #ffffff;
  --ink: #0b1020;
  --ink-2: #3a4056;
  --muted: #6b7280;
  --line: #e9ecf5;
  --brand: #3b6ef5;
  --brand-2: #6a8bff;
  --brand-ink: #1e40af;
  --dark: #0a0c14;
  --dark-2: #10131f;
  --card: #ffffff;
  --shadow-sm: 0 2px 8px rgba(20,30,70,.06);
  --shadow-md: 0 12px 30px rgba(20,30,70,.10);
  --shadow-lg: 0 30px 60px rgba(20,30,70,.16);
  --r: 16px;
  --r-lg: 22px;
  --maxw: 1160px;
  --nav-h: 74px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*{ box-sizing: border-box; margin: 0; padding: 0; }
html{ scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body{
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

.section{ padding: clamp(56px, 8vw, 110px) 22px; }
.section__inner{ max-width: var(--maxw); margin: 0 auto; }
.eyebrow{
  display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.section__title{
  font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; letter-spacing: -.02em;
  line-height: 1.08; color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-weight: 600; font-size: 15px; padding: 13px 22px; border-radius: 12px;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn--primary{ background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(59,110,245,.35); }
.btn--primary:hover{ background: #2f5fe0; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(59,110,245,.45); }
.btn--dark{ background: #1a1d2b; color: #fff; }
.btn--dark:hover{ background: #262b3d; transform: translateY(-2px); }
.btn--ghost{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover{ border-color: var(--brand); color: var(--brand); }

.link-arrow{
  display: inline-flex; align-items: center; gap: 6px; color: var(--brand);
  font-weight: 600; font-size: 15px;
}
.link-arrow svg{ transition: transform .2s ease; }
.link-arrow:hover svg{ transform: translateX(4px); }

/* ===================== NAV ===================== */
.nav{
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav.is-stuck{
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 6px 24px rgba(20,30,70,.06);
}
.nav__inner{
  width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; gap: 20px;
}
.brand{ display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; }
.nav.is-stuck .brand{ color: var(--ink); }
.brand__mark{
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 900; box-shadow: 0 4px 14px rgba(59,110,245,.4);
}
.nav__links{ display: flex; gap: 28px; margin-left: auto; }
.nav__links a{
  position: relative; font-weight: 500; font-size: 15px; color: rgba(255,255,255,.82);
  transition: color .2s ease;
}
.nav.is-stuck .nav__links a{ color: var(--ink-2); }
.nav__links a::after{
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--brand); transition: width .25s ease;
}
.nav__links a:hover{ color: var(--brand); }
.nav__links a:hover::after{ width: 100%; }
.nav__resume{ color: #fff; border-color: rgba(255,255,255,.25); }
.nav.is-stuck .nav__resume{ color: var(--ink); border-color: var(--line); }
.nav__resume:hover{ color: var(--brand); border-color: var(--brand); }
/* Projects dropdown */
.nav__dropdown{ position: relative; }
.nav__dropbtn{
  display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 500; font-size: 15px; color: rgba(255,255,255,.82); padding: 0;
  transition: color .2s ease;
}
.nav__dropbtn svg{ transition: transform .2s ease; }
.nav.is-stuck .nav__dropbtn{ color: var(--ink-2); }
.nav__dropdown:hover .nav__dropbtn, .nav__dropbtn:hover{ color: var(--brand); }
.nav__dropdown:hover .nav__dropbtn svg, .nav__dropdown.is-open .nav__dropbtn svg{ transform: rotate(180deg); }
.nav__menu{
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease;
}
.nav__menu::before{ content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav__dropdown:hover .nav__menu, .nav__dropdown.is-open .nav__menu{ opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav__menu a{ padding: 10px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink); transition: background .15s ease, color .15s ease; }
.nav__menu a:hover{ background: #f1f4fb; color: var(--brand); }
.nav__toggle{ display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav__toggle span{ width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
.nav.is-stuck .nav__toggle span{ background: var(--ink); }

/* ===================== HERO ===================== */
.hero{
  position: relative; background: var(--dark); color: #fff; overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 22px 90px;
}
.hero__glow{
  position: absolute; z-index: 0; width: 900px; height: 900px; right: -180px; top: -260px;
  background: radial-gradient(circle at center, rgba(59,110,245,.55), rgba(59,110,245,0) 62%);
  filter: blur(20px); animation: glowPulse 7s ease-in-out infinite;
}
.hero__grid{
  position: absolute; inset: 0; z-index: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 60% 30%, #000 30%, transparent 78%);
}
@keyframes glowPulse{ 0%,100%{ opacity: .8; transform: scale(1);} 50%{ opacity: 1; transform: scale(1.08);} }
.hero__inner{
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.18fr .82fr; gap: 40px; align-items: center;
}
.hero__title{
  font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; letter-spacing: -.03em;
  line-height: 1.05;
}
.hero__line{ white-space: nowrap; }
.grad{
  display: block;
  background: linear-gradient(100deg, #6a8bff, #45b6ff 60%, #7ad0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead{ margin: 22px 0 30px; color: rgba(255,255,255,.72); font-size: 18px; max-width: 44ch; }
.hero__lead strong{ color: #fff; font-weight: 600; }
.hero__cta{ display: flex; gap: 14px; flex-wrap: wrap; }
.hero__social{ display: flex; gap: 14px; margin-top: 30px; }
.hero__social a{
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px;
  color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.12);
  transition: .2s ease;
}
.hero__social a:hover{ color: #fff; border-color: var(--brand); transform: translateY(-3px); background: rgba(59,110,245,.15); }

/* ---------- CSS phone mockup ---------- */
.hero__phone{ display: flex; justify-content: center; perspective: 1400px; }
.phone{
  position: relative; width: 300px; height: 620px; border-radius: 46px;
  background: #0f1220; padding: 12px; border: 2px solid #23273a;
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(59,110,245,.06);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty{ 0%,100%{ transform: translateY(0) rotateY(-6deg) rotateX(2deg);} 50%{ transform: translateY(-16px) rotateY(-6deg) rotateX(2deg);} }
.phone__notch{ position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #0f1220; border-radius: 0 0 16px 16px; z-index: 3; }
.phone__screen{ width: 100%; height: 100%; border-radius: 36px; overflow: hidden; }
.app{
  background: linear-gradient(170deg, #fdf0f7, #eaf3ff);
  color: #5b4a7d; padding: 30px 18px 18px; font-size: 13px;
  display: flex; flex-direction: column; gap: 12px;
}
.app__status{ display: flex; justify-content: space-between; font-size: 11px; color: #9a8fb8; font-weight: 700; }
.app__greet h3{ font-size: 19px; font-weight: 800; color: #5b4a7d; letter-spacing: -.01em; }
.app__greet p{ color: #a99fc4; font-size: 12px; }
.app__stats{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app__stat{ background: #fff; border-radius: 16px; padding: 12px; display: flex; gap: 9px; align-items: center; box-shadow: 0 8px 18px rgba(160,130,210,.16); }
.app__stat-ico{ font-size: 20px; }
.app__stat small{ display: block; color: #a99fc4; font-size: 10px; font-weight: 700; }
.app__stat b{ font-size: 15px; color: #5b4a7d; }
.app__cta{
  border: 0; cursor: pointer; width: 100%; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, #b8a4f0, #9c86e6); color: #fff; font-weight: 800;
  font-family: var(--font); font-size: 14px; box-shadow: 0 5px 0 #8a72d6;
}
.app__label{ font-size: 11px; font-weight: 800; color: #9a8fb8; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.app__row{ background: #fff; border-radius: 16px; padding: 12px; display: flex; align-items: center; gap: 11px; box-shadow: 0 8px 18px rgba(160,130,210,.14); }
.app__row-ico{ width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #efe7ff; font-size: 18px; }
.app__row-body{ flex: 1; min-width: 0; }
.app__row-body b{ font-size: 13px; color: #5b4a7d; }
.app__row-body small{ display: block; color: #a99fc4; font-size: 11px; }
.app__prog{ height: 7px; border-radius: 999px; background: #e6ddf5; margin-top: 6px; overflow: hidden; }
.app__prog span{ display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg,#86e0c0,#ffe08a); }
.app__row-pct{ font-weight: 800; color: #b8a4f0; font-size: 12px; }
.app__row--challenge .app__row-ico{ background: #dcefff; }
.app__row-arrow{ color: #b8a4f0; font-size: 22px; font-weight: 700; }

/* ===================== ABOUT ===================== */
.about{ background: #f6f8fc; }
.about__grid{
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px 44px;
  grid-template-areas: "copy photo" "cards photo";
  align-items: start;
}
.about__copy{ grid-area: copy; }
.about__copy p{ color: var(--ink-2); margin-top: 16px; font-size: 16px; }
.about__copy .link-arrow{ margin-top: 22px; }
.about__photo{ grid-area: photo; }
.photo-frame{
  position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4/4.4;
  background: linear-gradient(135deg, #dfe6f5, #eef2fb); box-shadow: var(--shadow-md);
}
.photo-frame img{ width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.photo-frame__ph{
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 76px;
  font-weight: 900; color: #b8c4de; letter-spacing: .04em;
}
.about__cards{ grid-area: cards; display: flex; flex-direction: column; gap: 12px; }
.info-card{
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.info-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow-md); }
.info-card__ico{ width: 46px; height: 46px; border-radius: 12px; background: #eef3ff; display: grid; place-items: center; font-size: 22px; }
.info-card small{ display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.info-card b{ font-size: 15px; color: var(--ink); }
.info-card em{ display: block; font-style: normal; color: var(--muted); font-size: 12px; }

/* ===================== EXPERIENCE ===================== */
.experience .section__title{ margin-bottom: 44px; }
.timeline{ position: relative; display: flex; flex-direction: column; gap: 18px; }
.timeline::before{
  content: ""; position: absolute; left: 163px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(180deg, var(--brand), #cdd9f6);
}
.tl-item{ display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: start; }
.tl-date{ text-align: right; font-weight: 700; color: var(--muted); font-size: 14px; padding-top: 22px; position: relative; }
.tl-date::after{
  content: ""; position: absolute; right: -19px; top: 26px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brand); border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(59,110,245,.20); z-index: 1;
}
.tl-card{
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; gap: 16px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tl-card:hover{ transform: translateX(4px); box-shadow: var(--shadow-md); }
.tl-logo{ width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 20px; }
.tl-logo--bolt{ background: linear-gradient(135deg,#b8a4f0,#e0559a); }
.tl-logo--rh{ background: #00c805; }
.tl-logo--cy{ background: #16151a; }
.tl-logo--edu{ background: #eef3ff; }
.tl-body h3{ font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-tbd{ font-size: 11px; font-weight: 700; color: #b58900; background: #fff5d6; padding: 2px 7px; border-radius: 999px; }
.tl-org{ display: inline-block; color: var(--brand); font-weight: 600; font-size: 14px; margin: 2px 0 8px; }
.tl-body p{ color: var(--ink-2); font-size: 14.5px; }

/* ===================== PROJECTS ===================== */
.projects__head{ display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.proj-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; }
.proj-card{
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.proj-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #d6def0; }
.proj-card__top{ display: flex; justify-content: space-between; align-items: center; }
.proj-ico{ width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #eef3ff; font-size: 22px; font-weight: 900; color: var(--brand); }
.proj-ico--bolt{ background: linear-gradient(135deg,#b8a4f0,#e0559a); color: #fff; }
.proj-card h3{ font-size: 18px; font-weight: 700; color: var(--ink); }
.proj-card p{ font-size: 14px; color: var(--ink-2); flex: 1; }
.tags{ display: flex; flex-wrap: wrap; gap: 7px; }
.tags span{ font-size: 12px; font-weight: 600; color: var(--ink-2); background: #f1f4fb; padding: 4px 10px; border-radius: 999px; }
.badge{ font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge--progress{ background: #fff2cf; color: #a06d00; }
.proj-card--feature{ grid-column: span 1; border-color: #d9c9f6; background: linear-gradient(180deg,#faf7ff,#fff); }
.proj-card--feature .proj-card__top{ margin-top: 2px; }

/* Feature-card screenshot */
.proj-shot{
  position: relative; border-radius: 14px; overflow: hidden; height: 168px;
  box-shadow: inset 0 0 0 1px rgba(90,70,140,.08);
}
.proj-shot__bg{ width: 100%; height: 100%; object-fit: cover; }
.proj-shot__badge{ position: absolute; top: 10px; left: 10px; z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.proj-shot__ui{ position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; gap: 6px; max-width: 62%; }
.ps-pill{ background: rgba(255,255,255,.94); border-radius: 11px; padding: 7px 10px; box-shadow: 0 6px 14px rgba(90,70,140,.18); }
.ps-pill b{ display: block; font-size: 12px; color: #5b4a7d; font-weight: 800; }
.ps-pill small{ font-size: 10px; color: #a99fc4; font-weight: 700; }
.proj-shot__mascot{ position: absolute; right: 2px; bottom: -4px; width: 82px; z-index: 2; filter: drop-shadow(0 5px 7px rgba(90,70,140,.3)); }

/* ===================== SKILLS ===================== */
.skills .section__title{ margin-bottom: 30px; }
.skill-row{ display: flex; flex-wrap: wrap; gap: 12px; }
.chip{
  font-weight: 600; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid var(--line);
  padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover{ transform: translateY(-3px); color: var(--brand); border-color: var(--brand); box-shadow: var(--shadow-md); }

/* ===================== CONTACT ===================== */
.contact{ background: var(--dark); color: #fff; position: relative; overflow: hidden; }
.contact::before{
  content: ""; position: absolute; width: 700px; height: 700px; left: -150px; bottom: -350px;
  background: radial-gradient(circle, rgba(59,110,245,.4), transparent 65%); filter: blur(10px);
}
.contact__inner{ position: relative; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.contact .section__title{ color: #fff; margin: 10px 0; }
.contact p{ color: rgba(255,255,255,.7); }
.contact__cta{ display: flex; gap: 14px; flex-wrap: wrap; }
.contact .btn--ghost{ color: #fff; border-color: rgba(255,255,255,.25); }
.contact .btn--ghost:hover{ color: var(--brand-2); border-color: var(--brand-2); }

/* ===================== FOOTER ===================== */
.footer{ background: #06070c; color: rgba(255,255,255,.55); padding: 26px 22px; }
.footer__inner{ max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.footer__social{ display: flex; gap: 14px; }
.footer__social a{ color: rgba(255,255,255,.55); transition: color .2s ease, transform .2s ease; }
.footer__social a:hover{ color: #fff; transform: translateY(-2px); }

/* ===================== REVEAL ANIMATION ===================== */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in{ opacity: 1; transform: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px){
  .hero__inner{ grid-template-columns: 1fr; gap: 50px; }
  .hero__phone{ order: -1; }
  .phone{ width: 260px; height: 540px; }
  .about__grid{ grid-template-columns: 1fr; grid-template-areas: "copy" "photo" "cards"; }
  .about__photo{ max-width: 360px; }
  .proj-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px){
  .nav__links, .nav__resume{ display: none; }
  .nav__toggle{ display: flex; margin-left: auto; }
  .nav__links.is-open{
    display: flex; flex-direction: column; align-items: flex-start; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(12,14,22,.97); backdrop-filter: blur(14px); padding: 18px 24px; gap: 16px;
  }
  .nav.is-stuck .nav__links.is-open{ background: rgba(255,255,255,.97); }
  .nav__links.is-open a, .nav__links.is-open .nav__dropbtn{ color: #fff; }
  .nav.is-stuck .nav__links.is-open a, .nav.is-stuck .nav__links.is-open .nav__dropbtn{ color: var(--ink); }
  /* Dropdown becomes an inline, always-open sub-list on mobile */
  .nav__links.is-open .nav__dropdown{ width: 100%; }
  .nav__links.is-open .nav__menu{
    position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none;
    border: 0; background: transparent; padding: 8px 0 0 14px; min-width: 0;
  }
  .nav__links.is-open .nav__menu a{ color: rgba(255,255,255,.8); padding: 8px 0; }
  .nav.is-stuck .nav__links.is-open .nav__menu a{ color: var(--ink-2); }
  .nav__links.is-open .nav__dropbtn svg{ display: none; }
  .timeline::before{ display: none; }
  .tl-item{ grid-template-columns: 1fr; gap: 8px; }
  .tl-date{ text-align: left; padding-top: 0; }
  .tl-date::after{ display: none; }
}
@media (max-width: 520px){
  .proj-grid{ grid-template-columns: 1fr; }
  .hero__cta{ flex-direction: column; align-items: stretch; }
  .btn{ justify-content: center; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal{ opacity: 1; transform: none; }
  .phone{ transform: rotateY(-6deg); }
}
