/* =======================================================
   style.css — Michael Amper Portfolio
   Sections:
   01. Reset & Variables
   02. Scrollbar
   03. Noise Grain
   04. Scroll Progress Bar
   05. Navbar
   06. Sections & Labels
   07. Reveal Animations
   08. Buttons
   09. Social Links
   10. Hero
   11. About
   12. Education Timeline
   13. Skills Marquee
   14. Projects
   15. Contact
   16. Footer
   17. Back to Top
   18. Responsive Breakpoints
======================================================= */

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

:root {
  --bg:       #07080f;
  --bg2:      #0d0f1a;
  --bg3:      #13162a;
  --gold:     #c8a96e;
  --gold-d:   #a07840;
  --gold-p:   rgba(200,169,110,0.08);
  --white:    #f0ece3;
  --muted:    #7a7a8e;
  --border:   rgba(200,169,110,0.18);
  --nav-h:    68px;
  --fh:       'Playfair Display', Georgia, serif;
  --fb:       'DM Sans', sans-serif;
  --ease:     0.35s cubic-bezier(0.4,0,0.2,1);
  --px:       clamp(1rem, 5vw, 5%);
}

html { scroll-behavior: smooth; }
body { font-family: var(--fb); background: var(--bg); color: var(--white); line-height: 1.7; overflow-x: hidden; }
a    { color: inherit; text-decoration: none; }
img  { max-width: 100%; display: block; }
ul   { list-style: none; }

/* ── 02. Scrollbar ── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-d); border-radius: 4px; }

/* ── 03. Noise Grain ── */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  z-index: 9997; opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── 04. Scroll Progress Bar ── */
#progress-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold-d), var(--gold), #f0d080);
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(200,169,110,0.6);
}

/* ── 05. Navbar ── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--px);
  background: rgba(7,8,15,0.7);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--ease), box-shadow var(--ease);
}
#navbar.scrolled { background: rgba(7,8,15,0.92); box-shadow: 0 4px 30px rgba(0,0,0,0.4); }

.nav-logo {
  font-family: var(--fh); font-size: clamp(1.05rem,3vw,1.4rem);
  font-weight: 700; color: var(--gold); letter-spacing: 0.02em; position: relative;
}
.nav-logo span { color: var(--white); }
.nav-logo::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.nav-logo:hover::after { transform: scaleX(1); }

.nav-links { display: flex; gap: clamp(1.2rem,3vw,2.5rem); }
.nav-links a {
  font-size: 0.77rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  position: relative; transition: color var(--ease); padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width var(--ease);
}
.nav-links a:hover,
.nav-links a.active           { color: var(--white); }
.nav-links a:hover::after,
.nav-links a.active::after    { width: 100%; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; cursor: pointer; padding: 6px; border: none; background: transparent;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--ease); transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: rgba(10,12,22,0.98); backdrop-filter: blur(24px);
  padding: 1.5rem var(--px) 2rem; flex-direction: column; gap: 0;
  z-index: 199; border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block; padding: 0.9rem 0; font-size: 1rem; font-weight: 500;
  letter-spacing: 0.04em; color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--ease), padding-left var(--ease);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover      { color: var(--gold); padding-left: 0.4rem; }

/* ── 06. Sections & Labels ── */
section {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: clamp(60px,10vw,120px) var(--px);
  position: relative; z-index: 1;
}
.full-bleed { max-width: 100%; overflow: hidden; position: relative; z-index: 1; }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.8rem;
}
.section-label::before { content: ''; width: 20px; height: 1px; background: var(--gold); flex-shrink: 0; }

h2.section-title {
  font-family: var(--fh); font-size: clamp(1.9rem,5vw,3.4rem);
  font-weight: 900; line-height: 1.1; color: var(--white);
  margin-bottom: clamp(1.5rem,4vw,3rem);
}

.section-divider {
  width: 90%; margin: 0 auto; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  position: relative; z-index: 1;
}

/* ── 07. Reveal Animations ── */
.reveal       { opacity: 0; transform: translateY(36px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-40px); transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal-left.visible  { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px);  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1); }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }
.reveal-delay-6 { transition-delay: 0.60s; }

