:root {
    --bg: #f9f5ff;
    --card: #0b1220;
    --muted: #525861;
    --accent: #2dd4bf;
    --accent-2: ivory;
    --accent-3: rgb(255, 31, 31);
    --text: #2b333c;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

.cookie-banner {
  z-index: 99;
  position: fixed;
  max-width: 22rem;
  left: 6.5rem;
  bottom: 25px;
  .cookie-button {
    transition: all 0.4s cubic-bezier(0.65, 0.05, 0.36, 1);
    transform: scale(0) rotate(-200deg);
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-color: #ddaa65;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCA2MCI+PGRlZnM+PHN0eWxlPi5ie2ZpbGw6Izg0M308L3N0eWxlPjwvZGVmcz48Y2lyY2xlIGN4PSIzMCIgY3k9IjMwIiByPSIzMCIgZmlsbD0iI2RkYWE2NSIgR29vZ2w9InRydWUiLz48Y2lyY2xlIGNsYXNzPSJiIiBjeD0iMTUuNSIgY3k9IjIxLjUiIHI9IjMuNSIvPjxjaXJjbGUgY2xhc3M9ImIiIGN4PSIzNC41IiBjeT0iMTIuNSIgcj0iMy41Ii8+PGNpcmNsZSBjbGFzcz0iYiIgY3g9IjIwLjUiIGN5PSI0NS41IiByPSIzLjUiLz48Y2lyY2xlIGNsYXNzPSJiIiBjeD0iMzcuNSIgY3k9IjUzLjUiIHI9IjMuNSIvPjxjaXJjbGUgY2xhc3M9ImIiIGN4PSI0OC41IiBjeT0iMzguNSIgcj0iMy41Ii8+PGNpcmNsZSBjbGFzcz0iYiIgY3g9IjM0IiBjeT0iMzMiIHI9IjYiLz48L3N2Zz4=");
    border-radius: 50%;
    position: fixed;
    bottom: 25px;
    left: 25px;
    height: 60px;
    width: 60px;
  }
  .cookie-popin {
    &::before {
      height: 2.4rem;
      width: 1.4rem;
      left: 0;
      bottom: 0.7rem;
    }
    z-index:99;
    position: relative;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem 1.75rem;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.65, 0.05, 0.36, 1);
    .title {
      font-weight: 900;
      font-size: 1.4rem;
      color: #333;
    }
    .description {
      font-size: 0.8rem;
      margin-bottom: 0.9rem;
      color: #999;
      a {
        color: #52bab3;
      }
    }
    .user-choice {
      &::after {
        z-index: -1;
        content: "";
        border-top-right-radius: 0.2rem;
        box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
        position: absolute;
        height: 1.3rem;
        width: 1.3rem;
        background: #fff;
        left: 1.8rem;
        margin-top: 1rem;
        transform: rotate(45deg);
        left: -0.4rem;
      }
      .auth-button {
        user-select: none;
        text-align: center;
        text-transform: uppercase;
        background-color: #292e49;
        color: #fff;
        padding: 0.4rem 1rem;
        border-radius: 0.2rem;
        display: inline-block;
        cursor: pointer;
        box-shadow: 0 0.18rem 0.3rem 0.05rem rgba(0, 0, 0, 0.2);
        font-size: 0.7rem;
        &-light {
          background-color: #fff;
          color: #292e49;
        }
      }
    }
  }
  
  &.-deploy {
    .cookie-button {
      transform: scale(1) rotate(0);
    }
    .cookie-popin {
      transform: scale(1);
    }
  }
}

/* Utility spacer classes for inserting vertical gaps */
.empty-space {
    height: 50em;
}
.empty-space.small {
    height: 65px;
}
.empty-space.large {
    height: 220px;
}

h1, h2, h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif, serif;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 16px
}

.site-header {
    padding: 18px 0;
    min-height: 120vh;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between
}

/* Navbar container: ensure logo stays left and nav aligns right */
.navi-bar-inner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    position: relative; /* scope pseudo-element to this box */
    padding-bottom: 8px; /* space for bottom border */
}

.navi-bar-inner .logo {
    display: inline-block;
    text-align: left;
}

/* Spacing: distance between logo and navigation items */
.navi-bar-inner .logo {
        margin-right: 144px;
}

@media (max-width: 640px) {
    .navi-bar-inner .logo { margin-right: 12px; }
}

/* Inner layout */
.navi-bar-inner {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 64px;
}

/* border line */
.navi-bar-inner::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.246);
}

/* Logo */
.navibar {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
  text-decoration: none;
  position: relative;
}


.navibar .logo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.navibar .logo:hover::after {
  transform: scaleX(1);
}

/* Navigation list */
.navibar .nav {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.navibar .nav li {
  list-style: none;
}

/* Links */
.navibar .nav a {
  position: relative;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 80ms ease;
}

/* Hover / focus */
.navibar .nav a:hover,
.navibar .nav a:focus {
  background: rgba(28, 6, 108, 0.532);
  color: var(--accent-2);
  transform: translateY(-1px);
}

/* Active page indicator (optional) */
.navibar .nav a.active {
  background: linear-gradient(
    90deg,
    rgb(75, 185, 170),
    rgb(124, 58, 237)
  );
  color: var(--accent-3);
  font-weight: 600;
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
  .navi-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }

  .navibar .nav {
    flex-wrap: wrap;
    gap: 8px;
  }
}

.social-links {
  display: flex;
  gap: 18px;
  margin-top: 20px;
}

.social-links a {
  background: white;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.05);
}

