/* ═══════════════════════════════════════
   Reset & Variables
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Flutter-inspired theme ── */
  --sky: #54C5F8;        /* Flutter light blue */
  --sky-dark: #29B6F6;
  --indigo: #0175C2;     /* Flutter dark blue */
  --cyan: #13B9FD;
  --teal: #00B4AB;       /* Flutter teal */
  --bg: #060e1c;
  --bg-alt: #040b16;
  --surface: #0c1d34;
  --surface-2: #132840;
  --border: rgba(84, 197, 248, 0.14);
  --text: #e8f4fd;
  --text-2: #90cae8;
  --text-3: #2e607e;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(1,117,194,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(84,197,248,0.13) 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 80% 85%, rgba(0,180,171,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 30% 80%, rgba(1,117,194,0.10) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--sky-dark); }
ul { list-style: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* ═══════════════════════════════════════
   Scroll Reveal
═══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   Navbar
═══════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(6, 14, 28, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
  height: 64px; gap: 8px;
}
.nav-inner .nav-links { flex: 1; justify-content: flex-end; margin-right: 0; }
.nav-end { display: flex; align-items: center; flex-shrink: 0; margin-left: auto; }

.nav-logo {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: -0.5px;
}
.nav-logo .mono { color: var(--text-3); }

.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-links a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}
.nav-links a:hover { background: rgba(56,189,248,0.1); color: var(--sky); }
.nav-links a.active { background: rgba(56,189,248,0.12); color: var(--sky); }
.nav-links a.nav-cta {
  background: var(--sky);
  color: white;
  padding: 8px 18px;
}
.nav-links a.nav-cta:hover { background: var(--sky-dark); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text-2);
  border-radius: 2px;
  transition: all var(--transition);
  display: block;
}

/* ═══════════════════════════════════════
   Hero
═══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(84,197,248,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84,197,248,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 40%, transparent 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: drift 10s ease-in-out infinite alternate;
}
.blob-1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #54C5F8, #0175C2);
  top: -120px; left: -100px;
  opacity: 0.2;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #13B9FD, #00B4AB);
  bottom: -80px; right: -80px;
  animation-delay: -5s;
  opacity: 0.16;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

.hero-content { position: relative; z-index: 1; max-width: 680px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(14,165,233,0.1);
  border: 1px solid rgba(14,165,233,0.25);
  color: var(--sky);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.pulse-dot {
  font-size: 0.55rem;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-photo-wrap {
  position: relative;
  width: 150px; height: 150px;
  margin: 0 auto 28px;
}
.hero-photo {
  width: 150px; height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 2;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 3rem;
}
.hero-photo-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(14,165,233,0.4);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.greeting {
  display: block;
  font-size: 1.1rem;
  color: var(--text-2);
  font-weight: 400;
  margin-bottom: 4px;
}
.hero-name {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.name-highlight {
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-roles {
  font-size: 1.2rem;
  color: var(--text-2);
  margin-bottom: 20px;
  min-height: 2em;
}
.role-type { color: var(--sky); font-weight: 600; }
.cursor {
  color: var(--sky);
  animation: blink 1s step-end infinite;
  font-weight: 300;
}
@keyframes blink { 0%,100% { opacity:1 } 50% { opacity:0 } }

.hero-desc {
  color: var(--text-2);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center;
  margin-bottom: 28px;
}

.hero-socials {
  display: flex; gap: 16px; justify-content: center;
  margin-bottom: 24px;
}
.hero-socials a {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.hero-socials a:hover {
  background: var(--sky);
  color: white;
  border-color: var(--sky);
  transform: translateY(-2px);
}

.visitor-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 100px;
}
.visitor-badge i { color: var(--sky); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  color: var(--text-3);
  font-size: 1rem;
  animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════
   Buttons
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  box-shadow: 0 4px 16px rgba(14,165,233,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14,165,233,0.4);
  color: white;
}
.btn-secondary {
  background: var(--surface);
  color: var(--sky);
  border: 1.5px solid var(--sky);
}
.btn-secondary:hover {
  background: var(--sky);
  color: white;
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-3);
  color: var(--text);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════
   Section Common
═══════════════════════════════════════ */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sky);
  background: rgba(14,165,233,0.08);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}