/* ── 08. Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--bg);
  font-family: var(--fb); font-weight: 600; font-size: 0.875rem; letter-spacing: 0.04em;
  padding: 13px 26px; border-radius: 8px; border: none; cursor: pointer;
  transition: var(--ease); position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  transform: translateX(-100%); transition: transform 0.5s ease;
}
.btn-primary:hover::before { transform: translateX(100%); }
.btn-primary:hover { background: #d9bc84; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200,169,110,0.3); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--white);
  font-family: var(--fb); font-weight: 500; font-size: 0.875rem; letter-spacing: 0.04em;
  padding: 13px 26px; border-radius: 8px; border: 1px solid var(--border);
  cursor: pointer; transition: var(--ease);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ── 09. Social Links ── */
.social-row { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px;
  color: var(--muted); transition: var(--ease); flex-shrink: 0;
  position: relative; overflow: hidden;
}
.social-link::before {
  content: ''; position: absolute; inset: 0; background: var(--gold);
  transform: translateY(100%); transition: transform 0.25s ease;
}
.social-link:hover::before { transform: translateY(0); }
.social-link:hover          { border-color: var(--gold); color: var(--bg); transform: translateY(-3px); }
.social-link svg,
.social-link [data-icon] svg { width: 17px; height: 17px; fill: currentColor; position: relative; z-index: 1; }
[data-icon] { display: contents; line-height: 0; }

/* ── 10. Hero ── */
#home {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(40px,8vw,80px));
  padding-bottom: clamp(60px,8vw,80px);
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: clamp(2rem,5vw,4rem);
}

.hero-text { flex: 1 1 280px; min-width: 0; }

.hero-greeting {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold-p); border: 1px solid var(--border);
  border-radius: 40px; padding: 7px 18px;
  font-size: 0.8rem; color: var(--gold); letter-spacing: 0.06em; margin-bottom: 1.2rem;
}
.hero-greeting::before {
  content: ''; width: 7px; height: 7px; background: var(--gold);
  border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,169,110,0.5); }
  50%      { box-shadow: 0 0 0 6px rgba(200,169,110,0); }
}

.hero-name {
  font-family: var(--fh); font-size: clamp(2.6rem,7vw,5.5rem);
  font-weight: 900; line-height: 1.0; margin-bottom: 0.4rem;
}

.hero-role-wrap {
  font-family: var(--fh); font-size: clamp(1.15rem,3vw,2.2rem);
  font-weight: 700; font-style: italic; color: var(--gold);
  margin-bottom: 1.2rem; min-height: 2.8rem;
  display: flex; align-items: center; gap: 4px;
}
#typewriter-text { display: inline; }
.cursor-blink {
  display: inline-block; width: 2px; height: 1.1em; background: var(--gold);
  margin-left: 2px; vertical-align: middle;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-quote {
  font-size: 0.9rem; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--gold); padding-left: 1rem; margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 2rem; }

.scroll-hint {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: 2.5rem; animation: bounce-y 2s ease-in-out infinite;
}
.scroll-hint [data-icon] svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 2; }
@keyframes bounce-y { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

.hero-image-wrap {
  flex-shrink: 0; position: relative;
  width: clamp(180px,32vw,340px); height: clamp(180px,32vw,340px);
}
.hero-img-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px dashed var(--gold-d); animation: spin-ring 20s linear infinite;
}
.hero-img-ring-2 {
  position: absolute; inset: -28px; border-radius: 50%;
  border: 1px dashed rgba(200,169,110,0.2); animation: spin-ring 30s linear infinite reverse;
}
@keyframes spin-ring { to { transform: rotate(360deg); } }

.hero-img-avatar {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--bg3); box-shadow: 0 0 60px rgba(200,169,110,0.15);
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1), box-shadow 0.6s;
}
.hero-img-avatar:hover { transform: scale(1.04); box-shadow: 0 0 80px rgba(200,169,110,0.3); }

.avatar-placeholder {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, var(--bg3), #1e2240);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fh); font-size: clamp(2rem,8vw,4rem); font-weight: 700; color: var(--gold);
  border: 3px solid var(--bg3); box-shadow: 0 0 60px rgba(200,169,110,0.15);
}

.hero-badge {
  position: absolute; bottom: clamp(10px,3vw,20px); right: clamp(-10px,-2vw,-20px);
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 9px 14px; display: flex; flex-direction: column; gap: 2px;
  backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: float-badge 4s ease-in-out infinite;
}
@keyframes float-badge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hero-badge-num   { font-family: var(--fh); font-size: clamp(1.1rem,4vw,1.5rem); font-weight: 700; color: var(--gold); line-height: 1; }
.hero-badge-label { font-size: clamp(0.58rem,1.5vw,0.7rem); color: var(--muted); letter-spacing: 0.05em; white-space: nowrap; }

