*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --bg: #f7f6f2;
    --bg2: #fff;
    --ink: #1a1814;
    --ink2: #4a4740;
        --ink3: #8a8580;
        --accent: #c8441a;
        --accent2: #e8c84a;
        --border: rgba(26,24,20,0.1);
        --radius: 3px;
        --font-display: 'DM Serif Display', Georgia, serif;
        --font-body: 'DM Sans', sans-serif;
        --font-mono: 'DM Mono', monospace;
    }

    html { scroll-behavior: smooth; }

    body {
      background: var(--bg);
      color: var(--ink);
      font-family: var(--font-body);
      font-size: 15px;
      line-height: 1.7;
      font-weight: 300;
    }

    /* ── NAV ── */    
    .logo-container {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Styling the || separator */
    .lang-separator {
        color: #666; /* Adjust color to match your theme */
        font-weight: bold;
        user-select: none;
    }

    /* Language Switcher Wrapper */
    .lang-switcher {
        position: relative;
        display: inline-block;
    }

    /* The main button */
    .lang-btn {
        background: none;
        border: none;
        font-size: 1rem;
        font-weight: bold;
        cursor: pointer;
        color: inherit; /* Inherits your nav text color */
        padding: 5px;
    }

    /* Dropdown menu (hidden by default) */
    .lang-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #fff; /* Change based on your nav background */
        box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
        min-width: 40px;
        z-index: 1;
        border-radius: 4px;
    }

    /* Dropdown links */
    .lang-dropdown a {
        color: #333;
        padding: 8px 12px;
        text-decoration: none;
        display: block;
        font-weight: bold;
    }

    .lang-dropdown a:hover {
        background-color: #f1f1f1;
    }

    /* Class to show the dropdown via JavaScript */
    .lang-dropdown.show {
        display: block;
    }

    nav {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 3rem;
      height: 56px;
      background: rgba(247,246,242,0.88);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border);
    }
    .nav-logo {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.08em;
      color: var(--ink);
      text-decoration: none;
    }
    .nav-links { display: flex; gap: 2rem; list-style: none; }
    .nav-links a {
      font-family: var(--font-mono);
      font-size: 12px;
      letter-spacing: 0.06em;
      color: var(--ink2);
      text-decoration: none;
      text-transform: uppercase;
      transition: color 0.2s;
    }
    .nav-links a:hover { color: var(--accent); }

    /* ── LAYOUT ── */
    main { padding-top: 56px; }
    section { padding: 5rem 3rem; max-width: 900px; margin: 0 auto; }
    .section-label {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 2.5rem;
      display: flex; align-items: center; gap: 0.75rem;
    }
    .section-label::after {
      content: '';
      display: block;
      height: 1px;
      width: 40px;
      background: var(--accent);
      opacity: 0.4;
    }

    /* ── HERO ── */
    #hero {
      min-height: calc(100vh - 56px);
      display: flex; flex-direction: column; justify-content: center;
      padding-top: 3rem; padding-bottom: 3rem;
      border-bottom: 1px solid var(--border);
    }
    .hero-eyebrow {
      font-family: var(--font-mono);
      font-size: 12px;
      letter-spacing: 0.1em;
      color: var(--ink3);
      text-transform: uppercase;
      margin-bottom: 1.25rem;
    }
    h1 {
      font-family: var(--font-display);
      font-size: clamp(3.2rem, 8vw, 6.5rem);
      line-height: 1.05;
      font-weight: 400;
      letter-spacing: -0.02em;
      margin-bottom: 1.5rem;
    }
    h1 em {
      font-style: italic;
      color: var(--accent);
    }
    .hero-sub {
      font-size: 16px;
      color: var(--ink2);
      font-weight: 300;
      max-width: 600px;
      margin-bottom: 2.5rem;
      line-height: 1.75;
    }
    .hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 3rem; }
    .tag {
      font-family: var(--font-mono);
      font-size: 11px;
      letter-spacing: 0.06em;
      padding: 0.3rem 0.75rem;
      border: 1px solid var(--border);
      border-radius: 2px;
      color: var(--ink2);
      background: var(--bg2);
    }
    .hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
    .btn {
      font-family: var(--font-mono);
      font-size: 12px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      text-decoration: none;
      padding: 0.7rem 1.4rem;
      border-radius: var(--radius);
      transition: all 0.2s;
      display: inline-block;
    }
    .btn-primary { background: var(--ink); color: var(--bg); }
    .btn-primary:hover { background: var(--accent); }
    .btn-ghost { border: 1px solid var(--border); color: var(--ink2); }
    .btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

    .hero-status {
      margin-top: 4rem;
      padding-top: 2rem;
      border-top: 1px solid var(--border);
      display: flex; gap: 2.5rem; flex-wrap: wrap;
    }
    .status-item { display: flex; align-items: center; gap: 0.6rem; }
    .status-dot {
      width: 7px; height: 7px; border-radius: 50%;
      background: #3dbf6e;
      box-shadow: 0 0 0 3px rgba(61,191,110,0.2);
      animation: pulse 2.5s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { box-shadow: 0 0 0 3px rgba(61,191,110,0.2); }
      50% { box-shadow: 0 0 0 6px rgba(61,191,110,0.08); }
    }
    .status-text {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--ink2);
    }

    /* ── PROGRESS RING ── */
    .ring-wrap {
      display: inline-flex; align-items: center; gap: 0.65rem;
    }
    .ring-svg { transform: rotate(-90deg); flex-shrink: 0; }
    .ring-track { fill: none; stroke: var(--border); stroke-width: 3; }
    .ring-fill {
      fill: none; stroke-width: 3;
      stroke-linecap: round;
      transition: stroke-dashoffset 1.2s cubic-bezier(0.4,0,0.2,1);
    }
    .ring-fill.done   { stroke: #3dbf6e; }
    .ring-fill.active { stroke: var(--accent); }
    .ring-fill.soon   { stroke: var(--ink3); stroke-dasharray: 2 4; stroke-linecap: butt; }
    .ring-icon {
      position: absolute; top: 50%; left: 50%;
      transform: translate(-50%, -50%) rotate(90deg);
      font-size: 9px;
    }

    .ring-container { position: relative; display: inline-flex; }

    /* ── ABOUT ── */
    #about { border-bottom: 1px solid var(--border); }
    .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
    h2 {
      font-family: var(--font-display);
      font-size: 2.2rem;
      font-weight: 400;
      line-height: 1.2;
      margin-bottom: 1.25rem;
      letter-spacing: -0.01em;
    }
    .about-body p { color: var(--ink2); margin-bottom: 1rem; }
    .about-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
    .info-card {
      padding: 1.25rem;
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }
    .info-card-label {
      font-family: var(--font-mono);
      font-size: 10px;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--ink3);
      margin-bottom: 0.4rem;
    }
    .info-card-value { font-size: 14px; color: var(--ink); font-weight: 400; }

    /* ── EXPERIENCE ── */
    #experience { border-bottom: 1px solid var(--border); }
    .timeline { display: flex; flex-direction: column; gap: 0; }
    .timeline-item { display: grid; grid-template-columns: 180px 1fr; gap: 2rem; padding: 2rem 0; border-bottom: 1px solid var(--border); align-items: start; }
    .timeline-item:last-child { border-bottom: none; }
    .timeline-date {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--ink3);
      letter-spacing: 0.06em;
      padding-top: 3px;
      display: flex; flex-direction: column; gap: 0.5rem;
    }
    .timeline-content h3 { font-size: 15px; font-weight: 500; margin-bottom: 0.2rem; }
    .timeline-content .org {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--accent);
      margin-bottom: 0.6rem;
      letter-spacing: 0.04em;
    }
    .timeline-content p { color: var(--ink2); font-size: 14px; line-height: 1.65; }
    .milestone-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
    .mbadge {
      display: inline-flex; align-items: center; gap: 0.4rem;
      font-family: var(--font-mono);
      font-size: 10px; letter-spacing: 0.04em;
      padding: 0.2rem 0.55rem;
      border-radius: 2px;
      border: 1px solid;
    }
    .mbadge.done   { border-color: rgba(61,191,110,0.4); color: #2a9a52; background: rgba(61,191,110,0.07); }
    .mbadge.active { border-color: rgba(200,68,26,0.3); color: var(--accent); background: rgba(200,68,26,0.06); }
    .mbadge.soon   { border-color: var(--border); color: var(--ink3); background: transparent; }
    .mbadge svg { flex-shrink: 0; }

    /* ── PROJECTS ── */
    #projects { border-bottom: 1px solid var(--border); }
    .projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .project-card {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 1.75rem;
      transition: border-color 0.2s, transform 0.2s;
      position: relative;
      overflow: hidden;
    }
    .project-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0;
      height: 2px;
      background: var(--accent);
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s;
    }
    .project-card:hover { border-color: rgba(26,24,20,0.25); transform: translateY(-2px); }
    .project-card:hover::before { transform: scaleX(1); }
    .project-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
    .project-type {
      font-family: var(--font-mono);
      font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--ink3);
    }
    .project-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 0.5rem; }
    .project-card p { font-size: 13px; color: var(--ink2); line-height: 1.6; margin-bottom: 1.25rem; }
    .project-techs { display: flex; flex-wrap: wrap; gap: 0.35rem; }
    .tech-pill {
      font-family: var(--font-mono);
      font-size: 10px; padding: 0.2rem 0.5rem;
      border: 1px solid var(--border);
      border-radius: 2px; color: var(--ink3);
      background: var(--bg);
    }
    .project-card.featured {
      grid-column: span 2;
      background: var(--ink);
      color: var(--bg);
    }
    .project-card.featured .project-type,
    .project-card.featured p { color: rgba(247,246,242,0.6); }
    .project-card.featured h3 { color: var(--bg); }
    .project-card.featured .tech-pill { border-color: rgba(247,246,242,0.15); color: rgba(247,246,242,0.5); background: rgba(247,246,242,0.05); }
    .project-card.featured::before { background: var(--accent2); }

    /* ── SKILLS ── */
    #skills { border-bottom: 1px solid var(--border); }
    .skills-categories { display: flex; flex-direction: column; gap: 2.5rem; }
    .skill-category-label {
      font-family: var(--font-mono);
      font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
      color: var(--ink3); margin-bottom: 1rem;
    }
    .skills-list { display: flex; flex-direction: column; gap: 0.75rem; }
    .skill-row {
      display: grid;
      grid-template-columns: 160px 1fr auto;
      align-items: center; gap: 1rem;
    }
    .skill-name { font-size: 14px; font-weight: 400; }
    .skill-bar-track {
      height: 3px; background: var(--border);
      border-radius: 2px; overflow: hidden;
    }
    .skill-bar-fill {
      height: 100%;
      border-radius: 2px;
      background: var(--accent);
      transform-origin: left;
      animation: growBar 1s cubic-bezier(0.4,0,0.2,1) forwards;
      transform: scaleX(0);
    }
    @keyframes growBar { to { transform: scaleX(1); } }
    .skill-level {
      font-family: var(--font-mono);
      font-size: 10px; letter-spacing: 0.06em;
      color: var(--ink3); white-space: nowrap;
    }

    /* Languages grid */
    .lang-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
    .lang-card {
      padding: 1.25rem 1rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--bg2);
      text-align: center;
    }
    .lang-name { font-size: 14px; font-weight: 500; margin-bottom: 0.3rem; }
    .lang-level { font-family: var(--font-mono); font-size: 10px; color: var(--ink3); letter-spacing: 0.06em; }

    /* Lang card tooltip */
    .lang-card { position: relative; }

    .lang-tooltip {
      position: absolute;
      bottom: calc(100% + 10px);
      left: 50%;
      transform: translateX(-50%) translateY(4px);
      background: var(--ink);
      color: var(--bg);
      border-radius: var(--radius);
      padding: 0.6rem 0.85rem;
      width: max-content;
      max-width: 200px;
      text-align: center;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease, transform 0.18s ease;
      z-index: 10;
    }
    .lang-tooltip .tooltip-jp {
      font-size: 13px;
      line-height: 1.5;
      letter-spacing: 0.03em;
      display: block;
      margin-bottom: 0.25rem;
    }
    .lang-tooltip .tooltip-en {
      font-family: var(--font-mono);
      font-size: 10px;
      color: rgba(247,246,242,0.45);
      letter-spacing: 0.05em;
      display: block;
    }
    .lang-tooltip::after {
      content: '';
      position: absolute;
      top: 100%; left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent;
      border-top-color: var(--ink);
    }
    .lang-card:hover .lang-tooltip {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    /* ── CERTS ── */
    .cert-strip {
      margin-top: 2.5rem;
      padding: 1.25rem 1.5rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--bg2);
      display: flex; align-items: center; gap: 1.5rem;
    }
    .cert-icon {
      width: 38px; height: 38px; border-radius: 50%;
      background: var(--ink); display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .cert-icon svg { fill: var(--bg); width: 18px; height: 18px; }
    .cert-body { flex: 1; }
    .cert-title { font-size: 14px; font-weight: 500; }
    .cert-issuer { font-family: var(--font-mono); font-size: 11px; color: var(--ink3); margin-top: 0.15rem; }

    /* ── CERTIFICATE MODAL ── */
    .modal-backdrop {
      position: fixed; inset: 0; z-index: 200;
      background: rgba(26,24,20,0.75);
      backdrop-filter: blur(4px);
      display: flex; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity 0.2s ease;
    }
    .modal-backdrop.open {
      opacity: 1; pointer-events: all;
    }
    .modal-box {
      position: relative;
      max-width: min(860px, 92vw);
      width: 100%;
      transform: translateY(8px);
      transition: transform 0.2s ease;
    }
    .modal-backdrop.open .modal-box {
      transform: translateY(0);
    }
    .modal-box img {
      width: 100%; border-radius: var(--radius);
      display: block; box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    }
    .modal-close {
      position: absolute; top: -14px; right: -14px;
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--ink); color: var(--bg);
      border: none; cursor: pointer;
      font-size: 16px; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .modal-close:hover { background: var(--accent); }

    /* arrows */
    .modal-arrow {
      position: fixed; top: 50%; z-index: 201;
      transform: translateY(-50%);
      width: 44px; height: 44px; border-radius: 50%;
      background: rgba(247,246,242,0.1);
      border: 1px solid rgba(247,246,242,0.2);
      color: var(--bg); font-size: 18px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: background 0.15s;
      backdrop-filter: blur(4px);
    }
    .modal-arrow:hover { background: rgba(247,246,242,0.2); }
    .modal-arrow.prev { left: 1.5rem; }
    .modal-arrow.next { right: 1.5rem; }
    .modal-arrow:disabled { opacity: 0.2; cursor: default; }

    /* counter */
    .modal-counter {
      position: absolute; bottom: -28px; left: 50%;
      transform: translateX(-50%);
      font-family: var(--font-mono); font-size: 11px;
      color: rgba(247,246,242,0.5); letter-spacing: 0.08em;
      white-space: nowrap;
    }

    /* ── EDUCATION ── */
    #education { border-bottom: 1px solid var(--border); }
    .edu-card {
      padding: 2rem;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      background: var(--bg2);
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 1rem;
    }
    .edu-degree { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; margin-bottom: 0.3rem; }
    .edu-school { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.04em; margin-bottom: 0.6rem; }
    .edu-desc { font-size: 14px; color: var(--ink2); }
    .edu-meta { text-align: right; }
    .edu-status { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }

    /* ── CONTACT ── */
    #contact { text-align: center; }
    #contact h2 { margin-bottom: 0.75rem; }
    #contact p { color: var(--ink2); max-width: 420px; margin: 0 auto 2.5rem; }
    .contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

    /* ── FOOTER ── */
    footer {
      border-top: 1px solid var(--border);
      padding: 2rem 3rem;
      display: flex; justify-content: space-between; align-items: center;
      max-width: 900px; margin: 0 auto;
    }
    footer span { font-family: var(--font-mono); font-size: 11px; color: var(--ink3); letter-spacing: 0.06em; }

    /* ── RESPONSIVE ── */
    @media (max-width: 640px) {
      nav { padding: 0 1.25rem; }
      section { padding: 3.5rem 1.25rem; }
      h1 { font-size: 2.8rem; }
      .about-grid { grid-template-columns: 1fr; gap: 2rem; }
      .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
      .timeline-date { flex-direction: row; flex-wrap: wrap; gap: 0.75rem; }
      .projects-grid { grid-template-columns: 1fr; }
      .project-card.featured { grid-column: span 1; }
      .skill-row { grid-template-columns: 130px 1fr auto; }
      .lang-grid { grid-template-columns: repeat(2,1fr); }
      .nav-links { display: none; }
      .edu-card { grid-template-columns: 1fr; }
      .edu-meta { text-align: left; }
      footer { flex-direction: column; gap: 0.5rem; text-align: center; }
    }