:root {
    --bg: #0a0a0b;
    --bg-elevated: #141416;
    --text: #e8e6e3;
    --text-muted: #8b8884;
    --accent: #e07c4c;
    --accent-soft: rgba(224, 124, 76, 0.15);
    --border: rgba(255, 255, 255, 0.06);
    --radius: 12px;
    --radius-lg: 20px;
  }

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

  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'DM Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
  }

  /* Subtle grid background */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
      linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
  }

  .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
  }

  /* Navigation */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 0;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease;
  }

  nav.scrolled,
  nav.nav-open {
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(12px);
  }

  nav.scrolled {
    padding: 16px 0;
  }

  .hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: transform 0.2s ease;
  }

  .hamburger:hover {
    color: var(--accent);
  }

  .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
  }

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

  .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
  }

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

  /* Hero */
  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 80px;
  }

  .hero-content {
    max-width: 680px;
  }

  .hero-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
  }

  .hero h1 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.1s forwards;
  }

  .hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 520px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
  }

  .scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .scroll-indicator::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--text-muted), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

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

  /* Scroll-triggered animations */
  .animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
  }

  .animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
  }

  /* Scroll indicator bounce */
  .scroll-indicator {
    animation: floatDown 3s ease-in-out infinite;
  }

  @keyframes floatDown {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
  }

  /* Tech tag hover */
  .project-tech span {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .project-tech span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(224, 124, 76, 0.2);
  }

  /* Logo hover */
  .logo {
    transition: letter-spacing 0.3s ease;
  }

  .logo:hover {
    letter-spacing: 0.02em;
  }

  /* Nav link underline on hover */
  .nav-links a {
    position: relative;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  /* Form input focus glow */
  .form-group input:focus,
  .form-group textarea:focus {
    box-shadow: 0 0 0 3px var(--accent-soft);
  }

  /* About photo subtle hover */
  .about-photo {
    transition: transform 0.4s ease;
  }

  .about-photo:hover {
    transform: scale(1.02);
  }

  /* Respect reduced motion */
  @media (prefers-reduced-motion: reduce) {
    .scroll-indicator {
      animation: none;
    }

    .animate-on-scroll {
      opacity: 1;
      transform: none;
    }
  }

  /* About Section */
  .about {
    padding: 120px 0 160px;
    border-top: 1px solid var(--border);
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: center;
  }

  .about-photos {
    position: relative;
    width: 328px;
    height: 408px;
  }

  .about-photo {
    position: absolute;
    width: 280px;
    height: 360px;
    aspect-ratio: 3/4;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
  }

  .about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }

  .about-photo-main {
    top: 0;
    left: 0;
    z-index: 2;
  }

  .about-photo-secondary {
    top: 15rem;
    left: 13rem;
    z-index: 1;
  }

  .about-content .section-header {
    margin-bottom: 24px;
  }

  .about-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 20px;
  }

  .about-content p:last-child {
    margin-bottom: 0;
  }

  .about-content a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .about-content a:hover {
    color: #d66a3a;
    text-decoration: underline;
  }

  /* Offerings Section */
  .offerings {
    padding: 120px 0 160px;
    border-top: 1px solid var(--border);
  }

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

  .offering-item {
    padding: 40px 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, transform 0.3s ease;
  }

  .offering-item:hover {
    border-color: rgba(224, 124, 76, 0.3);
    transform: translateY(-4px);
  }

  .offering-item h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 12px;
  }

  .offering-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Skills Section */
  .skills {
    padding: 120px 0 160px;
    border-top: 1px solid var(--border);
  }

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

  .skill-category {
    padding: 32px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease;
  }

  .skill-category:hover {
    border-color: rgba(224, 124, 76, 0.3);
  }

  .skill-category h4 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
  }

  .skill-category p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Projects Section */
  .projects {
    padding: 120px 0 160px;
  }

  .section-header {
    margin-bottom: 64px;
  }

  .section-header h2 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 12px;
  }

  .section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
  }

  .projects-grid {
    display: grid;
    gap: 24px;
  }

  .project-card {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    align-items: center;
    padding: 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    color: inherit;
  }

  .project-card:hover {
    border-color: rgba(224, 124, 76, 0.3);
    transform: translateY(-4px);
  }

  .project-card:nth-child(even) {
    grid-template-columns: 1.2fr 1fr;
  }

  .project-card:nth-child(even) .project-visual {
    order: 2;
  }

  .project-visual {
    aspect-ratio: 16/10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
    position: relative;
  }

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

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

  .project-visual-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.4;
  }

  .project-info h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 12px;
  }

  .project-info .project-type {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
  }

  .project-info p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
  }

  .project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
  }

  .project-tech span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 6px;
  }

  .project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s ease;
  }

  .project-card:hover .project-link {
    gap: 12px;
  }

  .project-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
  }

  .project-card:hover .project-link svg,
  .project-item:hover .project-link svg {
    transform: translate(2px, -2px);
  }

  /* Personal Projects Section */
  .personal-projects {
    padding: 120px 0 160px;
    border-top: 1px solid var(--border);
  }

  .projects-list {
    display: grid;
    gap: 24px;
  }

  .project-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding: 40px 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s ease, transform 0.3s ease;
  }

  .project-item:hover {
    border-color: rgba(224, 124, 76, 0.3);
    transform: translateY(-4px);
  }

  .project-item-content {
    flex: 1;
  }

  .project-item h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 12px;
  }

  .project-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .project-item .project-tech {
    margin-bottom: 0;
  }

  .project-item .project-link {
    flex-shrink: 0;
  }

  /* Education Section */
  .education {
    padding: 120px 0 160px;
    border-top: 1px solid var(--border);
  }

  .education-list {
    display: grid;
    gap: 24px;
  }

  .education-item {
    padding: 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.3s ease;
  }

  .education-item:hover {
    border-color: rgba(224, 124, 76, 0.3);
  }

  .education-item .education-degree {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
  }

  .education-item h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 8px;
  }

  .education-item .education-school {
    color: var(--text-muted);
    font-size: 1rem;
  }

  /* Footer & Contact Form */
  footer {
    padding: 80px 0 48px;
    border-top: 1px solid var(--border);
  }

  .contact-section {
    margin-bottom: 64px;
  }

  .contact-section .section-header {
    margin-bottom: 40px;
    text-align: center;
  }

  .contact-section .section-header p {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-form {
    max-width: 560px;
    margin: 0 auto;
  }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .form-group {
    margin-bottom: 24px;
  }

  .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
  }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
  }

  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
  }

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

  .form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
  }

  .form-submit {
    padding: 14px 32px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .form-submit:hover {
    background: #d66a3a;
    transform: translateY(-2px);
  }

  .form-submit:active {
    transform: translateY(0);
  }

  .form-message {
    max-width: 560px;
    margin: 0 auto 24px;
    padding: 16px 20px;
    border-radius: var(--radius);
    font-size: 0.95rem;
  }

  .form-message.success {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #81c784;
  }

  .form-message.error {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #e57373;
  }

  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-brand {
    font-family: 'Instrument Serif', serif;
    font-size: 1.5rem;
    color: var(--text);
  }

  .footer-links {
    display: flex;
    gap: 32px;
  }

  .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
  }

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

  .footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
  }

  /* Responsive */
  @media (max-width: 900px) {
    .about-grid {
      grid-template-columns: 1fr;
      gap: 48px;
    }

    .about-photos {
      width: 248px;
      height: 308px;
      margin: 0 auto;
    }

    .about-photo {
      width: 200px;
      height: 260px;
    }

    .about-photo-secondary {
      top: 7rem;
      left: 10rem;
    }

    .offerings-grid {
      grid-template-columns: 1fr;
    }
    .skills-grid {
      grid-template-columns: 1fr;
    }
    .offering-item {
      padding: 32px 24px;
    }

    .project-card,
    .project-card:nth-child(even) {
      grid-template-columns: 1fr;
      gap: 32px;
    }

    .project-card:nth-child(even) .project-visual {
      order: 0;
    }

    .project-visual {
      aspect-ratio: 16/9;
    }

    .project-item {
      flex-direction: column;
      gap: 20px;
    }
  }

  @media (max-width: 600px) {
    .about-photos {
      width: 212px;
      height: 262px;
    }

    .about-photo {
      width: 168px;
      height: 218px;
    }

    .about-photo-secondary {
      top: 7rem;
      left: 8rem;
    }

    .form-row {
      grid-template-columns: 1fr;
    }

    .hero {
      padding: 100px 0 60px;
    }

    .project-card,
    .education-item,
    .skill-category,
    .project-item {
      padding: 32px 24px;
    }

    nav {
      background: rgba(10, 10, 11, 0.95);
      backdrop-filter: blur(12px);
    }

    .hamburger {
      display: flex;
    }

    .nav-links {
      position: fixed;
      top: 72px;
      left: 0;
      right: 0;
      flex-direction: column;
      gap: 0;
      padding: 24px;
      background: rgba(10, 10, 11, 0.98);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-open .nav-links {
      max-height: 320px;
      opacity: 1;
      visibility: visible;
    }

    .nav-links li {
      border-bottom: 1px solid var(--border);
    }

    .nav-links li:last-child {
      border-bottom: none;
    }

    .nav-links a {
      display: block;
      padding: 16px 0;
      font-size: 1rem;
    }

    .form-row {
      gap: 0;
    }
  }

  @media (min-width: 601px) {
    .hamburger {
      display: none !important;
    }

    .nav-links {
      position: static;
      max-height: none;
      opacity: 1;
      visibility: visible;
      flex-direction: row;
      padding: 0;
      background: none;
      border: none;
    }

    .nav-links li {
      border-bottom: none;
    }

    .nav-links a {
      padding: 0;
      font-size: 0.9rem;
    }
  }