.section-sub {
  color: var(--text-2);
  margin-top: 12px;
  font-size: 1rem;
}

/* ═══════════════════════════════════════
   About
═══════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

/* ── About text ── */
.about-text p {
  color: var(--text-2);
  margin-bottom: 14px;
  font-size: 0.97rem;
  line-height: 1.85;
}
.about-text strong { color: var(--text); font-weight: 700; }

/* ── Fact items ── */
.about-facts {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 24px;
}
.fact-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-2);
  transition: border-color var(--transition);
}
.fact-item:hover { border-color: rgba(56,189,248,0.35); }
.fact-item i {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(129,140,248,0.15));
  color: var(--sky);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Stat cards ── */
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 16px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(56,189,248,0.05), rgba(129,140,248,0.05));
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(56,189,248,0.3); }
.stat-card:hover::before { opacity: 1; }

.stat-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
  position: relative; z-index: 1;
}
.stat-number {
  display: inline;
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  position: relative; z-index: 1;
  font-family: var(--mono);
}
.stat-unit {
  font-size: 1.4rem; font-weight: 700;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative; z-index: 1;
}
.stat-label {
  font-size: 0.78rem; color: var(--text-3); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  position: relative; z-index: 1;
  margin-top: 2px;
}

/* ═══════════════════════════════════════
   Skills
═══════════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; gap: 16px;
  position: relative; overflow: hidden;
}
.skill-category::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--sky), var(--indigo));
  opacity: 0;
  transition: opacity var(--transition);
}
.skill-category:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-category:hover::before { opacity: 1; }

.skill-cat-header {
  display: flex; align-items: center; gap: 12px;
}
.skill-cat-header i {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}
.skill-cat-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.2px;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 100px;
  transition: all var(--transition);
  cursor: default;
}
.skill-tag:hover {
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(129,140,248,0.12));
  border-color: rgba(56,189,248,0.4);
  color: var(--sky);
  transform: translateY(-1px);
}
.skill-tag i { font-size: 0.9em; color: inherit; }

/* ═══════════════════════════════════════
   Timeline
═══════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sky), var(--indigo), transparent);
}

.timeline-item {
  display: flex; gap: 28px;
  margin-bottom: 40px;
  position: relative;
}

.timeline-dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px var(--bg), 0 4px 16px rgba(14,165,233,0.3);
  position: relative; z-index: 1;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  flex: 1;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.timeline-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* Timeline card background images */
.timeline-card-bg {
  position: relative;
  overflow: hidden;
}
.timeline-card-bg > * { position: relative; z-index: 1; }

.timeline-card-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  z-index: 0;
  opacity: 0.18;
  transition: opacity var(--transition);
}
.timeline-card-bg:hover::before { opacity: 0.28; }

.tc-songkhla::before {
  background-image: url('assets/images/songkhla_finishing_co._ltd/%231%20(39).png');
}
.tc-promptnow::before {
  background-image: url('assets/images/promptnow_co._ltd/Screenshot-2023-07-18-144601.png');
}

/* Light theme — reduce opacity so it blends with white surface */
[data-theme="light"] .timeline-card-bg::before { opacity: 0.1; }
[data-theme="light"] .timeline-card-bg:hover::before { opacity: 0.16; }

.timeline-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px; gap: 16px; flex-wrap: wrap;
}
.timeline-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }

.company {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.88rem; color: var(--text-3); margin-top: 4px;
}

.date-badge {
  font-size: 0.8rem; font-weight: 600;
  background: rgba(14,165,233,0.1);
  color: var(--sky);
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
  font-family: var(--mono);
}

.timeline-desc {
  margin-bottom: 16px;
}
.timeline-desc li {
  color: var(--text-2);
  font-size: 0.92rem;
  padding: 4px 0 4px 16px;
  position: relative;
}
.timeline-desc li::before {
  content: '▸';
  position: absolute; left: 0;
  color: var(--sky);
}

