:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-tertiary: #737373;
    --border: #e5e5e5;
    --accent: #000000;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --text-tertiary: #737373;
    --border: #262626;
    --accent: #ffffff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Smooth fade-in on page load */
body {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Grain/Noise Effect */
.grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 50px;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
}

.theme-toggle-slider {
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(24px);
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 5px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px;
    flex-shrink: 0;
}

.lang-btn {
    padding: 5px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s;
    font-family: inherit;
    outline: none;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .lang-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--bg-primary);
}

[data-theme="dark"] .lang-btn.active {
    color: var(--bg-primary);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 25px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

[data-theme="dark"] .navbar {
    background: rgba(10, 10, 10, 0.9);
}

.logo {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.logo:hover {
    letter-spacing: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    position: relative;
}

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

.nav-links a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero .container {
    display: flex;
    gap: 100px;
    align-items: center;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 500px;
    height: 500px;
    flex-shrink: 0;
}

.hero-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}

[data-theme="dark"] .hero-circle {
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.05);
}

.hero-icon {
    font-size: 120px;
    font-weight: 700;
    color: var(--border);
    opacity: 0.3;
    user-select: none;
}

/* Hero Cards */
.hero-card {
    position: absolute;
    display: flex;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

[data-theme="dark"] .hero-card {
    background: rgba(10, 10, 10, 0.6);
}

.hero-card:hover {
    transform: scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .hero-card:hover {
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
}

.hero-card-1 {
    top: 50px;
    left: 0;
    animation: fadeInLeft 1s ease-out 0.2s both;
}

.hero-card-2 {
    bottom: 80px;
    left: 20px;
    animation: fadeInLeft 1s ease-out 0.4s both;
}

.hero-card-3 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation: fadeInRight 1s ease-out 0.6s both;
}

.hero-card-3:hover {
    transform: translateY(-50%) scale(1.05);
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.hero-card-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-card-icon svg {
    color: var(--text-primary);
}

.hero-card-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 5px 0;
}

.hero-card-content p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Hero Text */
.hero-text {
    flex: 1;
}

.hero-intro {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-name {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out 0.9s both;
}

.hero-tagline {
    font-size: clamp(30px, 6vw, 60px);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.1;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.hero-description {
    max-width: 540px;
    font-size: 16px;
    color: var(--text-tertiary);
    line-height: 1.8;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 1.1s both;
}

.hero-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-tertiary);
    animation: fadeInUp 0.8s ease-out 1.2s both;
}

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

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 60px;
    gap: 15px;
    animation: fadeInLeft 0.8s ease-out both;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-number {
    font-size: 18px;
    color: var(--text-tertiary);
    font-weight: 400;
    transition: all 0.3s;
}

.section-header:hover .section-number {
    color: var(--text-primary);
    transform: scale(1.1);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-line {
    height: 1px;
    background: var(--border);
    flex: 1;
    transition: all 0.3s;
}

.section-header:hover .section-line {
    background: var(--accent);
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-text p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    margin-top: 20px;
    list-style: none;
}

.tech-list li {
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
    transition: all 0.3s ease;
}

.tech-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
    transition: all 0.3s ease;
}

.tech-list li:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.tech-list li:hover::before {
    color: var(--text-primary);
}

/* Work Section */
.work {
    padding: 100px 0;
}

.projects-list {
    margin-bottom: 100px;
}

.project.featured {
    margin-bottom: 100px;
    animation: fadeInUp 0.8s ease-out both;
}

.project.featured:nth-child(1) {
    animation-delay: 0.1s;
}

.project.featured:nth-child(2) {
    animation-delay: 0.2s;
}

.project.featured:nth-child(3) {
    animation-delay: 0.3s;
}

.project-content {
    position: relative;
    transition: transform 0.3s ease;
}

.project.featured:hover .project-content {
    transform: translateX(5px);
}

.project-overline {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.project-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.project-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.project-title a svg {
    width: 24px;
    height: 24px;
    color: var(--text-tertiary);
    transition: all 0.3s;
}

.project-title a:hover {
    color: var(--text-secondary);
}

.project-title a:hover svg {
    color: var(--text-primary);
    transform: translate(2px, -2px);
}

.project-description {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.project-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.project.featured:hover .project-description::after {
    width: 100%;
}

.project-description p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
}

.project-tech-list li {
    font-size: 13px;
    color: var(--text-tertiary);
}

.project-links {
    display: none;
}

/* Other Projects */
.other-projects {
    margin-top: 80px;
}

.other-projects-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.nda-note {
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 50px;
}

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

.project-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

[data-theme="dark"] .project-card::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}

.project-card:hover::before {
    left: 100%;
}

.project-card:hover {
    transform: translateY(-8px) translateZ(20px) rotateX(2deg);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.1);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.project-card-header svg {
    color: var(--text-tertiary);
}

.nda-badge {
    font-size: 11px;
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 3px;
}

.project-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
}

.project-card-tech li {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Impact Section */
.impact {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.impact-grid {
    display: grid;
    gap: 3rem;
}

.impact-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.impact-card:hover {
    border-color: var(--accent);
    transform: translateX(10px);
}

.impact-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.impact-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-tertiary);
}

.impact-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.impact-content {
    display: grid;
    gap: 25px;
    margin-bottom: 25px;
}

.impact-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.impact-section p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

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

.impact-tags span {
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.impact-card:hover .impact-tags span {
    border-color: var(--accent);
    color: var(--text-primary);
}

.contact-button {
    display: inline-block;
    padding: 18px 40px;
    border: 1px solid var(--accent);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.contact-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transition: left 0.3s ease;
    z-index: -1;
}

.contact-button:hover::before {
    left: 0;
}

.contact-button:hover {
    color: var(--bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .contact-button:hover {
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-links a {
    color: var(--text-tertiary);
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--text-primary);
    transform: translateY(-5px) scale(1.1);
}

footer p {
    font-size: 13px;
    color: var(--text-tertiary);
    animation: fadeIn 1s ease-out 0.8s both;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 25px;
    }

    .navbar {
        padding: 20px 25px;
    }

    .nav-links {
        display: none;
    }

    .nav-right {
        gap: 0;
    }

    .hero {
        padding-top: 80px;
    }

    .hero .container {
        flex-direction: column;
        gap: 50px;
    }

    .hero-visual {
        width: 100%;
        height: 400px;
    }

    .hero-circle {
        width: 200px;
        height: 200px;
    }

    .hero-icon {
        font-size: 80px;
    }

    .hero-card {
        padding: 15px;
    }

    .hero-card-1 {
        top: 20px;
        left: 10px;
    }

    .hero-card-2 {
        bottom: 20px;
        left: 10px;
    }

    .hero-card-3 {
        top: 40%;
        right: 10px;
    }

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

    .tech-list {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
/* Hero Image Button */
.hero-image-btn {
    display: block;
    max-width: 400px;
    width: 100%;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 15px rgba(100, 255, 218, 0.1));
    animation: floatingCube 6s ease-in-out infinite;
    cursor: pointer;
}

.hero-image-btn img {
    width: 100%;
    height: auto;
    border-radius: 20px;
}

.hero-image-btn:hover {
    transform: scale(1.05) translateY(-10px);
    filter: drop-shadow(0 0 30px rgba(100, 255, 218, 0.3));
}

@keyframes floatingCube {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@media (max-width: 768px) {
    .hero-image-btn {
        max-width: 250px;
        margin: 40px auto 0;
    }
}
