/* ========================================
   Starbreak — Dark Premium
   ======================================== */

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

:root {
    --bg: #050507;
    --surface: #0a0a0f;
    --border: #141420;
    --text: #ffffff;
    --text-dim: #666680;
    --text-muted: #333345;
    --accent: #4d7cff;
    --accent-glow: rgba(77, 124, 255, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========================================
   Aurora Background
   ======================================== */

.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.aurora-1 {
    position: absolute;
    top: -30%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse, rgba(60, 120, 255, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    animation: drift1 20s ease-in-out infinite;
    filter: blur(80px);
}

.aurora-2 {
    position: absolute;
    top: 20%;
    left: -15%;
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(100, 60, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: drift2 25s ease-in-out infinite;
    filter: blur(100px);
}

.aurora-3 {
    position: absolute;
    bottom: -20%;
    right: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(40, 180, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: drift3 18s ease-in-out infinite;
    filter: blur(90px);
}

@keyframes drift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-40px, 30px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes drift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(1.1); }
}

@keyframes drift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -30px) scale(1.15); }
}

/* ========================================
   Navigation
   ======================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    background: rgba(5, 5, 7, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    opacity: 0;
    animation: fadeDown 0.8s ease 0.2s forwards;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-mark {
    height: 28px;
    width: auto;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text);
}

.cta-link {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.cta-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Hero
   ======================================== */

.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 140px 48px 80px;
    gap: 60px;
}

.hero-content {
    max-width: 640px;
    flex-shrink: 0;
}

/* ========================================
   Hero Visual — Animated Logo Mark
   ======================================== */

.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeUp 1.2s ease 0.6s forwards;
}

.hero-mark {
    position: relative;
    width: 420px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-svg {
    width: 240px;
    height: 234px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(77, 124, 255, 0.2));
}

/* Brackets breathe apart */
.bracket-left {
    animation: breatheLeft 6s ease-in-out infinite;
}

.bracket-right {
    animation: breatheRight 6s ease-in-out infinite;
}

/* Star pulses */
.mark-star {
    animation: starPulse 4s ease-in-out infinite;
    transform-origin: 1025px 1024px;
}

@keyframes breatheLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-12px); }
}

@keyframes breatheRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(12px); }
}

@keyframes starPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Glow behind the mark */
.mark-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(77, 124, 255, 0.2) 0%,
        rgba(77, 124, 255, 0.08) 40%,
        transparent 70%
    );
    filter: blur(40px);
    animation: glowPulse 6s ease-in-out infinite;
    z-index: 1;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

/* Orbital rings */
.mark-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(77, 124, 255, 0.1);
    z-index: 0;
}

.mark-ring-1 {
    width: 340px;
    height: 340px;
    animation: markSpin 35s linear infinite;
    border-style: dashed;
    border-color: rgba(77, 124, 255, 0.08);
}

.mark-ring-2 {
    width: 410px;
    height: 410px;
    animation: markSpinReverse 45s linear infinite;
    border-color: rgba(77, 124, 255, 0.05);
}

@keyframes markSpin {
    from { transform: rotateX(65deg) rotateZ(0deg); }
    to { transform: rotateX(65deg) rotateZ(360deg); }
}

@keyframes markSpinReverse {
    from { transform: rotateX(72deg) rotateY(15deg) rotateZ(360deg); }
    to { transform: rotateX(72deg) rotateY(15deg) rotateZ(0deg); }
}

h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.1;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 1s ease 0.4s forwards;
}

.shimmer {
    background: linear-gradient(
        90deg,
        #fff 0%,
        #fff 35%,
        #7da8ff 50%,
        #fff 65%,
        #fff 100%
    );
    background-size: 250% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-dim);
    max-width: 480px;
    line-height: 1.7;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.7s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.9s forwards;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    gap: 14px;
}

/* ========================================
   Sections — Common
   ======================================== */

section {
    position: relative;
    z-index: 1;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 48px;
}

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

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

/* ========================================
   Services
   ======================================== */

.services {
    border-top: 1px solid var(--border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.service-card {
    background: var(--surface);
    padding: 48px 36px;
    transition: background 0.4s ease;
}

.service-card:hover {
    background: #0e0e18;
}

.service-num {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-dim);
    line-height: 1.65;
}

/* ========================================
   Work / Projects
   ======================================== */

.work {
    border-top: 1px solid var(--border);
}

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

.project-card {
    text-decoration: none;
    color: var(--text);
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-image {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.project-image {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.project-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
    filter: brightness(0.85);
}

.project-card:hover .project-image img {
    transform: scale(1.03);
    filter: brightness(1);
}

/* ========================================
   Project Modal
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal {
    max-width: 900px;
    width: 100%;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 1001;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.modal-image img {
    width: 100%;
    display: block;
}

.modal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.modal-info p {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.project-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.project-info p {
    font-size: 0.875rem;
    color: var(--text-dim);
}

/* ========================================
   Contact
   ======================================== */

.contact {
    border-top: 1px solid var(--border);
}

.contact-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
}

.contact-left {
    flex: 1;
}

.contact-desc {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.7;
    max-width: 400px;
    margin-top: 20px;
}

.contact-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-end;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    padding: 18px 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: all 0.4s ease;
}

.contact-email:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    gap: 16px;
}

.contact-location span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

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

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

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

/* ========================================
   Animations
   ======================================== */

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

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 20px 24px;
    }
    
    .nav-right {
        gap: 20px;
    }
    
    .nav-link:not(.cta-link) {
        display: none;
    }
    
    .hero {
        padding: 120px 24px 60px;
        flex-direction: column;
    }
    
    .hero-visual {
        display: none;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .section-container {
        padding: 80px 24px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-inner {
        flex-direction: column;
        gap: 40px;
        align-items: flex-start;
    }
    
    .contact-right {
        align-items: flex-start;
    }
    
    .footer-inner {
        padding: 24px;
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .aurora-1 { width: 400px; height: 400px; }
    .aurora-2 { width: 350px; height: 350px; }
    .aurora-3 { width: 300px; height: 300px; }
}
