/*
  Main stylesheet for the portfolio homepage.
  Sections are labeled so layout, sidebars, content cards, and responsive rules are easy to find.
*/
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Press+Start+2P&display=swap');

    :root {
      --font-body: "Share Tech Mono", "Courier New", Courier, monospace;
      --font-display: "Press Start 2P", "Share Tech Mono", monospace;
      --font-accent: "Share Tech Mono", "Courier New", Courier, monospace;
    }

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

    html {
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    body {
      background-color: #000000;
      background-image:
        repeating-linear-gradient(
          0deg,
          transparent,
          transparent 2px,
          rgba(0,255,0,0.03) 2px,
          rgba(0,255,0,0.03) 4px
        );
      color: #00FF00;
      font-family: var(--font-body);
      font-synthesis: none;
      cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ctext y='16' font-size='16'%3E💀%3C/text%3E%3C/svg%3E"), auto;
      overflow-x: hidden;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    button,
    input,
    textarea,
    select {
      font-family: inherit;
    }

    /* ===== SCANLINE OVERLAY ===== */
    body::after {
      content: '';
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0,0,0,0.15) 3px,
        rgba(0,0,0,0.15) 4px
      );
      pointer-events: none;
      z-index: 9999;
    }

    /* ===== TOP MARQUEE ===== */
    .marquee-top {
      background: #FF00FF;
      color: #000;
      font-family: var(--font-accent);
      font-weight: bold;
      font-size: 13px;
      padding: 4px 0;
      white-space: nowrap;
      overflow: hidden;
    }
    .marquee-top span {
      display: inline-block;
      animation: marquee 18s linear infinite;
    }
    @keyframes marquee {
      from { transform: translateX(100vw); }
      to { transform: translateX(-100%); }
    }

    /* ===== HEADER ===== */
    .site-header {
      background: #000000;
      border-bottom: 3px solid #FF00FF;
      border-top: 3px solid #00FFFF;
      padding: 16px 0 8px;
      text-align: center;
      position: relative;
      overflow: hidden;
    }

    .site-header > *:not(.grid-container) {
      position: relative;
      z-index: 2;
    }

    /* 3D Wireframe Grid */
    .grid-container {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      perspective: 400px;
      z-index: 1;
    }

    /* Horizon Fade Overlay */
    .grid-container::after {
      content: '';
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: linear-gradient(to bottom, #000000 0%, transparent 40%, transparent 80%, #000000 100%);
      pointer-events: none;
      z-index: 2;
    }

    .grid-plane {
      position: absolute;
      top: -50%; left: -50%;
      width: 200%; height: 200%;
      background-image: 
        linear-gradient(rgba(0, 255, 255, 0.25) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.25) 2px, transparent 2px);
      background-size: 50px 50px;
      transform: rotateX(80deg);
      animation: gridMove 4s linear infinite;
      z-index: 1;
    }

    @keyframes gridMove {
      from { transform: rotateX(80deg) translateY(0); }
      to { transform: rotateX(80deg) translateY(50px); }
    }

    .site-title {
      font-family: var(--font-display);
      font-size: clamp(14px, 3vw, 26px);
      color: #FFFF00;
      text-shadow:
        3px 3px 0 #FF00FF,
        -1px -1px 0 #00FFFF,
        0 0 20px #FFFF00,
        0 0 40px #FF00FF;
      letter-spacing: 3px;
      animation: flicker 4s infinite;
      line-height: 1.6;
    }
    @keyframes flicker {
      0%, 97%, 100% { opacity: 1; }
      98% { opacity: 0.4; }
      99% { opacity: 0.9; }
    }

    .site-subtitle {
      font-family: var(--font-accent);
      font-size: 13px;
      color: #00FFFF;
      margin-top: 6px;
      letter-spacing: 2px;
    }

    .stars-row {
      color: #FFFF00;
      font-size: 18px;
      margin: 6px 0;
      animation: twinkle 1.5s step-end infinite;
    }
    @keyframes twinkle {
      0%, 100% { color: #FFFF00; }
      50% { color: #FF00FF; }
    }

    /* ===== NAV BAR ===== */
    .navbar {
      background: #000080;
      border-top: 2px solid #00FFFF;
      border-bottom: 2px solid #00FFFF;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 0;
      padding: 2px 0;
    }
    .navbar a {
      color: #FFFF00;
      text-decoration: none;
      font-family: var(--font-accent);
      font-weight: bold;
      font-size: 13px;
      padding: 5px 14px;
      border-right: 2px solid #00FFFF;
      transition: background 0.1s, color 0.1s;
    }
    .navbar a:first-child { border-left: 2px solid #00FFFF; }
    .navbar a:hover {
      background: #FF00FF;
      color: #000;
    }
    /* ===== LAYOUT ===== */
    .page-body {
      display: flex;
      gap: 0;
      max-width: 1000px;
      margin: 12px auto;
      padding: 0 8px;
    }

    /* ===== LEFT SIDEBAR ===== */
    .sidebar-left {
      width: 200px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
    }

    .sidebar-box {
      border: 2px solid #00FF00;
      background: #001100;
      padding: 10px 8px;
    }
    .sidebar-box.cyan-border { border-color: #00FFFF; }
    .sidebar-box.magenta-border { border-color: #FF00FF; }
    .sidebar-box.yellow-border { border-color: #FFFF00; }

    .sidebar-box h3 {
      font-family: var(--font-display);
      font-size: 8px;
      color: #FFFF00;
      text-align: center;
      padding-bottom: 6px;
      border-bottom: 1px dashed #00FF00;
      margin-bottom: 8px;
    }

    /* Profile picture area */
    .profile-pic-wrap {
      text-align: center;
    }
    .profile-pic {
      width: 120px;
      height: 120px;
      margin: 0 auto 8px;
      position: relative;
      border: 3px solid #00FFFF;
      box-shadow: 0 0 12px #00FFFF, 0 0 24px #00FF00;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #001a2e;
      overflow: hidden;
    }

    .profile-photo {
      width: 100%;
      height: 100%;
      display: block;
      object-fit: cover;
    }    .profile-name {
      font-family: var(--font-display);
      font-size: 7px;
      color: #00FFFF;
      text-align: center;
      line-height: 1.8;
    }

    .online-indicator {
      display: inline-block;
      width: 8px; height: 8px;
      background: #00FF00;
      border-radius: 50%;
      animation: pulse 1s ease-in-out infinite;
      vertical-align: middle;
      margin-right: 4px;
      box-shadow: 0 0 6px #00FF00;
    }
    @keyframes pulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.4); opacity: 0.6; }
    }

    .status-text {
      font-size: 10px;
      color: #00FF00;
      text-align: center;
      margin-top: 4px;
    }

    /* Skills progress bars */
    .skill-item {
      margin-bottom: 8px;
    }
    .skill-section-label {
      border-bottom: 1px dashed #00FF00;
      color: #00FF00;
      font-family: var(--font-display);
      font-size: 7px;
      line-height: 1.7;
      margin: 2px 0 8px;
      padding-bottom: 5px;
      text-align: center;
    }
    .skill-focus-label {
      border-top: 1px dashed #003300;
      margin-top: 10px;
      padding-top: 8px;
    }
    .skill-icon-groups {
      display: grid;
      gap: 9px;
      margin-bottom: 6px;
    }
    .skill-icon-group {
      text-align: center;
    }
    .skill-icon-heading {
      color: #C0C0C0;
      font-family: var(--font-display);
      font-size: 7px;
      line-height: 1.7;
      margin-bottom: 4px;
    }
    .skill-icon-group img {
      display: block;
      height: auto;
      margin: 0 auto;
      max-width: 100%;
    }
    .skill-name {
      font-size: 9px;
      color: #00FFFF;
      margin-bottom: 2px;
    }
    .skill-bar-bg {
      background: #003300;
      border: 1px solid #00FF00;
      height: 10px;
      width: 100%;
    }
    .skill-bar-fill {
      background: linear-gradient(90deg, #00FF00, #00FFFF);
      height: 100%;
      animation: loadBar 2s ease-out forwards;
      width: 0%;
    }
    @keyframes loadBar {
      to { width: var(--pct); }
    }

    /* Weather / status widget */
    .blink {
      animation: blink 0.8s step-end infinite;
    }
    @keyframes blink {
      50% { visibility: hidden; }
    }

    /* ===== MAIN CONTENT ===== */
    .main-content {
      flex: 1;
      padding: 0 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-width: 0;
    }
    /* Welcome box */
    .welcome-box {
      border: 3px double #00FFFF;
      background: #000d1a;
      padding: 14px;
    }
    .welcome-box h2 {
      font-family: var(--font-display);
      font-size: 11px;
      color: #FFFF00;
      margin-bottom: 10px;
      text-shadow: 0 0 10px #FFFF00;
    }
    .welcome-box p {
      font-size: 12px;
      color: #C0C0C0;
      line-height: 1.9;
      margin-bottom: 8px;
      font-family: var(--font-accent);
    }
    .welcome-box p .highlight { color: #00FFFF; font-weight: bold; }
    .welcome-box p .neon { color: #FF00FF; font-weight: bold; }

    /* About me section */
    .section-block {
      border: 2px solid #00FF00;
      background: #000a00;
    }
    .section-header {
      background: #003300;
      padding: 7px 12px;
      border-bottom: 2px solid #00FF00;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .section-header h2 {
      font-family: var(--font-display);
      font-size: 9px;
      color: #00FF00;
    }
    .section-content {
      padding: 12px;
    }
    .section-content p {
      font-size: 12px;
      color: #C0C0C0;
      line-height: 1.8;
      margin-bottom: 8px;
    }

    /* Info table */
    .info-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 11px;
      margin: 8px 0;
    }
    .info-table td {
      padding: 5px 8px;
      border: 1px solid #003300;
    }
    .info-table td:first-child {
      color: #00FFFF;
      width: 120px;
      background: #001100;
      font-weight: bold;
    }
    .info-table td:last-child {
      color: #C0C0C0;
    }
    .info-table tr:hover td { background: #001a00; }
    .project-link {
      color: #FF00FF;
      text-decoration: none;
      font-weight: bold;
    }
    .project-link:hover {
      color: #FFFF00;
    }

    /* Certificates + Awards */
    .cert-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
      margin-top: 8px;
    }
    .cert-card {
      border: 2px solid #FFFF00;
      background: #111100;
      padding: 9px;
      min-height: 96px;
    }
    .cert-card:nth-child(2n) {
      border-color: #00FFFF;
      background: #001515;
    }
    .cert-card:nth-child(3n) {
      border-color: #FF00FF;
      background: #1a001a;
    }
    .cert-title {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
      margin-bottom: 5px;
    }
    .cert-card:nth-child(2n) .cert-title { color: #00FFFF; }
    .cert-card:nth-child(3n) .cert-title { color: #FF00FF; }
    .cert-issuer,
    .cert-date,
    .cert-note {
      color: #C0C0C0;
      font-size: 10px;
      line-height: 1.6;
    }
    .cert-date { color: #888; }
    .cert-action {
      display: inline-block;
      margin-top: 6px;
      border: 1px solid currentColor;
      color: #00FF00;
      font-family: var(--font-display);
      font-size: 7px;
      padding: 3px 5px;
      text-decoration: none;
    }
    .cert-action:hover {
      background: #00FF00;
      color: #000;
    }
    /* Terminal block */
    .terminal-box {
      background: #000;
      border: 2px solid #00FF00;
      padding: 12px;
      font-family: var(--font-body);
      font-size: 11px;
      color: #00FF00;
    }
    #interactive-terminal {
      height: 250px;
      overflow-y: auto;
      cursor: text;
    }
    .terminal-box .prompt { color: #00FFFF; }
    .terminal-box .cmd { color: #FFFF00; }
    .terminal-box .output { color: #00FF00; }
    .terminal-box .comment { color: #555; }
    .terminal-cursor {
      display: inline-block;
      width: 8px;
      background: #00FF00;
      animation: blink 0.8s step-end infinite;
      vertical-align: middle;
      height: 12px;
    }
    .terminal-line { margin-bottom: 3px; }
    .terminal-input-line {
      display: flex;
      align-items: center;
      gap: 5px;
      margin-top: 3px;
    }
    #terminal-input {
      background: transparent;
      border: none;
      color: #FFFF00;
      font-family: var(--font-body);
      font-size: 16px; /* Prevent iOS auto-zoom */
      flex: 1;
      outline: none;
      min-width: 0;
    }
    @media (min-width: 768px) {
      #terminal-input {
        font-size: 11px;
      }
    }

    /* ===== RIGHT SIDEBAR ===== */
    .sidebar-right {
      width: 180px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
      min-width: 0;
    }

    /* Social links */
    .social-link {
      display: flex;
      align-items: center;
      gap: 7px;
      color: #00FFFF;
      text-decoration: none;
      font-size: 11px;
      padding: 5px 6px;
      border: 1px solid transparent;
      transition: all 0.15s;
    }
    .social-link:hover {
      border-color: #00FFFF;
      background: #001a2e;
      color: #FFFF00;
    }
    .social-icon {
      font-size: 16px;
      width: 20px;
      text-align: center;
    }

    /* Latest activity */
    .activity-item {
      padding: 4px 0;
      border-bottom: 1px dashed #003300;
      font-size: 10px;
      color: #888;
      line-height: 1.5;
    }
    .activity-item .time {
      color: #555;
      font-size: 9px;
    }
    .activity-item .action {
      color: #00FF00;
    }

    /* ===== FOOTER ===== */
    .site-footer {
      background: #000033;
      border-top: 3px solid #00FFFF;
      padding: 18px;
      text-align: center;
      margin-top: auto;
    }

    .social-footer {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 20px;
      margin-bottom: 16px;
    }
    .social-footer-link {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      color: #00FFFF;
      text-decoration: none;
      font-family: var(--font-accent);
      font-size: 11px;
      padding: 8px 12px;
      border: 2px solid #00FFFF;
      background: #000020;
      transition: all 0.2s;
      min-width: 70px;
    }
    .social-footer-link:hover {
      background: #00FFFF;
      color: #000;
      box-shadow: 0 0 12px #00FFFF;
    }
    .social-footer-link .icon { font-size: 20px; }

    .footer-divider {
      color: #FF00FF;
      font-size: 13px;
      margin: 10px 0;
      letter-spacing: 3px;
    }

    .footer-text {
      font-family: var(--font-accent);
      font-size: 11px;
      color: #555;
      line-height: 1.9;
    }
    .footer-text a { color: #00FFFF; }
    .footer-text .neon { color: #FF00FF; }

    .best-viewed {
      background: #000080;
      display: inline-block;
      border: 2px outset #8888FF;
      padding: 6px 14px;
      font-size: 10px;
      color: #FFFFFF;
      font-family: var(--font-accent);
      margin-top: 10px;
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 10px; background: #000; }
    ::-webkit-scrollbar-thumb { background: #00FF00; border: 1px solid #003300; }
    ::-webkit-scrollbar-thumb:hover { background: #00FFFF; }

    /* Rainbow text animation */
    .rainbow {
      background: linear-gradient(90deg, #FF0000, #FF8800, #FFFF00, #00FF00, #00FFFF, #FF00FF);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: rainbowShift 3s linear infinite;
      background-size: 200%;
    }
    @keyframes rainbowShift {
      0% { background-position: 0% 50%; }
      100% { background-position: 200% 50%; }
    }





    /* ===== CONTACT PAGE (OUTLOOK 98) ===== */
    .contact-page {
      max-width: 760px;
      margin: 12px auto;
      padding: 0 8px;
    }
    
    .outlook-window {
      border: 3px solid #00FFFF;
      background: #000000;
      box-shadow: 0 0 10px #00FFFF;
      display: flex;
      flex-direction: column;
    }

    .outlook-title-bar {
      background: linear-gradient(90deg, #000080, #0088FF);
      color: #FFFFFF;
      padding: 6px 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 2px solid #00FFFF;
    }

    .outlook-title {
      font-family: var(--font-display);
      font-size: 8px;
      text-shadow: 1px 1px #000;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .outlook-controls {
      display: flex;
      gap: 4px;
    }

    .outlook-controls button {
      background: #000080;
      border: 1px solid #00FFFF;
      color: #00FFFF;
      cursor: pointer;
      font-family: var(--font-display);
      font-size: 8px;
      padding: 2px;
      box-shadow: inset 1px 1px #0088FF;
    }

    .outlook-controls button:hover {
      background: #00FFFF;
      color: #000080;
    }

    .outlook-body {
      padding: 12px;
      background: #000000;
      overflow: hidden;
      display: block; /* For collapsing */
    }

    .outlook-header-block {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .outlook-header-row {
      display: flex;
      align-items: center;
      background: #050505;
      border-bottom: 1px dashed #003300;
      padding-bottom: 4px;
    }

    .outlook-label {
      width: 120px;
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      flex-shrink: 0;
    }

    .outlook-value {
      color: #00FFFF;
      font-family: var(--font-body);
      font-size: 13px;
    }

    .outlook-input {
      flex: 1;
      background: #0a0a0a;
      border: 1px solid #003300;
      color: #C0C0C0;
      font-family: var(--font-body);
      font-size: 16px; /* prevent iOS zoom */
      padding: 4px 6px;
      outline: none;
      min-width: 0;
    }

    .outlook-input:focus {
      border-color: #00FFFF;
      background: #111111;
    }

    .outlook-textarea-container {
      margin-top: 10px;
    }

    .outlook-textarea {
      width: 100%;
      background: #0a0a0a;
      border: 1px solid #003300;
      color: #C0C0C0;
      font-family: var(--font-body);
      font-size: 16px; /* prevent iOS zoom */
      padding: 8px;
      resize: vertical;
      outline: none;
    }

    .outlook-textarea:focus {
      border-color: #00FFFF;
      background: #111111;
    }

    @media (min-width: 768px) {
      .outlook-input, .outlook-textarea {
        font-size: 13px;
      }
    }

    .outlook-footer {
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .outlook-submit {
      align-self: flex-start;
      border: 2px solid #FF00FF;
      background: #1a001a;
      color: #FF00FF;
      cursor: pointer;
      font-family: var(--font-display);
      font-size: 9px;
      padding: 9px 12px;
      text-transform: uppercase;
      box-shadow: 2px 2px #550055;
    }

    .outlook-submit:hover,
    .outlook-submit:focus {
      background: #FF00FF;
      color: #000;
      box-shadow: 0 0 12px #FF00FF;
    }

    #form-error-terminal {
      color: #FF0000;
      border-color: #FF0000;
    }
    
    #form-error-terminal.hidden {
      display: none;
    }

    .form-honeypot {
      display: none;
    }

    /* ===== WRITEUPS PAGE ===== */
    .writeups-page,
    .post-page {
      max-width: 1000px;
      margin: 12px auto;
      padding: 0 8px;
    }

    .writeups-intro {
      margin-bottom: 12px;
    }

    .writeups-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
    }

    .writeups-stats a {
      border: 2px solid #00FFFF;
      background: #001515;
      color: #00FFFF;
      text-decoration: none;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
      padding: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .writeups-stats a:nth-child(2n) {
      border-color: #FF00FF;
      color: #FF00FF;
      background: #170017;
    }

    .writeups-stats span {
      color: #FFFF00;
      font-size: 11px;
    }

    .writeups-note {
      color: #C0C0C0;
      font-size: 11px;
      line-height: 1.8;
      margin-top: 10px;
    }

    .writeups-feed-link {
      border: 1px solid #FFFF00;
      color: #FFFF00;
      display: inline-flex;
      align-items: center;
      font-family: var(--font-display);
      font-size: 7px;
      line-height: 1.6;
      padding: 4px 6px;
      text-decoration: none;
    }

    .writeups-feed-link:hover,
    .writeups-feed-link:focus {
      background: #FFFF00;
      color: #000;
    }

    .writeup-search {
      border: 2px solid #00FFFF;
      background: #000;
      display: grid;
      gap: 7px;
      margin-top: 12px;
      padding: 10px;
    }

    .writeup-search-topline {
      align-items: center;
      display: flex;
      gap: 8px;
      justify-content: space-between;
    }

    .writeup-search label {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
    }

    .writeup-search input {
      background: #001515;
      border: 1px solid #00FFFF;
      color: #00FF00;
      font-family: var(--font-body);
      font-size: 16px;
      outline: none;
      padding: 8px 10px;
      width: 100%;
    }

    .writeup-search input:focus {
      border-color: #FFFF00;
      box-shadow: 0 0 10px #00FFFF;
    }

    .writeup-search-empty {
      border: 2px dashed #FF00FF;
      color: #FF00FF;
      display: none;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
      margin-top: 10px;
      padding: 10px;
    }

    .writeup-search-empty.visible {
      display: block;
    }

    .writeup-category {
      border: 2px solid #00FF00;
      background: #000a00;
      margin-bottom: 12px;
    }

    .writeup-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
      gap: 10px;
      padding: 12px;
    }

    .writeup-card {
      border: 2px solid #00FFFF;
      background: #001015;
      min-height: 100%;
      display: flex;
      flex-direction: column;
    }

    .writeup-card:nth-child(2n) {
      border-color: #FF00FF;
      background: #170017;
    }

    .writeup-card-image-link {
      display: block;
      background: #000;
      border-bottom: 2px solid currentColor;
      color: inherit;
    }

    .writeup-card-image {
      width: 100%;
      aspect-ratio: 16 / 9;
      object-fit: cover;
      display: block;
    }

    .writeup-card-body {
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      flex: 1;
    }

    .writeup-card-date {
      color: #777;
      font-size: 9px;
    }

    .writeup-card h3 {
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
    }

    .writeup-card h3 a {
      color: #FFFF00;
      text-decoration: none;
    }

    .writeup-card h3 a:hover {
      color: #00FFFF;
    }

    .writeup-card p {
      color: #C0C0C0;
      font-size: 11px;
      line-height: 1.7;
      flex: 1;
    }

    .writeup-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .writeup-tags span {
      border: 1px solid #003300;
      color: #00FF00;
      background: #001100;
      font-size: 9px;
      padding: 2px 4px;
    }

    .writeup-read-link {
      color: #FF00FF;
      border: 1px solid currentColor;
      text-decoration: none;
      font-family: var(--font-display);
      font-size: 8px;
      padding: 5px 6px;
      align-self: flex-start;
    }

    .writeup-read-link:hover {
      background: #FF00FF;
      color: #000;
    }

    /* ===== LATEST ACTIVITY ===== */
    .latest-activity-block {
      border-color: #00FFFF;
    }

    .latest-activity-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
    }

    .latest-activity-item {
      border: 2px solid #00FFFF;
      background: #001515;
      color: #C0C0C0;
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-height: 105px;
      padding: 10px;
      text-decoration: none;
    }

    .latest-activity-item:nth-child(2n) {
      border-color: #FF00FF;
      background: #170017;
    }

    .latest-activity-item:hover {
      background: #002020;
      box-shadow: 0 0 12px currentColor;
    }

    .latest-activity-item strong {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
    }

    .latest-activity-item span {
      color: #C0C0C0;
      font-size: 10px;
      line-height: 1.6;
    }

    .latest-activity-type {
      color: #00FF00 !important;
      font-family: var(--font-display);
      font-size: 7px !important;
    }

    .project-activity .latest-activity-type {
      color: #FF00FF !important;
    }

    /* ===== POST LAYOUT ===== */
    .reading-progress {
      background: #001100;
      border-bottom: 1px solid #00FF00;
      height: 5px;
      left: 0;
      position: fixed;
      right: 0;
      top: 0;
      z-index: 10000;
    }

    .reading-progress-fill {
      background: linear-gradient(90deg, #00FF00, #00FFFF, #FFFF00);
      box-shadow: 0 0 10px #00FFFF;
      height: 100%;
      width: 0;
    }

    .post-shell {
      border: 2px solid #00FF00;
      background: #000a00;
    }

    .post-hero {
      display: grid;
      grid-template-columns: minmax(0, 260px) 1fr;
      gap: 12px;
      align-items: stretch;
      border-bottom: 2px solid #00FF00;
      background: #001100;
      padding: 12px;
    }

    .post-hero-image {
      width: 100%;
      height: 100%;
      min-height: 160px;
      object-fit: cover;
      border: 2px solid #00FFFF;
      background: #000;
    }

    .post-hero-copy {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 10px;
    }

    .post-date {
      color: #00FFFF;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
    }

    .post-hero h1 {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 16px;
      line-height: 1.7;
      text-shadow: 2px 2px 0 #FF00FF;
    }

    .post-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
    }

    .post-tags span {
      color: #FF00FF;
      border: 1px solid currentColor;
      font-size: 10px;
      padding: 3px 5px;
    }

    .post-copy-link {
      align-self: flex-start;
      background: #000;
      border: 2px solid #00FFFF;
      color: #00FFFF;
      cursor: pointer;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.6;
      padding: 7px 9px;
    }

    .post-copy-link:hover,
    .post-copy-link:focus {
      background: #00FFFF;
      color: #000;
    }

    .post-content {
      padding: 16px;
      color: #C0C0C0;
      font-size: 14px;
      line-height: 1.85;
    }

    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4 {
      color: #FFFF00;
      font-family: var(--font-display);
      line-height: 1.7;
      margin: 22px 0 10px;
    }

    .post-content h2 { font-size: 13px; }
    .post-content h3 { font-size: 11px; }
    .post-content h4 { font-size: 10px; }

    .post-content p,
    .post-content ul,
    .post-content ol,
    .post-content blockquote,
    .post-content pre,
    .post-content table {
      margin-bottom: 14px;
    }

    .post-content ul,
    .post-content ol {
      margin-left: 0;
      padding-left: 24px;
    }

    .post-content li {
      padding-left: 4px;
    }

    .post-content a {
      color: #00FFFF;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .post-content img {
      max-width: 100%;
      height: auto;
      border: 2px solid #00FFFF !important;
      border-radius: 0 !important;
      background: #000;
      display: block;
      margin: 14px auto;
    }

    .post-content pre,
    .post-content code {
      font-family: var(--font-body);
    }

    .post-content pre,
    .post-content .code-block-container {
      border: 2px solid #00FF00;
      background: #000;
      color: #00FF00;
      overflow-x: auto;
      padding: 12px;
      border-radius: 0 !important;
    }

    .post-content blockquote {
      border-left: 3px solid #FF00FF;
      color: #C0C0C0;
      background: #170017;
      padding: 10px 12px;
    }

    .post-content table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }

    .post-content th,
    .post-content td {
      border: 1px solid #003300;
      padding: 6px;
    }

    .post-content th {
      color: #00FFFF;
      background: #001100;
    }

    .post-pager {
      border-top: 2px solid #00FF00;
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      padding: 12px;
    }

    .post-pager-link {
      border: 2px solid #00FFFF;
      background: #001515;
      color: #C0C0C0;
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-height: 92px;
      padding: 10px;
      text-decoration: none;
    }

    .post-pager-next {
      border-color: #FF00FF;
      background: #170017;
      text-align: right;
    }

    .post-pager-link span {
      color: #00FF00;
      font-family: var(--font-display);
      font-size: 7px;
      line-height: 1.7;
    }

    .post-pager-link strong {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
      overflow-wrap: anywhere;
    }

    .post-pager-link:hover {
      box-shadow: 0 0 12px currentColor;
    }

    .post-pager-empty {
      border-color: #003300;
      color: #555;
      opacity: 0.7;
    }

    /* ===== 404 PAGE ===== */
    .error-page {
      max-width: 900px;
      margin: 18px auto;
      padding: 0 8px;
    }

    .error-terminal {
      border: 2px solid #FF00FF;
      background: #080008;
      box-shadow: 0 0 18px #FF00FF;
      color: #00FF00;
      padding: 18px;
    }

    .error-code {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: clamp(34px, 10vw, 76px);
      line-height: 1.2;
      text-shadow: 3px 3px 0 #FF00FF;
    }

    .error-terminal h1 {
      color: #00FFFF;
      font-family: var(--font-display);
      font-size: 15px;
      line-height: 1.8;
      margin: 14px 0;
    }

    .error-terminal p {
      color: #C0C0C0;
      font-size: 13px;
      line-height: 1.8;
      margin-bottom: 12px;
    }

    .error-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
    }

    .error-actions a {
      border: 2px solid #00FFFF;
      color: #00FFFF;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.6;
      padding: 8px 10px;
      text-decoration: none;
    }

    .error-actions a:hover {
      background: #00FFFF;
      color: #000;
    }

    .packet-game {
      border: 2px solid #00FF00;
      background: #000a00;
      margin-top: 18px;
      padding: 12px;
    }

    .packet-game-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .packet-game h2 {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 10px;
      line-height: 1.7;
      margin: 0 0 5px;
    }

    .packet-game-status {
      color: #00FFFF;
      font-size: 11px;
      line-height: 1.6;
    }

    .packet-game button {
      cursor: pointer;
      font-family: var(--font-display);
    }

    #packet-game-start {
      background: #000;
      border: 2px solid #FF00FF;
      color: #FF00FF;
      font-size: 8px;
      line-height: 1.6;
      padding: 8px 10px;
    }

    #packet-game-start:hover,
    #packet-game-start:focus {
      background: #FF00FF;
      color: #000;
    }

    .packet-game-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 10px;
    }

    .packet-game-stats span {
      border: 1px solid #00FFFF;
      color: #C0C0C0;
      font-size: 11px;
      padding: 5px 7px;
    }

    .packet-game-stats strong {
      color: #FFFF00;
    }

    .packet-game-field {
      background:
        linear-gradient(rgba(0, 255, 0, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.14) 1px, transparent 1px),
        #000;
      background-size: 22px 22px;
      border: 2px solid #003300;
      height: 230px;
      overflow: hidden;
      position: relative;
      touch-action: manipulation;
    }

    .packet-target {
      align-items: center;
      background: #FFFF00;
      border: 2px solid #00FFFF;
      box-shadow: 0 0 16px #FFFF00;
      color: #000;
      display: none;
      font-size: 16px;
      height: 42px;
      justify-content: center;
      line-height: 1;
      padding: 0;
      position: absolute;
      width: 42px;
    }

    .packet-target.visible {
      display: flex;
    }

    .packet-target.caught {
      animation: packet-pop 180ms ease-out;
    }

    @keyframes packet-pop {
      0% { transform: scale(1); }
      50% { transform: scale(1.25); }
      100% { transform: scale(1); }
    }

    /* ===== PROJECTS PAGE ===== */
    .projects-page {
      max-width: 1000px;
      margin: 12px auto;
      padding: 0 8px;
    }

    .projects-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
      border-bottom: 1px dashed #003300;
      padding-bottom: 10px;
    }

    .projects-count {
      color: #00FFFF;
      font-family: var(--font-display);
      font-size: 9px;
      line-height: 1.7;
    }

    .projects-source {
      color: #777;
      font-size: 10px;
      line-height: 1.6;
      margin-top: 3px;
    }

    .projects-profile-link {
      border: 1px solid currentColor;
      padding: 5px 7px;
      white-space: nowrap;
      font-size: 10px;
    }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 10px;
    }

    .project-loading {
      border: 2px solid #00FFFF;
      background: #001515;
      color: #00FFFF;
      font-family: var(--font-display);
      font-size: 9px;
      padding: 12px;
      line-height: 1.8;
    }

    .project-card {
      border: 2px solid #00FF00;
      background: #000a00;
      padding: 10px;
      min-height: 190px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .project-card:nth-child(2n) {
      border-color: #00FFFF;
      background: #001015;
    }

    .project-card:nth-child(3n) {
      border-color: #FF00FF;
      background: #170017;
    }

    .project-card-topline {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .project-card-title {
      color: #FFFF00;
      font-family: var(--font-display);
      font-size: 8px;
      line-height: 1.7;
      text-decoration: none;
      overflow-wrap: anywhere;
    }

    .project-card-title:hover {
      color: #00FFFF;
    }

    .project-language {
      color: #00FFFF;
      border: 1px solid currentColor;
      font-size: 9px;
      padding: 2px 4px;
      white-space: nowrap;
    }

    .project-card p {
      color: #C0C0C0;
      font-size: 11px;
      line-height: 1.7;
      flex: 1;
    }

    .project-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: #AAAAAA;
      font-size: 9px;
    }

    .project-topics {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }

    .project-topics span {
      border: 1px solid #003300;
      background: #001100;
      color: #00FF00;
      font-size: 9px;
      padding: 2px 4px;
    }

    .project-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 2px;
    }

    .project-card-link {
      color: #FF00FF;
      border: 1px solid currentColor;
      text-decoration: none;
      font-family: var(--font-display);
      font-size: 8px;
      padding: 4px 6px;
    }

    .project-card-link:hover {
      background: #FF00FF;
      color: #000;
    }

    /* Utility classes moved out of inline HTML styles */
    .profile-role { color: #FF00FF; }
    .skill-linux { --pct: 90%; }
    .skill-python { --pct: 78%; }
    .skill-recon { --pct: 85%; }
    .skill-web { --pct: 72%; }
    .skill-ctf { --pct: 88%; }
    .skill-social { --pct: 65%; }
    .welcome-pointer {
      color: #FF0000;
      font-weight: bold;
    }
    .welcome-note { color: #FFFF00; }
    .terminal-path { color: #00FF00; }
    .projects-block { border-color: #FF00FF; }
    .projects-header {
      background: #1a0033;
      border-color: #FF00FF;
    }
    .projects-title { color: #FF00FF; }
    .quote-box { border-style: dashed; }
    .quote-text {
      font-size: 9px;
      color: #888;
      line-height: 1.8;
      font-style: italic;
      text-align: center;
    }
    .quote-highlight { color: #00FF00; }
    .quote-author {
      color: #555;
      font-style: normal;
    }
    .footer-heading {
      font-family: var(--font-display);
      font-size: 9px;
      color: #00FFFF;
      margin-bottom: 14px;
    }
    .social-footer-handle {
      font-size: 9px;
      color: #555;
    }
    .footer-spaced { margin-top: 6px; }
    .footer-disclaimer {
      margin-top: 4px;
      font-size: 9px;
      color: #333;
    }
    .footer-load-note {
      margin-top: 12px;
      font-family: var(--font-display);
      font-size: 7px;
      color: #333;
    }
    /* Mobile layout: show the homepage content first, then stack sidebar panels. */
    @media (max-width: 700px) {
      body {
        -webkit-text-size-adjust: 100%;
        font-family: var(--font-body);
        min-width: 0;
        text-size-adjust: 100%;
      }

      .marquee-top,
      .site-subtitle,
      .navbar a,
      .welcome-box,
      .section-content,
      .sidebar-box,
      .terminal-box,
      .post-content,
      .footer-text,
      .site-footer {
        font-family: var(--font-body);
      }

      .site-title,
      .sidebar-box h3,
      .section-header h2,
      .welcome-box h2,
      .cert-title,
      .latest-activity-item strong,
      .writeup-card h3,
      .writeup-read-link,
      .project-card-title,
      .project-card-link,
      .footer-heading,
      .footer-load-note {
        font-family: var(--font-display);
      }

      .marquee-top {
        font-size: 11px;
        line-height: 1.6;
      }

      .site-header {
        padding: 12px 8px 6px;
      }

      .site-title {
        font-size: 16px;
        letter-spacing: 0;
        line-height: 1.7;
      }

      .site-subtitle {
        font-size: 11px;
        letter-spacing: 0;
        line-height: 1.7;
      }

      .stars-row {
        font-size: 13px;
        overflow: hidden;
        white-space: nowrap;
      }

      .navbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        padding: 3px;
        gap: 3px;
      }

      .navbar a {
        width: 100%;
        flex: none;
        border: 1px solid #00FFFF;
        padding: 6px 4px;
        text-align: center;
        font-size: 11px;
        line-height: 1.4;
      }

      .navbar a:first-child {
        border-left: 1px solid #00FFFF;
      }

      .page-body {
        flex-direction: column;
        max-width: 100%;
        margin: 10px auto;
        padding: 0 10px;
        gap: 12px;
      }

      .main-content {
        order: 3;
        width: 100%;
        padding: 0;
      }

      .sidebar-left {
        order: 1;
        width: 100%;
      }

      .sidebar-right {
        order: 2;
        width: 100%;
      }

      .sidebar-box,
      .section-block,
      .welcome-box,
      .terminal-box {
        max-width: 100%;
        min-width: 0;
      }

      .section-header {
        align-items: flex-start;
      }

      .section-header h2,
      .welcome-box h2 {
        line-height: 1.8;
        overflow-wrap: anywhere;
      }

      .welcome-box p,
      .section-content p {
        font-size: 12px;
        line-height: 1.8;
        overflow-wrap: anywhere;
      }

      .terminal-line,
      .social-link,
      .project-card p {
        overflow-wrap: anywhere;
      }

      .info-table,
      .info-table tbody,
      .info-table tr,
      .info-table td {
        display: block;
        width: 100%;
      }

      .info-table tr {
        border: 1px solid #003300;
        margin-bottom: 8px;
      }

      .info-table td {
        border: 0;
        border-bottom: 1px solid #003300;
        overflow-wrap: anywhere;
      }

      .info-table td:first-child {
        width: 100%;
      }

      .cert-list,
      .projects-grid,
      .writeup-grid {
        grid-template-columns: 1fr;
      }

      .project-card-topline {
        align-items: flex-start;
        flex-direction: column;
      }

      .social-footer {
        gap: 8px;
      }

      .social-footer-link {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
      }

      .footer-divider {
        overflow: hidden;
        white-space: nowrap;
        letter-spacing: 0;
        font-size: 10px;
      }

      .footer-text {
        overflow-wrap: anywhere;
      }

      .footer-load-note {
        line-height: 1.8;
      }

      .post-hero { grid-template-columns: 1fr; }
      .projects-toolbar { align-items: flex-start; flex-direction: column; }
      .writeups-stats { grid-template-columns: 1fr; }

      .post-content ul,
      .post-content ol {
        padding-left: 20px;
      }

      .writeup-search {
        padding: 8px;
      }

      .writeup-search-topline {
        align-items: flex-start;
        flex-direction: column;
      }

      .post-pager {
        grid-template-columns: 1fr;
      }

      .post-pager-next {
        text-align: left;
      }

      .packet-game-head {
        flex-direction: column;
      }

      .packet-game-field {
        height: 190px;
      }

      .contact-page,
      .projects-page,
      .writeups-page,
      .post-page {
        max-width: 100%;
        padding: 0 10px;
      }

      .contact-submit {
        width: 100%;
      }
    }

    @media (max-width: 380px) {
      .site-title { font-size: 14px; }
      .site-subtitle { font-size: 10px; }
      .navbar { grid-template-columns: 1fr; }
      .social-footer-link { flex-basis: 100%; }
    }

/* ===== YOUTUBE MUSIC PLAYER ===== */
#yt-player-wrap {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9998;
  border: 2px solid #00FFFF;
  background: #000d1a;
  box-shadow: 0 0 16px #00FFFF;
}
#yt-player-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  font-family: var(--font-display);
  color: #00FFFF;
}
#yt-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}
#yt-controls button {
  background: none;
  border: 1px solid #00FFFF;
  color: #00FFFF;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 10px;
  font-family: inherit;
  line-height: 1;
}
#yt-controls button:hover {
  background: #00FFFF;
  color: #000;
}
#yt-player {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}