.icon {
  width: 26px;
  height: 26px;
  fill: var(--text);
  transition: transform 0.15s ease, fill 0.15s ease;
}

.social-links a:hover .icon {
  fill: var(--accent-3);
  transform: translateY(-2px);
}

.logo {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem
}

.hero {
    min-height: 12vh;
    display: flex;
    align-items: center
}

.hero-inner {
    display: flex;
    align-items: center;
    gap: 80px;
    padding: 48px 0
}

.hero-content {
    flex: 1
}

.hero h1 {
    margin: 0 0 15px;
    font-size: 2.4rem;
    line-height: 1.05
}

.hero-image {
    flex: 0 0 220px
}

.hero-image .avatar {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.6);
    border: 1px solid rgb(22, 7, 74)
}

.lead {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 60ch
}

.actions {
    display: flex;
    gap: 12px
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06)
}

.btn.primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border: 0;
    color: #031018
}

.summary {
    padding: 28px 0
}

.summary h2 {
    margin: 0 0 12px
}

.summary ul {
    padding-left: 18px
}

.site-footer {
    padding: 24px 0;
    color: var(--muted);
    border-top: 1px solid rgba(255, 255, 255, 0.02)
}

@media (max-width:640px) {
    .hero h1 {
        font-size: 1.6rem
    }

    .header-inner {
        gap: 12px
    }

    .nav {
        gap: 8px
    }

    .hero-inner {
        flex-direction: column;
        gap: 18px
    }

    .hero-image {
        flex: 0 0 auto
    }

    .hero-image .avatar {
        width: 140px;
        height: 140px;
        border-radius: 12px
    }
}

/* Accessibility: focus states */
a:focus {
    outline: 3px solid rgba(48, 31, 238, 0.244);
    outline-offset: 3px
}
.clickable:after,
.clickable:focus {
    outline: 3px solid  rgba(48, 31, 238, 0.656);
    outline-offset: 3px
}

.comic-button {
    display: inline-block;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    color: #fff;
    background-color: #ff5252;
    border: 2px solid #000;
    border-radius: 10px;
    box-shadow: 5px 5px 0px #000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.comic-button.secondary {
    background: ivory;
    border: 2px solid #000;
    color: black;
}

.comic-button:hover {
    background-color: #fff;
    color: #ff5252;
    border: 2px solid #ff5252;
    box-shadow: 5px 5px 0px #ff5252;
}

.comic-button:active {
    background-color: #fcf414;
    box-shadow: none;
    transform: translateY(4px);
}

.cookie-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ff5252;
  border: 2px solid #000;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
}

.spacer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    pointer-events: none;
    z-index: 1000;
}

.spacer.delayed {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.spacer.delayed.visible {
    opacity: 1;
    pointer-events: auto;
}

#typer-sizer {
    margin: 0;
    font-size: 40px;
    text-align: center;
    pointer-events: none;
}

/* Intro section: fills the viewport; typer centered, spacer pinned to bottom of this section */
.intro {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.intro .spacer { margin-top: auto; }

/* Prevent overlap and enforce vertical stacking of sections */
main {
  display: flex;
  flex-direction: column;
}

/* Work grid: cards with image + short description */
.work {
    padding: 36px 0px;
}
.work h2 {
    margin: 0 0 18px;
    font-size: 1.5rem;
}
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 5fr);
    gap: 34px;
    align-items: stretch;
}

.work-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(2,6,23,0.08);
    display: flex;
    flex-direction: column;
}

.work-card img {
    width: 100%;
    height: 233px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}
.card-title {
    margin: 0;
    font-size: 1rem;
}
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.3;
    margin-top: 4px;
    flex: 1 1 auto;
}

/* Tooltip for info icon */
.info-wrapper { position: relative; display: inline-block;}
.info-icon {
    margin-left: 20px;
    appearance: none;
    border: 00;
    background: black;
    color: #000000;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.info-icon:focus { outline: 2px solid rgba(45,212,191,0.25); outline-offset: 2px; }
/* Variant to display a visible info emoji inside the button */
.info-icon.info-emoji {
    background: transparent;
    color: var(--muted);
    width: auto;
    height: auto;
    margin-left: 8px;
    padding: 0;
    border-radius: 0;
    font-size: 1rem;
}
.tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: rgba(12,12,12,0.95);
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.95rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
    z-index: 90;
}
.tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 8px;
    height: 8px;
    background: rgba(12,12,12,0.95);
    transform: translateX(-50%) rotate(45deg);
}
.info-wrapper:hover .tooltip,
.info-wrapper:focus-within .tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 640px) {
    .tooltip { white-space: normal; max-width: 220px; }
}

/* Remove default browser link styling inside work cards */
.work-card a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}
.work-card img:hover {
    transform: scale(1.05);
    transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 900px) {
    .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    #typer-sizer { font-size: 28px; }
}

/* Fade helper: fade spacer out when scrolling down */
.spacer {
    transition: opacity 320ms ease, transform 320ms ease;
}
.spacer.faded {
    opacity: 0 !important;
    transform: translateY(50px) !important;
    pointer-events: none;
    /* stop any entrance animation from competing */
    animation: none !important;
}

/* Typed cursor blinking */
.typed-cursor {
    display: inline-block;
    margin-left: 6px;
    color: var(--text);
    animation: blink 1s steps(1, start) infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.role {
    font-weight: 600;
    margin: 6px 0 0 0;
}

.description {
    margin: 6px 0 16px 0;
    color: var(--muted);
    font-size: 0.95rem;
}