:root {
  --primary: #fafafa;
  --secondary: #1d1c20;
  --accent: #72ffff;
  --muted: #ccc;
  --gray-300: #ddd;
  --gray-500: #888;
  --gray-600: #666;
  --gray-700: #555;
  --gray-800: #404040;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration: 0.4s;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes navSlide {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(114, 255, 255, 0.08); }
  50% { box-shadow: 0 0 20px 1px rgba(114, 255, 255, 0.12); }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--primary);
  background: var(--secondary);
  background-image: radial-gradient(circle, #303030 1px, transparent 1px);
  background-size: 20px 20px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400&family=Montserrat:wght@400;700&display=swap');

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  margin-top: 1rem;
  animation: navSlide 0.5s var(--ease-out) forwards;
}

.nav-inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(29, 28, 32, 0.9);
  border: 1px solid var(--gray-800);
  border-radius: 40px;
  backdrop-filter: blur(12px);
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.nav-inner:hover {
  border-color: rgba(114, 255, 255, 0.2);
  box-shadow: 0 0 24px rgba(114, 255, 255, 0.06);
}

.nav a {
  padding: 0.5rem 1rem;
  color: var(--primary);
  text-decoration: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out), transform 0.2s var(--ease-out);
}

.nav a:hover {
  background: rgba(29, 28, 32, 0.5);
  color: var(--accent);
  transform: translateY(-1px);
}

.nav a.active {
  background: var(--primary);
  color: var(--secondary);
  transform: translateY(0);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--gray-700);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--gray-600);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  margin: 0 auto;
  transition: transform var(--duration) var(--ease-out), opacity var(--duration) var(--ease-out);
}

.nav-inner.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-inner.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-inner.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 6rem 0 4rem;
  scroll-margin-top: 5rem;
}

