/* ============================================
   DC Admin Landing — shadcn/ui style
   ============================================ */

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === CSS Variables (zinc-based shadcn palette) === */
:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-fg: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-fg: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-fg: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-fg: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-fg: 240 5.9% 10%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* === Typography & Body === */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
    color: hsl(var(--foreground));
    background: hsl(var(--background));
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

p {
    color: hsl(var(--muted-fg));
    line-height: 1.7;
}

a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: hsl(var(--muted-fg));
}

/* === Layout === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-alt {
    background: hsl(var(--secondary));
}

.section-title {
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    text-align: center;
    color: hsl(var(--muted-fg));
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* === Grid === */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

/* === Header === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.header.scrolled {
    border-bottom-color: hsl(var(--border));
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: hsl(var(--foreground));
}

.logo:hover {
    color: hsl(var(--foreground));
}

.logo svg {
    width: 28px;
    height: 28px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-fg));
    transition: color 0.2s;
}

.nav a:hover {
    color: hsl(var(--foreground));
}

/* === Buttons === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--primary));
    color: hsl(var(--primary-fg));
    border: none;
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary:hover {
    opacity: 0.9;
    color: hsl(var(--primary-fg));
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.btn-outline:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--accent));
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-full {
    width: 100%;
}

/* === Card === */
.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: hsl(var(--secondary));
    margin-bottom: 1rem;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke: hsl(var(--foreground));
}

.card h3 {
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.875rem;
}

/* === Hero === */
.hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    opacity: 1;
    transform: none;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 1.25rem;
}

.hero-sub {
    font-size: 1.125rem;
    color: hsl(var(--muted-fg));
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
}

.hero-illustration svg {
    width: 100%;
    height: auto;
    max-width: 520px;
}

/* === Features === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* === Skills === */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.skill-percent {
    font-size: 0.8125rem;
    font-weight: 600;
    color: hsl(var(--muted-fg));
}

.progress {
    width: 100%;
    height: 8px;
    background: hsl(var(--secondary));
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 999px;
    width: 0;
    transition: width 1s ease;
}

.progress-bar.animated {
    /* width set via style attr */
}

/* === Login === */
.login-container {
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: hsl(var(--muted-fg));
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: hsl(var(--foreground));
}

.input {
    display: block;
    width: 100%;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    background: transparent;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.input::placeholder {
    color: hsl(var(--muted-fg));
}

.input:focus {
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.15);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input {
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: hsl(var(--muted-fg));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: hsl(var(--foreground));
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.form-submit {
    margin-top: 1.5rem;
}

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-fg));
}

.forgot-link:hover {
    color: hsl(var(--foreground));
    text-decoration: underline;
}

/* === Footer === */
.footer {
    border-top: 1px solid hsl(var(--border));
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8125rem;
    color: hsl(var(--muted-fg));
}

.footer-links a:hover {
    color: hsl(var(--foreground));
}

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

.hero .hero-content {
    animation: fadeInUp 0.7s ease forwards;
}

.hero .hero-illustration {
    animation: fadeInUp 0.7s ease 0.2s forwards;
    opacity: 0;
}

/* subtle float animation for hero SVG */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-illustration svg {
    animation: float 6s ease-in-out infinite;
}

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .section { padding: 3.5rem 0; }

    .hero { padding-top: 6rem; }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-sub {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-illustration {
        order: -1;
    }

    .hero-illustration svg {
        max-width: 340px;
        margin: 0 auto;
        display: block;
    }

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

    .nav {
        gap: 1rem;
    }

    .footer-inner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }

    .container { padding: 0 1rem; }

    .hero { padding-top: 5.5rem; }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .login-card {
        padding: 1.75rem;
    }
}