.timeline-tech {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.timeline-tech span {
  font-size: 0.78rem;
  font-family: var(--mono);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ═══════════════════════════════════════
   Projects
═══════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.project-img {
  height: 180px;
  background: linear-gradient(135deg, var(--sky) 0%, var(--indigo) 100%);
  position: relative;
  overflow: hidden;
}
.project-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,0.25);
}
.proj-card-icon {
  width: 110px; height: 110px;
  object-fit: cover;
  object-position: center;
  border-radius: 22px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  display: block;
  vertical-align: bottom;
}
.proj-card-icon-full {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.project-img { position: relative; }
.project-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; gap: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-link {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: white;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.project-link:hover { background: var(--sky); color: white; transform: scale(1.1); }

.project-body { padding: 24px; }
.project-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.project-type {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--sky);
  background: rgba(14,165,233,0.1);
  padding: 3px 10px; border-radius: 6px;
}
.project-year { font-size: 0.82rem; color: var(--text-3); font-family: var(--mono); }
.project-body h3 {
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.project-body p { font-size: 0.9rem; color: var(--text-2); margin-bottom: 16px; line-height: 1.7; }
.project-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.project-stack span {
  font-size: 0.78rem; font-family: var(--mono);
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text-2); padding: 3px 10px; border-radius: 6px;
}

/* ═══════════════════════════════════════
   Events
═══════════════════════════════════════ */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex; gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.event-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(14,165,233,0.12), rgba(99,102,241,0.12));
  color: var(--sky);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.event-body { flex: 1; }
.event-year { font-size: 0.75rem; color: var(--text-3); font-family: var(--mono); font-weight: 500; }
.event-body h3 { font-size: 0.95rem; font-weight: 700; margin: 4px 0 8px; color: var(--text); }
.event-body p { font-size: 0.85rem; color: var(--text-2); margin-bottom: 12px; line-height: 1.6; }

