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

    :root {
      --bg: #f5f5f3;
      --surface: #ffffff;
      --text: #111111;
      --muted: #999999;
      --border: #e0e0e0;
      --tag-bg: #efefef;
      --nav-h: 64px;
      --text-dim: rgba(17, 17, 17, 0);

      /* Mobile Group (Indigo) */
      --mobile-filled-bg: #e0e7ff;
      --mobile-filled-color: #3730a3;
      --mobile-filled-border: #c7d2fe;
      --mobile-outline-bg: rgba(79, 70, 229, 0.03);
      --mobile-outline-color: #6366f1;
      --mobile-outline-border: rgba(99, 102, 241, 0.25);
      --mobile-accent: #4f46e5;

      /* Backend Group (Teal) */
      --backend-filled-bg: #ccfbf1;
      --backend-filled-color: #115e59;
      --backend-filled-border: #99f6e4;
      --backend-outline-bg: rgba(13, 148, 136, 0.03);
      --backend-outline-color: #14b8a6;
      --backend-outline-border: rgba(20, 184, 166, 0.25);
      --backend-accent: #0d9488;

      /* Tools Group (Purple) */
      --tools-filled-bg: #f3e8ff;
      --tools-filled-color: #6b21a8;
      --tools-filled-border: #e9d5ff;
      --tools-outline-bg: rgba(124, 58, 237, 0.03);
      --tools-outline-color: #a855f7;
      --tools-outline-border: rgba(168, 85, 247, 0.25);
      --tools-accent: #7c3aed;

      /* Frontend Group (Rose) */
      --frontend-filled-bg: #ffe4e6;
      --frontend-filled-color: #9f1239;
      --frontend-filled-border: #fecdd3;
      --frontend-outline-bg: rgba(225, 29, 72, 0.03);
      --frontend-outline-color: #f43f5e;
      --frontend-outline-border: rgba(244, 63, 94, 0.25);
      --frontend-accent: #db2777;
    }

    /* Better touch targets */
    button {
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }

    a {
      -webkit-tap-highlight-color: transparent;
    }

    [data-theme="dark"] {
      --bg: #0c0c0c;
      --surface: #161616;
      --text: #f0f0f0;
      --muted: #666666;
      --border: #252525;
      --tag-bg: #1e1e1e;
      --text-dim: rgba(240, 240, 240, 0);

      /* Mobile Group (Indigo) */
      --mobile-filled-bg: rgba(99, 102, 241, 0.2);
      --mobile-filled-color: #c7d2fe;
      --mobile-filled-border: rgba(99, 102, 241, 0.45);
      --mobile-outline-bg: transparent;
      --mobile-outline-color: rgba(165, 180, 252, 0.65);
      --mobile-outline-border: rgba(99, 102, 241, 0.2);
      --mobile-accent: #818cf8;

      /* Backend Group (Teal) */
      --backend-filled-bg: rgba(20, 184, 166, 0.18);
      --backend-filled-color: #99f6e4;
      --backend-filled-border: rgba(20, 184, 166, 0.4);
      --backend-outline-bg: transparent;
      --backend-outline-color: rgba(153, 246, 228, 0.65);
      --backend-outline-border: rgba(20, 184, 166, 0.2);
      --backend-accent: #2dd4bf;

      /* Tools Group (Purple) */
      --tools-filled-bg: rgba(168, 85, 247, 0.18);
      --tools-filled-color: #e9d5ff;
      --tools-filled-border: rgba(168, 85, 247, 0.45);
      --tools-outline-bg: transparent;
      --tools-outline-color: rgba(233, 213, 255, 0.65);
      --tools-outline-border: rgba(168, 85, 247, 0.2);
      --tools-accent: #a78bfa;

      /* Frontend Group (Rose) */
      --frontend-filled-bg: rgba(244, 63, 94, 0.18);
      --frontend-filled-color: #fecdd3;
      --frontend-filled-border: rgba(244, 63, 94, 0.45);
      --frontend-outline-bg: transparent;
      --frontend-outline-color: rgba(254, 205, 211, 0.65);
      --frontend-outline-border: rgba(244, 63, 94, 0.2);
      --frontend-accent: #fb7185;
    }

    html {
      scroll-behavior: smooth;
      background: var(--bg);
      transition: background 0.4s;
    }

    body {
      font-family: 'Inter', sans-serif;
      color: var(--text);
      transition: color 0.4s;
      overflow-x: hidden;
      position: relative;
    }

    /* ═══ INTRO OVERLAY ═══ */
    #intro-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: #050508;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      pointer-events: all;
      transition: opacity 0.5s ease, visibility 0.5s ease;
    }

    #intro-overlay.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .intro-text {
      position: relative;
      z-index: 2;
      text-align: center;
      color: #fff;
    }

    .intro-line1 {
      font-size: clamp(13px, 1.5vw, 16px);
      letter-spacing: 0.25em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.4);
      margin-bottom: 16px;
      opacity: 0;
      transform: translateY(10px);
      animation: introFadeUp 0.25s 0.05s forwards;
    }

    .intro-name {
      font-family: 'Playfair Display', serif;
      font-size: clamp(40px, 7vw, 88px);
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1;
      color: #fff;
      opacity: 0;
      transform: translateY(20px);
      animation: introFadeUp 0.3s 0.1s forwards;
    }

    .intro-bar {
      width: 0;
      height: 1px;
      background: rgba(255, 255, 255, 0.25);
      margin: 28px auto;
      animation: introBar 0.3s 0.2s forwards;
    }

    .intro-role {
      font-size: clamp(12px, 1.2vw, 14px);
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: rgba(255, 255, 255, 0.35);
      opacity: 0;
      animation: introFadeUp 0.25s 0.25s forwards;
    }

    @keyframes introFadeUp {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes introBar {
      to {
        width: 120px;
      }
    }

    /* ═══ NAV ═══ */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--nav-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 48px;
      z-index: 100;
      background: var(--bg);
      border-bottom: 1px solid transparent;
      transition: border-color 0.3s, background 0.4s;
    }

    nav.scrolled {
      border-color: var(--border);
    }

    .nav-links {
      display: flex;
      gap: 4px;
    }

    .nav-link {
      padding: 7px 16px;
      border-radius: 999px;
      border: 1px solid transparent;
      cursor: pointer;
      color: var(--muted);
      background: transparent;
      transition: all 0.2s;
      text-transform: uppercase;
      font-size: 11px;
      letter-spacing: 0.08em;
      font-family: 'Inter', sans-serif;
      text-decoration: none;
    }

    .nav-link:hover {
      color: var(--text);
      border-color: var(--border);
    }

    .nav-link.active {
      background: var(--text);
      color: var(--bg);
      border-color: var(--text);
    }

    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .theme-btn {
      width: 36px;
      height: 36px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      transition: all 0.2s;
      color: var(--text);
    }

    .theme-btn:hover {
      border-color: var(--text);
    }

    .lang-btn {
      height: 36px;
      padding: 0 10px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--surface);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.05em;
      transition: all 0.2s;
      color: var(--text);
      font-family: 'Inter', sans-serif;
    }

    .lang-btn:hover {
      border-color: var(--text);
    }

    /* Mobile nav */
    .nav-hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 8px;
      border: none;
      background: none;
    }

    .nav-hamburger span {
      display: block;
      width: 22px;
      height: 1.5px;
      background: var(--text);
      transition: all 0.3s;
    }

    .mobile-menu {
      display: none;
      position: fixed;
      top: var(--nav-h);
      left: 0;
      right: 0;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      padding: 16px 24px;
      z-index: 99;
      flex-direction: column;
      gap: 4px;
    }

    .mobile-menu.open {
      display: flex;
    }

    .mobile-menu .nav-link {
      text-align: left;
      border-radius: 8px;
    }

    /* ═══ JOURNEY LINE (full page, scroll-drawn) ═══ */
    #journey-svg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      pointer-events: none;
      z-index: -1;
      overflow: visible;
    }

    #journey-path {
      /* Ghost trail removed — no pre-drawn faint line */
      display: none;
    }

    #journey-path-filled {
      fill: none;
      stroke: var(--text);
      stroke-width: 1.5;
      stroke-opacity: 0.55;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-dasharray: 10000;
      stroke-dashoffset: 10000;
      transition: stroke-dashoffset 0.05s linear;
    }

    .journey-node {
      fill: var(--bg);
      stroke: var(--text);
      stroke-width: 1.5;
      opacity: 0;
      transition: opacity 0.5s ease;
    }

    .journey-node.lit {
      opacity: 0.8;
    }

    .journey-node-inner {
      fill: var(--text);
      opacity: 0;
      transition: opacity 0.5s ease;
    }

    .journey-node-inner.lit {
      opacity: 0.7;
    }

    .journey-node-label {
      fill: var(--muted);
      font-family: 'Inter', sans-serif;
      font-size: 9px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      opacity: 0;
      transition: opacity 0.5s ease;
      pointer-events: none;
    }

    .journey-node-label.lit {
      opacity: 0.5;
    }

    /* ═══ SECTIONS ═══ */
    section {
      min-height: 100vh;
      padding: calc(var(--nav-h) + 80px) 48px 80px;
      position: relative;
      z-index: 1;
    }

    /* ═══ ABOUT ═══ */
    #about {
      padding-top: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }


    .hero-content {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 300px 1fr;
      gap: 80px;
      align-items: center;
      max-width: 1100px;
      margin: 0 auto;
      padding: var(--nav-h) 0 0;
      height: 100vh;
    }

    .hero-left {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .avatar-wrap {
      width: 220px;
      height: 220px;
      border-radius: 50%;
      overflow: hidden;
      border: 2px solid var(--border);
      flex-shrink: 0;
    }

    .avatar-placeholder {
      width: 100%;
      height: 100%;
      background: var(--tag-bg);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 64px;
    }

    .avatar-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .stat-cards {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .stat-card {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 18px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      transition: transform 0.2s, border-color 0.2s;
    }

    .stat-card:hover {
      transform: translateX(4px);
      border-color: var(--text);
    }

    .stat-icon {
      font-size: 15px;
      color: var(--muted);
      width: 20px;
    }

    .stat-val {
      font-size: 15px;
      font-weight: 600;
    }

    .stat-label {
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }

    .hero-eyebrow {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--muted);
      margin-bottom: 16px;
      overflow: hidden;
    }

    .hero-eyebrow span {
      display: block;
      transform: translateY(100%);
      animation: slideUp 0.6s 0.6s forwards;
    }

    .hero-name {
      font-family: 'Playfair Display', serif;
      font-size: clamp(48px, 5.5vw, 76px);
      font-weight: 700;
      line-height: 1.05;
      letter-spacing: -0.02em;
      overflow: hidden;
      margin-bottom: 8px;
    }

    .hero-name span {
      display: block;
      transform: translateY(100%);
      animation: slideUp 0.7s 0.8s forwards;
    }

    .hero-title {
      font-size: 17px;
      color: var(--muted);
      font-weight: 300;
      overflow: hidden;
      margin-bottom: 36px;
    }

    .hero-title span {
      display: block;
      transform: translateY(100%);
      animation: slideUp 0.6s 1.0s forwards;
    }

    .hero-bio {
      font-size: 15px;
      line-height: 1.8;
      color: var(--muted);
      max-width: 480px;
      border-left: 2px solid var(--border);
      padding-left: 20px;
      opacity: 0;
      animation: fadeIn 0.8s 1.2s forwards;
    }

    .hero-scroll {
      margin-top: 48px;
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--muted);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      opacity: 0;
      animation: fadeIn 0.6s 1.6s forwards;
    }

    .hero-scroll::before {
      content: '';
      display: block;
      width: 40px;
      height: 1px;
      background: var(--muted);
    }

    @keyframes slideUp {
      to {
        transform: translateY(0);
      }
    }

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

    /* ═══ SECTION HEADERS ═══ */
    .section-header {
      margin-bottom: 64px;
    }

    .section-eyebrow {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.14em;
      color: var(--muted);
      margin-bottom: 12px;
    }

    .section-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(38px, 5vw, 62px);
      font-weight: 700;
      line-height: 1;
      letter-spacing: -0.02em;
    }

    /* ═══ REVEAL ANIMATIONS ═══ */
    .reveal-line {
      display: inline-block;
      overflow: hidden;
      position: relative;
    }

    .reveal-line::after {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--bg);
      transform: translateX(0);
      transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .reveal-line.revealed::after {
      transform: translateX(101%);
    }

    /* ═══ PEN-WRITTEN TITLES ═══
       Each letter starts invisible; JS lights them up one by one, in sync
       with how far the journey line has been drawn — so the section title
       looks like it's being written by the pen at the tip of the line,
       not "revealed" as a single block. */
    .pen-text .letter {
      display: inline-block;
      opacity: 0;
      transform: translateY(4px) scale(0.9);
      filter: blur(1.5px);
      transition: opacity 0.2s ease-out, transform 0.2s ease-out, filter 0.2s ease-out;
    }

    .pen-text .letter.lit {
      opacity: 1;
      transform: none;
      filter: none;
    }

    @media (max-width: 768px) {

      /* No journey line on mobile, so there's nothing to "write" the
         letters in — just show the title normally. */
      .pen-text .letter {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
      }
    }



    .reveal-up {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-up.revealed {
      opacity: 1;
      transform: translateY(0);
    }

    .reveal-fade {
      opacity: 0;
      transition: opacity 0.8s ease;
    }

    .reveal-fade.revealed {
      opacity: 1;
    }

    .stagger>* {
      opacity: 0;
      transform: translateY(22px);
      transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .stagger.revealed>*:nth-child(1) {
      opacity: 1;
      transform: none;
      transition-delay: 0s;
    }

    .stagger.revealed>*:nth-child(2) {
      opacity: 1;
      transform: none;
      transition-delay: 0.1s;
    }

    .stagger.revealed>*:nth-child(3) {
      opacity: 1;
      transform: none;
      transition-delay: 0.2s;
    }

    .stagger.revealed>*:nth-child(4) {
      opacity: 1;
      transform: none;
      transition-delay: 0.3s;
    }

    .stagger.revealed>*:nth-child(5) {
      opacity: 1;
      transform: none;
      transition-delay: 0.4s;
    }

    .stagger.revealed>*:nth-child(6) {
      opacity: 1;
      transform: none;
      transition-delay: 0.5s;
    }

    .h-divider {
      width: 100%;
      height: 1px;
      background: var(--border);
      position: relative;
      overflow: hidden;
      margin: 48px 0;
    }

    .h-divider::after {
      content: '';
      position: absolute;
      inset: 0;
      background: var(--bg);
      transform: translateX(0);
      transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .h-divider.revealed::after {
      transform: translateX(101%);
    }

    /* ═══ EXPERIENCE ═══ */
    #experience {
      max-width: 1100px;
      margin: 0 auto;
    }

    .timeline {
      padding-left: 32px;
    }

    .timeline-item {
      position: relative;
      padding-bottom: 52px;
    }

    .timeline-item:last-child {
      padding-bottom: 0;
    }

    .timeline-date {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .exp-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 28px 32px;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.35s;
      cursor: default;
    }

    .exp-card:hover {
      transform: translateX(10px);
      border-color: var(--text);
      box-shadow: -4px 0 0 0 var(--text);
    }

    .exp-role {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .exp-company {
      font-size: 13px;
      color: var(--muted);
      margin-bottom: 14px;
    }

    .exp-desc {
      font-size: 14px;
      line-height: 1.75;
      color: var(--muted);
    }

    /* Hover micro tags on exp cards */
    .exp-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, margin-top 0.35s;
      opacity: 0;
      margin-top: 0;
    }

    .exp-card:hover .exp-tags {
      max-height: 80px;
      opacity: 1;
      margin-top: 16px;
    }

    .exp-tag {
      font-size: 10px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      padding: 4px 10px;
      border: 1px solid var(--border);
      border-radius: 999px;
      color: var(--muted);
      background: var(--tag-bg);
    }

    /* Stat pill row that slides in on hover */
    .exp-stats {
      display: flex;
      gap: 20px;
      align-items: center;
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, opacity 0.35s ease 0.05s, margin-top 0.35s 0.05s;
      margin-top: 0;
    }

    .exp-card:hover .exp-stats {
      max-height: 60px;
      opacity: 1;
      margin-top: 20px;
    }

    .exp-stat {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .exp-stat-val {
      font-size: 16px;
      font-weight: 600;
      color: var(--text);
    }

    .exp-stat-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
    }

    .exp-stat-divider {
      width: 1px;
      height: 28px;
      background: var(--border);
    }

    /* ═══ PROJECTS ═══ */
    #projects {
      padding: 0;
      min-height: auto;
    }

    .projects-intro {
      max-width: 1100px;
      margin: 0 auto;
      padding: calc(var(--nav-h) + 80px) 48px 64px;
    }

    .project-full {
      position: relative;
      min-height: 100vh;
      display: flex;
      align-items: center;
      border-top: 1px solid var(--border);
      overflow: hidden;
    }

    .project-bg-num {
      position: absolute;
      right: -30px;
      top: 50%;
      transform: translateY(-50%);
      font-family: 'Playfair Display', serif;
      font-size: clamp(140px, 18vw, 240px);
      font-weight: 700;
      color: var(--border);
      line-height: 1;
      pointer-events: none;
      user-select: none;
      letter-spacing: -0.05em;
    }

    .project-inner {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 1fr 780px;
      gap: 80px;
      align-items: center;
      width: 100%;
      max-width: 1500px;
      margin: 0 auto;
      padding: 80px 48px;
    }

    .project-inner.reverse {
      grid-template-columns: 780px 1fr;
    }

    .project-inner.reverse .project-info {
      order: 2;
    }

    .project-inner.reverse .project-visual {
      order: 1;
    }

    .project-counter {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--muted);
      margin-bottom: 20px;
    }

    .project-name {
      font-family: 'Playfair Display', serif;
      font-size: clamp(34px, 4vw, 50px);
      font-weight: 700;
      line-height: 1.05;
      letter-spacing: -0.02em;
      margin-bottom: 20px;
    }

    .project-desc {
      font-size: 15px;
      line-height: 1.8;
      color: var(--muted);
      margin-bottom: 28px;
      max-width: 460px;
    }

    .project-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 32px;
    }

    .tag {
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 5px 12px;
      background: var(--tag-bg);
      border-radius: 999px;
      color: var(--muted);
    }

    .project-details-floating {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .proj-detail {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      font-size: 13px;
      color: var(--muted);
      opacity: 0;
      transform: translateX(-12px);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .proj-detail.revealed {
      opacity: 1;
      transform: none;
    }

    .proj-detail-icon {
      font-size: 14px;
      margin-top: 1px;
      flex-shrink: 0;
    }

    .proj-detail strong {
      color: var(--text);
      display: block;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      margin-bottom: 2px;
    }

    .project-visual {
      position: relative;
    }

    .proj-img-wrap {
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid var(--border);
      aspect-ratio: 16/9;
      background: var(--tag-bg);
      position: relative;
    }

    .proj-img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.6s ease;
    }

    .proj-img-wrap img.proj-card-img {
      object-fit: cover;
      padding: 0;
      background: var(--tag-bg);
    }

    .project-full:hover .proj-img-wrap img {
      transform: scale(1.03);
    }

    .proj-img-placeholder {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      color: var(--muted);
      font-size: 13px;
    }

    .proj-emoji {
      font-size: 48px;
    }

    .proj-badge {
      position: absolute;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 16px;
      font-size: 12px;
      white-space: nowrap;
      box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
      opacity: 0;
      transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .proj-badge.pos-tl {
      top: -16px;
      left: -16px;
      transform: translate(-10px, -8px);
    }

    .proj-badge.pos-tr {
      top: -16px;
      right: -16px;
      transform: translate(10px, -8px);
    }

    .proj-badge.pos-br {
      bottom: -16px;
      right: -16px;
      transform: translate(10px, 8px);
    }

    .proj-badge.pos-bl {
      bottom: -16px;
      left: -16px;
      transform: translate(-10px, 8px);
    }

    .proj-badge.revealed {
      opacity: 1;
      transform: translate(0, 0) !important;
    }

    .proj-badge-label {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 3px;
    }

    .proj-badge-val {
      font-weight: 600;
      font-size: 13px;
      color: var(--text);
    }

    /* ═══ SKILLS ═══ */
    #skills {
      max-width: 1100px;
      margin: 0 auto;
    }

    .skills-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }

    .skill-group {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 32px;
      transition: transform 0.3s, border-color 0.3s;
    }

    .skill-group:hover {
      transform: translateY(-4px);
    }

    /* Group Color Mapping Overrides */
    .skill-group.group-mobile {
      --group-filled-bg: var(--mobile-filled-bg);
      --group-filled-color: var(--mobile-filled-color);
      --group-filled-border: var(--mobile-filled-border);
      --group-outline-bg: var(--mobile-outline-bg);
      --group-outline-color: var(--mobile-outline-color);
      --group-outline-border: var(--mobile-outline-border);
      --group-accent: var(--mobile-accent);
    }

    .skill-group.group-backend {
      --group-filled-bg: var(--backend-filled-bg);
      --group-filled-color: var(--backend-filled-color);
      --group-filled-border: var(--backend-filled-border);
      --group-outline-bg: var(--backend-outline-bg);
      --group-outline-color: var(--backend-outline-color);
      --group-outline-border: var(--backend-outline-border);
      --group-accent: var(--backend-accent);
    }

    .skill-group.group-tools {
      --group-filled-bg: var(--tools-filled-bg);
      --group-filled-color: var(--tools-filled-color);
      --group-filled-border: var(--tools-filled-border);
      --group-outline-bg: var(--tools-outline-bg);
      --group-outline-color: var(--tools-outline-color);
      --group-outline-border: var(--tools-outline-border);
      --group-accent: var(--tools-accent);
    }

    .skill-group.group-frontend {
      --group-filled-bg: var(--frontend-filled-bg);
      --group-filled-color: var(--frontend-filled-color);
      --group-filled-border: var(--frontend-filled-border);
      --group-outline-bg: var(--frontend-outline-bg);
      --group-outline-color: var(--frontend-outline-color);
      --group-outline-border: var(--frontend-outline-border);
      --group-accent: var(--frontend-accent);
    }

    .skill-group:hover {
      border-color: var(--group-accent);
    }

    .skill-group-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text);
      margin-bottom: 28px;
      border-bottom: 1px solid var(--border);
      padding-bottom: 12px;
      transition: border-color 0.3s;
    }

    .skill-group:hover .skill-group-title {
      border-color: rgba(var(--group-accent), 0.3);
    }

    .skill-group-icon {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
      color: var(--group-accent);
      transition: transform 0.3s ease;
    }

    .skill-group:hover .skill-group-icon {
      transform: scale(1.15) rotate(3deg);
    }

    .skill-subcategory {
      margin-bottom: 24px;
    }

    .skill-subcategory:last-child {
      margin-bottom: 0;
    }

    .subcategory-title {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .subcategory-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .skill-tag {
      font-size: 12px;
      font-weight: 500;
      padding: 5px 12px;
      border-radius: 8px;
      border: 1px solid var(--border);
      transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
      position: relative;
      cursor: default;
    }

    .skill-tag.tag-primary {
      background: var(--group-filled-bg);
      color: var(--group-filled-color);
      border-color: var(--group-filled-border);
      font-weight: 600;
    }

    .skill-tag.tag-secondary {
      background: var(--group-outline-bg);
      color: var(--group-outline-color);
      border-color: var(--group-outline-border);
    }

    .skill-tag:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    }

    .skill-tag.tag-primary:hover {
      border-color: var(--group-accent);
      filter: brightness(0.98);
    }

    .skill-tag.tag-secondary:hover {
      background: var(--group-filled-bg);
      color: var(--group-filled-color);
      border-color: var(--group-filled-border);
    }

    /* Tooltip styles */
    .skill-tag[data-tooltip] {
      cursor: pointer;
    }

    .tag-info-dot {
      display: inline-block;
      width: 4px;
      height: 4px;
      background-color: currentColor;
      border-radius: 50%;
      margin-left: 6px;
      vertical-align: middle;
      opacity: 0.65;
    }

    /* Tooltip container */
    .skill-tag[data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute;
      bottom: 135%;
      left: 50%;
      transform: translateX(-50%) translateY(4px);
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--border);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
      padding: 6px 12px;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 500;
      width: max-content;
      max-width: 250px;
      white-space: normal;
      line-height: 1.4;
      text-align: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.25s;
      z-index: 100;
      pointer-events: none;
      text-transform: none;
      letter-spacing: normal;
    }

    /* Tooltip arrow */
    .skill-tag[data-tooltip]::before {
      content: "";
      position: absolute;
      bottom: calc(135% - 6px);
      left: 50%;
      transform: translateX(-50%) translateY(4px);
      border-width: 6px;
      border-style: solid;
      border-color: var(--surface) transparent transparent transparent;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.25s;
      z-index: 101;
      pointer-events: none;
      /* shadow element for arrow border */
      filter: drop-shadow(0 1px 0 var(--border));
    }

    .skill-tag[data-tooltip]:hover::after,
    .skill-tag[data-tooltip]:hover::before {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }


    /* ═══ EDUCATION ═══ */
    #education {
      max-width: 1100px;
      margin: 0 auto;
    }

    .edu-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 24px;
    }

    .edu-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      padding: 36px;
      transition: transform 0.3s, border-color 0.3s;
      position: relative;
      overflow: hidden;
    }

    .edu-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--text);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.4s;
    }

    .edu-card:hover::before {
      transform: scaleX(1);
    }

    .edu-card:hover {
      transform: translateY(-4px);
      border-color: var(--text);
    }

    .edu-icon {
      font-size: 28px;
      margin-bottom: 20px;
    }

    .edu-degree {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 6px;
    }

    .edu-school {
      font-size: 14px;
      color: var(--muted);
      margin-bottom: 16px;
    }

    .edu-meta {
      display: flex;
      gap: 16px;
    }

    .edu-meta span {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      padding: 4px 10px;
      background: var(--tag-bg);
      border-radius: 999px;
    }

    .edu-courses {
      list-style: none;
      padding: 0;
      margin: 24px 0 0 0;
      display: flex;
      flex-direction: column;
      gap: 10px;
      border-top: 1px dashed var(--border);
      padding-top: 20px;
    }

    .edu-courses li {
      font-size: 13px;
      line-height: 1.5;
      color: var(--muted);
      opacity: 0.85;
      position: relative;
      padding-left: 18px;
      font-weight: 400;
      transition: opacity 0.2s ease, color 0.2s ease;
    }

    .edu-courses li::before {
      content: '';
      position: absolute;
      left: 2px;
      top: 8px;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: var(--muted);
      opacity: 0.5;
      transition: opacity 0.2s ease, background-color 0.2s ease;
    }

    .edu-card:hover .edu-courses li {
      opacity: 0.95;
    }

    .edu-card:hover .edu-courses li::before {
      opacity: 0.7;
    }

    /* ═══ CONTACT ═══ */
    #contact {
      background: #000000;
      color: #ffffff;
      padding: 100px 48px;
      position: relative;
      z-index: 1;
      width: 100%;
      min-height: auto;
      max-width: none;
      margin: 0;
    }

    #contact .contact-container {
      max-width: 1100px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1.15fr 0.85fr;
      gap: 80px;
      align-items: start;
    }

    .contact-info-col {
      display: flex;
      flex-direction: column;
    }

    .contact-info-col .contact-headline {
      font-family: 'Playfair Display', serif;
      font-size: clamp(38px, 5vw, 64px);
      font-weight: 300;
      color: #ffffff;
      line-height: 1.1;
      margin-bottom: 24px;
      letter-spacing: -0.02em;
    }

    .contact-info-col .contact-sub {
      font-family: 'Inter', sans-serif;
      font-size: 16px;
      color: #a1a1aa;
      line-height: 1.6;
      margin-bottom: 40px;
      max-width: 480px;
    }

    .contact-details-list {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .contact-detail-item {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      color: #ffffff;
      text-decoration: none;
      font-size: 16px;
      transition: color 0.25s ease;
      width: fit-content;
    }

    .contact-detail-item:hover {
      color: #a1a1aa;
    }

    .contact-detail-item svg {
      width: 20px;
      height: 20px;
      stroke: currentColor;
    }

    .contact-form-col {
      display: flex;
      flex-direction: column;
    }

    #contact-form {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .contact-form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .contact-form-group label {
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      font-weight: 500;
      color: #ffffff;
    }

    .contact-input {
      width: 100%;
      padding: 14px 16px;
      font-family: 'Inter', sans-serif;
      font-size: 14px;
      border: 1px solid #3f3f46;
      border-radius: 8px;
      background: #18181b;
      color: #ffffff;
      outline: none;
      transition: border-color 0.25s, box-shadow 0.25s;
    }

    .contact-input::placeholder {
      color: #71717a;
    }

    .contact-input:focus {
      border-color: #ffffff;
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    }

    .contact-input.textarea {
      resize: none;
      height: 120px;
    }

    .contact-submit-btn {
      width: 100%;
      padding: 14px 24px;
      font-family: 'Inter', sans-serif;
      font-size: 15px;
      font-weight: 500;
      border-radius: 8px;
      border: none;
      background: #ffffff;
      color: #171717;
      cursor: pointer;
      transition: background-color 0.25s, color 0.25s, transform 0.1s;
    }

    .contact-submit-btn:hover:not(:disabled) {
      background: #e4e4e7;
    }

    .contact-submit-btn:active:not(:disabled) {
      transform: scale(0.98);
    }

    .contact-submit-btn:disabled {
      cursor: not-allowed;
      opacity: 0.7;
    }

    .contact-submit-btn.sending {
      background: #3f3f46;
      color: #ffffff;
    }

    .contact-submit-btn.sent {
      background: #16a34a;
      color: #ffffff;
    }

    .contact-submit-btn.error {
      background: #dc2626;
      color: #ffffff;
    }

    /* Responsive adjustments */
    @media (max-width: 1024px) {
      #contact .contact-container {
        gap: 40px;
      }
    }

    @media (max-width: 768px) {
      #contact {
        padding: 80px 24px;
      }
      #contact .contact-container {
        grid-template-columns: 1fr;
        gap: 48px;
      }
      .contact-info-col .contact-headline {
        font-size: 40px;
      }
    }

    footer {
      border-top: 1px solid #1f1f23 !important;
      padding: 32px 48px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      background: #000000 !important;
      color: #71717a !important;
    }

    /* ═══ PROJECT VIEW DETAILS BUTTON & MODAL ═══ */
    .view-details-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 22px;
      margin-top: 24px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: 999px;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 500;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      outline: none;
    }

    .view-details-btn:hover {
      background: var(--text);
      color: var(--bg);
      border-color: var(--text);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 10000;
      background: rgba(0, 0, 0, 0.45);
      backdrop-filter: blur(14px) saturate(180%);
      -webkit-backdrop-filter: blur(14px) saturate(180%);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.4s ease, visibility 0.4s ease;
      padding: 24px;
    }

    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }

    .modal-content {
      background: var(--surface);
      border: 1px solid var(--border);
      width: 100%;
      max-width: 1050px;
      max-height: 85vh;
      border-radius: 24px;
      position: relative;
      overflow-y: auto;
      transform: scale(0.92) translateY(20px);
      opacity: 0;
      transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
      padding: 40px;
    }

    .modal-overlay.active .modal-content {
      transform: scale(1) translateY(0);
      opacity: 1;
    }

    .modal-close {
      position: absolute;
      top: 24px;
      right: 24px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      font-size: 24px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.25s ease;
      z-index: 10;
    }

    .modal-close:hover {
      background: var(--text);
      color: var(--bg);
      border-color: var(--text);
      transform: rotate(90deg);
    }

    .modal-grid {
      display: grid;
      grid-template-columns: 460px 1fr;
      gap: 48px;
      align-items: start;
    }

    .modal-visuals {
      display: flex;
      flex-direction: column;
      gap: 16px;
      align-items: center;
      position: relative;
    }

    .modal-slider {
      position: relative;
      width: 100%;
      height: 520px;
      border-radius: 16px;
      overflow: hidden;
      background: var(--tag-bg);
      border: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .slider-track {
      display: flex;
      width: 100%;
      height: 100%;
      transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .slider-slide {
      min-width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      user-select: none;
    }

    .slider-slide img {
      max-width: 100%;
      max-height: 100%;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
      object-fit: contain;
      pointer-events: none;
    }

    .slider-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 44px;
      height: 44px;
      border-radius: 50%;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      transition: all 0.25s ease;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
      z-index: 5;
    }

    .slider-arrow:hover {
      background: var(--text);
      color: var(--bg);
      border-color: var(--text);
    }

    .slider-arrow.prev {
      left: 16px;
    }

    .slider-arrow.next {
      right: 16px;
    }

    .slider-dots {
      display: flex;
      gap: 8px;
      justify-content: center;
      flex-wrap: wrap;
      margin-top: 8px;
    }

    .slider-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--border);
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .slider-dot.active {
      background: var(--text);
      transform: scale(1.2);
    }

    .modal-details {
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .modal-header {
      border-bottom: 1px solid var(--border);
      padding-bottom: 16px;
    }

    .modal-title {
      font-family: 'Playfair Display', serif;
      font-size: 32px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .modal-type {
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--muted);
      font-weight: 500;
    }

    .modal-description {
      font-size: 15px;
      line-height: 1.6;
      color: var(--text);
      opacity: 0.85;
    }

    .modal-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .modal-tags .tag {
      background: var(--tag-bg);
      border: 1px solid var(--border);
      padding: 6px 14px;
      border-radius: 999px;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--text);
      font-weight: 500;
    }

    .modal-specs {
      display: flex;
      flex-direction: column;
      gap: 12px;
      background: var(--tag-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 20px;
    }

    .spec-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 13px;
      border-bottom: 1px solid var(--border);
      padding-bottom: 8px;
    }

    .spec-row:last-child {
      border-bottom: none;
      padding-bottom: 0;
    }

    .spec-label {
      color: var(--muted);
      font-weight: 500;
    }

    .spec-val {
      color: var(--text);
      font-weight: 600;
    }

    .spec-val.link {
      color: var(--text);
      text-decoration: none;
      border-bottom: 1.5px solid var(--text);
      padding-bottom: 1px;
      transition: opacity 0.2s;
    }

    .spec-val.link:hover {
      opacity: 0.7;
    }


    /* ═══ MOBILE — Tablet ═══ */
    @media (max-width: 1024px) {
      .hero-content {
        grid-template-columns: 240px 1fr;
        gap: 48px;
      }

      .avatar-wrap {
        width: 180px;
        height: 180px;
      }

      .project-inner {
        grid-template-columns: 1fr 540px;
        gap: 48px;
      }

      .project-inner.reverse {
        grid-template-columns: 540px 1fr;
      }

      .skills-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* ═══ MOBILE — Phone ═══ */
    @media (max-width: 768px) {
      :root {
        --nav-h: 56px;
      }

      /* Nav */
      nav {
        padding: 0 16px;
      }

      .nav-links {
        display: none;
      }

      .nav-right .nav-link {
        display: none;
      }

      .nav-hamburger {
        display: flex;
      }

      .mobile-menu {
        top: var(--nav-h);
      }

      /* Sections */
      section {
        padding: calc(var(--nav-h) + 36px) 18px 56px;
      }

      #about {
        padding-top: 0;
      }

      /* Hero */
      .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        height: auto;
        padding-top: calc(var(--nav-h) + 28px);
        padding-bottom: 56px;
        min-height: 100svh;
        align-items: flex-start;
      }

      .hero-left {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
        align-items: flex-start;
      }

      .avatar-wrap {
        width: 88px;
        height: 88px;
        border-radius: 50%;
        flex-shrink: 0;
      }

      .avatar-placeholder {
        font-size: 32px;
      }

      .stat-cards {
        flex: 1;
        min-width: 140px;
        gap: 7px;
      }

      .stat-card {
        padding: 9px 12px;
      }

      .stat-val {
        font-size: 13px;
      }

      .stat-label {
        font-size: 10px;
      }

      .hero-name {
        font-size: clamp(34px, 10vw, 52px);
      }

      .hero-bio {
        font-size: 14px;
      }

      .hero-scroll {
        margin-top: 28px;
      }

      /* Section headers */
      .section-header {
        margin-bottom: 40px;
      }

      .section-title {
        font-size: clamp(30px, 8vw, 44px);
      }

      /* Experience timeline */
      .timeline {
        padding-left: 20px;
      }

      .timeline-item {
        padding-bottom: 36px;
      }

      .exp-card {
        padding: 20px 18px;
        border-radius: 12px;
      }

      .exp-role {
        font-size: 16px;
      }

      .exp-card:hover {
        transform: none;
        box-shadow: none;
      }

      /* Projects */
      .projects-intro {
        padding: calc(var(--nav-h) + 36px) 18px 36px;
      }

      .project-full {
        min-height: auto;
      }

      .project-inner,
      .project-inner.reverse {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 40px 18px;
      }

      .project-inner.reverse .project-info {
        order: 1;
      }

      .project-inner.reverse .project-visual {
        order: 2;
      }

      .proj-badge {
        display: none;
      }

      .project-bg-num {
        font-size: clamp(80px, 20vw, 120px);
        right: -8px;
        opacity: 0.4;
      }

      .project-name {
        font-size: clamp(28px, 7vw, 40px);
      }

      .project-desc {
        font-size: 14px;
      }

      .proj-img-wrap {
        aspect-ratio: 16/9;
        border-radius: 14px;
      }

      /* Skills */
      #skills {
        padding-left: 18px;
        padding-right: 18px;
      }

      .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
      }

      .skill-group {
        padding: 22px 18px;
        border-radius: 14px;
      }

      .skill-group:hover {
        transform: none;
      }

      /* Education */
      #education {
        padding-left: 18px;
        padding-right: 18px;
      }

      .edu-grid {
        grid-template-columns: 1fr;
        gap: 16px;
      }

      .edu-card {
        padding: 24px 20px;
        border-radius: 14px;
      }

      .edu-card:hover {
        transform: none;
      }

      .edu-degree {
        font-size: 16px;
      }

      .edu-courses {
        margin-top: 18px;
        padding-top: 14px;
        gap: 8px;
      }

      .edu-courses li {
        font-size: 12px;
      }

      /* Contact mobile padding */
      #contact {
        padding-left: 18px;
        padding-right: 18px;
      }

      /* Footer */
      footer {
        padding: 20px 18px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
      }

      /* Journey SVG hidden on mobile (too narrow to be readable) */
      #journey-svg {
        display: none;
      }

      /* Modal Mobile Overrides */
      .modal-grid {
        grid-template-columns: 1fr;
        gap: 28px;
      }

      .modal-content {
        padding: 32px 20px 24px 20px;
        border-radius: 16px;
        max-height: 90vh;
      }

      .modal-close {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 18px;
      }

      .modal-slider {
        height: 360px;
      }

      .modal-title {
        font-size: 26px;
      }
    }

    /* ═══ MOBILE — Small phones ═══ */
    @media (max-width: 390px) {
      .hero-name {
        font-size: 32px;
      }

      .stat-cards {
        min-width: 120px;
      }

      .contact-headline {
        font-size: 26px;
      }

      section {
        padding-left: 14px;
        padding-right: 14px;
      }
    }

    .more-projects-wrap {
      display: flex;
      justify-content: center;
      margin-top: 56px;
      padding-bottom: 56px;
    }

    .more-projects-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 14px 32px;
      border: 1px solid var(--border);
      background: var(--surface);
      color: var(--text);
      border-radius: 999px;
      cursor: pointer;
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      text-decoration: none;
      transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }

    .more-projects-btn:hover {
      background: var(--text);
      color: var(--bg);
      border-color: var(--text);
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }

    /* ═══ PROJECTS GRID PAGE ═══ */
    .grid-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 100px 24px 48px;
    }

    .grid-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 48px;
    }

    .back-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--text);
      text-decoration: none;
      font-size: 11px;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      border: 1px solid var(--border);
      padding: 10px 20px;
      border-radius: 999px;
      background: var(--surface);
      transition: all 0.2s;
    }

    .back-btn:hover {
      border-color: var(--text);
      background: var(--tag-bg);
      transform: translateX(-3px);
    }

    .projects-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 32px;
    }

    .project-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      cursor: pointer;
    }

    .project-card:hover {
      transform: translateY(-6px);
      border-color: var(--text);
      box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    }

    .card-img-wrap {
      aspect-ratio: 16/9;
      background: var(--tag-bg);
      border-bottom: 1px solid var(--border);
      overflow: hidden;
      position: relative;
    }

    .card-img-wrap img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.5s ease;
    }

    .project-card:hover .card-img-wrap img {
      transform: scale(1.03);
    }

    .card-body {
      padding: 24px;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
    }

    .card-title {
      font-family: 'Playfair Display', serif;
      font-size: 22px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .card-type {
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      margin-bottom: 16px;
      font-weight: 500;
    }

    .card-desc {
      font-size: 13.5px;
      line-height: 1.6;
      color: var(--muted);
      margin-bottom: 20px;
      flex-grow: 1;
    }

    .card-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 20px;
    }

    .card-tags .tag {
      font-size: 10px;
      font-weight: 500;
      padding: 4px 10px;
      border: 1px solid var(--border);
      border-radius: 999px;
      color: var(--muted);
      background: var(--tag-bg);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid var(--border);
      padding-top: 16px;
      margin-top: auto;
    }

    .card-spec {
      font-size: 11px;
      color: var(--muted);
    }

    .card-spec strong {
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .card-btn {
      padding: 8px 16px;
      font-size: 11px;
      margin-top: 0;
    }

    @media (max-width: 768px) {
      .grid-container {
        padding-top: 60px;
      }
      .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
      }
      .grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
      }
    }

