@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --card: #111111;
    --card-hover: #1a1a1a;
    --border: #222222;
    --border-light: #333333;
    --text: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --accent: #00A8FF;
    --accent-hover: #0088cc;
    --accent-glow: rgba(0, 168, 255, 0.3);
    --gradient: linear-gradient(135deg, #00A8FF 0%, #0088cc 100%);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 8px 30px rgba(0, 168, 255, 0.2);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 168, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 168, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: scale(1.02);
}

.brand-logo {
    width: 40px;
    height: 40px;
    filter: brightness(1.1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.brand-text span {
    color: var(--accent);
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: -0.2rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
}

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

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

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

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 80px;
}

.hero-inner {
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0 auto 2.5rem;
    max-width: 700px;
    font-weight: 400;
    line-height: 1.6;
}

.button {
    display: inline-block;
    background: var(--gradient);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.button:hover::before {
    left: 100%;
}

.button-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.button-secondary:hover {
    background: var(--accent);
    color: #000;
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.section-lead {
    text-align: center;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Cards */
.grid {
    display: grid;
    gap: 2rem;
}

.grid.three {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid.four {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

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

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.project img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* show full image without cropping */
    background: var(--bg-secondary);
    padding: 0.75rem; /* give some breathing room so it fits nicely */
    transition: transform 0.3s ease;
}

.project:hover img {
    transform: scale(1.05);
}

.project h3 {
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

/* Contact */
.contact {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    position: relative;
}

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

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

.location {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 2rem;
}

/* Contact Form */
.contact-form {
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.1);
}

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

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.footer p {
    font-size: 0.9rem;
}

/* Badges */
.badges{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}
.badge{display:inline-flex;align-items:center;gap:.5rem;padding:.35rem .6rem;border:1px solid var(--border);border-radius:999px;background:var(--card);color:var(--text-secondary);font-size:.85rem}
.badge.primary{border-color:var(--accent);color:var(--text)}
.badge::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--accent)}

/* Specs table */
.specs{width:100%;border-collapse:separate;border-spacing:0;overflow:hidden;border-radius:12px;border:1px solid var(--border);background:var(--card)}
.specs th,.specs td{padding:1rem 1.25rem;border-bottom:1px solid var(--border);text-align:left}
.specs th{color:var(--text);font-weight:600;background:linear-gradient(0deg, rgba(255,255,255,0.02), rgba(255,255,255,0.02))}
.specs tr:last-child td{border-bottom:none}
.specs td{color:var(--text-secondary)}

/* Detail layout */
.detail-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:3rem}
.detail-hero{min-height:50vh;display:flex;align-items:center;justify-content:center;text-align:center;padding-top:120px}
.crumbs{display:flex;gap:.5rem;justify-content:center;color:var(--text-muted);font-size:.9rem;margin-bottom:1rem}
.crumbs a{text-decoration:none;color:var(--text-secondary)}
.crumbs span{color:var(--text-muted)}

/* Gallery */
.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.gallery img{width:100%;height:180px;object-fit:contain;background:var(--bg-secondary);border:1px solid var(--border);border-radius:12px;padding:1rem;transition:transform .2s}
.gallery img:hover{transform:scale(1.02)}

/* Tabs */
.tabs {
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-nav {
    display: flex;
    gap: 0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Code blocks */
.code-section {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    color: #e5e5e5;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #333;
}

.code-title {
    font-weight: 600;
    color: var(--text);
}

.copy-btn {
    background: #333;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--accent);
    color: #000;
}

/* Connection guide */
.connection-guide {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.connection-item:last-child {
    border-bottom: none;
}

.connection-pin {
    background: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text);
    min-width: 100px;
    text-align: center;
}

.connection-arrow {
    color: var(--accent);
    font-weight: bold;
}

/* Charts */
.chart-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    height: 300px;
}

/* Project hero */
.project-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 120px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

.project-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.project-images img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1rem; /* slightly less padding to avoid overflow on small screens */
    border: 1px solid var(--border);
}

/* Feature cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

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

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

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

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.open {
        transform: translateX(0);
    }
    
    .hamburger {
        display: flex;
        z-index: 1000;
    }
    
    .hero {
        padding-top: 100px;
        min-height: 80vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .button {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .project h3 {
        padding: 1rem;
        font-size: 1rem;
    }
}

