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

:root {
    --bg-dark: #0f0f0f;
    --bg-darker: #0a0a0a;
    --bg-card: #1a1a1a;
    --text-primary: #e5e5e5;
    --text-secondary: #a0a0a0;
    --accent-cyan: #00d9ff;
    --accent-blue: #0096c7;
    --accent-dim: #005f7a;
    --border-color: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Background subtle effect */
body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 217, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 150, 199, 0.03) 0%, transparent 50%);
    z-index: -1;
    animation: bgShift 20s ease infinite;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10%, -10%); }
}

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

/* Header / Hero */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    margin: 0 auto 2rem;
    animation: fadeInDown 1s ease;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.logo-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.logo-container:hover {
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.5);
}

.logo-container img:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 1s ease 0.2s both;
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease 0.4s both;
}

.tagline span {
    color: var(--accent-cyan);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.5;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-indicator span {
    display: block;
    width: 25px;
    height: 40px;
    border: 2px solid var(--accent-cyan);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    50% { opacity: 1; transform: translate(-50%, 5px); }
    100% { opacity: 0; transform: translate(-50%, 20px); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(42, 42, 42, 0.5);
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

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

main {
    margin-top: 15vh;
}

section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background: var(--bg-darker);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

p, li {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Section specific styling */
#sobre .intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: center;
}

#sobre .intro p {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.highlight {
    color: var(--accent-cyan);
}

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

.details div {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(0, 217, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border 0.3s ease;
}

.details div:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.details h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-cyan);
    font-size: 1.3rem;
}

.details p {
    margin-bottom: 0.5rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skill-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.8rem;
    border: 1px solid rgba(0, 217, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.skill-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.skill-card ul {
    list-style: none;
    line-height: 2;
}

.skill-card ul li::before {
    content: "•";
    margin-right: 0.5rem;
    color: var(--accent-cyan);
}

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

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.8rem;
    border: 1px solid rgba(0, 217, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, border 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.card h3 {
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

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

/* Lab list */
.lab-list {
    margin-top: 2rem;
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.lab-list li {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Contact form */
form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

label {
    font-weight: 500;
    color: var(--text-primary);
}

input, textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border: 1px solid rgba(0, 217, 255, 0.6);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

textarea {
    height: 180px;
    resize: vertical;
}

button {
    padding: 0.9rem 1.5rem;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    border: none;
    border-radius: 8px;
    color: var(--bg-dark);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 217, 255, 0.3);
}

#my-form-status {
    text-align: center;
    font-weight: 500;
}

#my-form-status.success {
    color: #4ade80;
}

#my-form-status.error {
    color: #f87171;
}

/* Footer */
footer {
    padding: 3rem 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

footer p {
    color: var(--text-secondary);
    text-align: center;
}

footer a {
    color: var(--accent-cyan);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

    header {
        padding: 2rem 0;
    }

    .logo-container {
        width: 150px;
        height: 150px;
    }

    .details {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility classes */
.section-caption {
    font-size: 1rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.3), transparent);
    margin: 3rem 0;
}

.quote {
    font-style: italic;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 217, 255, 0.05);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 8px;
}

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

.mosaic img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.1);
}

.projects-grid .card:nth-child(odd) {
    border-color: rgba(0, 217, 255, 0.2);
}

.projects-grid .card:nth-child(even) {
    border-color: rgba(0, 217, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
