@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #021C35;
  --bg-card: #112C47;
  --bg-card-hover: #163455;
  --text: #ffffff;
  --text-muted: #a0b0c0;
  --accent: #9766EF;
  --accent-secondary: #1EA5CB;
  --accent-dim: rgba(151, 102, 239, 0.15);
  --border: rgba(255, 255, 255, 0.1);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'Outfit', system-ui, sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, var(--bg), transparent);
  transition: background 0.4s;
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: 1px;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Mobile nav overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  transition: right 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 999;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}

/* ── Page wrapper ── */

.page {
  min-height: 100vh;
  padding-top: 80px;
}

/* ── Hero ── */

.hero {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 0 10%;
  position: relative;
  background: linear-gradient(rgba(2, 28, 53, 0.7), rgba(2, 28, 53, 0.7)), url('img/bg-lines.svg');
  background-size: cover;
}

.hero-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
  filter: brightness(94%) saturate(0%);
  flex-shrink: 0;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero h1 .gradient-text {
  background: linear-gradient(to right, #9766EF, #1EA5CB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-links {
  display: flex;
  gap: 1.2rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 10%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
}

.hero-scroll .line {
  width: 40px;
  height: 1px;
  background: var(--text-muted);
}

/* ── Section commons ── */

.section {
  padding: 6rem 10%;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 3rem;
  line-height: 1.2;
}

/* ── Project cards ── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.4s;
  cursor: pointer;
  position: relative;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(151, 102, 239, 0.3);
  background: var(--bg-card-hover);
}

.project-card-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.project-card-image .placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s ease;
}

.project-card:hover .project-card-image img {
  transform: scale(1.03);
}

.project-card-body {
  padding: 1.5rem;
}

.project-card-type {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.project-card-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.project-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-card-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 2px;
  letter-spacing: 0.5px;
}

.project-card-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.project-card-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  transition: color 0.3s;
}

.project-card-links a:hover {
  color: var(--accent);
}

/* ── Timeline ── */

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-3.5px);
}

.timeline-date {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: none;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.timeline-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ── Skills ── */

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-chip {
  padding: 0.5rem 1.5rem;
  background: white;
  border: none;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #333;
  transition: all 0.2s;
  cursor: default;
}

.skill-chip:hover {
  transform: scale(1.1);
  background: #88ccff;
}

.skills-section {
  background: linear-gradient(225deg, #FF3CAC 0%, #784BA0 50%, #2B86C5 100%);
  padding: 6rem 10%;
}

.skills-section .section-label,
.skills-section .section-title {
  color: white;
}

/* ── YouTube section ── */

.yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.yt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  transition: all 0.3s;
}

.yt-card:hover {
  border-color: rgba(151, 102, 239, 0.3);
  transform: translateY(-2px);
}

.yt-card-icon {
  color: #ff4444;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.yt-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.yt-card-title a {
  color: var(--text);
}

.yt-card-title a:hover {
  color: var(--accent);
}

/* ── Contact / Footer ── */

.footer {
  padding: 4rem 10%;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* ── Education ── */

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
}

.education-card h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.education-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.education-card .award {
  margin-top: 0.8rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ── Animations ── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── WordPress badge ── */

.wp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  background: rgba(33, 150, 243, 0.1);
  color: #64b5f6;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .yt-grid {
    grid-template-columns: 1fr;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 6%;
  }

  .hero {
    padding: 0 6%;
  }

  .footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    padding: 3rem 6%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding-top: 2rem;
  }

  .hero-photo {
    width: 200px;
    height: 200px;
  }

  .hero-content {
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .hero-sub {
    font-size: 1rem;
  }

  .hero-scroll {
    left: 50%;
    transform: translateX(-50%);
  }

  .project-card-image {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 0 5%;
  }

  .section {
    padding: 3rem 5%;
  }

  .hero-links {
    flex-direction: column;
  }

  .hero-links a {
    justify-content: center;
  }

  .timeline {
    padding-left: 2rem;
  }

  .timeline-item::before {
    left: -2rem;
  }
}
