:root {
    color-scheme: dark;
    --bg: #0e0e0f;
    --fg: #e0e0e0;
    --accent: #4fc3f7;
    --card-bg: #18181a;
    --border: #2e2e32;
    --muted: #a0a0a0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--fg);
    margin: 0;
    line-height: 1.6;
}

header, main, footer {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* ==========================================================================
   Links Page Specific Styles (links/index.html - Bio Link Landing Page)
   ========================================================================== */

/* Full Viewport Height & Vertical Centering on Desktop */
body.links-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

/* Centered Narrow Container for Smartphone/Linktree Feel */
.bio-container {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 16px;
    box-sizing: border-box;
}

.links-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.links-page-header .avatar {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.links-page-header .profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Card - 3 Element Layout */
.link-card {
    display: flex;
    align-items: center; /* Perfect vertical alignment across card height */
    gap: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-card:hover {
    background: #202024;
    border-color: #4a4a50;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.link-card:active {
    transform: scale(0.985);
    background: #1a1a1d;
}

/* Card Left - Icon */
.card-left {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: #242428;
    border-radius: 10px;
    color: var(--accent);
    flex-shrink: 0;
    align-self: center;
}

/* Card Center - Title & Description */
.card-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.card-center h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.card-center p {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.35;
}

/* Card Right - Arrow Indicator (Enforced 50% Vertical Centering) */
.card-right {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #66666e;
    transition: color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    align-self: center; /* Exactly at half card height */
}

.link-card:hover .card-right {
    color: var(--accent);
    transform: translate(2px, -2px);
}

/* Featured Card (Portfolio) */
.featured-card {
    background: linear-gradient(135deg, #1a2734 0%, #151a22 100%);
    border: 1px solid rgba(79, 195, 247, 0.4);
    box-shadow: 0 4px 16px rgba(79, 195, 247, 0.08);
}

.featured-card:hover {
    background: linear-gradient(135deg, #203142 0%, #19202b 100%);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(79, 195, 247, 0.2);
}

.featured-card .card-left {
    background: rgba(79, 195, 247, 0.15);
    color: var(--accent);
}

.featured-badge {
    font-size: 0.68rem;
    font-weight: 700;
    color: #0e0e0f;
    background: var(--accent);
    padding: 2px 7px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   Portfolio Home Page Styles (index.html)
   ========================================================================== */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.profile-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-header .avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.role-badge {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 2px;
}

/* Typography */
h1, h2, h3 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 0.4em;
}

h2 {
    font-size: 1.35rem;
}

h3 {
    font-size: 1.15rem;
}

p {
    margin-top: 0;
    margin-bottom: 1em;
    color: var(--muted);
}

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

a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero-section {
    padding: 24px 0 32px;
    border-bottom: 1px solid #1e1e22;
    margin-bottom: 32px;
}

.hero-tagline {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 760px;
    color: var(--muted);
    margin-bottom: 0;
}

/* Section Common */
.section-title {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.projects-section, .skills-section {
    margin-bottom: 40px;
}

/* Projects Grid (2 columns on desktop) */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

@media (max-width: 640px) {
    .projects {
        grid-template-columns: 1fr;
    }
}

/* Project Card */
.project-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: #4a4a50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #ffffff;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 16px;
    flex-grow: 1;
}

/* Tags & Skills */
.tags, .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag, .skill-pill {
    font-size: 0.8rem;
    background: #252528;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #38383c;
    font-weight: 500;
}

.skill-pill {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 16px;
    background: var(--card-bg);
}

.skill-pill:hover {
    border-color: var(--accent);
    color: #ffffff;
}

/* Card Actions / Buttons */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: #0e0e0f;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: #81d4fa;
    border-color: #81d4fa;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.btn-disabled {
    background: #1e1e20;
    color: #666666;
    border: 1px solid #2a2a2d;
    cursor: not-allowed;
}

/* Footer */
footer {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding-top: 32px;
}

.footer-contact {
    margin-bottom: 24px;
}

.footer-contact h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    align-items: right;
}

.contact-btn {
    margin-top: 12px;
    display: inline-block;
}

.footer-links {
    margin-bottom: 24px;
}

.social-nav-link {
    font-weight: 500;
    color: var(--accent);
}

.copyright {
    font-size: 0.85rem;
    color: #777777;
    margin-top: 16px;
}

[hidden] { display: none !important; }