.hero-badge-top {
  position: absolute; top: clamp(-8px,-2vw,-14px); left: clamp(-8px,-2vw,-18px);
  background: linear-gradient(135deg, #0f4c2a, #155e35);
  border: 1px solid rgba(52,211,153,0.35); border-radius: 20px;
  padding: 5px 12px; font-size: 0.65rem; font-weight: 600;
  color: #6ee7b7; letter-spacing: 0.08em; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.hero-badge-top::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #34d399;
  animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}

.glows            { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.glow             { position: absolute; border-radius: 50%; }
.glow-1 { width: clamp(200px,40vw,500px); height: clamp(200px,40vw,500px); background: radial-gradient(circle, rgba(200,169,110,0.07) 0%, transparent 70%); top: -50px; right: -80px; }
.glow-2 { width: clamp(180px,35vw,400px); height: clamp(180px,35vw,400px); background: radial-gradient(circle, rgba(90,120,255,0.06) 0%, transparent 70%); top: 200px; left: -60px; }

/* ── 11. About ── */
#about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,6vw,5rem); align-items: center; }

.about-img-wrap { position: relative; }
.about-img-frame { position: relative; border-radius: 20px; overflow: hidden; }
.about-img-frame::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, rgba(200,169,110,0.08) 0%, transparent 50%); }
.about-img-frame img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 20px; transition: transform 0.6s ease; }
.about-img-frame:hover img { transform: scale(1.03); }
.about-img-frame .avatar-rect {
  aspect-ratio: 4/5; background: linear-gradient(135deg, var(--bg3), #1a1d35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--fh); font-size: clamp(3rem,10vw,5rem); font-weight: 700; color: var(--gold); border-radius: 20px;
}
.about-accent-tl { position: absolute; top: -12px; left: -12px; width: 60px; height: 60px; border-top: 3px solid var(--gold); border-left: 3px solid var(--gold); border-radius: 6px 0 0 0; }
.about-accent-br { position: absolute; bottom: -12px; right: -12px; width: 60px; height: 60px; border-bottom: 3px solid var(--gold); border-right: 3px solid var(--gold); border-radius: 0 0 6px 0; }

.about-float-tag {
  position: absolute; bottom: 24px; left: -20px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 16px; display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 2;
  animation: float-badge 5s ease-in-out infinite;
}
.about-float-tag .icon  { font-size: 1.3rem; }
.about-float-tag .label { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.about-float-tag .label strong { display: block; color: var(--white); font-size: 0.8rem; }

.about-text p { font-size: clamp(0.85rem,1.5vw,0.95rem); color: rgba(240,236,227,0.75); line-height: 1.9; margin-bottom: 1.5rem; }

.about-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.8rem; margin-top: 2rem; }
.stat-card {
  text-align: center; padding: 1rem 0.5rem;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 12px;
  transition: var(--ease); cursor: default;
}
.stat-card:hover { border-color: var(--gold); transform: translateY(-3px); background: rgba(19,22,42,0.8); }
.stat-num   { font-family: var(--fh); font-size: clamp(1.3rem,3vw,1.8rem); font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── 12. Education Timeline ── */
#education { padding: clamp(60px,10vw,120px) var(--px); }

.timeline { position: relative; margin-top: 1rem; }
.timeline::before {
  content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--gold), rgba(200,169,110,0.1));
}

.timeline-item          { position: relative; padding-left: 60px; margin-bottom: 2.5rem; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute; left: 12px; top: 6px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg3); border: 2px solid var(--gold);
  transition: var(--ease); box-shadow: 0 0 0 0 rgba(200,169,110,0.4);
}
.timeline-item:hover .timeline-dot { background: var(--gold); box-shadow: 0 0 0 6px rgba(200,169,110,0.15); }

