:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --border-color: #333333;
    --accent-color: #0070f3;
    --accent-glow: rgba(0, 112, 243, 0.5);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Helper Classes */
.hidden {
    display: none !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* Background Effects */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-image:
        linear-gradient(to right, #111 1px, transparent 1px),
        linear-gradient(to bottom, #111 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    opacity: 0.5;
}

.gradient-sphere {
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.2;
    z-index: -1;
    pointer-events: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.btn-primary {
    display: inline-block;
    background: var(--text-primary);
    color: var(--bg-color);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.lang-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    margin-left: 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    background: rgba(0, 0, 0, 0.5);
}

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

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 2rem;
}

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

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #111;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.gradient-text {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 2.5rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Services Section */
.services-section {
    padding: 4rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-card:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    border-color: var(--text-primary);
}

.icon-box {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Details Section */
.details-section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
}

.description-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 12px;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Legal Info (Collapsed) */
.legal-info-wrapper {
    margin-top: 2rem;
}

details summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    outline: none;
    transition: color 0.2s;
}

details summary:hover {
    color: var(--text-primary);
}

details[open] summary {
    margin-bottom: 1.5rem;
}

.small-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    background: #000;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
}

.info-item .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.info-item .value {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0 8rem;
}

.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-content p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1.2rem;
}

.contact-list {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.contact-item span:first-child {
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.contact-item b,
.contact-item a,
.contact-item span {
    color: var(--text-primary);
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Utilities like copyable */
.copyable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
}

.copyable:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 3rem;
    }

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

    .contact-list {
        flex-direction: column;
        gap: 2rem;
    }

    .nav-links a {
        display: none;
    }

    .nav-links .lang-btn {
        display: block;
        margin-left: 0;
    }
}

/* Portfolio Section */
.portfolio-section {
    padding: 6rem 0;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--text-secondary);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.project-image {
    height: 200px;
    width: 100%;
    background-size: cover;
    background-position: center;
}

/* Abstract Gradients for Project Placeholders */
.gradient-1 {
    background: linear-gradient(135deg, #00C6FB 0%, #005BEA 100%);
}

.gradient-2 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-3 {
    background: linear-gradient(135deg, #f83600 0%, #f9d423 100%);
}

.gradient-4 {
    background: linear-gradient(135deg, #B721FF 0%, #21D4FD 100%);
}

.gradient-5 {
    background: linear-gradient(135deg, #20E2D7 0%, #F9FEA5 100%);
}

.gradient-6 {
    background: linear-gradient(135deg, #8EC5FC 0%, #E0C3FC 100%);
}

.gradient-7 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.gradient-8 {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}

.gradient-9 {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.project-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #111;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    z-index: 1001;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image-wrapper {
    background: var(--card-bg);
}

.modal-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background-size: cover;
    background-position: center;
}

.modal-text {
    padding: 3rem;
}

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.modal-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.modal-details-grid {
    display: grid;
    gap: 1.5rem;
}

.detail-item h4 {
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
    border-left: 2px solid var(--accent-color);
    padding-left: 0.75rem;
}

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

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 200px;
    }

    .modal-text {
        padding: 2rem;
    }
}