.card {
  background: linear-gradient(180deg, #202020, #181818);
  border: 1px solid var(--gray-800);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0 0 1px rgba(114, 255, 255, 0.08);
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.card:hover {
  border-color: rgba(114, 255, 255, 0.15);
  box-shadow: 0 0 0 1px rgba(114, 255, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .hero-card {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
  }
}

.hero-card.animate-in .hero-avatar {
  animation: fadeUp 0.6s var(--ease-out) forwards;
}

.hero-card.animate-in .hero-text h1 {
  animation: fadeUp 0.5s var(--ease-out) 0.1s both;
}

.hero-card.animate-in .hero-text .title {
  animation: fadeUp 0.5s var(--ease-out) 0.15s both;
}

.hero-card.animate-in .greeting {
  animation: fadeUp 0.5s var(--ease-out) 0.2s both;
}

.hero-card.animate-in .hero-text > p:not(.title):not(.greeting) {
  animation: fadeUp 0.5s var(--ease-out) 0.25s both;
}

.hero-card.animate-in .socials {
  animation: fadeUp 0.5s var(--ease-out) 0.35s both;
}

.hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  border: 2px solid var(--gray-700);
  flex-shrink: 0;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.hero-card:hover .hero-avatar {
  border-color: rgba(114, 255, 255, 0.3);
  box-shadow: 0 0 24px rgba(114, 255, 255, 0.15);
}

.hero-text h1 {
  font-family: Fredoka, sans-serif;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.hero-text .title {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.greeting {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-text p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.socials {
  display: flex;
  gap: 0.75rem;
}

.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gray-700);
  color: var(--primary);
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), transform 0.25s var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.socials a:hover {
  border-color: var(--accent);
  background: rgba(114, 255, 255, 0.12);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 16px rgba(114, 255, 255, 0.2);
}

.socials svg {
  width: 20px;
  height: 20px;
}

.connector-beam-wrap {
  width: 90%;
  max-width: 700px;
  height: 70px;
  margin: 0 auto;
  padding: 0 1rem;
  animation: fadeIn 0.8s var(--ease-out) 0.4s both;
}

.connector-svg {
  width: 100%;
  height: 100%;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.connector-path {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.connector-path-base {
  stroke: rgba(114, 255, 255, 0.25);
  stroke-width: 2.5;
}

.connector-path-beam {
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 0.15 4;
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 14px rgba(114, 255, 255, 0.5));
  opacity: 0;
}

.connector-beam-vertical {
  animation: beamDown 4s linear infinite;
}

.connector-beam-left,
.connector-beam-right {
  animation: beamOut 4s linear infinite;
}

@keyframes beamDown {
  0% {
    stroke-dashoffset: 0.3;
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  45% {
    stroke-dashoffset: -1.0;
    opacity: 1;
  }
  45.1%, 100% {
    stroke-dashoffset: -1.0;
    opacity: 0;
  }
}

@keyframes beamOut {
  0%, 39% {
    stroke-dashoffset: 0.3;
    opacity: 0;
  }
  40% {
    stroke-dashoffset: 0.3;
    opacity: 1;
  }
  85% {
    stroke-dashoffset: -1.0;
    opacity: 1;
  }
  85.1%, 100% {
    stroke-dashoffset: -1.0;
    opacity: 0;
  }
}

.section {
  padding: 3rem 0;
  scroll-margin-top: 5rem;
}

.section.animate-in .section-title {
  animation: fadeUp 0.5s var(--ease-out) forwards;
}

.section h2 {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

#experience.animate-in .card {
  animation: fadeUp 0.55s var(--ease-out) 0.08s both;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.tabs button {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--gray-700);
  border-radius: 0.5rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out), transform 0.2s var(--ease-out);
}

.tabs button:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}

.tabs button.active {
  background: var(--gray-800);
  color: var(--primary);
  border-color: var(--gray-600);
}

.panel.active {
  animation: fadeIn 0.3s var(--ease-out);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-item {
  display: flex;
  gap: 1rem;
  transition: transform 0.25s var(--ease-out);
}

.exp-item:hover {
  transform: translateX(4px);
}

.card.animate-in .exp-item {
  opacity: 0;
  animation: fadeUp 0.4s var(--ease-out) forwards;
}

.card.animate-in .exp-item:nth-child(1) { animation-delay: 0.15s; }
.card.animate-in .exp-item:nth-child(2) { animation-delay: 0.22s; }
.card.animate-in .exp-item:nth-child(3) { animation-delay: 0.29s; }
.card.animate-in .exp-item:nth-child(4) { animation-delay: 0.36s; }

.exp-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.4rem;
  box-shadow: 0 0 10px var(--accent);
}

.exp-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.exp-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.exp-content p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(180deg, #202020, #181818);
  border: 1px solid var(--gray-800);
  border-radius: 1rem;
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

.project-card:hover {
  border-color: rgba(114, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(114, 255, 255, 0.1), 0 12px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(-4px);
}

#projects.animate-in .project-card {
  opacity: 0;
  animation: fadeUp 0.55s var(--ease-out) forwards;
}

#projects.animate-in .project-card:nth-child(1) { animation-delay: 0.1s; }
#projects.animate-in .project-card:nth-child(2) { animation-delay: 0.2s; }
#projects.animate-in .project-card:nth-child(3) { animation-delay: 0.3s; }

#projects.animate-in .view-all .btn-outline {
  animation: fadeUp 0.5s var(--ease-out) 0.35s both;
}

#skills.animate-in .skills-card {
  opacity: 0;
  animation: fadeUp 0.5s var(--ease-out) forwards;
}

#skills.animate-in .skills-card:nth-child(1) { animation-delay: 0.1s; }
#skills.animate-in .skills-card:nth-child(2) { animation-delay: 0.18s; }
#skills.animate-in .skills-card:nth-child(3) { animation-delay: 0.26s; }

@media (min-width: 1024px) {
  .project-card {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .project-card:nth-child(even) {
    flex-direction: row-reverse;
  }
}

.project-visual {
  flex: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--gray-800);
  min-height: 200px;
  background: #141414;
}

.project-visual-video {
  position: relative;
  min-height: 280px;
  background: #0a0a0a;
}

.playable-vid-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.playable-vid {
  position: absolute;
  inset: -1%;
  width: 102%;
  height: 102%;
  object-fit: cover;
  object-position: center center;
  background: #0a0a0a;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

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

.project-info {
  flex: 1;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-info p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(114, 255, 255, 0.15);
  color: var(--accent);
  border-radius: 9999px;
  font-size: 0.8rem;
  transition: background var(--duration) var(--ease-out), transform 0.2s var(--ease-out);
}

.tag:hover {
  background: rgba(114, 255, 255, 0.25);
  transform: translateY(-1px);
}

.project-links {
  margin-top: 0.75rem;
}

.project-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  margin-right: 1rem;
}

.project-links a:hover {
  text-decoration: underline;
}

.widget-mock {
  background: #282828;
  border: 1px solid var(--gray-700);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.85rem;
}

.widget-mock .widget-header {
  text-align: right;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.widget-mock input {
  width: 100%;
  padding: 0.5rem;
  background: #404040;
  border: 1px solid var(--gray-600);
  border-radius: 0.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.widget-mock ul {
  list-style: none;
}

.widget-mock li {
  padding: 0.35rem 0;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-mock li::before {
  content: "O";
  color: var(--accent);
}

.btn-outline {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--gray-600);
  border-radius: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color var(--duration) var(--ease-out), background var(--duration) var(--ease-out), transform 0.2s var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(114, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(114, 255, 255, 0.15);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skills-card {
  padding: 2rem;
  background: linear-gradient(180deg, #202020, #181818);
  border: 1px solid var(--gray-800);
  border-radius: 1rem;
  border-bottom: 2px solid var(--accent);
  transition: border-color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.skills-card:hover {
  border-color: rgba(114, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}


.skills-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.skills-card ul {
  list-style: none;
}

.skills-card li {
  padding: 0.25rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.skills-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.skills-card a {
  color: var(--accent);
  text-decoration: none;
}

.skills-card a:hover {
  text-decoration: underline;
}

.contact-card {
  text-align: center;
  padding: 3rem 2rem;
}

#contact.animate-in .contact-card {
  animation: fadeUp 0.55s var(--ease-out) forwards;
}

.contact-card .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 35%;
  margin-bottom: 1rem;
  border: 2px solid var(--gray-700);
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.contact-card:hover .avatar {
  border-color: rgba(114, 255, 255, 0.35);
  box-shadow: 0 0 28px rgba(114, 255, 255, 0.2);
}

.contact-card h2 {
  margin-bottom: 0.25rem;
}

.contact-card .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.contact-card .contact-detail {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.contact-card .email {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.contact-card .email a {
  color: var(--accent);
  text-decoration: none;
}

.contact-card .email a:hover {
  text-decoration: underline;
}

.footer {
  padding: 2rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  border-top: 1px solid var(--gray-800);
}

.view-all {
  text-align: center;
  margin-top: 2rem;
}

@media (max-width: 767px) {
  .nav {
    left: 0;
    right: 0;
    transform: none;
    margin-top: 0;
    padding: 0.75rem 1rem;
  }

  .nav-inner {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem;
  }

  .nav-toggle {
    display: flex;
    order: 1;
  }

  .nav-links {
    display: none;
    order: 2;
    width: 100%;
    flex-direction: column;
    gap: 0.25rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--gray-800);
  }

  .nav-inner.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 5rem 0 3rem;
  }

  .hero-card {
    padding: 1.5rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .connector-beam-wrap {
    height: 50px;
    padding: 0 0.5rem;
  }

  .section {
    padding: 2rem 0;
  }

  .section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .card {
    padding: 1.25rem;
  }

  .tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tabs button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .exp-content h3 {
    font-size: 1rem;
  }

  .exp-content p {
    font-size: 0.85rem;
  }

  .exp-meta {
    font-size: 0.75rem;
  }

  .projects-grid {
    gap: 2rem;
  }

  .project-card {
    padding: 1.25rem;
  }

  .project-visual-video {
    min-height: 220px;
  }

  .playable-vid-wrap {
    min-height: 220px;
  }

  .project-info h3 {
    font-size: 1.25rem;
  }

  .project-info p {
    font-size: 0.875rem;
  }

  .project-tags {
    gap: 0.35rem;
  }

  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .skills-card {
    padding: 1.25rem;
  }

  .skills-card h3 {
    font-size: 1rem;
  }

  .skills-card ul,
  .skills-card p {
    font-size: 0.875rem;
  }

  .contact-card {
    padding: 2rem 1.25rem;
  }

  .contact-card .contact-detail {
    font-size: 0.8rem;
    word-break: break-word;
  }

  .footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }
}