.timeline-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: clamp(1rem,3vw,1.5rem); transition: var(--ease);
}
.timeline-card:hover { border-color: rgba(200,169,110,0.4); transform: translateX(4px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }

.timeline-year {
  display: inline-block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
  background: var(--gold-p); border: 1px solid var(--border); border-radius: 20px;
  padding: 3px 10px; margin-bottom: 0.6rem;
}
.timeline-title { font-family: var(--fh); font-size: clamp(1rem,2.5vw,1.2rem); font-weight: 700; color: var(--white); margin-bottom: 2px; }
.timeline-sub   { font-size: 0.82rem; color: var(--gold); margin-bottom: 0.5rem; }
.timeline-desc  { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

.timeline-badge {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 0.75rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px;
}
.badge-green  { background: rgba(52,211,153,0.1);  color: #6ee7b7; border: 1px solid rgba(52,211,153,0.25); }
.badge-blue   { background: rgba(96,165,250,0.1);  color: #93c5fd; border: 1px solid rgba(96,165,250,0.25); }
.badge-purple { background: rgba(167,139,250,0.1); color: #c4b5fd; border: 1px solid rgba(167,139,250,0.25); }

/* ── Experience section extras ── */
.exp-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem;
}
.exp-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: #6ee7b7; white-space: nowrap; flex-shrink: 0;
  background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.2);
  border-radius: 20px; padding: 3px 10px;
}
.exp-status-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #34d399; flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}
.exp-highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0.9rem 0 0.75rem;
}
.exp-highlight-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.78rem; color: rgba(240,236,227,0.75);
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
  transition: border-color var(--ease), color var(--ease);
}
.exp-highlight-item:hover { border-color: rgba(200,169,110,0.3); color: var(--white); }
.exp-highlight-icon { font-size: 0.9rem; flex-shrink: 0; }
.exp-tags { margin-top: 0.75rem; }
@media (max-width: 480px) {
  .exp-highlights { grid-template-columns: 1fr; }
  .exp-header { flex-direction: column; gap: 0.5rem; }
}

/* ── 13. Skills — Bento Grid ── */
#skills { padding: clamp(60px,10vw,120px) var(--px); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
}

/* Wide card spans 2 columns */
.bento-wide { grid-column: span 2; }

/* Base card */
.bento-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  overflow: hidden;
  cursor: default;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}
.bento-card:hover {
  border-color: rgba(200,169,110,0.45);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

/* Animated glow blob */
.bento-glow {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,169,110,0.12) 0%, transparent 70%);
  bottom: -60px; right: -60px;
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}
.bento-glow-purple {
  background: radial-gradient(circle, rgba(167,139,250,0.14) 0%, transparent 70%);
}
.bento-card:hover .bento-glow {
  transform: scale(1.4);
  opacity: 1.4;
}

/* Card header row */
.bento-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.bento-icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.bento-category {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* "Trending" badge */
.bento-badge-new {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(167,139,250,0.12);
  color: #c4b5fd;
  border: 1px solid rgba(167,139,250,0.3);
  animation: pulse-badge 3s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%,100% { box-shadow: 0 0 0 0 rgba(167,139,250,0.3); }
  50%      { box-shadow: 0 0 0 5px rgba(167,139,250,0); }
}

/* Chips row */
.bento-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.bento-chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 30px;
  background: var(--bg3);
  border: 1px solid rgba(200,169,110,0.15);
  color: rgba(240,236,227,0.8);
  letter-spacing: 0.02em;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}
.bento-chip:hover {
  background: rgba(200,169,110,0.1);
  border-color: rgba(200,169,110,0.5);
  color: var(--gold);
  transform: translateY(-2px);
}

/* Gold accent chips */
.bento-chip-gold {
  background: rgba(200,169,110,0.1);
  border-color: rgba(200,169,110,0.35);
  color: var(--gold);
}
.bento-chip-gold:hover {
  background: rgba(200,169,110,0.22);
  border-color: var(--gold);
}

/* Purple accent chips (AI) */
.bento-chip-purple {
  background: rgba(167,139,250,0.08);
  border-color: rgba(167,139,250,0.25);
  color: #c4b5fd;
}
.bento-chip-purple:hover {
  background: rgba(167,139,250,0.18);
  border-color: rgba(167,139,250,0.6);
  color: #ddd6fe;
  transform: translateY(-2px);
}

/* AI card description text */
.bento-ai-desc {
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
}

/* AI card subtle top border accent */
.bento-card-ai {
  border-color: rgba(167,139,250,0.2);
}
.bento-card-ai:hover {
  border-color: rgba(167,139,250,0.5);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 30px rgba(167,139,250,0.06);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .bento-grid { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: span 2; }
}
@media (max-width: 480px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
}

/* ── 14. Projects ── */
#project { padding: clamp(60px,10vw,120px) var(--px); }
.projects-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: clamp(1.5rem,4vw,3rem); }
.projects-grid   { display: grid; grid-template-columns: repeat(2,1fr); gap: clamp(0.8rem,2vw,1.5rem); }
.project-card-featured { grid-column: 1 / -1; }

