body {
    font-family: Arial, sans-serif;
    margin: 0;
    color: #111;
    background: #f7f7f7;
    line-height: 1.6;
    padding: 0;

    background:
      radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 32%),
      radial-gradient(circle at top right, rgba(45, 212, 191, 0.22), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.82)),
      #f7f7f7;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;

  }
  
  body.no-scroll {
    overflow: hidden;
  }

  body.not-found-page {
    background: #f7f7f7;
  }
  
  header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
  }
  
  nav {
    max-width: 900px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
  }
  
  nav a {
    text-decoration: none;
    color: #333;
    margin-left: 20px;
  }
  
  nav a:hover {
    text-decoration: underline;
  }

  .site-footer-bar {
    width: 100%;
    background: white;
    border-top: 1px solid #ddd;
    margin-top: 40px;
  }

  .site-footer-inner {
    max-width: 900px;
    margin: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 20px;
    box-sizing: border-box;
  }

  .site-footer-link {
    text-decoration: none;
    color: inherit;
  }

  .site-footer-link:hover {
    text-decoration: underline;
  }
  
  main {
    max-width: 900px;
    margin: auto;
    padding: 110px 20px 40px 20px;
  }
  
  .profile {
    display: flex;
    align-items: center;
    gap: 28px;
    background: white;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    margin-bottom: 32px;
  }

  .not-found-card {
    max-width: 620px;
    margin: 80px auto 0;
    background: white;
    padding: 32px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .not-found-code {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #666;
  }
  
  .profile:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  }
  
  .profile img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
  }
  
  .photo-gallery-section h2 {
    margin-bottom: 16px;
  }
  
  .photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    grid-auto-flow: dense;
  }
  
  .photo-card {
    overflow: hidden;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
  }
  
  .photo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
  }
  
  .photo-card.square {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
  }
  
  .photo-card.rect {
    grid-column: span 2;
    aspect-ratio: 2 / 1;
  }
  
  .photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  /* Lightbox */
  .lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 2000;
  }
  
  .lightbox.active {
    opacity: 1;
    pointer-events: auto;
  }
  
  .lightbox-img {
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
    cursor: zoom-out;
    transform: scale(0.96);
    transition: transform 0.2s ease;
  }
  
  .lightbox.active .lightbox-img {
    transform: scale(1);
  }
  
  .lightbox-close {
    position: absolute;
    top: 22px;
    right: 30px;
    font-size: 40px;
    line-height: 1;
    color: white;
    cursor: pointer;
    user-select: none;
  }
  
  @media (max-width: 700px) {
    .profile {
      flex-direction: column;
      text-align: center;
    }

    .site-footer-inner {
      flex-direction: column;
      gap: 8px;
      text-align: center;
    }
  
    .photo-grid {
      grid-template-columns: 1fr;
    }
  
    .photo-card.square,
    .photo-card.rect {
      grid-column: span 1;
      aspect-ratio: 4 / 3;
    }
  }

  .profile-links {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
  }
  
  .profile-links img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  
  .profile-links img:hover {
    transform: translateY(-2px);
    opacity: 1;
  }

  .experience-card {
    background: white;
    padding: 26px 30px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-bottom: 28px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }
  
  .experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.14);
  }
  
  .entry + .entry {
    margin-top: 24px;
  }
  
  .entry h3 {
    margin-bottom: 6px;
  }
  
  .entry p {
    margin-top: 0;
    color: #444;
  }


  .project-card {
    background: white;
    padding: 26px 30px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-bottom: 28px;
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease,
      opacity 0.28s ease,
      max-height 0.35s ease,
      margin 0.28s ease,
      padding 0.28s ease;
    max-height: 900px;
    opacity: 1;
    overflow: hidden;
  }
  
  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.14);
  }

  .project-card.project-card-hidden {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.985);
    box-shadow: none;
  }

  .project-group {
    transition: opacity 0.25s ease, max-height 0.35s ease, margin 0.28s ease;
    max-height: 5000px;
    opacity: 1;
    overflow: hidden;
  }

  .project-group.project-group-hidden {
    opacity: 0;
    max-height: 0;
    margin: 0;
    pointer-events: none;
  }

  .project-search-panel {
    background: white;
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-bottom: 14px;
  }

  .project-search-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .project-search-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d5d8df;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fbfbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  }

  .project-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: white;
  }

  .project-search-status {
    min-height: 1.4em;
    margin: 0 0 20px;
    color: #5c6470;
  }
  
  .project-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
  }
  
  .project-text {
    flex: 1;
    min-width: 0;
  }
  
  .project-text h2 {
    margin-top: 0;
    margin-bottom: 6px;
  }
  
  .project-date {
    font-size: 14px;
    color: #666;
    margin-top: 0;
    margin-bottom: 14px;
  }
  
  .project-links {
    margin-top: 12px;
  }
  
  .project-links a {
    text-decoration: none;
    font-weight: 500;
    color: #2563eb;
  }
  
  .project-links a:hover {
    text-decoration: underline;
  }
  
  .project-gif {
    width: 260px;
    height: auto; /* make it 100% of the height of the container it is in, no cap on height */
    min-height: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #ececec, #dcdcdc);
    border: 1px solid #d6d6d6;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .project-gif:empty::after {
    content: "GIF Preview";
    font-size: 14px;
    color: #666;
    font-weight: 500;
  }

  .project-gif img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    border-radius: inherit;
  }
  
  .link-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: text-bottom;
  }

  .notes-shell {
    display: grid;
    gap: 22px;
  }

  .notes-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    background: white;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .notes-heading h1 {
    margin-bottom: 10px;
  }

  .notes-heading p {
    margin-bottom: 0;
    color: #444;
    max-width: 640px;
  }

  .add-note-button,
  .save-note-button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  }

  .add-note-button:hover,
  .save-note-button:hover {
    transform: translateY(-2px);
  }

  .add-note-button {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    font-size: 2rem;
    line-height: 1;
    background: #111;
    color: white;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  }

  .note-composer {
    background: white;
    padding: 24px 28px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .note-composer.hidden {
    display: none;
  }

  .note-composer label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .note-composer input,
  .note-composer textarea {
    width: 100%;
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    margin-bottom: 16px;
    background: #fff;
  }

  .note-composer textarea {
    resize: vertical;
    min-height: 140px;
  }

  .note-actions {
    display: flex;
    justify-content: flex-end;
  }

  .save-note-button {
    background: #2563eb;
    color: white;
    padding: 11px 18px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
  }

  .notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
    gap: 18px;
    justify-content: center;
    align-content: start;
    padding: 16px 20px 40px;
  }

  .note-card {
    position: relative;
    width: 100%;
    min-height: 260px;
    background: white;
    padding: 22px 24px;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
  }

  .note-delete-button {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #dc2626;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
  }

  .note-delete-button svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
  }

  .note-delete-button:hover {
    background: rgba(220, 38, 38, 0.1);
    transform: scale(1.05);
  }

  .note-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    padding-right: 24px;
  }

  .note-card p {
    margin-bottom: 0;
    color: #444;
    line-height: 1.55;
  }

  .placeholder-note {
    border: 1px dashed #d8d8d8;
    background: rgba(255, 255, 255, 0.7);
  }

  .blog-main {
    position: relative;
    min-height: calc(100vh - 150px);
  }

  .floating-add-button {
    position: fixed;
    top: 92px;
    right: max(12px, calc((100vw - 900px) / 2 - 8px));
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: #111;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1100;
  }

  .floating-add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.22);
  }

  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 1400;
  }

  .modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100vw - 32px));
    background: white;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    z-index: 1500;
  }

  .hidden {
    display: none;
  }

  .modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
  }

  .modal-form {
    display: grid;
    gap: 10px;
  }

  .login-form {
    justify-items: stretch;
    gap: 10px;
    padding-top: 4px;
  }

  .password-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d7d7d7;
    border-radius: 14px;
    padding: 10px 14px;
    font: inherit;
    background: #fff;
  }

  .login-arrow-button {
    border: 0;
    background: transparent;
    color: #111;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    justify-self: end;
    margin-top: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .login-arrow-button:hover {
    transform: translateY(2px);
    opacity: 0.8;
  }

  .modal-status {
    margin: 0;
    min-height: 1.4em;
    color: #b91c1c;
    text-align: center;
  }

  @media (max-width: 700px) {
    .notes-list {
      grid-template-columns: minmax(0, 1fr);
      padding-left: 12px;
      padding-right: 12px;
    }

    .note-card {
      min-height: 220px;
    }

    .notes-heading {
      flex-direction: column;
    }

    .add-note-button {
      align-self: flex-end;
    }

    .floating-add-button {
      right: 12px;
      top: 88px;
    }
  }
  
  @media (max-width: 700px) {
    .project-content {
      flex-direction: column;
    }
  
    .project-gif {
      width: 100%;
      height: 190px;
    }
  }

  .link-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  .game-shell {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px 40px 20px;
  }

  .game-card {
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  }

  .game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .money-display {
    font-size: 1.4rem;
    font-weight: bold;
  }

  .game-instructions {
    color: #444;
    width: 100%;
    max-width: 1000px;
    box-sizing: border-box;
    margin: 0 auto 14px;
    line-height: 1.5;
  }

  #gameCanvas {
    display: block;
    width: 100%;
    max-width: 1000px;
    height: auto;
    border: 3px solid #222;
    background: #f4f1ea;
    margin: 0 auto;
  }

  .legend {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    font-size: 0.95rem;
  }

  .legend div {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 10px 12px;
  }

  .play-link {
    display: inline-block;
    margin-top: 12px;
    font-weight: bold;
  }

  .game-header div {
    display: flex;
    align-items: center;
    gap: 10px;
  }


  #focusButton.active {
    background: #c62828;
  }
  
  #focusButton.active:hover {
    background: #d32f2f;
  }

  #focusButton {
    background: #2e7d32;
    color: white;
    border: none;
    padding: 8px 16px;
    margin-right: 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  
  #focusButton:hover {
    background: #388e3c;
  }
  
  #focusButton:active {
    transform: translateY(1px);
    background: #1b5e20;
  }
  
  #focusButton:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(46,125,50,0.4);
  }

  .download-button {
    position: relative;
    display: inline-block;
    text-decoration: none;
    border-width: 0;
    color: #222;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;   
  }
  
  /* TOP LAYER */
  .download-button .docs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 4px;
    background-color: #ffffff;
    border: solid 1px #d9d9d9;
    position: relative;
    z-index: 2;
    transition: transform 0.4s ease;
  }
  
  /* BOTTOM LAYER */
  .download-button .download {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border: solid 1px #e3e3e3;
    border-radius: 4px;
    z-index: 1;
    transform: translateY(100%);   /* start hidden BELOW */
    transition: transform 0.4s ease;
  }
  
  /* HOVER EFFECT */
  .download-button:hover .docs {
    transform: translateY(-100%);  /* slide OUT */
  }
  
  .download-button:hover .download {
    transform: translateY(0%);     /* slide IN */
  }
  
  /* SHADOW */
  .download-button:hover {
    box-shadow:
      rgba(0, 0, 0, 0.18) 0px 12px 20px,
      rgba(0, 0, 0, 0.08) 0px 4px 8px;
  }
  
  @keyframes docs {
    0% {
      transform: translateY(0%);
    }
    50% {
      transform: translateY(-15%);
    }
    100% {
      transform: translateY(0%);
    }
  }
