/* =====================================================
   Mario Nagy Portfolio - style.css
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Fira+Code:wght@400;500&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #0f0f1e;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --text-primary: #f0f0ff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(124, 58, 237, 0.4);
  --gradient: linear-gradient(135deg, #7c3aed, #06b6d4);
  --gradient-hero: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(124,58,237,0.35) 0%, transparent 70%);
  --font-main: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-secondary); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ---- Selection ---- */
::selection { background: var(--accent); color: #fff; }

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

/* ---- Navbar ---- */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}
#navbar.scrolled {
  background: rgba(10, 10, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none !important;
}
.nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 8px 14px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 14px; right: 14px;
  height: 1.5px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  border-radius: 2px;
}
.nav-link:hover { color: var(--text-primary) !important; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28240,240,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; }
.navbar-toggler { border-color: var(--border) !important; }

/* ---- Hero ---- */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  background: var(--bg-primary);
  overflow: hidden;
}
.hero-gradient {
  position: absolute; inset: 0; z-index: 0;
  background: var(--gradient-hero);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-2);
  background: rgba(6,182,212,0.08);
  margin-bottom: 28px;
  animation: fadeInDown 0.8s ease forwards;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 1.8s ease-in-out infinite;
}
.hero-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  background: linear-gradient(160deg, #ffffff 0%, #a78bfa 60%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.9s ease 0.2s forwards; opacity: 0;
}
.hero-title-wrap {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fadeInUp 0.9s ease 0.4s forwards; opacity: 0;
}
.hero-title-wrap .cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--accent-2);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 0.9s infinite;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px; margin: 0 auto 40px;
  animation: fadeInUp 0.9s ease 0.6s forwards; opacity: 0;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 0.9s ease 0.8s forwards; opacity: 0;
}
.hero-scroll-hint {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.5px;
  animation: bounce 2.5s ease-in-out infinite 1.5s;
}
.hero-scroll-hint svg { opacity: 0.5; }

/* ---- Buttons ---- */
.btn-primary-custom {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: none; cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 0 32px var(--accent-glow);
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 48px var(--accent-glow);
  color: #fff;
}
.btn-outline-custom {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  border-radius: 100px;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.btn-outline-custom:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(124,58,237,0.1);
  transform: translateY(-2px);
}

/* ---- Section Base ---- */
section { padding: 100px 0; position: relative; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 56px;
}

/* ---- Glass Card ---- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.glass-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.glass-card:hover::before { opacity: 1; }

/* ---- About Section ---- */
#about { background: var(--bg-secondary); }
.about-stat-box {
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.about-stat-box:hover { border-color: var(--border-accent); transform: translateY(-3px); }
.stat-value {
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: block; line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; letter-spacing: 0.5px; }

/* ---- Skills Section ---- */
#skills .skill-category-title {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.skill-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
  margin: 4px;
}
.skill-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(124,58,237,0.12);
  transform: translateY(-2px);
}
.skill-icon-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

/* ---- Experience Section ---- */
#experience { background: var(--bg-secondary); }
.exp-timeline {
  position: relative;
  padding-left: 40px;
}
.exp-timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2), transparent);
  border-radius: 2px;
}
.exp-item {
  position: relative;
  margin-bottom: 40px;
}
.exp-item::before {
  content: '';
  position: absolute;
  left: -46px; top: 8px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 16px var(--accent-glow);
}
.exp-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-2);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
}
.exp-company { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.exp-role { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.exp-desc { font-size: 0.92rem; color: var(--text-secondary); }
.exp-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 3px 2px 0;
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  border: 1px solid rgba(124,58,237,0.25);
}

/* ---- Projects Section ---- */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.project-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.project-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.project-card:hover::after { transform: scaleX(1); }
.project-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}
.project-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.project-desc { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 20px; }
.project-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 3px 2px 0;
  background: rgba(6,182,212,0.1);
  color: #67e8f9;
  border: 1px solid rgba(6,182,212,0.2);
}

/* ---- Education Section ---- */
#education { background: var(--bg-secondary); }
.edu-card { display: flex; gap: 24px; align-items: flex-start; }
.edu-icon {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 14px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.edu-degree { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.edu-school { font-size: 0.9rem; color: var(--accent-2); margin-bottom: 4px; font-weight: 500; }
.edu-period { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.edu-grade {
  display: inline-block; margin-top: 8px;
  padding: 3px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(124,58,237,0.15);
  color: #c4b5fd;
  border: 1px solid rgba(124,58,237,0.3);
}

/* ---- Contact Section ---- */
.contact-link {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 12px;
}
.contact-link:hover {
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateX(6px);
  background: var(--bg-card-hover);
}
.contact-link-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 10px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-link-arrow { margin-left: auto; opacity: 0.4; transition: var(--transition); }
.contact-link:hover .contact-link-arrow { opacity: 1; transform: translateX(4px); }

/* ---- Footer ---- */
footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
footer strong { color: var(--text-secondary); }

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

/* ---- Animations ---- */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- Responsive Tweaks ---- */
@media (max-width: 768px) {
  .exp-timeline { padding-left: 28px; }
  .exp-item::before { left: -34px; }
  section { padding: 70px 0; }
  .edu-card { flex-direction: column; gap: 14px; }
}
