/* ===================================================
   JEFFY BRAILIN — PORTFOLIO
   Inspired by: safak/next-animated-portfolio
   =================================================== */

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0d;
  --bg2: #111827;
  --cream: #f0e6d3;
  --muted: #9ca3af;
  --accent: #8b5cf6;
  --accent2: #06b6d4;
  --accent3: #f59e0b;
  --border: rgba(255,255,255,0.07);
  --font-sans: 'DM Sans', sans-serif;
  --font-serif: 'DM Serif Display', serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--cream);
  overflow: hidden;
  cursor: default;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 72px;
  transition: background 0.4s;
}

.nav-logo { }
.logo-link {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: border-color 0.3s, background 0.3s;
}
.logo-link:hover { border-color: var(--accent); background: rgba(139,92,246,0.1); }

.nav-social {
  display: flex; gap: 28px;
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.04em;
}
.nav-social a:hover { color: var(--cream); }

.hamburger {
  display: flex; flex-direction: column; justify-content: center;
  gap: 7px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px;
  position: relative; z-index: 600;
}
.hamburger span {
  display: block; width: 100%; height: 1.5px;
  background: var(--cream);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.77,0,0.175,1);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(3px, 6px); }
.hamburger.open span:nth-child(2) { transform: rotate(-45deg) translate(3px, -6px); }

/* ============================================================
   MENU OVERLAY
============================================================ */
.menu-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: #111;
  display: flex; align-items: center; justify-content: center;
  clip-path: circle(0% at calc(100% - 60px) 36px);
  transition: clip-path 0.6s cubic-bezier(0.77,0,0.175,1);
  pointer-events: none;
}
.menu-overlay.open {
  clip-path: circle(150% at calc(100% - 60px) 36px);
  pointer-events: all;
}

.menu-inner {
  width: 100%; max-width: 1200px; padding: 0 48px;
  display: flex; flex-direction: column; gap: 60px;
}

.menu-nav { display: flex; flex-direction: column; gap: 4px; }
.menu-link {
  display: flex; align-items: baseline; gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.3s;
  overflow: hidden;
}
.menu-link:last-child { border-bottom: none; }
.menu-link:hover { color: var(--cream); }
.menu-num {
  font-family: var(--font-sans); font-size: 13px; color: var(--accent);
  min-width: 28px;
}
.menu-text {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.77,0,0.175,1);
}
.menu-overlay.open .menu-text { transform: translateY(0); }
.menu-link:nth-child(1) .menu-text { transition-delay: 0.05s; }
.menu-link:nth-child(2) .menu-text { transition-delay: 0.1s; }
.menu-link:nth-child(3) .menu-text { transition-delay: 0.15s; }
.menu-link:nth-child(4) .menu-text { transition-delay: 0.2s; }
.menu-link:nth-child(5) .menu-text { transition-delay: 0.25s; }

.menu-footer {
  display: flex; gap: 32px;
  font-size: 14px; color: var(--muted);
}
.menu-footer a:hover { color: var(--cream); }

