/* ============================================================
   George Sebastian — portfolio
   Hand-written neobrutalist design system. No build step:
   this file is served exactly as committed.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --main: #76fbd9;
  --bg: #ffffff;
  --text: #000000;
  --card-bg: #ffffff;
  --accent: #2b55ff;
  --yellow: #fde047;
  --blue: #60a5fa;
  --green: #4ade80;
  --shadow: #000000;
  --page-bg: #f4f4f5;
  --grid-line: #e4e4e7;
  --line: #000000; /* structural lines (timeline spine) */
  --sb-track: #ffffff;
  --sb-thumb: #000000;
  --radius: 5px;
  color-scheme: light;
}
html.dark {
  --bg: #212121;
  --text: #eeefe9;
  --card-bg: #2a2a2a; /* lifted above the frame so cards read as surfaces */
  --accent: #4b6fff;
  --shadow: #555555;
  --page-bg: #171717;
  --grid-line: #303030;
  --line: #555555; /* matches shadows; pure black vanishes on #212121 */
  --sb-track: #171717;
  --sb-thumb: #555555;
  color-scheme: dark;
}

/* ---------- reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.6;
  color: var(--text);
  /* subtle fixed contour-pattern page background */
  background-color: var(--page-bg);
  background-image: repeating-radial-gradient(
      circle at 15% 25%,
      transparent 0 44px,
      rgba(0, 0, 0, 0.05) 44px 46px
    ),
    repeating-radial-gradient(
      circle at 85% 75%,
      transparent 0 64px,
      rgba(0, 0, 0, 0.04) 64px 66px
    );
  background-attachment: fixed;
}
html.dark body {
  background-image: repeating-radial-gradient(
      circle at 15% 25%,
      transparent 0 44px,
      rgba(255, 255, 255, 0.05) 44px 46px
    ),
    repeating-radial-gradient(
      circle at 85% 75%,
      transparent 0 64px,
      rgba(255, 255, 255, 0.04) 64px 66px
    );
}
a {
  color: inherit;
}
ul,
ol {
  list-style: none;
}
h1,
h2,
h3 {
  line-height: 1.2;
}

/* custom scrollbar: square thumb, theme-aware track */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: var(--sb-track);
}
::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
  border-radius: 0;
  border: 2px solid var(--sb-track);
}
* {
  scrollbar-color: var(--sb-thumb) var(--sb-track);
}

/* text selection in brand teal */
::selection {
  background: var(--main);
  color: #000;
}

/* visible keyboard focus, neobrutal-style */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* icon sizing helpers (svgs inherit currentColor) */
.i svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.i-sm svg {
  width: 1rem;
  height: 1rem;
}
.i-lg svg {
  width: 1.5rem;
  height: 1.5rem;
}
.i-xl svg {
  width: 2.25rem;
  height: 2.25rem;
}

/* ---------- outer frame ---------- */
.frame {
  max-width: 1400px;
  min-height: 100vh;
  margin: 1rem auto;
  background: var(--bg);
  border: 3px solid #000;
  box-shadow: 12px 12px 0 0 var(--shadow);
  isolation: isolate;
}
@media (min-width: 768px) {
  .frame {
    margin: 2rem auto;
    border-width: 4px;
  }
}

/* ---------- shared: buttons, cards, badges ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  background: var(--main);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
}
.btn:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 0 var(--shadow);
}
.btn-yellow {
  background: var(--yellow);
}
.btn-blue {
  background: var(--blue);
}
.btn-green {
  background: var(--green);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: var(--text);
  background: var(--card-bg);
}
.card {
  background: var(--card-bg);
  border: 3px solid #000;
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 0 var(--shadow);
  padding: 1.5rem;
  transition: all 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 12px 12px 0 0 var(--shadow);
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  background: var(--yellow);
  border: 2px solid #000;
  border-radius: var(--radius);
}

/* ---------- layout helpers ---------- */
.section {
  padding: 4rem 1rem;
  scroll-margin-top: 5rem;
}
@media (min-width: 768px) {
  .section {
    padding: 4rem 2rem;
  }
}
.container {
  max-width: 64rem;
  margin: 0 auto;
}
.container-wide {
  max-width: 72rem;
  margin: 0 auto;
}

/* grid-paper section background: 20px grid, radial fade at edges */
.grid-paper {
  position: relative;
}
.grid-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 40%, transparent 100%);
}
.grid-paper > * {
  position: relative;
  z-index: 1;
}

/* section title banner */
.section-title {
  margin-bottom: 2.5rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
  color: #000;
  background: var(--main);
  border: 3px solid #000;
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 0 var(--shadow);
}
.st-yellow {
  background: var(--yellow);
}
.st-blue {
  background: var(--blue);
}
.st-green {
  background: var(--green);
}
.section-title h2 {
  font-size: 1.5rem;
  font-weight: 900;
}
@media (min-width: 640px) {
  .section-title h2 {
    font-size: 1.875rem;
  }
}
@media (min-width: 768px) {
  .section-title h2 {
    font-size: 2.25rem;
  }
}

