/* ─────────────────────────────────────────
   JAMES FRANCIS O. ROSAS — PORTFOLIO CSS
   ───────────────────────────────────────── */

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

:root {
  --bg:         #070b14;
  --bg-2:       #0c1220;
  --bg-card:    rgba(255,255,255,0.04);
  --border:     rgba(255,255,255,0.08);
  --accent:     #00d4ff;
  --accent-2:   #7c3aed;
  --accent-3:   #f59e0b;
  --text:       #e8eaf0;
  --text-muted: #8892a4;
  --grad-1:     linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  --grad-2:     linear-gradient(135deg, #7c3aed 0%, #f59e0b 100%);
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 20px 60px rgba(0,0,0,0.5);
  --shadow-sm:  0 8px 24px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Cursor Glow ── */
.cursor-glow {
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: transform 0.05s linear;
}

/* ── Particle Canvas ── */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* ── Navigation ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
#navbar.scrolled {
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: 2px;
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  margin-left: auto;
}
.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: color 0.3s, background 0.3s;
}
.nav-link:hover { color: var(--accent); background: rgba(0,212,255,0.08); }
.nav-cta {
  background: var(--grad-1);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 2rem 4rem;
}
.hero-bg-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.shape-1 { width: 600px; height: 600px; background: rgba(0,212,255,0.07); top: -200px; left: -200px; }
.shape-2 { width: 500px; height: 500px; background: rgba(124,58,237,0.08); bottom: -100px; right: -100px; }
.shape-3 { width: 300px; height: 300px; background: rgba(245,158,11,0.05); top: 50%; left: 50%; transform: translate(-50%,-50%); }

.hero .container {
  display: flex;
  align-items: center;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-name {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 1.2rem;
}
.name-first {
  display: block;
  color: var(--text);
}
.name-last {
  display: block;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

/* Buttons */
.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}
.btn-primary {
  background: var(--grad-1);
  color: #fff;
  box-shadow: 0 0 30px rgba(0,212,255,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(0,212,255,0.5); }
.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  background: transparent;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,255,0.06); }

/* Stats */
.hero-stats { display: flex; align-items: center; gap: 2rem; }
.stat { text-align: center; }
.stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat > span:nth-child(2) {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { display: block; color: var(--text-muted); font-size: 0.8rem; margin-top: 0.2rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* Hero Image */
.hero-image-wrap {
  flex-shrink: 0;
  position: relative;
  width: 340px; height: 340px;
}
.hero-image-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--grad-1) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 12s linear infinite;
}
.ring-2 {
  inset: -28px;
  animation: spin 20s linear infinite reverse;
  border: 1px solid transparent;
  background: var(--grad-2) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.hero-image {
  width: 340px; height: 340px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  background-color: transparent;
  display: block;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 60px rgba(0,212,255,0.2);
  transform: scale(0.85);
}

/* Float Cards */
.hero-float-card {
  position: absolute;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}
.card-1 { top: 10%; right: -30px; animation-delay: 0s; }
.card-2 { bottom: 12%; left: -40px; animation-delay: 1.5s; }
.float-icon { font-size: 1.1rem; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: scrollBounce 1.6s ease-in-out infinite;
  margin: 0 auto;
}
.scroll-dot::before {
  content:'';
  display: block;
  width: 2px;
  height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  margin: 0 auto 6px;
  border-radius: 2px;
}
@keyframes scrollBounce { 0%,100%{transform:translateY(0); opacity:1} 50%{transform:translateY(6px); opacity:0.4} }

/* ── Sections ── */
.section {
  padding: 7rem 2rem;
  position: relative;
}
.section-label {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 3.5rem;
  color: var(--text);
}

/* Alternating section backgrounds */
.experience-section, .certs-section { background: var(--bg-2); }

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}
.about-text strong { color: var(--text); }
.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s;
}
.highlight-item:hover { border-color: var(--accent); }
.highlight-icon { font-size: 1.5rem; }
.highlight-item strong { display: block; font-size: 0.95rem; color: var(--text); }
.highlight-item span { font-size: 0.82rem; color: var(--text-muted); }

.about-contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.about-contact-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 1.2rem; }
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.contact-icon { font-size: 1.2rem; margin-top: 0.1rem; }
.contact-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-list a, .contact-list span {
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}
.contact-list a:hover { color: var(--accent); }

/* ── Timeline ── */
.timeline { position: relative; display: flex; flex-direction: column; gap: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
}
.timeline-item { display: flex; gap: 1.5rem; align-items: flex-start; }
.timeline-marker {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  z-index: 1;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.timeline-item:hover .timeline-marker { border-color: var(--accent); box-shadow: 0 0 20px rgba(0,212,255,0.2); }
.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: border-color 0.3s, transform 0.3s;
}
.timeline-card:hover { border-color: rgba(0,212,255,0.2); transform: translateY(-2px); }
.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.timeline-role {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.timeline-company { color: var(--accent); font-size: 0.9rem; font-weight: 500; }
.timeline-date {
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.25);
  color: #a78bfa;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  white-space: nowrap;
}
.timeline-location { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 1rem; }
.timeline-duties { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.timeline-duties li { display: flex; align-items: flex-start; gap: 0.6rem; color: var(--text-muted); font-size: 0.9rem; }
.timeline-duties li::before { content: '▸'; color: var(--accent); flex-shrink: 0; margin-top: 0.15rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  animation-delay: var(--delay);
}
.skill-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.skill-icon { font-size: 2rem; margin-bottom: 0.8rem; }
.skill-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 1rem; }
.skill-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}
.skill-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--grad-1);
  width: 0;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.skill-pct { font-size: 0.75rem; color: var(--text-muted); }

/* ── Education ── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: border-color 0.3s, transform 0.3s;
}
.edu-card:hover { border-color: rgba(124,58,237,0.4); transform: translateY(-4px); }
.edu-icon { font-size: 2.2rem; }
.edu-level {
  display: block;
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.3rem;
}
.edu-body h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.edu-body p { font-size: 0.82rem; color: var(--text-muted); }
.edu-date { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.4rem; }
.edu-degree-badge {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.3rem 0.9rem;
  background: var(--grad-1);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

/* ── Certifications ── */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: rgba(12,18,32,0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-1);
}
.cert-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-4px); }
.cert-ribbon { font-size: 2rem; margin-bottom: 0.8rem; display: block; }
.cert-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.6rem; line-height: 1.5; }
.cert-issuer { font-size: 0.82rem; color: var(--accent); margin-bottom: 0.5rem; }
.cert-date { font-size: 0.78rem; color: var(--text-muted); }
.cert-tag {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.2rem 0.7rem;
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--accent-3);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Contact Section ── */
.contact-intro { color: var(--text-muted); font-size: 1.05rem; max-width: 550px; margin-bottom: 3rem; }
.contact-cards { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.contact-card {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(0,212,255,0.1);
}
.cc-icon { font-size: 2rem; }
.cc-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem; }
.cc-value { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* ── Footer ── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  background: var(--grad-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
}
.footer-inner p { color: var(--text-muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent); }

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero .container { flex-direction: column-reverse; text-align: center; }
  .hero-content { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-tagline { margin: 0 auto 2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 27px; }
}
@media (max-width: 600px) {
  .hero-image-wrap { width: 260px; height: 260px; }
  .hero-image { width: 260px; height: 260px; }
  .hero-float-card { display: none; }
  .nav-links { display: none; }
  .timeline-header { flex-direction: column; }
  .contact-cards { flex-direction: column; }
}