/* ============================================================
   PAGE TRANSITIONS
============================================================ */
.transition-layer {
  position: fixed; inset: 0; z-index: 300;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.layer-1 { background: #7c3aed; }
.layer-2 { background: #6d28d9; transition-delay: 0.05s; }
.layer-3 { background: #0d0d0d; transition-delay: 0.1s; }

.transitioning .transition-layer {
  transform: scaleX(1);
  transition: transform 0.35s cubic-bezier(0.77,0,0.175,1);
}
.transitioning.transition-out .transition-layer {
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(0.77,0,0.175,1);
}

/* ============================================================
   PAGES
============================================================ */
.pages-wrap {
  position: fixed; inset: 0; top: 72px;
  overflow: hidden;
}

.page {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow-y: auto;
  overflow-x: hidden;
}
.page.active {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}

.page-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 40px 48px 80px;
  min-height: 100%;
}

/* ============================================================
   HOME PAGE
============================================================ */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%; height: calc(100vh - 72px);
  overflow: hidden;
}

.home-left {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 48px 0 60px;
  position: relative;
}

.home-subtitle {
  font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.home-subtitle::before {
  content: ''; display: block; width: 30px; height: 1px; background: var(--accent);
}

.home-name {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.0;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--cream) 0%, rgba(240,230,211,0.7) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.home-cta { display: flex; gap: 16px; margin-bottom: 48px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 50px;
  background: var(--accent);
  color: #fff; font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}
.btn-primary:hover { background: #7c3aed; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(139,92,246,0.4); }

.btn-ghost {
  display: inline-flex; align-items: center;
  padding: 14px 28px; border-radius: 50px;
  border: 1px solid var(--border);
  color: var(--cream); font-size: 14px; font-weight: 500;
  transition: border-color 0.3s, transform 0.2s, background 0.3s;
}
.btn-ghost:hover { border-color: var(--cream); transform: translateY(-2px); background: rgba(255,255,255,0.04); }

.home-socials {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.home-socials a {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted);
  transition: color 0.3s;
}
.home-socials a:hover { color: var(--cream); }


/* Hero Right */
.home-right {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a0015 0%, #0d0d20 50%, #000a1a 100%);
  display: flex; align-items: center; justify-content: center;
}
.home-right::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139,92,246,0.15) 0%, transparent 65%);
}

.hero-canvas-wrap { position: relative; width: 400px; height: 400px; z-index: 1; }

.hero-blob-container { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.hero-blob {
  position: absolute; width: 340px; height: 340px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(6,182,212,0.2));
  animation: morphBlob 8s ease-in-out infinite;
  filter: blur(2px);
}
@keyframes morphBlob {
  0%,100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg) scale(1); }
  25% { border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%; transform: rotate(90deg) scale(1.05); }
  50% { border-radius: 70% 30% 50% 50% / 30% 50% 70% 50%; transform: rotate(180deg) scale(0.95); }
  75% { border-radius: 30% 70% 30% 70% / 70% 30% 70% 30%; transform: rotate(270deg) scale(1.02); }
}

.hero-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.h-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(139,92,246,0.2);
  animation: spinRing 12s linear infinite;
}
.r1 { width: 360px; height: 360px; border-style: dashed; animation-duration: 20s; }
.r2 { width: 280px; height: 280px; border-color: rgba(6,182,212,0.15); animation-direction: reverse; animation-duration: 15s; }
.r3 { width: 200px; height: 200px; border-style: dotted; animation-duration: 10s; border-color: rgba(168,85,247,0.25); }
@keyframes spinRing { to { transform: rotate(360deg); } }

