
/* ========= Theme and reset ========= */
:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --surface: #12151d;
    --surface-alt: #171c25;
    --border: #272d39;
    --text: #f2f3f7;
    --muted: #a0a5b4;
    --accent: #a5f36b;
    --purple: #b8a0ff;
    --tag-bg: #202a20;
    --tag-text: #c9f2b3;
    --max-width: 1160px;
  }
  
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-alt: #edf1f6;
    --border: #dfe4ec;
    --text: #19202b;
    --muted: #596579;
    --accent: #397d16;
    --purple: #7450c8;
    --tag-bg: #edf5e8;
    --tag-text: #315a20;
  }
  
  * { box-sizing: border-box; }
  
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
  }
  
  body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    transition: background-color .2s ease, color .2s ease;
  }
  
  img, svg, video { max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; }
  button, a { -webkit-tap-highlight-color: transparent; }
  
  ::selection {
    background: var(--accent);
    color: #10140d;
  }
  
  h1, h2, h3, p { margin-top: 0; }
  p:last-child { margin-bottom: 0; }
  
  /* ========= Navigation ========= */
  .navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    min-height: 76px;
    padding: 12px max(6%, calc((100% - var(--max-width)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  
  .logo {
    flex: 0 0 auto;
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
  }
  
  .logo span { color: var(--accent); }
  
  .nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(12px, 2vw, 24px);
  }
  
  .nav-links a {
    color: var(--muted);
    font-size: .91rem;
    white-space: nowrap;
    transition: color .2s;
  }
  
  .nav-links a:hover { color: var(--accent); }
  
  .nav-links .nav-cta {
    padding: 7px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
  }
  
  .theme-toggle {
    flex: 0 0 auto;
    padding: 8px 12px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
  }
  
  .theme-toggle:hover { border-color: var(--accent); }
  .menu-toggle { display: none; }
  
  /* ========= Shared sections ========= */
  .section {
    width: min(var(--max-width), 88%);
    margin-inline: auto;
    padding: 92px 0;
  }
  
  .section-heading { margin-bottom: 34px; }
  
  .eyebrow,
  .project-type {
    color: var(--accent);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: 1.7px;
  }
  
  .section-heading h2,
  .contact-section h2 {
    margin-bottom: 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    letter-spacing: -1.3px;
  }
  
  .section-description {
    max-width: 600px;
    color: var(--muted);
  }
  
  .gradient { color: var(--accent); }
  
  /* ========= Hero ========= */
  .hero {
    min-height: min(760px, calc(100vh - 76px));
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
    gap: clamp(28px, 5vw, 64px);
    padding-top: 64px;
    padding-bottom: 64px;
  }
  
  .hero-content,
  .hero-visual { min-width: 0; }
  
  .status-dot,
  .card-footer span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    background: var(--accent);
    border-radius: 50%;
  }
  
  .hero h1 {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: clamp(2.4rem, 4.4vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -2.5px;
    overflow-wrap: break-word;
  }
  
  .hero-description {
    max-width: 560px;
    color: var(--muted);
    font-size: 1.04rem;
  }
  
  .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0;
  }
  
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 700;
    text-align: center;
    transition: transform .2s, background .2s;
  }
  
  .button:hover { transform: translateY(-2px); }
  .primary { background: var(--accent); color: #11170c; }
  .primary:hover { filter: brightness(1.08); }
  .secondary { border-color: var(--border); color: var(--text); }
  
  .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    color: var(--muted);
    font-size: .9rem;
  }
  
  .social-links a:hover { color: var(--accent); }
  
  .hero-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 370px;
  }
  
  .orbit {
    position: absolute;
    aspect-ratio: 1;
    border: 1px solid rgba(165, 243, 107, .17);
    border-radius: 50%;
    pointer-events: none;
  }
  
  .orbit-one { width: min(340px, 90%); }
  .orbit-two { width: min(270px, 72%); }
  
  .profile-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    min-width: 0;
    padding: clamp(18px, 2.2vw, 26px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: 0 25px 80px #0003;
  }
  
  .code-label { color: var(--muted); font-size: .8rem; }
  
  .profile-card pre {
    max-width: 100%;
    margin: 14px 0;
    overflow-x: auto;
    font-size: clamp(.7rem, .9vw, .88rem);
    line-height: 1.85;
  }
  
  .code-purple { color: var(--purple); }
  .code-green { color: var(--accent); }
  .card-footer { color: var(--muted); font-size: .72rem; }
  
  .float-tag {
    position: absolute;
    z-index: 2;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
  }
  
  .tag-one { top: 22px; right: 0; color: var(--accent); }
  .tag-two { bottom: 20px; left: 0; color: var(--purple); }
  
  /* ========= About ========= */
  .about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 44px;
    align-items: start;
  }
  
  .about-copy p {
    margin-bottom: 18px;
    color: var(--muted);
  }
  
  .info-card,
  .skill-card,
  .project-card,
  .certificate {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
  }
  
  .info-card { padding: 22px 25px; }
  .info-card div { padding: 13px 0; }
  .info-card div + div { border-top: 1px solid var(--border); }
  .info-card span, .info-card strong { display: block; }
  .info-card span { color: var(--muted); font-size: .8rem; }
  .info-card strong { margin-top: 3px; font-size: .96rem; }
  
  /* ========= Skills ========= */
  .skill-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  
  .skill-card {
    min-width: 0;
    padding: 22px;
    transition: transform .2s, border-color .2s;
  }
  
  .skill-card:hover,
  .project-card:hover {
    transform: translateY(-4px);
    border-color: #687b50;
  }
  
  .skill-icon,
  .certificate-icon {
    color: var(--accent);
    font-size: 1.6rem;
  }
  
  .skill-card h3 { margin: 13px 0 4px; font-size: 1rem; }
  
  .skill-card p {
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 0;
  }
  
  .note { margin-top: 18px; color: var(--muted); font-size: .82rem; }
  
  /* ========= Projects ========= */
  .project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 22px;
    width: 100%;
  }
  
  .project-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
    transition: transform .25s ease, border-color .25s ease,
                box-shadow .25s ease;
  }
  
  .project-card:hover {
    box-shadow: 0 12px 28px rgba(20, 30, 50, .12);
  }
  
  /*
    IMPORTANT:
    The correct class in your CSS is .project-art.
    Keep the artwork dark and force the large titles to white
    in both light mode and dark mode.
  */
  .project-art {
    min-height: 190px;
    padding: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    background:
      radial-gradient(ellipse at top right, #3c5b35, transparent 60%),
      #171e20;
    color: #ffffff;
  }
  
  .project-art span {
    align-self: flex-start;
    color: #e1ffd0;
    font-size: .95rem;
  }
  
  .project-art b {
    color: #ffffff !important;
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    line-height: 1.2;
    letter-spacing: 1px;
    text-align: right;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  }
  
  .art-two {
    background:
      radial-gradient(ellipse at top right, #44386d, transparent 60%),
      #191824;
  }
  
  .project-body { padding: 24px; }
  
  .project-type {
    font-size: .69rem;
    letter-spacing: 1.2px;
  }
  
  .project-body h3 {
    margin: 10px 0;
    font-size: 1.22rem;
    line-height: 1.35;
  }
  
  .project-body > p:not(.project-type) {
    color: var(--muted);
    font-size: .91rem;
  }
  
  .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
  }
  
  .tags span {
    padding: 4px 9px;
    color: var(--tag-text);
    background: var(--tag-bg);
    border-radius: 5px;
    font-size: .75rem;
  }
  
  .project-link {
    color: var(--accent);
    font-size: .9rem;
    font-weight: 700;
  }
  
  .project-link:hover { text-decoration: underline; }
  
  /* ========= Education ========= */
  .timeline {
    margin-left: 7px;
    padding-left: 27px;
    border-left: 1px solid var(--border);
  }
  
  .timeline-item { position: relative; padding-bottom: 35px; }
  .timeline-item:last-child { padding-bottom: 0; }
  
  .timeline-dot {
    position: absolute;
    left: -33px;
    top: 7px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
  }
  
  .timeline-item h3 {
    margin-bottom: 6px;
    font-size: 1.05rem;
    line-height: 1.4;
  }
  
  .timeline-item > p:last-child {
    color: var(--muted);
    font-size: .9rem;
  }
  
  /* ========= Certificates and contact ========= */
  .certificate-list { display: grid; gap: 14px; }
  
  .certificate {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
  }
  
  .certificate-icon { flex: 0 0 auto; }
  
  .certificate h3 {
    margin-bottom: 4px;
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .certificate p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
  }
  
  .contact-section { text-align: center; }
  
  .contact-section .section-description {
    margin: 0 auto 27px;
  }
  
  .centered { justify-content: center; margin-top: 25px; }
  
  /* ========= Footer ========= */
  .footer {
    width: 100%;
    padding: 25px max(6%, calc((100% - var(--max-width)) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--border);
  }
  
  .footer p {
    color: var(--muted);
    margin: 0;
    font-size: .8rem;
  }
  
  /* ========= Responsive layout ========= */
  @media (max-width: 1000px) {
    .navbar { padding-inline: 4%; }
    .nav-links { gap: 13px; }
    .nav-links a { font-size: .85rem; }
    .section { width: 90%; }
    .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer { padding-inline: 5%; }
  }
  
  @media (max-width: 800px) {
    .navbar { min-height: 68px; }
  
    .menu-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 43px;
      height: 40px;
      color: var(--text);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      cursor: pointer;
      font-size: 1.2rem;
    }
  
    .nav-links {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      padding: 20px 5% 24px;
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      flex-direction: column;
      align-items: stretch;
      gap: 14px;
    }
  
    .nav-links.open { display: flex; }
    .nav-links a { font-size: .95rem; }
    .nav-links .nav-cta { text-align: center; }
    .theme-toggle { width: 100%; }
    .section { padding: 72px 0; }
  
    .hero {
      min-height: auto;
      grid-template-columns: minmax(0, 1fr);
      gap: 24px;
      padding-top: 60px;
      padding-bottom: 55px;
    }
  
    .hero h1 {
      font-size: clamp(2.5rem, 8vw, 4rem);
      letter-spacing: -1.5px;
    }
  
    .hero-visual { width: 100%; min-height: 340px; }
    .about-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .project-grid { grid-template-columns: minmax(0, 1fr); }
    .project-art b { font-size: 1.65rem; }
    .footer { flex-wrap: wrap; }
  }
  
  @media (max-width: 520px) {
    .section { width: 88%; padding: 62px 0; }
    .hero { padding-top: 48px; }
  
    .hero h1 {
      font-size: clamp(2.1rem, 10vw, 3.2rem);
      letter-spacing: -1.2px;
    }
  
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .button { width: 100%; }
    .hero-visual { min-height: 300px; }
    .profile-card { padding: 16px; }
    .profile-card pre { font-size: .68rem; }
    .tag-one { right: -4px; }
    .tag-two { left: -4px; }
    .skill-grid { grid-template-columns: minmax(0, 1fr); }
    .project-art { min-height: 160px; padding: 20px; }
    .project-art b { font-size: 1.25rem; }
    .project-body { padding: 20px; }
    .certificate { align-items: flex-start; padding: 18px; gap: 14px; }
  
    .footer {
      align-items: flex-start;
      flex-direction: column;
      gap: 12px;
      padding: 24px 6%;
    }
  
    .footer p { width: 100%; }
  
    .section-heading h2,
    .contact-section h2 {
      font-size: clamp(1.9rem, 8vw, 2.5rem);
    }
  }
  
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      scroll-behavior: auto !important;
      transition-duration: .01ms !important;
    }
  }
  