@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&display=swap');
@import url('https://unpkg.com/normalize.css') layer(normalize);

@layer normalize, base, demo, stick, effect, srollbar, debug;

@layer debug {
  [data-debug='true'] li {
    outline: 0.05em dashed currentColor;
  }
  [data-debug='true'] h2 {
    outline: 0.05em dashed canvasText;
  }

  /* Removed debug outline for li:last-of-type to prevent visual differences */
}

@layer scrollbar {
  @property --hue {
    initial-value: 0;
    syntax: '<number>';
    inherits: false;
  }
  @property --chroma {
    initial-value: 0;
    syntax: '<number>';
    inherits: true;
  }

  [data-sync-scrollbar='true'] {
    scrollbar-color: oklch(var(--lightness) var(--chroma) var(--hue)) #0000;
  }
  @supports (animation-timeline: scroll()) and (animation-range: 0% 100%) {
    [data-sync-scrollbar='true'][data-animate='true'] {
      timeline-scope: --list;
      scrollbar-color: oklch(var(--lightness) var(--chroma, 0) var(--hue)) #0000;
      -webkit-animation-name: change, chroma-on, chroma-off;
              animation-name: change, chroma-on, chroma-off;
      -webkit-animation-fill-mode: both;
              animation-fill-mode: both;
      -webkit-animation-timing-function: linear;
              animation-timing-function: linear;
      /* animation-timeline: scroll(root); */
      animation-range: entry 50% exit 50%, entry 40% entry 50%,
        exit 30% exit 40%;
      animation-timeline: --list;
      ul {
        view-timeline: --list;
      }
    }
  }

  @-webkit-keyframes change {
    to {
      --hue: var(--end);
    }
  }

  @keyframes change {
    to {
      --hue: var(--end);
    }
  }
  @-webkit-keyframes chroma-on {
    to {
      --chroma: 0.3;
    }
  }
  @keyframes chroma-on {
    to {
      --chroma: 0.3;
    }
  }
  @-webkit-keyframes chroma-off {
    to {
      --chroma: 0;
    }
  }
  @keyframes chroma-off {
    to {
      --chroma: 0;
    }
  }
}

@layer effect {
  :root {
    --start: 0;
    --end: 360;
    --lightness: 65%;
    --base-chroma: 0.3;
  }
  [data-theme='dark'] {
    --lightness: 75%;
  }
  [data-theme='light'] {
    --lightness: 65%;
  }
  @media (prefers-color-scheme: dark) {
    --lightness: 75%;
  }
  ul {
    --step: calc((var(--end) - var(--start)) / (var(--count) - 1));
  }
  /* Removed special styling for last items - all items should look the same */

  /* Make About Me title as prominent as Technical Expertise */
  #about .section-title {
    --font-level: 7 !important;
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    background: linear-gradient(
      canvasText 40%,
      color-mix(in oklch, canvas, canvasText 30%)
    ) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: #0000 !important;
    margin-bottom: 3rem !important;
    line-height: 1.1 !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-self: center !important;
    align-self: center !important;
  }

  /* Force all technologies to have the same appearance - but allow GSAP to control opacity during animation */
  .skills-list li {
    /* opacity: 1 !important; */ /* Temporarily disabled to allow GSAP animation */
    color: inherit !important;
  }

  .skills-list li.gsap-animated {
    opacity: 1 !important; /* Only apply after GSAP animation completes */
  }

  .skills-list li:nth-child(1),
  .skills-list li:nth-child(2),
  .skills-list li:nth-child(3),
  .skills-list li:nth-child(4),
  .skills-list li:nth-child(5),
  .skills-list li:nth-child(6),
  .skills-list li:nth-child(7),
  .skills-list li:nth-child(8),
  .skills-list li:nth-child(9),
  .skills-list li:nth-child(10) {
    opacity: 1 !important; /* Re-enabled for final state */
    color: oklch(
      var(--lightness) var(--base-chroma)
        calc(var(--start) + (var(--step) * var(--i)))
    ) !important;
  }

  /* Force ALL list items to have same appearance, including last ones */
  .skills-list li:last-child,
  .skills-list li:nth-last-child(1),
  .skills-list li:nth-last-child(2),
  .skills-list li:nth-last-child(3),
  .skills-list li:nth-last-child(4),
  .skills-list li:nth-last-child(5),
  .skills-list li:nth-last-child(6),
  .skills-list li:nth-last-child(7),
  .skills-list li:nth-last-child(8),
  .skills-list li:nth-last-child(9),
  .skills-list li:nth-last-child(10) {
    opacity: 1 !important; /* Re-enabled for final state */
    color: oklch(
      var(--lightness) var(--base-chroma)
      calc(var(--start) + (var(--step) * var(--i)))
    ) !important;
    box-shadow: none !important; /* No glow for last items */
  }

  /* Specific guarantee for each section's last item */
  .skills-list li:nth-child(8),  /* Docker - Web Technologies last */
  .skills-list li:nth-child(14), /* App Store Deployment - Mobile last */
  .skills-list li:nth-child(21) { /* Incident Response - Cybersecurity last */
    box-shadow: none !important; /* Absolutely no glow */
  }

  @supports (animation-timeline: scroll()) and (animation-range: 0% 100%) {
    [data-animate='true'] {
      li {
        opacity: 0.2;
        -webkit-animation-name: brighten;
                animation-name: brighten;

        &:first-of-type {
          --start-opacity: 1;
        }
        &:last-of-type {
          --brightness: 1;
          --end-opacity: 1;
        }
        -webkit-animation-fill-mode: both;
                animation-fill-mode: both;
        -webkit-animation-timing-function: linear;
                animation-timing-function: linear;
        animation-range: cover calc(50% - 1lh) calc(50% + 1lh);
        animation-timeline: view();
      }
    }

    @-webkit-keyframes brighten {
      0% {
        opacity: var(--start-opacity, 0.2);
      }
      50% {
        opacity: 1;
        filter: brightness(var(--brightness, 1.2));
      }
      100% {
        opacity: var(--end-opacity, 0.2);
      }
    }

    @keyframes brighten {
      0% {
        opacity: var(--start-opacity, 0.2);
      }
      50% {
        opacity: 1;
        filter: brightness(var(--brightness, 1.2));
      }
      100% {
        opacity: var(--end-opacity, 0.2);
      }
    }
  }
}