.event-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600;
  padding: 4px 12px; border-radius: 100px;
}
.event-win { background: rgba(234,179,8,0.12); color: #ca8a04; border: 1px solid rgba(234,179,8,0.25); }
.event-attend { background: rgba(14,165,233,0.1); color: var(--sky); border: 1px solid rgba(14,165,233,0.25); }
.event-speak { background: rgba(99,102,241,0.1); color: var(--indigo); border: 1px solid rgba(99,102,241,0.25); }
.event-cert { background: rgba(20,184,166,0.1); color: var(--teal); border: 1px solid rgba(20,184,166,0.25); }

/* ═══════════════════════════════════════
   Contact
═══════════════════════════════════════ */
/* ── Contact Cards ── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}
.contact-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(84,197,248,0.05), rgba(1,117,194,0.05));
  opacity: 0;
  transition: opacity var(--transition);
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(84,197,248,0.3);
}
.contact-card:hover::before { opacity: 1; }

.contact-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(84,197,248,0.3);
  position: relative; z-index: 1;
}
.contact-card-body {
  flex: 1;
  display: flex; flex-direction: column; gap: 3px;
  position: relative; z-index: 1;
  min-width: 0;
}
.contact-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  font-weight: 700;
}
.contact-card-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-card-arrow {
  font-size: 0.75rem;
  color: var(--text-3);
  position: relative; z-index: 1;
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.contact-card:hover .contact-card-arrow {
  color: var(--sky);
  transform: translate(2px, -2px);
}

/* ═══════════════════════════════════════
   Footer
═══════════════════════════════════════ */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-logo { color: var(--sky); font-size: 1.1rem; font-weight: 700; }
.footer p { font-size: 0.85rem; color: var(--text-2); }
.footer i { color: #ef4444; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  color: var(--text-2); font-size: 1rem;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.footer-socials a:hover { background: var(--sky); color: white; }

/* ═══════════════════════════════════════
   Back to top
═══════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--indigo));
  color: white;
  border: none; cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(14,165,233,0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 99;
}
.back-to-top.visible {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(14,165,233,0.5); }

/* ═══════════════════════════════════════
   Responsive
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; max-width: 100%; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .nav-inner .nav-links {
    display: none;
    flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(6,14,28,0.97);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    flex: unset; margin-right: 0;
    z-index: 99;
  }
  [data-theme="light"] .nav-inner .nav-links {
    background: rgba(240,246,255,0.97);
  }
  .nav-inner .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; align-items: center; }
  .timeline::before { left: 16px; }
  .timeline-dot { width: 32px; height: 32px; font-size: 0.75rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════
   Project Detail Modal
═══════════════════════════════════════ */
.proj-modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.proj-modal-backdrop.open {
  opacity: 1; pointer-events: all;
}

.proj-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 820px;
  max-height: 90vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  transform: translateY(40px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.proj-modal-backdrop.open .proj-modal {
  transform: translateY(0) scale(1);
}

.proj-modal-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.proj-modal-close:hover { background: #ef4444; color: white; border-color: #ef4444; }

.proj-modal-body {
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
}
.proj-modal-body::-webkit-scrollbar { width: 6px; }
.proj-modal-body::-webkit-scrollbar-track { background: var(--bg-alt); }
.proj-modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Banner (image only) */
.pm-banner {
  height: 200px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #065f46, #059669);
  flex-shrink: 0;
}
.pm-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  border: 2.5px solid rgba(255,255,255,0.35);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  position: relative; z-index: 1;
}
.pm-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-icon i { font-size: 3rem; color: white; }

/* Info block (text, always on surface) */
.pm-info {
  padding: 24px 36px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.pm-info h2 { font-size: 1.35rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pm-subtitle { font-size: 0.82rem; color: var(--text-3); font-family: var(--mono); margin-bottom: 10px; }
.pm-desc { font-size: 0.9rem; color: var(--text-2); line-height: 1.75; margin-bottom: 14px; }
.pm-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-badge {
  font-size: 0.72rem; font-weight: 600;
  background: rgba(56,189,248,0.1);
  color: var(--sky);
  border: 1px solid rgba(56,189,248,0.25);
  padding: 3px 12px; border-radius: 100px;
}

/* Sections inside modal */
.pm-section { padding: 28px 36px; border-bottom: 1px solid var(--border); }
.pm-section:last-child { border-bottom: none; }
.pm-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 700; color: var(--text);
  margin-bottom: 16px;
}
.pm-section-title i {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(14,165,233,0.15), rgba(99,102,241,0.15));
  color: var(--sky);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.88rem;
}

/* Full-width image */
.pm-img-full {
  width: 100%; border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden; margin-top: 4px;
}
.pm-img-full img { width: 100%; display: block; }

/* Image caption */
.pm-img-caption {
  text-align: center; font-size: 0.78rem;
  color: var(--text-3); margin-top: 8px;
}

/* Feature columns */
.pm-features {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.pm-feature-group h4 {
  font-size: 0.85rem; font-weight: 700;
  color: var(--sky); margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.pm-feature-group ul { display: flex; flex-direction: column; gap: 5px; }
.pm-feature-group li {
  font-size: 0.84rem; color: var(--text-2);
  padding-left: 14px; position: relative; line-height: 1.5;
}
.pm-feature-group li::before {
  content: '▸'; position: absolute; left: 0; color: var(--sky);
}

/* Tech stack */
.pm-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-tech-item {
  font-size: 0.8rem; font-weight: 500;
  font-family: var(--mono);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 14px; border-radius: 8px;
}

/* Workflow */
.pm-workflow {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 20px;
  font-size: 0.85rem; color: var(--text-2);
  line-height: 1.9;
}
.pm-workflow-row { display: flex; flex-direction: column; gap: 8px; }
.pm-workflow-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 16px;
}
.pm-workflow-item i { color: var(--sky); width: 16px; }
.pm-workflow-arrow {
  text-align: center; color: var(--text-3); font-size: 1rem;
  margin: -2px 0;
}

/* ─── Line QR Modal ─── */
.qr-backdrop {
  position: fixed; inset: 0; z-index: 201;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.qr-backdrop.open { opacity: 1; pointer-events: all; }

.qr-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  width: 280px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}
.qr-backdrop.open .qr-modal { transform: scale(1) translateY(0); }

.qr-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.qr-close:hover { background: #ef4444; color: white; border-color: #ef4444; }

.qr-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #06c755, #00a040);
  color: white;
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 6px 20px rgba(6,199,85,0.35);
}
.qr-id {
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  font-family: var(--mono);
}
.qr-img-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 14px;
  background: white;
}
.qr-img-wrap img { width: 100%; display: block; }
.qr-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.5;
}

/* ─── Popup Link Buttons ─── */
.pm-links {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0 0;
}

.pm-link-wrap {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Spinning light ring for active links */
.pm-link-wrap.active::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(
    transparent 0deg,
    transparent 240deg,
    var(--sky) 290deg,
    white 330deg,
    var(--sky) 360deg
  );
  animation: pm-link-spin 2s linear infinite;
  z-index: 0;
}
.pm-link-wrap.active::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: var(--surface);
  z-index: 1;
}
@keyframes pm-link-spin {
  to { transform: rotate(360deg); }
}

.pm-link-btn {
  position: relative; z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  background: transparent;
}
/* Brand colors */
.pm-link-wrap.active[data-brand="playstore"] .pm-link-btn { color: #34a853; }
.pm-link-wrap.active[data-brand="appstore"]  .pm-link-btn { color: #0071e3; }
.pm-link-wrap.active[data-brand="github"]    .pm-link-btn { color: #e6edf3; }

.pm-link-wrap.active .pm-link-btn:hover { transform: scale(1.12); }

/* Spinning ring — brand-colored comet */
.pm-link-wrap.active[data-brand="playstore"]::before {
  background: conic-gradient(transparent 0deg, transparent 240deg, #34a853 285deg, #86efac 325deg, #34a853 360deg);
}
.pm-link-wrap.active[data-brand="appstore"]::before {
  background: conic-gradient(transparent 0deg, transparent 240deg, #0071e3 285deg, #93c5fd 325deg, #0071e3 360deg);
}
.pm-link-wrap.active[data-brand="github"]::before {
  background: conic-gradient(transparent 0deg, transparent 240deg, #8b949e 285deg, #e6edf3 325deg, #8b949e 360deg);
}
.pm-link-wrap.inactive {
  opacity: 0.35;
  cursor: not-allowed;
}
.pm-link-wrap.inactive .pm-link-btn {
  color: var(--text-3);
  cursor: not-allowed;
}

/* CSS Tooltip — inactive only (active uses title attr) */
.pm-link-wrap.inactive[data-tip]:hover .pm-link-btn::after,
.pm-link-wrap.active[data-tip]:hover .pm-link-btn::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.pm-link-btn { position: relative; }

/* Project detail button in overlay */
.proj-detail-btn {
  background: white; border: none; cursor: pointer;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.proj-detail-btn:hover { background: var(--sky); color: white; transform: scale(1.1); }

@media (max-width: 640px) {
  .proj-modal { max-height: 95vh; border-radius: 16px; }
  .pm-banner { height: 160px; }
  .pm-info { padding: 20px; }
  .pm-section { padding: 20px; }
  .pm-features { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════
   Light Theme
═══════════════════════════════════════ */
[data-theme="light"] {
  --bg: #f0f6ff;
  --bg-alt: #e8f2ff;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --border: #dbeafe;
  --text: #1e293b;
  --text-2: #475569;
  --text-3: #94a3b8;
  --shadow: 0 4px 24px rgba(14, 165, 233, 0.08);
  --shadow-md: 0 8px 40px rgba(14, 165, 233, 0.14);
  --shadow-lg: 0 20px 60px rgba(14, 165, 233, 0.18);
  --sky: #0ea5e9;
  --sky-dark: #0284c7;
  --indigo: #6366f1;
}
[data-theme="light"] .navbar {
  background: rgba(240, 246, 255, 0.88);
}
[data-theme="light"] .blob-1 { opacity: 0.2; }
[data-theme="light"] .blob-2 { opacity: 0.18; }
[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(rgba(14,165,233,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,0.07) 1px, transparent 1px);
}

/* ═══════════════════════════════════════
   Lamp Cord Theme Toggle
═══════════════════════════════════════ */
.lamp-wrap {
  position: fixed;
  top: 0;
  right: 52px;
  z-index: 98;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: 50% 0%;
  cursor: pointer;
  user-select: none;
}

.lamp-mount {
  width: 14px; height: 7px;
  background: var(--text-3);
  border-radius: 0 0 8px 8px;
  position: relative; z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: background var(--transition);
}
[data-theme="light"] .lamp-mount { background: #9ca3af; }

.lamp-cord {
  width: 4px;
  height: 120px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    -50deg,
    #0a2540 0px, #0a2540 3px,
    #0e3358 3px, #0e3358 6px
  );
  position: relative;
  transition: background var(--transition);
}
[data-theme="light"] .lamp-cord {
  background: repeating-linear-gradient(
    -50deg,
    #6b7280 0px, #6b7280 3px,
    #9ca3af 3px, #9ca3af 6px
  );
}
/* Small knots on the cord */
.lamp-cord::before,
.lamp-cord::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 8px; height: 5px;
  border-radius: 4px;
  background: var(--text-3);
}
.lamp-cord::before { top: 36px; }
.lamp-cord::after  { top: 80px; }

.lamp-pull {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lamp-bulb {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  position: relative; z-index: 2;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* OFF state */
  background: radial-gradient(circle at 38% 38%, #2d3748, #1a202c);
  border: 2px solid #374151;
  color: #4b5563;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ON state (light theme) */
[data-theme="light"] .lamp-bulb {
  background: radial-gradient(circle at 38% 32%, #fef9c3, #fde047 40%, #f59e0b 100%);
  border: 2px solid #fbbf24;
  color: #78350f;
  box-shadow:
    0 0 0   6px rgba(251,191,36,0.15),
    0 0 18px 8px rgba(251,191,36,0.35),
    0 0 40px 16px rgba(251,191,36,0.15),
    0 4px 16px rgba(0,0,0,0.15);
}

/* Glow ring (only on light theme) */
.lamp-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
[data-theme="light"] .lamp-glow { opacity: 1; }

/* Hover effect */
.lamp-pull:hover .lamp-bulb {
  transform: scale(1.08);
}
[data-theme="light"] .lamp-pull:hover .lamp-bulb {
  box-shadow:
    0 0 0   8px rgba(251,191,36,0.2),
    0 0 24px 12px rgba(251,191,36,0.45),
    0 0 50px 20px rgba(251,191,36,0.2),
    0 4px 16px rgba(0,0,0,0.15);
}

/* Pull-down press effect */
.lamp-pull:active .lamp-bulb {
  transform: translateY(5px) scale(0.94);
  transition-duration: 0.1s;
}

/* ── Swing animation ─────────────── */
.lamp-wrap.swinging {
  animation: lamp-swing 0.85s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}
@keyframes lamp-swing {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(18deg); }
  35%  { transform: rotate(-11deg); }
  52%  { transform: rotate(6deg); }
  67%  { transform: rotate(-3deg); }
  80%  { transform: rotate(1.2deg); }
  90%  { transform: rotate(-0.5deg); }
  100% { transform: rotate(0deg); }
}

/* ── Flash on switch ─────────────── */
.lamp-bulb.flash {
  animation: bulb-flash 0.45s ease-out;
}
@keyframes bulb-flash {
  0%   { filter: brightness(1); }
  25%  { filter: brightness(3) saturate(1.5); }
  60%  { filter: brightness(1.4); }
  100% { filter: brightness(1); }
}

/* ═══════════════════════════════════════
   Floating Lang Panel
═══════════════════════════════════════ */
.float-controls {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 97;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 8px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.float-lang-btn {
  width: 48px; height: 54px;
  border-radius: 14px;
  background: transparent;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all var(--transition);
}
.float-lang-btn .flag-emoji { font-size: 1.55rem; line-height: 1; }
.float-lang-btn .lang-label {
  font-size: 0.62rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-3);
  letter-spacing: 0.5px;
  transition: color var(--transition);
}
.float-lang-btn:hover { background: var(--bg-alt); border-color: var(--border); transform: scale(1.06); }
.float-lang-btn.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.12), rgba(129,140,248,0.12));
  border-color: rgba(56,189,248,0.3);
}
.float-lang-btn.active .lang-label { color: var(--sky); }

.float-lang-btn.pop {
  animation: lang-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lang-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.22); }
  75%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Mobile */
@media (max-width: 640px) {
  .lamp-wrap { right: 28px; }
  .lamp-cord { height: 96px; }
  .lamp-bulb { width: 50px; height: 50px; font-size: 1.25rem; }

  .float-controls {
    right: 10px; top: auto; bottom: 90px;
    transform: none;
    flex-direction: row;
    border-radius: 16px;
    padding: 8px 10px; gap: 4px;
  }
  .float-lang-btn { width: 46px; height: 46px; border-radius: 12px; }
  .float-lang-btn .flag-emoji { font-size: 1.35rem; }
}

/* ═══════════════════════════════════════
   Page Transition Overlay
═══════════════════════════════════════ */
.page-transition {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.page-transition.active {
  opacity: 1;
  pointer-events: all;
}
