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

  :root {
    --bg: #0d0d0d;
    --bg2: #141414;
    --bg3: #1a1a1a;
    --border: #2a2a2a;
    --text: #e8e2d9;
    --muted: #6b6560;
    --amber: #e8a838;
    --amber-dim: #c48a22;
    --amber-glow: rgba(232,168,56,0.12);
    --red: #e05252;
    --green: #5bbf7a;
    --blue: #5b9fe0;
    --white: #f5f0e8;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: 'DM Serif Display', serif;
    --font-sans: 'Instrument Sans', sans-serif;
  }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: auto;
  }

  /* Custom cursor */
  .cursor {
    width: 10px; height: 10px;
    background: var(--amber);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.2s, height 0.2s, opacity 0.2s;
    mix-blend-mode: difference;
  }
  .cursor-ring {
    width: 36px; height: 36px;
    border: 1px solid rgba(232,168,56,0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease;
  }
  a:hover ~ .cursor, button:hover ~ .cursor { transform: translate(-50%,-50%) scale(2.5); }

  /* Noise texture overlay */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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: 1000;
    opacity: 0.5;
  }

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

  /* NAV */
  nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.25rem 3rem;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s;
    backdrop-filter: blur(0px);
  }
  nav.scrolled {
    border-color: var(--border);
    background: rgba(13,13,13,0.85);
    backdrop-filter: blur(12px);
  }
  .nav-logo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--amber);
    letter-spacing: 0.05em;
    text-decoration: none;
  }
  .nav-logo span { color: var(--muted); }
  .nav-links { display: flex; gap: 2.5rem; list-style: none; }
  .nav-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
  }
  .nav-links a::after {
    content: '';
    position: absolute; bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--amber);
    transition: width 0.3s;
  }
  .nav-links a:hover { color: var(--text); }
  .nav-links a:hover::after { width: 100%; }

  /* HERO */
  #hero {
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 8rem 3rem 4rem;
    position: relative;
    overflow: hidden;
  }
  .hero-grid-bg {
    position: absolute; inset: 0;
    background-image:
      linear-gradient(var(--border) 1px, transparent 1px),
      linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 100%);
    opacity: 0.4;
  }
  .hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(232,168,56,0.06) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
  }
  .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
  .status-pill {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.35rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
    width: fit-content;
  }
  .status-dot {
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s ease infinite;
  }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(91,191,122,0.4); }
    50% { box-shadow: 0 0 0 5px rgba(91,191,122,0); }
  }
  .hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--amber);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }
  h1 {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 8vw, 7.5rem);
    line-height: 1.02;
    color: var(--white);
    margin-bottom: 0.5rem;
    position: relative;
  }
  h1 em {
    font-style: italic;
    color: var(--amber);
  }
  .hero-sub {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 520px;
    margin: 1.5rem 0 2.5rem;
    font-weight: 300;
    line-height: 1.7;
  }
  .hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
  .btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: none;
  }
  .btn-primary {
    background: var(--amber);
    color: #0d0d0d;
    font-weight: 700;
  }
  .btn-primary:hover { background: var(--white); transform: translateY(-2px); }
  .btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
  }
  .btn-ghost:hover { border-color: var(--amber); color: var(--amber); transform: translateY(-2px); }

  .hero-stats {
    display: flex; gap: 3rem;
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    position: relative;
  }
  .stat-num {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--white);
    line-height: 1;
    display: block;
  }
  .stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.3rem;
    display: block;
  }

  /* TICKER */
  .ticker-wrap {
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 0;
    background: var(--bg2);
  }
  .ticker {
    display: flex; gap: 0;
    animation: ticker 25s linear infinite;
    width: max-content;
  }
  .ticker-item {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 0 2.5rem;
    display: flex; align-items: center; gap: 1.5rem;
  }
  .ticker-item::after {
    content: '◆';
    color: var(--amber);
    font-size: 0.5rem;
  }
  @keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }

  /* SECTIONS */
  section {
    padding: 7rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
  }
  .section-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 0.75rem;
  }
  .section-label::before {
    content: '';
    display: block;
    width: 24px; height: 1px;
    background: var(--amber);
  }
  h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 1rem;
  }
  h2 em { color: var(--amber); font-style: italic; }

  /* ABOUT */
  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    margin-top: 4rem;
    align-items: start;
  }
  .about-text p {
    color: var(--muted);
    line-height: 1.85;
    margin-bottom: 1.25rem;
    font-weight: 300;
  }
  .about-text p strong { color: var(--text); font-weight: 500; }
  .about-aside { display: flex; flex-direction: column; gap: 1.5rem; }
  .info-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
  }
  .info-card-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
  }
  .info-list { list-style: none; }
  .info-list li {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between;
  }
  .info-list li:last-child { border-bottom: none; }
  .info-list .tag {
    font-size: 0.65rem;
    color: var(--muted);
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.1rem 0.5rem;
    align-self: center;
  }

  /* SKILLS */
  .skills-section { border-top: 1px solid var(--border); }
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
  }
  .skill-block {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
  }
  .skill-block::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--amber), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .skill-block:hover { border-color: var(--amber-dim); transform: translateY(-4px); }
  .skill-block:hover::before { opacity: 1; }
  .skill-icon { font-size: 1.5rem; margin-bottom: 1rem; }
  .skill-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
  }
  .skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .skill-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text);
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.25rem 0.6rem;
  }

  /* PROJECTS */
  .projects-section { border-top: 1px solid var(--border); }
  .projects-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 4rem;
  }
  .projects-header a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--amber);
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: opacity 0.2s;
  }
  .projects-header a:hover { opacity: 0.7; }

  .projects-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
  }
  .project-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: flex; flex-direction: column;
    position: relative;
  }
  .project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(232,168,56,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(232,168,56,0.1);
  }
  .project-card.large { grid-column: span 7; }
  .project-card.medium { grid-column: span 5; }
  .project-card.half { grid-column: span 6; }
  .project-thumb {
    height: 200px;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
  }
  .project-thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 50%, var(--bg2));
  }
  .thumb-1 { background: linear-gradient(135deg, #1a1508, #2d2510, #4a3e15); }
  .thumb-2 { background: linear-gradient(135deg, #0a1a0f, #0f2d1e, #1a4a2a); }
  .thumb-3 { background: linear-gradient(135deg, #1a0a0a, #2d1515, #4a1a1a); }
  .thumb-4 { background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460); }
  

  .project-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
  .project-meta {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.75rem;
  }
  .project-year {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
  }
  .project-badges { display: flex; gap: 0.4rem; }
  .badge {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .badge-green { background: rgba(91,191,122,0.15); color: var(--green); border: 1px solid rgba(91,191,122,0.3); }
  .badge-blue { background: rgba(91,159,224,0.15); color: var(--blue); border: 1px solid rgba(91,159,224,0.3); }
  .badge-amber { background: rgba(232,168,56,0.15); color: var(--amber); border: 1px solid rgba(232,168,56,0.3); }
  .project-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    line-height: 1.2;
  }
  .project-desc {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 1.25rem;
    font-weight: 300;
  }
  .project-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
  .stack-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--muted);
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.2rem 0.55rem;
  }
  .project-links { display: flex; gap: 1rem; }
  .project-link {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--amber);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex; align-items: center; gap: 0.4rem;
    transition: opacity 0.2s;
  }
  .project-link:hover { opacity: 0.7; }

  /* EXPERIENCE */
  .exp-section { border-top: 1px solid var(--border); }
  .timeline { margin-top: 4rem; display: flex; flex-direction: column; gap: 0; }
  .timeline-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    position: relative;
  }
  .timeline-item:last-child { border-bottom: none; }
  .timeline-left { position: relative; }
  .tl-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
  }
  .tl-company {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--amber);
  }
  .tl-role {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 0.75rem;
    line-height: 1.2;
  }
  .tl-desc {
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.75;
    font-weight: 300;
    margin-bottom: 1rem;
  }
  .tl-achievements { list-style: none; }
  .tl-achievements li {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text);
    padding: 0.35rem 0;
    padding-left: 1.1rem;
    position: relative;
  }
  .tl-achievements li::before {
    content: '→';
    color: var(--amber);
    position: absolute; left: 0;
  }

  /* CONTACT */
  .contact-section {
    border-top: 1px solid var(--border);
    padding-bottom: 0;
  }
  .contact-inner {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    overflow: hidden;
  }
  .contact-inner::before {
    content: '';
    position: absolute;
    bottom: -100px; right: -100px;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(232,168,56,0.06), transparent 70%);
    pointer-events: none;
  }
  .contact-left h2 { margin-bottom: 1rem; }
  .contact-left p {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.75;
    margin-bottom: 2rem;
  }
  .social-links { display: flex; flex-direction: column; gap: 0.75rem; }
  .social-link {
    display: flex; align-items: center; gap: 1rem;
    text-decoration: none;
    padding: 0.75rem 1rem;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.2s, background 0.2s;
  }
  .social-link:hover { border-color: var(--amber-dim); background: var(--bg); }
  .social-icon { font-size: 1rem; width: 28px; text-align: center; }
  .social-info { flex: 1; }
  .social-name {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .social-handle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text);
    margin-top: 0.1rem;
  }
  .social-arrow { color: var(--muted); font-size: 0.75rem; }
  .contact-form { display: flex; flex-direction: column; gap: 1rem; }
  .form-group { display: flex; flex-direction: column; gap: 0.4rem; }
  .form-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--amber);
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }
  .form-input, .form-textarea {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    resize: none;
  }
  .form-input:focus, .form-textarea:focus { border-color: var(--amber-dim); }
  .form-input::placeholder, .form-textarea::placeholder { color: var(--muted); }

  /* FOOTER */
  footer {
    border-top: 1px solid var(--border);
    padding: 2rem 3rem;
    display: flex; align-items: center; justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
  }
  .footer-copy {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    letter-spacing: 0.05em;
  }
  .footer-right {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
    display: flex; align-items: center; gap: 0.75rem;
  }
  .footer-right span { color: var(--amber); }

  /* FADE-IN ANIMATIONS */
  .fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* RESPONSIVE */
  @media (max-width: 900px) {
    nav { padding: 1rem 1.5rem; }
    .nav-links { gap: 1.5rem; }
    section { padding: 5rem 1.5rem; }
    #hero { padding: 7rem 1.5rem 3rem; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .project-card.large, .project-card.medium, .project-card.half { grid-column: span 12; }
    .timeline-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; padding: 2.5rem; }
    .hero-stats { gap: 2rem; }
    footer { flex-direction: column; gap: 1rem; text-align: center; }
  }

@media (max-width: 600px) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-ring {
    display: none;
  }

  nav {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-links {
    width: 100%;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 0.65rem;
  }

  #hero {
    min-height: auto;
    padding: 8rem 1rem 3rem !important;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4rem);
    word-break: break-word;
  }

  .hero-sub {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
    cursor: pointer;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
  }

  section {
    padding: 4rem 1rem;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

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

  .project-thumb {
    height: 150px;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-meta {
    align-items: flex-start;
    gap: 0.75rem;
    flex-direction: column;
  }

  .project-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .info-list li {
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-start;
  }

  .contact-inner {
    padding: 1.25rem;
  }

  .social-link {
    padding: 0.75rem;
  }

  .social-handle {
    font-size: 0.7rem;
    overflow-wrap: anywhere;
  }

  footer {
    padding: 2rem 1rem;
  }
}