.hero-profile {
  position: relative; z-index: 2;
  width: 170px; height: 170px; border-radius: 50%;
  border: 2px solid rgba(139,92,246,0.5);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(139,92,246,0.3);
}
.hero-avatar { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-initials {
  width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2.5rem; color: #fff;
}

.hero-floating-chips { position: absolute; inset: 0; }
.chip {
  position: absolute; padding: 6px 14px; border-radius: 50px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  background: rgba(13,13,13,0.85); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px); color: var(--cream);
  white-space: nowrap;
}
.chip-1 { top: 20px; left: 30px; animation: chipFloat 3s ease-in-out infinite; border-color: rgba(139,92,246,0.4); color: #a78bfa; }
.chip-2 { top: 40px; right: 20px; animation: chipFloat 3.5s ease-in-out infinite 0.5s; border-color: rgba(6,182,212,0.4); color: #67e8f9; }
.chip-3 { bottom: 60px; left: 20px; animation: chipFloat 4s ease-in-out infinite 1s; border-color: rgba(168,85,247,0.4); color: #d8b4fe; }
.chip-4 { bottom: 40px; right: 30px; animation: chipFloat 3.2s ease-in-out infinite 0.3s; border-color: rgba(245,158,11,0.4); color: #fcd34d; }
@keyframes chipFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* Skills marquee row */
.skills-row {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 56px;
  border-top: 1px solid var(--border);
  overflow: hidden; display: flex; align-items: center;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
}
.skills-row-inner { width: 100%; overflow: hidden; }
.skills-marquee {
  display: inline-flex; gap: 24px; white-space: nowrap;
  animation: marquee 35s linear infinite;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.skills-marquee span:nth-child(odd) { color: var(--muted); }
.skills-marquee span:nth-child(even) { color: rgba(139,92,246,0.5); }
@keyframes marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ============================================================
   ABOUT PAGE
============================================================ */
.about-layout {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 80px; align-items: start;
  min-height: calc(100vh - 200px);
}

.about-left { position: sticky; top: 20px; }
.about-svg-wrap { position: relative; display: flex; justify-content: center; }
.about-img { width: 100%; max-width: 280px; filter: drop-shadow(0 0 30px rgba(139,92,246,0.5)); border-radius: 10px; object-fit: contain; }
.svg-path { fill: none; stroke-linecap: round; }
.body-path, .neck-path, .torso-path { animation: svgPulse 3s ease-in-out infinite alternate; }
@keyframes svgPulse { from{filter:drop-shadow(0 0 4px rgba(99,102,241,0.4))} to{filter:drop-shadow(0 0 12px rgba(99,102,241,0.7))} }
.about-scroll-line { position: absolute; left: 50%; top: 0; width: 2px; height: 100%; opacity: 0.3; }
.scroll-line-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: drawLine 2s ease forwards 0.5s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.about-right { padding-top: 20px; }
.about-desc {
  font-size: 1.15rem; line-height: 1.9; color: rgba(240,230,211,0.75);
  margin-bottom: 24px;
  font-weight: 400;
}
.about-desc strong {
  color: var(--cream);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, var(--cream) 40%, #d8b4fe 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.about-exp { margin: 32px 0; border-left: 2px solid var(--accent); padding-left: 20px; }
.exp-item { display: flex; flex-direction: column; gap: 4px; }
.exp-tag { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.exp-item strong { font-size: 0.95rem; color: var(--cream); }
.exp-date { font-size: 12px; color: var(--muted); font-family: var(--font-sans); }

.skills-title {
  font-family: var(--font-serif); font-size: 1.4rem; margin-bottom: 24px; color: var(--cream);
}
.skill-item { margin-bottom: 18px; }
.skill-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.skill-pct { color: var(--accent); font-weight: 600; }
.skill-track { height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.skill-prog { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }

/* ============================================================
   PORTFOLIO PAGE
============================================================ */
.port-header { margin-bottom: 48px; }
.port-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400; margin-bottom: 12px;
}
.port-sub { font-size: 14px; color: var(--muted); }

.projects-list { display: flex; flex-direction: column; gap: 2px; }
.proj-item {
  display: grid; grid-template-columns: 200px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  margin-bottom: 16px;
}
.proj-item:hover { border-color: rgba(139,92,246,0.4); transform: translateX(4px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }

.proj-visual {
  background: #0a0a14;
  display: flex; align-items: center; justify-content: center;
  min-height: 160px; position: relative; overflow: hidden;
  border-right: 1px solid var(--border);
}

.proj-info { padding: 24px 28px; display: flex; flex-direction: column; gap: 10px; }

.proj-tags-row { display: flex; gap: 8px; flex-wrap: wrap; }
.proj-tag {
  font-size: 10px; padding: 3px 12px; border-radius: 50px;
  border: 1px solid var(--border); color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.proj-tag.featured { border-color: rgba(245,158,11,0.4); color: #fcd34d; background: rgba(245,158,11,0.08); }

.proj-name { font-family: var(--font-serif); font-size: 1.3rem; color: var(--cream); }
.proj-desc { font-size: 0.88rem; line-height: 1.7; color: var(--muted); flex: 1; }
.proj-stack { font-size: 11px; color: rgba(139,92,246,0.8); letter-spacing: 0.05em; }
.proj-link {
  color: var(--accent); font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.2s, color 0.2s; width: fit-content;
}
.proj-link:hover { gap: 10px; color: #a78bfa; }

/* Project GFX */
.proj-gfx { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.gfx-sso { }
.gfx-center {
  font-family: var(--font-serif); font-size: 1.2rem;
  color: var(--accent); letter-spacing: 0.2em; z-index: 2;
}
.gfx-orbit { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,0.08); }
.o1 { width: 80px; height: 80px; animation: orb 4s linear infinite; display: flex; }
.o2 { width: 120px; height: 120px; animation: orb 7s linear infinite reverse; display: flex; }
@keyframes orb { to { transform: rotate(360deg); } }
.gfx-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: -4px; align-self: flex-start; }

.gfx-agents { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; }
.agent-n {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.3);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  animation: agentPulse 2s ease-in-out infinite;
}
.n2 { animation-delay: 0.5s; } .n3 { animation-delay: 1s; } .n4 { animation-delay: 1.5s; }
@keyframes agentPulse { 0%,100%{box-shadow:none} 50%{box-shadow:0 0 12px rgba(139,92,246,0.4)} }

.gfx-quantum { position: relative; display: flex; align-items: center; justify-content: center; }
.q-circle { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle,rgba(6,182,212,0.5),rgba(6,182,212,0.1)); border: 2px solid var(--accent2); box-shadow: 0 0 24px rgba(6,182,212,0.4); }
.q-ring { position: absolute; width: 100px; height: 100px; border-radius: 50%; border: 1px dashed rgba(6,182,212,0.4); animation: spinRing 5s linear infinite; }
.q-label { position: absolute; font-size: 16px; color: var(--accent2); font-family: 'Georgia',serif; bottom: 20px; right: 30px; }

.gfx-fraud { flex-direction: column; gap: 8px; }
.fraud-bars-mini { display: flex; gap: 5px; align-items: flex-end; height: 70px; }
.fb { width: 14px; border-radius: 3px 3px 0 0; background: rgba(139,92,246,0.4); }
.fb.danger { background: rgba(239,68,68,0.7); animation: dangerPulse 1.5s infinite; }
@keyframes dangerPulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.fraud-label { font-size: 10px; color: #ef4444; letter-spacing: 0.15em; font-weight: 700; }

.gfx-credit { position: relative; display: flex; align-items: center; justify-content: center; }
.score-text { position: absolute; font-family: var(--font-serif); font-size: 1.5rem; color: #10b981; }

.gfx-chatbot { flex-direction: column; gap: 8px; padding: 16px; align-items: stretch; }
.chat-b { padding: 7px 12px; border-radius: 12px; font-size: 10px; max-width: 85%; }
.bot-b { background: rgba(139,92,246,0.15); border: 1px solid rgba(139,92,246,0.25); align-self: flex-start; }
.user-b { background: rgba(6,182,212,0.12); border: 1px solid rgba(6,182,212,0.2); align-self: flex-end; }

/* ============================================================
   CONTACT PAGE
============================================================ */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
  min-height: calc(100vh - 200px);
}

.contact-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 28px;
}
.contact-title em { font-style: italic; color: var(--accent); }

.contact-typed-wrap {
  font-size: 1rem; color: var(--muted); margin-bottom: 40px;
  min-height: 28px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.contact-typed-word { color: var(--accent2); font-weight: 600; }
.contact-caret { animation: caBlink 0.8s infinite; color: var(--accent); }
@keyframes caBlink { 0%,100%{opacity:1} 50%{opacity:0} }

.contact-info-list { display: flex; flex-direction: column; gap: 14px; }
.ci-item {
  display: flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--muted);
  padding: 12px 0; border-bottom: 1px solid var(--border);
  transition: color 0.3s;
}
.ci-item:last-child { border-bottom: none; }
.ci-item:not(div):hover { color: var(--cream); }
.ci-icon { font-size: 1.1rem; }

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { }
.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  color: var(--cream); font-family: var(--font-sans); font-size: 14px;
  transition: border-color 0.3s, box-shadow 0.3s; outline: none;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(156,163,175,0.5); }

.btn-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 32px; border-radius: 50px; border: none;
  background: var(--accent); color: #fff;
  font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
  width: 100%;
}
.btn-send:hover { background: #7c3aed; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(139,92,246,0.4); }

.form-success {
  display: none; text-align: center; padding: 12px; border-radius: 8px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80; font-size: 13px;
}

/* ============================================================
   PAGE INDICATOR DOTS
============================================================ */
.page-dots {
  position: fixed; right: 28px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; z-index: 200;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.2); border: none; cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.dot.active { background: var(--accent); transform: scale(1.4); }
.dot:hover { background: var(--cream); }

/* ============================================================
   SCROLL DOWN ARROW
============================================================ */
.scroll-arrow {
  position: fixed; bottom: 32px; right: 32px;
  z-index: 200;
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.35);
  color: var(--accent);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  animation: arrowBounce 2s ease-in-out infinite;
  transition: background 0.3s, border-color 0.3s, opacity 0.3s, color 0.3s;
  backdrop-filter: blur(6px);
}
.scroll-arrow:hover {
  background: rgba(139,92,246,0.28);
  border-color: var(--accent);
  color: #fff;
}
.scroll-arrow.hidden { opacity: 0; pointer-events: none; }
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1024px) {
  .home-layout { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 72px); padding-bottom: 60px; }
  .home-right { display: flex; min-height: 450px; padding: 40px 0; }
  .home-left { padding: 60px 48px; text-align: center; align-items: center; }
  .home-subtitle { justify-content: center; }
  .home-socials { justify-content: center; }
  .home-scroll-hint { display: none; }
  .hero-canvas-wrap { transform: scale(0.9); }
  
  .about-layout { grid-template-columns: 1fr; gap: 40px; min-height: auto; }
  .about-left { position: static; display: flex; justify-content: center; }
  
  .contact-layout { grid-template-columns: 1fr; gap: 40px; min-height: auto; }
  .contact-left { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .contact-typed-wrap { justify-content: center; }
  .ci-item { justify-content: center; }
  
  .proj-item { grid-template-columns: 200px 1fr; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 24px; height: 60px; }
  .pages-wrap { top: 60px; }
  .nav-social { display: none; }
  
  .page-inner { padding: 28px 24px 80px; }
  .home-left { padding: 40px 24px 20px; }
  .home-name { font-size: clamp(2.8rem, 8vw, 4rem); margin-bottom: 24px; }
  .home-cta { flex-direction: column; width: 100%; gap: 12px; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  
  .home-right { min-height: 350px; padding: 0 0 20px; }
  .hero-canvas-wrap { transform: scale(0.7); width: 320px; height: 320px; }
  
  .proj-item { grid-template-columns: 1fr; }
  .proj-visual { min-height: 160px; border-right: none; border-bottom: 1px solid var(--border); }
  .proj-info { padding: 20px; }
  
  .form-row { grid-template-columns: 1fr; }
  .menu-inner { padding: 0 24px; gap: 30px; }
  .menu-text { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .menu-footer { flex-direction: column; align-items: center; gap: 16px; }
  .page-dots { display: none; }
  
  .contact-title { font-size: clamp(2.5rem, 8vw, 3.5rem); text-align: center; }
  .port-title { font-size: clamp(2.2rem, 8vw, 3rem); text-align: center; }
  .port-sub { text-align: center; }
}

@media (max-width: 480px) {
  .hero-canvas-wrap { transform: scale(0.55); width: 280px; height: 280px; }
  .home-right { min-height: 280px; }
  .home-left { padding: 20px 20px 10px; }
  .home-name { font-size: clamp(2.2rem, 10vw, 3rem); }
  .home-subtitle { font-size: 10px; }
  .about-img { max-width: 220px; }
  .skills-marquee { font-size: 10px; }
}

/* ============================================================
   CERTIFICATIONS PAGE
============================================================ */
.page-certifications .page-inner { padding-top: 48px; }

.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cert-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.3s, box-shadow 0.35s;
  cursor: default;
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

/* Brand-specific hover borders */
.cert-card:not([class*='cert-aws']):not([class*='cert-ms']):not([class*='cert-gcp']):not([class*='cert-rh']):hover { border-color: rgba(99,102,241,0.5); }
.cert-card.cert-aws:hover { border-color: rgba(255,153,0,0.5); }
.cert-card.cert-ms:hover  { border-color: rgba(0,164,239,0.5); }
.cert-card.cert-gcp:hover { border-color: rgba(66,133,244,0.5); }
.cert-card.cert-rh:hover  { border-color: rgba(238,0,0,0.5); }

/* Glow blob in the bottom-right corner */
.cert-glow {
  position: absolute; bottom: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none; filter: blur(40px);
  background: rgba(99,102,241,0.4);
}
.cert-card:hover .cert-glow { opacity: 1; }
.cert-glow-aws { background: rgba(255,153,0,0.45); }
.cert-glow-ms  { background: rgba(0,164,239,0.35); }
.cert-glow-gcp { background: rgba(66,133,244,0.35); }
.cert-glow-rh  { background: rgba(238,0,0,0.35); }

/* Top row: logo + year */
.cert-badge {
  display: flex; align-items: center; justify-content: space-between;
}

.cert-logo {
  display: flex; align-items: center; justify-content: center;
  min-width: 52px; height: 40px;
  border-radius: 10px;
  font-weight: 800; font-size: 14px; letter-spacing: 0.05em;
}

/* Brand logo backgrounds */
.aws-logo { background: transparent; }
.ibm-logo { background: #1F70C1; color: #fff; font-size: 16px; width: 52px; }
.ms-logo  { background: transparent; width: 40px; height: 40px; }
.gcp-logo { background: transparent; width: 36px; height: 36px; }
.rh-logo  { background: #EE0000; color: #fff; font-size: 14px; width: 44px; height: 40px; border-radius: 8px; }

.cert-year {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 4px 10px; border-radius: 50px;
  border: 1px solid var(--border);
}

/* Bottom info */
.cert-info { display: flex; flex-direction: column; gap: 6px; }
.cert-name {
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 400;
  color: var(--cream); line-height: 1.35;
}
.cert-issuer {
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.03em;
}
.cert-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cert-tag {
  font-size: 10px; padding: 3px 10px; border-radius: 50px;
  border: 1px solid var(--border); color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(255,255,255,0.03);
}

/* AWS card special top accent bar */
.cert-card.cert-aws::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #FF9900, #FFB84D);
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .certs-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cert-card { padding: 18px 18px; }
  .cert-name { font-size: 0.95rem; }
}