@layer stick {
  section:first-of-type {
    --font-level: 6;
    display: flex;
    line-height: 1.25;
    width: 100%;
    padding-left: 5rem;
  }
  section:last-of-type {
    min-height: 100vh;
    display: flex;
    place-items: center;
    width: 100%;
    justify-content: center;

    h2 {
      --font-level: 6;
    }
  }
  main {
    width: 100%;
  }
  section:first-of-type h2 {
    position: sticky;
    top: calc(50% - 0.5lh);
    font-size: inherit;
    margin: 0;
    display: inline-block;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    font-weight: 600;
  }
  ul {
    font-weight: 600;
    padding-inline: 0;
    margin: 0;
    list-style-type: none;
  }

  [data-snap='true'] {
    -ms-scroll-snap-type: y proximity;
        scroll-snap-type: y proximity;

    li {
      scroll-snap-align: center;
    }
  }

  h2 {
    background: linear-gradient(
      canvasText 50%,
      color-mix(in oklch, canvas, canvasText 25%)
    );
    -webkit-background-clip: text;
            background-clip: text;
    color: #0000;
  }

  /* Force ALL last items to have same appearance as others */
  .skills-list li:last-child {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    color: oklch(
      var(--lightness) var(--base-chroma)
      calc(var(--start) + (var(--step) * var(--i)))
    ) !important;
    opacity: 1 !important;
  }

  /* Ensure no special styling for any list items */
  li {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
  }

  /* Removed special styling for li:last-of-type to make all items equal */
}