a.project-card { text-decoration: none; color: inherit; display: block; }
.project-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; cursor: pointer; position: relative; display: flex; flex-direction: column;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d; will-change: transform;
}
.project-card:hover { border-color: rgba(200,169,110,0.45); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }

.project-thumb { width: 100%; height: clamp(160px,22vw,260px); object-fit: cover; display: block; transition: transform 0.5s ease; }
.project-card-featured .project-thumb { height: clamp(180px,25vw,320px); }
.project-card:hover .project-thumb    { transform: scale(1.04); }

.project-thumb-placeholder { width: 100%; height: clamp(160px,22vw,260px); background: linear-gradient(135deg,var(--bg3),#161932); display: flex; align-items: center; justify-content: center; }
.project-thumb-placeholder--pokedex { background: linear-gradient(135deg, #0f0c1a, #1a0f2e); }
.project-card-featured .project-thumb-placeholder { height: clamp(180px,25vw,320px); }
.project-thumb-placeholder [data-icon] svg,
.project-thumb-placeholder svg { width: 40px; height: 40px; opacity: 0.15; }

.project-overlay { position: absolute; left: 0; right: 0; top: 0; height: clamp(160px,22vw,260px); background: linear-gradient(to bottom, transparent 40%, rgba(7,8,15,0.92) 100%); pointer-events: none; }
.project-card-featured .project-overlay { height: clamp(180px,25vw,320px); }

.project-hover-overlay {
  position: absolute; left: 0; right: 0; top: 0; height: clamp(160px,22vw,260px);
  background: rgba(7,8,15,0.7); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none; backdrop-filter: blur(2px);
}
.project-card-featured .project-hover-overlay { height: clamp(180px,25vw,320px); }
.project-card:hover .project-hover-overlay    { opacity: 1; }

.project-hover-icon {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--gold); background: rgba(200,169,110,0.1);
  display: flex; align-items: center; justify-content: center;
  transform: scale(0.7); transition: transform 0.3s ease; color: var(--gold);
}
.project-card:hover .project-hover-icon { transform: scale(1); }
.project-hover-icon [data-icon] svg,
.project-hover-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

.project-body  { padding: clamp(0.9rem,2vw,1.5rem); flex: 1; }
.project-tags  { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 0.6rem; }
.tag { font-size: 0.63rem; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(200,169,110,0.08); color: var(--gold); border: 1px solid rgba(200,169,110,0.2); padding: 2px 9px; border-radius: 20px; font-weight: 500; transition: var(--ease); }
.tag:hover { background: var(--gold); color: var(--bg); }

.project-title { font-family: var(--fh); font-size: clamp(0.95rem,2vw,1.15rem); font-weight: 700; margin-bottom: 0.45rem; color: var(--white); }
.project-desc {
  font-size: clamp(0.75rem,1.5vw,0.82rem); color: var(--muted); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; transition: all 0.3s ease;
}
.project-desc.expanded {
  display: block; -webkit-line-clamp: unset; overflow: visible;
}
.read-more-btn {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 0.45rem; font-size: 0.72rem; font-weight: 600;
  color: var(--gold); background: none; border: none; padding: 0;
  cursor: pointer; letter-spacing: 0.04em; transition: opacity 0.2s ease;
}
.read-more-btn:hover { opacity: 0.7; }
.read-more-btn svg { transition: transform 0.25s ease; flex-shrink: 0; }
.read-more-btn.expanded svg { transform: rotate(180deg); }
.project-footer { display: flex; justify-content: flex-end; padding: 0 clamp(0.9rem,2vw,1.5rem) clamp(0.8rem,2vw,1.2rem); }
.project-link   { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--gold); font-weight: 500; transition: gap var(--ease); }
.project-link:hover { gap: 10px; }

/* ── 15. Contact ── */
#contact { padding: clamp(60px,10vw,120px) var(--px); }
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2.5rem,6vw,5rem); align-items: start; }

.contact-info h3 { font-family: var(--fh); font-size: clamp(1.4rem,3.5vw,2.2rem); font-weight: 700; margin-bottom: 0.8rem; }
.contact-info p  { font-size: 0.875rem; color: var(--muted); margin-bottom: 2rem; line-height: 1.8; }

