:root {
    --bg: #06070f;
    --surface: #0c0d1a;
    --surface2: #111326;
    --border: #1c1f38;
    --border2: #262a4a;
    --accent: #00e5c4;
    --accent2: #ff5f3c;
    --accent3: #7b6cff;
    --text: #c4d4e8;
    --dim: #4a5a70;
    --bright: #eef2ff;
    --mono: 'Space Mono', monospace;
    --sans: 'Syne', sans-serif;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.7;
    overflow-x: hidden;
  }

  /* Grain overlay */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
  }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

  /* NAV */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    border-bottom: 1px solid var(--border);
    background: rgba(6,7,15,0.85);
    backdrop-filter: blur(16px);
  }

  .nav-logo {
    font-family: var(--sans);
    font-weight: 800;
    font-size: 18px;
    color: var(--bright);
    text-decoration: none;
    letter-spacing: -0.5px;
  }

  .nav-logo span { color: var(--accent); }

  .nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
  }

  .nav-links a {
    color: var(--dim);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
  }

  .nav-links a:hover { color: var(--accent); }

  /* HERO */
  #hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 48px 80px;
    position: relative;
    overflow: hidden;
  }

  .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(var(--border) 1px, transparent 1px),
      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  }

  .hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,229,196,0.07) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }

  .hero-content {
    max-width: 900px;
    position: relative;
  }

  .hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
    padding: 6px 12px;
    border: 1px solid rgba(0,229,196,0.3);
    border-radius: 2px;
  }

  .hero-tag::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-in-out infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  h1 {
    font-family: var(--sans);
    font-size: clamp(52px, 8vw, 96px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -3px;
    color: var(--bright);
    margin-bottom: 28px;
  }

  h1 .dim-name { color: var(--dim); }
  h1 .accent-slash { color: var(--accent2); }

  .hero-desc {
    font-size: 15px;
    color: var(--text);
    max-width: 560px;
    line-height: 1.8;
    margin-bottom: 44px;
  }

  .terminal-line {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border2);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 44px;
  }

  .terminal-line .prompt { color: var(--accent3); }
  .terminal-line .cmd { color: var(--bright); }

  .cursor {
    display: inline-block;
    width: 8px; height: 14px;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1.1s step-end infinite;
  }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }

  .hero-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
  }

  .btn-primary {
    background: var(--accent);
    color: var(--bg);
    font-weight: 700;
  }

  .btn-primary:hover {
    background: var(--bright);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0,229,196,0.25);
  }

  .btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border2);
  }

  .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
  }

  .hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .scroll-line {
    width: 48px;
    height: 1px;
    background: var(--dim);
    animation: extend 2s ease-in-out infinite;
  }

  @keyframes extend {
    0%, 100% { transform: scaleX(1); transform-origin: left; }
    50% { transform: scaleX(1.5); transform-origin: left; }
  }

  /* SECTIONS */
  section {
    padding: 100px 48px;
    max-width: 1100px;
    margin: 0 auto;
  }

  .section-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .section-label::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--accent);
  }

  h2 {
    font-family: var(--sans);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    color: var(--bright);
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 48px;
  }

  /* ABOUT */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
  }

  .about-text p {
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.9;
  }

  .about-text p strong { color: var(--bright); }

  .stack-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 24px;
  }

  .stack-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
  }

  .stack-item::before {
    content: '▸';
    color: var(--accent);
    font-size: 10px;
  }

  .about-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    transition: border-color 0.2s;
  }

  .stat-card:hover { border-color: var(--border2); }

  .stat-num {
    font-family: var(--sans);
    font-size: 40px;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-label {
    font-size: 12px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  /* DIVIDER */
  .divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0 48px;
  }

  /* EXPERIENCE */
  .exp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .exp-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
  }

  .exp-item:last-child { border-bottom: none; }

  .exp-meta {
    position: sticky;
    top: 100px;
    height: fit-content;
  }

  .exp-period {
    font-size: 11px;
    color: var(--dim);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
  }

  .exp-company {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 16px;
    color: var(--bright);
    margin-bottom: 4px;
  }

  .exp-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(0,229,196,0.1);
    border: 1px solid rgba(0,229,196,0.25);
    border-radius: 2px;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .exp-role {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
    color: var(--bright);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
  }

  .exp-desc {
    color: var(--text);
    font-size: 13px;
    line-height: 1.9;
    margin-bottom: 20px;
  }

  .exp-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
  }

  .exp-bullets li {
    font-size: 13px;
    color: var(--text);
    padding-left: 16px;
    position: relative;
    line-height: 1.7;
  }

  .exp-bullets li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent2);
    font-size: 11px;
  }

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

  .tag {
    font-size: 11px;
    padding: 3px 10px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--dim);
    letter-spacing: 0.05em;
  }

  /* PROJECTS */
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
  }

  .project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px;
    transition: all 0.25s;
    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: var(--border2); transform: translateY(-3px); }
  .project-card:hover::before { transform: scaleX(1); }

  .project-card.featured::before { transform: scaleX(1); background: var(--accent2); }
  .project-card.featured { border-color: rgba(255,95,60,0.3); }

  .project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
  }

  .project-icon {
    font-size: 24px;
    line-height: 1;
  }

  .project-links a {
    color: var(--dim);
    font-size: 12px;
    text-decoration: none;
    margin-left: 12px;
    transition: color 0.2s;
  }

  .project-links a:hover { color: var(--accent); }

  .project-name {
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--bright);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
  }

  .project-desc {
    font-size: 13px;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 20px;
  }

  /* HOMELAB */
  .homelab-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
  }

  .homelab-desc {
    font-size: 14px;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 32px;
  }

  .homelab-desc strong { color: var(--bright); }

  .service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 13px;
    transition: border-color 0.2s;
  }

  .service-item:hover { border-color: var(--border2); }

  .service-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
  }

  .service-dot.orange { background: var(--accent2); }
  .service-dot.purple { background: var(--accent3); }

  .service-name { color: var(--bright); flex: 1; }
  .service-tech { color: var(--dim); font-size: 11px; }

  .terminal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    font-size: 12px;
  }

  .terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }

  .dot { width: 10px; height: 10px; border-radius: 50%; }
  .dot.red { background: #ff5f57; }
  .dot.yellow { background: #febc2e; }
  .dot.green { background: #28c840; }

  .terminal-title {
    font-size: 11px;
    color: var(--dim);
    margin-left: 6px;
    letter-spacing: 0.05em;
  }

  .terminal-body {
    padding: 20px;
    line-height: 2;
  }

  .t-comment { color: var(--dim); }
  .t-cmd { color: var(--accent); }
  .t-output { color: var(--text); padding-left: 16px; }
  .t-success { color: #28c840; }
  .t-info { color: var(--accent3); }

  /* BLOG */
  .blog-list {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .blog-item {
    display: flex;
    align-items: baseline;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
  }

  .blog-item:hover .blog-title { color: var(--accent); }
  .blog-item:last-child { border-bottom: none; }

  .blog-date { color: var(--dim); font-size: 12px; width: 100px; flex-shrink: 0; }

  .blog-title {
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    color: var(--bright);
    letter-spacing: -0.3px;
    flex: 1;
    transition: color 0.2s;
  }

  .blog-tag {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 2px;
    flex-shrink: 0;
  }

  .blog-tag.green { background: rgba(0,229,196,0.1); color: var(--accent); border: 1px solid rgba(0,229,196,0.2); }
  .blog-tag.orange { background: rgba(255,95,60,0.1); color: var(--accent2); border: 1px solid rgba(255,95,60,0.2); }
  .blog-tag.purple { background: rgba(123,108,255,0.1); color: var(--accent3); border: 1px solid rgba(123,108,255,0.2); }

  .blog-coming {
    font-size: 13px;
    color: var(--dim);
    font-style: italic;
    margin-top: 8px;
  }

  /* CONTACT */
  #contact {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 48px;
  }

  .contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }

  .contact-intro {
    font-size: 15px;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 40px;
  }

  .contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.2s;
  }

  .contact-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateX(4px);
  }

  .contact-link-icon {
    width: 28px;
    text-align: center;
    color: var(--accent);
    font-size: 16px;
  }

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

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

  .form-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
  }

  .form-input, .form-textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 12px 14px;
    color: var(--bright);
    font-family: var(--mono);
    font-size: 13px;
    transition: border-color 0.2s;
    outline: none;
    resize: vertical;
  }

  .form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,229,196,0.08);
  }

  .form-textarea { min-height: 120px; }

  /* FOOTER */
  footer {
    border-top: 1px solid var(--border);
    padding: 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dim);
    font-size: 12px;
  }

  footer a { color: var(--dim); text-decoration: none; }
  footer a:hover { color: var(--accent); }

  /* ANIMATIONS */
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* MOBILE */
  @media (max-width: 768px) {
    nav { padding: 16px 24px; }
    .nav-links { display: none; }
    #hero, section, #contact { padding: 80px 24px; }
    .about-grid, .homelab-layout, .contact-layout, .exp-item {
      grid-template-columns: 1fr;
      gap: 32px;
    }
    h1 { letter-spacing: -2px; }
    footer { flex-direction: column; gap: 8px; text-align: center; }
    .divider { margin: 0 24px; }
  }