@layer demo {
  header {
    min-height: 100vh;
    display: flex;
    place-items: center;
    width: 100%;
    padding: 0 1rem;
    position: relative;
    overflow: hidden;
  }

  .hero {
    text-align: center;
    z-index: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .hero-title {
    --font-size-min: 32;
    --font-level: 10;
    text-wrap: pretty;
    line-height: 0.8;
    margin: 0 0 1rem 0;
    background: linear-gradient(
      canvasText 60%,
      color-mix(in oklch, canvas, canvasText)
    );
    -webkit-background-clip: text;
            background-clip: text;
    color: #0000;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
  }

  .hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: canvasText;
    opacity: 0.8;
    margin: 0 0 3rem 0;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
  }

  .hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
  }

  .stat {
    text-align: center;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: canvasText;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
  }

  .stat-label {
    font-size: 0.9rem;
    color: canvasText;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-align: center;
    width: 100%;
    word-wrap: break-word;
  }

  footer {
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .footer-links {
    display: flex;
    gap: 2rem;
  }

  .footer-links a {
    color: canvasText;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.3s ease;
  }

  .footer-links a:hover {
    opacity: 1;
  }

  /* Navigation */
  .navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
  }

  .nav-link {
    color: canvasText;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    position: relative;
  }

  .nav-link:hover,
  .nav-link:focus {
    opacity: 1;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
  }

  .nav-link:hover::after,
  .nav-link:focus::after {
    width: 100%;
  }

  /* Sections */
  section {
    padding: 6rem 1rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100vw;
    width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .section-title {
    --font-size-min: 28;
    --font-level: 6;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(
      canvasText 50%,
      color-mix(in oklch, canvas, canvasText 25%)
    );
    -webkit-background-clip: text;
            background-clip: text;
    color: #0000;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  /* Header Logo */
  .header-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
  }

  .logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* White logo for dark theme */
    transition: transform 0.3s ease, filter 0.3s ease;
  }

  .logo-image:hover {
    transform: scale(1.1);
    filter: brightness(0) invert(1) brightness(1.2); /* Slightly brighter on hover */
  }

  /* About Section */
  .about-section {
    background: rgba(255, 255, 255, 0.02);
  }

  .about-content {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    display: block;
  }

  .about-text {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .about-description {
    font-size: 1.5rem;
    line-height: 1.8;
    color: canvasText;
    opacity: 1 !important; /* Force visible */
    margin-bottom: 3rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    visibility: visible !important; /* Ensure visibility */
    word-wrap: break-word;
    hyphens: auto;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-family: inherit !important;
    transform: none !important;
  }

  .about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .highlight-item {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
  }

  .highlight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
  }

  .highlight-item:hover::before {
    left: 100%;
  }

  .highlight-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .highlight-item h3 {
    margin: 0 0 1rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: canvasText;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
  }

  .highlight-item p {
    margin: 0;
    color: canvasText;
    opacity: 0.85;
    line-height: 1.6;
    font-size: 1rem;
    position: relative;
    z-index: 1;
  }

  /* Skills Section */
  .skills-content {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
  }

  .skill-category {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
  }

  .category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: canvasText;
    margin: 0 0 2rem 0;
    text-align: center;
  }

  .skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skills-list li {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
    color: canvasText;
    transition: all 0.3s ease;
    text-align: center;
    will-change: transform, opacity;
  }

  /* Hover effects now handled by GSAP */

  /* Projects Section */
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0.5rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }

  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: canvasText;
    margin: 0 0 0.75rem 0;
    word-wrap: break-word;
    hyphens: auto;
  }

  .project-description {
    color: canvasText;
    opacity: 0.8;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    word-wrap: break-word;
    hyphens: auto;
  }

  .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 1rem;
  }

  .tech-tag {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: canvasText;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    display: inline-block;
  }

  /* Contact Section */
  .contact-content {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: canvasText;
    opacity: 0.9;
    margin-bottom: 3rem;
  }

  .contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: canvasText;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
  }

  .contact-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.08);
  }

  .contact-icon {
    font-size: 1.5rem;
  }

  /* Theme Toggle */
  .theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: canvasText;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }

  /* Loading animations */
  body:not(.loaded) {
    opacity: 0;
  }

  body.loaded {
    animation: fadeIn 0.5s ease-out;
  }

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

  /* Animate in class for sections */
  .animate-in {
    animation: slideUp 0.8s ease-out;
  }

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

  /* Navigation active state */
  .nav-link.active {
    opacity: 1;
  }

  .nav-link.active::after {
    width: 100%;
  }

  /* Skills Animation - Advanced GSAP Ready */
  .skills-list li {
    will-change: transform, opacity, box-shadow, filter;
    cursor: pointer;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* Remove all CSS transitions - GSAP handles everything */
    transition: none !important;
  }

  /* GSAP handles all hover effects now */

  /* Responsive Design */
  @media (max-width: 768px) {
    /* General Layout */
    header {
      padding: 0 1rem;
      min-height: 90vh;
    }

    .hero {
      padding: 2rem 0;
    }

    .hero-title {
      --font-level: 8;
      font-size: clamp(2.5rem, 8vw, 4rem);
      margin-bottom: 1rem;
      line-height: 1.1;
    }

    .hero-subtitle {
      font-size: clamp(1rem, 4vw, 1.5rem);
      margin-bottom: 2rem;
    }

    .hero-stats {
      flex-direction: column;
      gap: 1rem;
      max-width: 100%;
      padding: 0 1rem;
    }

    .stat {
      min-width: 100px;
      max-width: 100%;
      padding: 1rem;
      text-align: center;
    }

    .stat-number {
      font-size: clamp(1.8rem, 6vw, 2.5rem);
      margin-bottom: 0.25rem;
    }

    .stat-label {
      font-size: 0.85rem;
    }

    /* Navigation */
    .navigation {
      padding: 0.5rem 1rem;
    }

    .nav-links {
      gap: 0.5rem;
      padding: 0 0.5rem;
      justify-content: space-around;
    }

    .nav-link {
      font-size: 0.8rem;
      padding: 0.5rem 0.75rem;
      min-width: auto;
    }

    /* Sections */
    section {
      padding: 4rem 1rem;
      min-height: auto;
    }

    .section-title {
      --font-level: 5;
      margin-bottom: 2rem;
      font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    /* Make About Me title prominent on tablet too */
    #about .section-title {
      --font-level: 6 !important;
      font-size: clamp(2.2rem, 6vw, 3.5rem) !important;
      font-weight: 700 !important;
      margin-bottom: 2.5rem !important;
      text-align: center !important;
      display: block !important;
      width: 100% !important;
      position: relative !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    /* Header Logo Tablet */
    .header-logo {
      top: 1.5rem;
      left: 1.5rem;
    }

    .logo-image {
      width: 60px;
      height: 60px;
    }

    /* About Section */
    .about-content {
      padding: 0;
    }

    .about-text {
      text-align: center;
      padding: 0;
    }

    .about-description {
      font-size: 1.2rem;
      line-height: 1.7;
      margin-bottom: 2rem;
      padding: 0 1rem;
      font-weight: 500;
      opacity: 1 !important;
      visibility: visible !important;
      text-align: center;
      word-wrap: break-word;
      hyphens: auto;
      overflow-wrap: break-word;
      white-space: normal;
      max-width: 100%;
      width: 100%;
      box-sizing: border-box;
      display: block !important;
      position: relative !important;
      z-index: 1 !important;
      background: transparent !important;
      border: none !important;
      outline: none !important;
      font-family: inherit !important;
      transform: none !important;
    }

    .about-highlights {
      grid-template-columns: 1fr;
      gap: 1.5rem;
      padding: 0;
    }

    .highlight-item {
      padding: 1.5rem 1rem;
      text-align: center;
    }

    .highlight-item h3 {
      font-size: 1.2rem;
      margin-bottom: 0.75rem;
    }

    .highlight-item p {
      font-size: 0.9rem;
      line-height: 1.5;
    }

    /* Skills Section */
    .skills-content {
      grid-template-columns: 1fr;
      gap: 2rem;
      padding: 0;
    }

    .skill-category {
      padding: 1.5rem 1rem;
      text-align: center;
    }

    .category-title {
      font-size: 1.3rem;
      margin-bottom: 1.5rem;
    }

    .skills-list {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      padding: 0;
    }

    .skills-list li {
      padding: 0.75rem 1rem;
      font-size: 0.9rem;
      text-align: center;
      border-radius: 0.5rem;
    }

    /* Projects Section */
    .projects-grid {
      grid-template-columns: 1fr;
      gap: 1.5rem;
      padding: 0;
    }

    .project-card {
      max-width: 100%;
      padding: 1.5rem;
    }

    .project-content {
      padding: 0;
    }

    .project-title {
      font-size: 1.1rem;
      margin-bottom: 0.75rem;
    }

    .project-description {
      font-size: 0.85rem;
      margin-bottom: 1rem;
      line-height: 1.4;
    }

    .project-tech {
      gap: 0.5rem;
      flex-wrap: wrap;
      justify-content: center;
    }

    .tech-tag {
      font-size: 0.75rem;
      padding: 0.2rem 0.6rem;
      max-width: none;
    }

    /* Contact Section */
    .contact-content {
      padding: 0;
    }

    .contact-description {
      font-size: 1rem;
      margin-bottom: 2rem;
    }

    .contact-methods {
      gap: 1rem;
      padding: 0;
    }

    .contact-link {
      padding: 1rem 1.5rem;
      font-size: 0.9rem;
      max-width: 100%;
    }

    .contact-icon {
      font-size: 1.2rem;
    }

    /* Footer */
    .footer-content {
      flex-direction: column;
      text-align: center;
      gap: 1.5rem;
      padding: 2rem 1rem;
    }

    .footer-links {
      gap: 1rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    .footer-links a {
      font-size: 0.9rem;
    }

    /* Theme Toggle */
    .theme-toggle {
      top: 1rem;
      right: 1rem;
      width: 40px;
      height: 40px;
      font-size: 1rem;
    }
  }

  @media (max-width: 480px) {
    .hero-title {
      --font-level: 6;
      font-size: clamp(1.8rem, 9vw, 2.5rem);
      margin-bottom: 0.75rem;
      line-height: 1.1;
      letter-spacing: -0.01em;
    }

    .hero-subtitle {
      font-size: clamp(0.9rem, 4.5vw, 1.2rem);
      margin-bottom: 1.5rem;
      line-height: 1.4;
    }

    .stat-number {
      font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .stat-label {
      font-size: 0.8rem;
    }

    .hero-stats {
      gap: 0.75rem;
      padding: 0 0.5rem;
    }

    .stat {
      min-width: 80px;
      padding: 0.75rem 0.5rem;
    }

    .stat-number {
      font-size: clamp(1.4rem, 7vw, 2rem);
      margin-bottom: 0.2rem;
    }

    .stat-label {
      font-size: 0.75rem;
      letter-spacing: 0.02em;
    }

    section {
      padding: 3rem 0.5rem;
    }

    .section-title {
      --font-level: 4;
      margin-bottom: 1.5rem;
      font-size: clamp(1.5rem, 7vw, 2rem);
      line-height: 1.2;
    }

    /* Header Logo Mobile */
    .header-logo {
      top: 1rem;
      left: 1rem;
    }

    .logo-image {
      width: 50px;
      height: 50px;
    }

    /* About Section Mobile */
    .about-content {
      padding: 0;
    }

    /* Make About Me title prominent on mobile too */
    #about .section-title {
      --font-level: 5 !important;
      font-size: clamp(1.8rem, 8vw, 2.5rem) !important;
      font-weight: 700 !important;
      margin-bottom: 2rem !important;
      text-align: center !important;
      display: block !important;
      width: 100% !important;
      position: relative !important;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    .about-description {
      font-size: 1rem;
      line-height: 1.6;
      margin-bottom: 1.5rem;
      padding: 0 0.5rem;
      font-weight: 500;
      opacity: 1 !important;
      visibility: visible !important;
      text-align: center;
      word-wrap: break-word;
      hyphens: auto;
      overflow-wrap: break-word;
      white-space: normal;
      max-width: 100%;
      width: 100%;
      box-sizing: border-box;
      display: block !important;
      position: relative !important;
      z-index: 1 !important;
      background: transparent !important;
      border: none !important;
      outline: none !important;
      font-family: inherit !important;
      transform: none !important;
    }

    .contact-description {
      font-size: 0.95rem;
      margin-bottom: 1.5rem;
      padding: 0 0.5rem;
    }

    .contact-methods {
      gap: 0.75rem;
    }

    .contact-link {
      padding: 0.8rem 1.2rem;
      font-size: 0.85rem;
      border-radius: 0.5rem;
      max-width: 100%;
    }

    .contact-icon {
      font-size: 1.1rem;
    }

    .theme-toggle {
      top: 0.5rem;
      right: 0.5rem;
      width: 36px;
      height: 36px;
      font-size: 0.9rem;
    }

    .footer-content {
      padding: 1.5rem 0.5rem;
      gap: 1rem;
    }

    .footer-links {
      gap: 0.8rem;
    }

    .footer-links a {
      font-size: 0.85rem;
    }

    .bear-link {
      bottom: 1rem;
      right: 0.5rem;
      width: 36px;
      height: 36px;
    }

    .navigation {
      padding: 0.25rem 0.5rem;
    }

    .nav-links {
      gap: 0.25rem;
      padding: 0 0.25rem;
      justify-content: space-between;
    }

    .nav-link {
      font-size: 0.7rem;
      padding: 0.4rem 0.6rem;
      min-width: 0;
      flex: 1;
      text-align: center;
    }

    .about-highlights {
      gap: 1rem;
    }

    .highlight-item {
      padding: 1.5rem 1rem;
    }

    .highlight-item h3 {
      font-size: 1.2rem;
      margin-bottom: 0.6rem;
    }

    .highlight-item p {
      font-size: 0.9rem;
      line-height: 1.5;
    }

    .skills-content {
      gap: 1.5rem;
    }

    .skill-category {
      padding: 1.25rem 0.75rem;
    }

    .category-title {
      font-size: 1.2rem;
      margin-bottom: 1.25rem;
    }

    .skills-list {
      gap: 0.5rem;
    }

    .skills-list li {
      padding: 0.6rem 0.75rem;
      font-size: 0.85rem;
      border-radius: 0.4rem;
    }

    .projects-grid {
      gap: 1rem;
    }

    .project-card {
      padding: 1.25rem;
    }

    .project-title {
      font-size: 1rem;
      margin-bottom: 0.6rem;
    }

    .project-description {
      font-size: 0.8rem;
      margin-bottom: 0.8rem;
    }

    .project-tech {
      gap: 0.4rem;
    }

    .tech-tag {
      font-size: 0.7rem;
      padding: 0.15rem 0.5rem;
    }

    .projects-grid {
      grid-template-columns: 1fr !important;
      padding: 0 0.25rem;
    }

    .project-content {
      padding: 0.75rem;
    }

    .project-title {
      font-size: 1rem;
      margin-bottom: 0.5rem;
    }

    .project-description {
      font-size: 0.8rem;
      margin-bottom: 0.5rem;
    }

    .tech-tag {
      font-size: 0.65rem;
      padding: 0.1rem 0.3rem;
      max-width: 80px;
    }
  }

  /* Print styles */
  @media print {
    .navigation,
    .theme-toggle,
    .bear-link {
      display: none !important;
    }

    body {
      background: white !important;
      color: black !important;
    }

    section {
      break-inside: avoid;
      page-break-inside: avoid;
    }
  }

  /* High contrast mode support */
  @media (prefers-contrast: high) {
    .project-card,
    .highlight-item,
    .skill-category {
      border: 2px solid canvasText;
      background: canvas;
    }

    .nav-link::after {
      background: canvasText;
    }
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}

@layer base {
  :root {
    --font-size-min: 14;
    --font-size-max: 20;
    --font-ratio-min: 1.1;
    --font-ratio-max: 1.33;
    --font-width-min: 375;
    --font-width-max: 1500;
  }

  html {
    color-scheme: light dark;
  }

  [data-theme='light'] {
    color-scheme: light only;
  }

  [data-theme='dark'] {
    color-scheme: dark only;
  }

  :where(.fluid) {
    --fluid-min: calc(
      var(--font-size-min) * pow(var(--font-ratio-min), var(--font-level, 0))
    );
    --fluid-max: calc(
      var(--font-size-max) * pow(var(--font-ratio-max), var(--font-level, 0))
    );
    --fluid-preferred: calc(
      (var(--fluid-max) - var(--fluid-min)) /
        (var(--font-width-max) - var(--font-width-min))
    );
    --fluid-type: clamp(
      (var(--fluid-min) / 16) * 1rem,
      ((var(--fluid-min) / 16) * 1rem) -
        (((var(--fluid-preferred) * var(--font-width-min)) / 16) * 1rem) +
        (var(--fluid-preferred) * var(--variable-unit, 100vi)),
      (var(--fluid-max) / 16) * 1rem
    );
    font-size: var(--fluid-type);
  }

  *,
  *:after,
  *:before {
    box-sizing: border-box;
  }

  body {
    display: grid;
    place-items: center;
    background: light-dark(white, black);
    min-height: 100vh;
    font-family: 'Geist', 'SF Pro Text', 'SF Pro Icons', 'AOS Icons',
      'Helvetica Neue', Helvetica, Arial, sans-serif, system-ui;
    overflow-x: hidden !important;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100vw;
    width: 100vw;
  }

  body::before {
    --size: 30px;
    --line: color-mix(in hsl, canvasText, transparent 70%);
    content: '';
    height: 100vh;
    width: 100vw;
    position: fixed;
    background: linear-gradient(
          90deg,
          var(--line) 1px,
          transparent 1px var(--size)
        )
        50% 50% / var(--size) var(--size),
      linear-gradient(var(--line) 1px, transparent 1px var(--size)) 50% 50% /
        var(--size) var(--size);
    -webkit-mask: linear-gradient(-20deg, transparent 50%, white);
            mask: linear-gradient(-20deg, transparent 50%, white);
    top: 0;
    transform-style: flat;
    pointer-events: none;
    z-index: -1;
  }

  .bear-link {
    color: canvasText;
    position: fixed;
    top: 1rem;
    left: 1rem;
    width: 48px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    opacity: 0.8;
  }

  :where(.x-link, .bear-link):is(:hover, :focus-visible) {
    opacity: 1;
  }

  .bear-link svg {
    width: 75%;
  }

  /* Utilities */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }
}

div.tp-dfwv {
  position: fixed;
}