.contact-item { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.contact-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: var(--gold);
  transition: var(--ease);
}
.contact-item:hover .contact-icon { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.contact-icon [data-icon] svg,
.contact-icon svg { width: 17px; height: 17px; fill: currentColor; }
.contact-detail       { font-size: 0.85rem; color: var(--white); min-width: 0; word-break: break-all; }
.contact-detail small { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 1px; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row     { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group   { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color var(--ease); }
.form-group:focus-within label { color: var(--gold); }
.form-control {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-family: var(--fb); font-size: 0.875rem; color: var(--white);
  outline: none; resize: none; width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus        { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,0.1); }
textarea.form-control      { min-height: 140px; }

/* ── 16. Footer ── */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: clamp(1.5rem,4vw,2.5rem) var(--px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; position: relative; z-index: 1;
}
.footer-logo    { font-family: var(--fh); font-size: 1.05rem; color: var(--gold); }
.footer-copy    { font-size: 0.75rem; color: var(--muted); }
.footer-socials { display: flex; gap: 0.6rem; }

/* ── 17. Back to Top ── */
#back-top {
  position: fixed; bottom: 20px; right: 20px;
  width: 44px; height: 44px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); cursor: pointer; z-index: 50;
  opacity: 0; pointer-events: none; transform: translateY(10px); transition: var(--ease);
}
#back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
#back-top:hover { background: var(--gold); color: var(--bg); transform: translateY(-3px); }
#back-top [data-icon] svg,
#back-top svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* Buttons with icons */
.btn-primary [data-icon],
.btn-secondary [data-icon] { display: contents; }
.btn-primary [data-icon] svg,
.btn-secondary [data-icon] svg { width: 15px; height: 15px; }

/* ── 18. Responsive Breakpoints ── */
@media (min-width: 901px) and (max-width: 1100px) {
  .hero-image-wrap { width: 280px; height: 280px; }
  #home { gap: 2.5rem; }
}
@media (max-width: 900px) {
  :root { --nav-h: 62px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  #home { flex-direction: column-reverse; text-align: center; padding-top: calc(var(--nav-h) + 32px); gap: 2.5rem; }
  .hero-text { max-width: 100%; }
  .hero-greeting, .hero-actions, .social-row, .scroll-hint { justify-content: center; margin-left: auto; margin-right: auto; }
  .hero-quote { text-align: left; }
  .hero-image-wrap { width: clamp(180px,50vw,260px); height: clamp(180px,50vw,260px); margin: 0 auto; }
  .hero-badge     { right: -8px; bottom: 10px; }
  .hero-badge-top { left: -8px; }
  #about { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img-wrap  { max-width: 340px; margin: 0 auto; }
  .about-float-tag { left: -10px; }
  .projects-grid   { grid-template-columns: 1fr; }
  .project-card-featured { grid-column: auto; }
  .contact-wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  footer { justify-content: center; text-align: center; }
  .footer-copy { order: 3; width: 100%; text-align: center; }
  .timeline::before { left: 14px; }
  .timeline-item  { padding-left: 48px; }
  .timeline-dot   { left: 6px; }
}
@media (max-width: 768px) {
  .hero-image-wrap { width: clamp(160px,48vw,240px); height: clamp(160px,48vw,240px); }
}
@media (max-width: 640px) {
  .hero-image-wrap { width: clamp(150px,55vw,210px); height: clamp(150px,55vw,210px); }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: 1 / -1; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; align-items: center; }
  .about-float-tag { display: none; }
}
@media (max-width: 480px) {
  :root { --nav-h: 58px; }
  .hero-image-wrap { width: clamp(140px,62vw,195px); height: clamp(140px,62vw,195px); }
  .hero-img-ring   { inset: -9px; }
  .hero-img-ring-2 { inset: -18px; }
  .hero-badge      { right: -4px; padding: 7px 11px; }
  .hero-badge-top  { display: none; }
  .hero-actions    { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .about-stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .project-thumb, .project-thumb-placeholder { height: 160px !important; }
  .project-hover-overlay { height: 160px !important; }
  #back-top { bottom: 14px; right: 14px; width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  :root { --px: 0.9rem; }
  .hero-name { font-size: 2.2rem; }
  .hero-image-wrap { width: 140px; height: 140px; }
  .hero-img-ring   { inset: -8px; }
  .hero-img-ring-2 { inset: -16px; }
  .skill-pill { padding: 6px 12px; font-size: 0.72rem; }
  .project-thumb, .project-thumb-placeholder { height: 140px !important; }
  .project-hover-overlay { height: 140px !important; }
}
@media (min-width: 1400px) {
  :root { --px: 6%; }
  section { max-width: 1320px; }
}
