:root {
    /* Typography */
    --font-main: 'Outfit', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default Dark Theme */
[data-theme="dark"],
:root {
    --bg-main: #0a0f1d;
    --bg-accent: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #10b981;
    --accent-secondary: #06b6d4;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.15);
    --ring-glow: rgba(16, 185, 129, 0.4);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    --tag-bg: #1e293b;
    --hero-glow: #1e293b;
    --icon-invert: 1;
    --icon-opacity: 0.6;
}

/* Light Theme */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-accent: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    /* Darkened for better contrast */
    --accent-primary: #059669;
    --accent-secondary: #0891b2;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.1);
    --ring-glow: rgba(16, 185, 129, 0.2);
    --card-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    --tag-bg: #e2e8f0;
    --hero-glow: #e2e8f0;
    --icon-invert: 0;
    --icon-opacity: 0.8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

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

/* --- Layout --- */

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

/* --- Typography --- */

h1,
h2,
h3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --- Hero Section --- */

.hero {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, var(--hero-glow) 0%, var(--bg-main) 100%);
    padding: 100px 20px;
}

.profile-ring {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 2.5rem;
}

.profile-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    z-index: 0;
    animation: pulseGlow 4s infinite alternate;
}

.profile-ring img {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--bg-main);
    z-index: 1;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
}

/* --- Glassmorphism Cards --- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
    justify-content: center;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: fadeInUp 0.8s ease backwards;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: var(--card-shadow);
}

.card img {
    border-radius: 12px;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.card h3 span {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 100px;
    white-space: nowrap;
}

.card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* --- Tags & Links --- */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.tags span {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--tag-bg);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
}

.links {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: var(--transition-fast);
}

.links a:hover {
    background: var(--accent-primary);
    transform: rotate(10deg);
}

.links img {
    width: 20px;
    height: 20px;
    margin: 0;
    filter: brightness(0) invert(var(--icon-invert, 1));
}



/* --- Footer --- */

footer {
    text-align: center;
    padding: 80px 20px;
    border-top: 1px solid var(--glass-border);
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 2rem;
}

footer ul li a img {
    width: 32px;
    transition: var(--transition-fast);
    filter: brightness(0) invert(var(--icon-invert));
    opacity: var(--icon-opacity);
}

footer ul li a:hover img {
    opacity: 1;
    transform: translateY(-5px);
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Animations --- */

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 20px var(--ring-glow);
    }

    100% {
        box-shadow: 0 0 50px var(--ring-glow);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Accessibility & Utilities --- */

.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--accent-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0 0 10px 10px;
    z-index: 200;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* --- Features Grid --- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-category {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition-base);
}

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

.feature-category h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.feature-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-category li {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-left: 0;
    position: relative;
    line-height: 1.5;
}

.feature-category li::before {
    content: "✓";
    color: var(--accent-primary);
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

/* --- Services Grid --- */

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

.service-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--transition-base);
    text-align: center;
}

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

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-weight: 700;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.service-highlight {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
}

/* --- Contact Form --- */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

section > p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-accent);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-base);
    line-height: 1.5;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--ring-glow);
}

.submit-btn {
    padding: 0.875rem 2rem;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-main);
    transition: var(--transition-base);
    margin: auto;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* --- Theme Toggle --- */

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    box-shadow: var(--card-shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-primary);
}

/* --- Responsive Adjustments --- */

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 60px 0;
    }

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

    .profile-ring {
        width: 180px;
        height: 180px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-category {
        padding: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem auto 2rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .contact-form {
        padding: 0;
        max-width: 100%;
        gap: 1.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 1rem 0.875rem;
        font-size: 16px;
        min-height: 44px;
    }

    .form-group textarea {
        min-height: 120px;
        font-size: 16px;
    }

    .submit-btn {
        align-self: stretch;
        padding: 1rem 1.5rem;
        min-height: 48px;
        font-size: 1rem;
    }

    .submit-btn:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    main {
        padding: 0 16px;
    }

    section {
        padding: 50px 0;
    }

    section > p {
        font-size: 0.95rem;
        margin: 0 auto 1.5rem;
    }

    .profile-ring {
        width: 150px;
        height: 150px;
        margin-bottom: 1.5rem;
    }

    .contact-form {
        gap: 1rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.875rem 0.75rem;
        border-radius: 6px;
    }

    .card {
        padding: 16px;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    .feature-category {
        padding: 1.25rem;
    }

    .feature-category h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .feature-category li {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .service-card p {
        font-size: 0.9rem;
    }
}