/* ---------- navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--yellow);
  border-bottom: 3px solid #000;
  color: #000;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
}
@media (min-width: 768px) {
  .nav-inner {
    padding: 0.75rem 2rem;
  }
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.125rem;
  font-weight: 900;
  color: #000;
  text-decoration: none;
  background: var(--main);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
  transition: all 0.3s;
}
.logo:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 0 var(--shadow);
}
.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-weight: 700;
}
.nav-links a {
  text-decoration: none;
  text-underline-offset: 4px;
}
.nav-links a:hover {
  text-decoration: underline;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-cta {
  display: none;
}
@media (min-width: 640px) {
  .nav-cta {
    display: inline-flex;
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
}
/* theme + menu icon swapping */
html.dark .icon-sun {
  display: none;
}
html:not(.dark) .icon-moon {
  display: none;
}
.menu-btn .icon-close {
  display: none;
}
.nav.open .menu-btn .icon-close {
  display: block;
}
.nav.open .menu-btn .icon-menu {
  display: none;
}
/* mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 1rem 1rem;
  font-weight: 700;
  background: var(--yellow);
  border-top: 2px solid #000;
}
.nav.open .mobile-menu {
  display: flex;
}
.mobile-menu a {
  display: block;
  padding: 0.5rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
}
.mobile-menu a:hover {
  background: var(--main);
  border-color: #000;
}
.mobile-menu .mobile-cta {
  margin-top: 0.25rem;
  text-align: center;
  background: var(--main);
  border: 2px solid #000;
  box-shadow: 4px 4px 0 0 var(--shadow);
}
@media (min-width: 768px) {
  .nav.open .mobile-menu {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
}
.hero-greeting {
  min-height: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
}
@media (min-width: 640px) {
  .hero-greeting {
    font-size: 1.875rem;
  }
}
.type-cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 0.9s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.hero h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 900;
}
.hero-bio {
  max-width: 42rem;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}
@media (min-width: 768px) {
  .hero-bio {
    font-size: 1.25rem;
  }
}
.hero-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.hero-socials .icon-btn {
  width: 3rem;
  height: 3rem;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
    align-items: center;
  }
}
/* staggered entrance (replaces framer-motion) */
.rise {
  opacity: 0;
  animation: rise 0.5s ease forwards;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.d1 { animation-delay: 0.15s; }
.d2 { animation-delay: 0.3s; }
.d3 { animation-delay: 0.45s; }
.d4 { animation-delay: 0.6s; }
@media (prefers-reduced-motion: reduce) {
  .rise {
    animation: none;
    opacity: 1;
  }
  .marquee-track {
    animation: none;
  }
}

/* skills marquee (replaces react-fast-marquee) */
.marquee {
  overflow: hidden;
  padding: 0.75rem 0;
  background: var(--card-bg);
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}
.marquee-item svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.about-grid h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 900;
}

/* ---------- journey timeline ---------- */
.timeline-heading {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: #000;
  background: var(--main);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
}
.timeline + .timeline-heading {
  margin-top: 3rem;
}
.timeline {
  position: relative;
  margin-left: 1.5rem;
  padding-left: 2.5rem;
  border-left: 3px solid var(--line);
}
@media (min-width: 768px) {
  .timeline {
    margin-left: 2rem;
  }
}
.timeline li {
  position: relative;
}
.timeline li + li {
  margin-top: 2.5rem;
}
.timeline-marker {
  position: absolute;
  top: 0;
  left: -4.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  color: #000;
  background: var(--main);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
}
@media (min-width: 768px) {
  .timeline-marker {
    left: -4.6rem;
  }
}
.timeline-marker svg {
  width: 1.5rem;
  height: 1.5rem;
}
.timeline h3 {
  font-size: 1.25rem;
  font-weight: 900;
}
.timeline .org {
  margin-top: 0.25rem;
  font-weight: 700;
  color: var(--accent);
}
.timeline .date {
  margin-top: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
}
.timeline .desc {
  margin-top: 0.75rem;
}
.timeline .loc {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
}
.timeline .loc svg {
  width: 1rem;
  height: 1rem;
}

/* ---------- skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  font-weight: 700;
  text-align: center;
  background: var(--card-bg);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
  transition: all 0.3s;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 0 var(--shadow);
}
.skill-card svg {
  width: 2.25rem;
  height: 2.25rem;
}

/* ---------- projects ---------- */
.projects-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.project-card {
  display: flex;
  flex-direction: column;
}
.project-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 900;
}
.project-card .project-desc {
  flex: 1;
  margin-bottom: 1rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- footer ---------- */
.footer {
  padding: 2.5rem 1rem;
  background: var(--card-bg);
  border-top: 3px solid #000;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-weight: 700;
}
.footer-links a {
  text-decoration: none;
  text-underline-offset: 4px;
}
.footer-links a:hover {
  text-decoration: underline;
}
.footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-socials .icon-btn {
  width: 2.5rem;
  height: 2.5rem;
}
.footer-copy {
  font-weight: 700;
}
.footer-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: #000;
  background: var(--main);
  border: 2px solid #000;
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 0 var(--shadow);
}

/* ---------- 404 ---------- */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  min-height: 80vh;
  padding: 2rem 1rem;
  text-align: center;
}
.error-page h1 {
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 900;
}