/* ══════════════════════════════════════
   PRINT STYLES (PDF CV Generation)
   ══════════════════════════════════════ */
@media print {
  /* Set A4 sizing and margins */
  @page {
    size: A4;
    margin: 15mm;
  }

  /* Force light colors to save ink and look professional */
  :root, [data-theme="dark"] {
    --bg: #ffffff !important;
    --background: #ffffff !important;
    --text: #111111 !important;
    --muted: #555555 !important;
    --border: #cccccc !important;
    --surface: #f9f9f9 !important;
    --tag-bg: #f3f3f3 !important;
    --primary: #111111 !important;
  }

  body {
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Hide interactive, animated or useless components */
  #nav,
  .mobile-menu,
  .theme-btn,
  .lang-btn,
  #intro-overlay,
  #journey-container,
  .hero-scroll,
  .view-details-btn,
  .more-projects-wrap,
  .contact-form-col,
  .modal-overlay,
  footer,
  button,
  a.more-projects-btn {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* Reset layout structure for printing */
  section {
    padding: 20px 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Hero section print layout */
  #about {
    padding-top: 0 !important;
  }

  .hero-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px !important;
    align-items: center !important;
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid var(--border) !important;
  }

  .hero-left {
    flex: 0 0 150px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
  }

  .avatar-wrap {
    width: 110px !important;
    height: 110px !important;
    margin: 0 !important;
    border: 2px solid var(--border) !important;
  }

  /* Compact Hero Stats List */
  .stat-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-top: 10px !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .stat-icon {
    font-size: 14px !important;
  }

  .stat-val {
    font-size: 11px !important;
    font-weight: 700 !important;
  }

  .stat-label {
    font-size: 9px !important;
  }

  .hero-right {
    flex: 1 !important;
    text-align: left !important;
  }

  .hero-eyebrow {
    font-size: 12px !important;
    margin-bottom: 4px !important;
  }

  .hero-name {
    font-size: 26px !important;
    line-height: 1.1 !important;
    margin-bottom: 8px !important;
  }

  .hero-title {
    font-size: 13px !important;
    margin-bottom: 10px !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
  }

  .hero-bio {
    font-size: 11.5px !important;
    margin: 0 !important;
    color: var(--muted) !important;
  }

  /* Section header adjustments */
  .section-header {
    margin-bottom: 10px !important;
  }

  .section-eyebrow {
    font-size: 9px !important;
    letter-spacing: 0.1em !important;
  }

  .section-title {
    font-size: 18px !important;
    margin: 2px 0 !important;
  }

  .h-divider {
    margin: 8px 0 15px 0 !important;
    height: 1px !important;
    background: var(--border) !important;
    opacity: 1 !important;
  }

  /* Timeline / Experience */
  .timeline {
    padding: 0 !important;
  }

  .timeline-item {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    margin-bottom: 15px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .timeline-date {
    flex: 0 0 120px !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: var(--muted) !important;
    text-align: right !important;
    margin: 0 !important;
    padding-top: 4px !important;
  }

  .exp-card {
    flex: 1 !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .exp-role {
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
  }

  .exp-company {
    font-size: 11px !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
  }

  .exp-desc {
    font-size: 10.5px !important;
    color: var(--muted) !important;
    margin-bottom: 8px !important;
  }

  .exp-tags {
    margin-bottom: 10px !important;
  }

  .exp-tag {
    font-size: 9.5px !important;
    padding: 3px 8px !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    color: var(--text) !important;
    background: var(--tag-bg) !important;
  }

  .exp-stats {
    padding-top: 8px !important;
    border-top: 1px solid var(--border) !important;
    margin-top: 0 !important;
  }

  .exp-stat-val {
    font-size: 11px !important;
  }

  .exp-stat-label {
    font-size: 9px !important;
  }

  /* Projects Section - Text-focused compact list */
  .project-full {
    padding: 12px !important;
    margin-bottom: 15px !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--surface) !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .project-bg-num {
    display: none !important;
  }

  .project-inner {
    display: block !important;
    flex-direction: row !important;
  }

  .project-info {
    width: 100% !important;
    padding: 0 !important;
  }

  .project-counter {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }

  .project-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
  }

  .project-desc {
    font-size: 10.5px !important;
    color: var(--muted) !important;
    margin-bottom: 8px !important;
  }

  .project-tags {
    margin-bottom: 8px !important;
  }

  .tag {
    font-size: 9px !important;
    padding: 3px 8px !important;
    background: var(--tag-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    color: var(--text) !important;
  }

  .project-details-floating {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-top: 10px !important;
  }

  .proj-detail {
    border: none !important;
    padding: 0 !important;
    flex: 1 1 180px !important;
  }

  .proj-detail strong {
    font-size: 9px !important;
    text-transform: uppercase !important;
    color: var(--text) !important;
    display: inline-block !important;
    margin-right: 5px !important;
  }

  .proj-detail span {
    font-size: 10px !important;
    color: var(--muted) !important;
  }

  /* Hide project visual elements to save ink */
  .project-visual {
    display: none !important;
  }

  /* Skills Grid */
  .skills-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .skill-group {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .skill-group-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
  }

  .skill-subcategory {
    margin-bottom: 6px !important;
  }

  .subcategory-title {
    font-size: 9.5px !important;
    color: var(--muted) !important;
    margin-bottom: 2px !important;
  }

  .subcategory-tags {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .skill-tag {
    font-size: 9px !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    border: 1px solid var(--border) !important;
  }

  .tag-primary {
    background: var(--tag-bg) !important;
    color: var(--text) !important;
  }

  .tag-secondary {
    background: transparent !important;
    color: var(--muted) !important;
  }

  /* Education */
  .edu-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 15px !important;
  }

  .edu-card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .edu-icon {
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }

  .edu-degree {
    font-size: 12px !important;
    font-weight: 700 !important;
  }

  .edu-school {
    font-size: 10.5px !important;
    margin-bottom: 4px !important;
  }

  .edu-meta {
    font-size: 9.5px !important;
    color: var(--muted) !important;
    margin-bottom: 8px !important;
  }

  .edu-courses {
    font-size: 9.5px !important;
    padding-left: 15px !important;
    list-style-type: disc !important;
    margin-top: 8px !important;
    border-top: none !important;
    padding-top: 0 !important;
  }

  .edu-courses li::before {
    display: none !important;
  }

  /* Contact Section */
  #contact {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .contact-container {
    display: block !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: var(--surface) !important;
    padding: 15px !important;
  }

  .contact-info-col {
    width: 100% !important;
    padding: 0 !important;
  }

  .contact-headline {
    font-size: 16px !important;
    margin-bottom: 8px !important;
  }

  .contact-sub {
    font-size: 10.5px !important;
    color: var(--muted) !important;
    margin-bottom: 12px !important;
  }

  .contact-details-list {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
  }

  .contact-detail-item {
    font-size: 10.5px !important;
    color: var(--text) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .contact-detail-item svg {
    width: 14px !important;
    height: 14px !important;
  }
}
