#summary-result h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

#summary-result h4 {
    color: #34495e;
    margin-top: 16px;
}

#summary-result ul {
    padding-left: 20px;
}

#summary-result li {
    margin-bottom: 4px;
}

/* ── Reset & Variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #ffffff;
    --fg: #0a1128;
    --muted: #6b7280;
    --accent: #f97316;       /* orange-500 */
    --accent-dark: #ea580c;  /* orange-600 */
    --accent-text: #7c2d12;  /* orange-950 */
    --card-bg: #fdba74;      /* orange-300ish — matches orange-400 */
    --about-bg: #86efac;     /* green-300 — matches green-400 */
    --tag-bg: #ea580c;
    --nav-border: #e5e7eb;
    --shadow: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.16);
    --radius: 12px;
    --transition: .25s ease;
}

.dark {
    --bg: #030712;
    --fg: #f9fafb;
    --muted: #9ca3af;
    --nav-border: #1f2937;
    --shadow: 0 4px 16px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

/* ── Navbar ── */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    border-bottom: 1px solid var(--nav-border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
    gap: 16px;
    flex-wrap: wrap;
    transition: background var(--transition);
}

.nav-title {
    font-family: 'DM Serif Display', serif;
    font-size: 1.25rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--fg);
    transition: opacity var(--transition);
}
.nav-title:hover { opacity: .75; }

.nav-icons { display: flex; gap: 14px; align-items: center; }
.nav-icons a {
    color: var(--fg);
    font-size: 1.4rem;
    transition: transform var(--transition), opacity var(--transition);
    display: flex;
    align-items: center;
}
.nav-icons a:hover { transform: scale(1.15); opacity: .8; }

/* Dark Mode Toggle */
.toggle-wrap { display: flex; align-items: center; gap: 8px; font-size: .875rem; }
.switch {
    position: relative;
    width: 44px; height: 24px;
    cursor: pointer;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background var(--transition);
}
.slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ── Section wrappers ── */
section { padding: 48px 24px; }
.section-inner { max-width: 900px; margin: 0 auto; }
.section-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 32px;
}

/* ── Hero ── */
#hero {
    text-align: center;
    padding: 60px 24px 40px;
}
.hero-heading {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 400;
    min-height: 3.5rem;
    margin-bottom: 16px;
}
/* cursor blink */
.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
    max-width: 540px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── Cards ── */
.card {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.about-card .card-body {
    background: var(--about-bg);
    padding: 28px;
    color: #052e16; /* green-950 */
}
.about-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 14px;
}
.about-card p { line-height: 1.65; }
.about-card p + p { margin-top: 12px; }

/* Project cards */
.projects-grid {
    display: grid;
    gap: 20px;
}
.projects-grid.two-col { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.projects-grid.three-col { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.project-card .card-body {
    background: #fb923c; /* orange-400 */
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}
.project-card h3 {
    font-family: 'DM Serif Display', serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #0a1128;
}
.project-card p {
    font-size: .875rem;
    color: var(--accent-text);
    flex-grow: 1;
    line-height: 1.55;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    font-size: .72rem;
    font-weight: 600;
    background: #ea580c;
    color: white;
    padding: 3px 9px;
    border-radius: 99px;
    letter-spacing: .02em;
}
.btn-details {
    display: inline-block;
    margin-top: 4px;
    background: #0a1128;
    color: white;
    font-size: .85rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    align-self: flex-start;
    transition: background var(--transition);
}
.btn-details:hover { background: #1a2540; }

/* Fun section subtitle */
.fun-sub {
    font-size: .85rem;
    opacity: .6;
    text-align: center;
    margin-top: -22px;
    margin-bottom: 28px;
}

/* ── Skills Radar ── */
#skills canvas {
    max-width: 480px;
    margin: 0 auto;
    display: block;
}

/* ── Contact Form ── */
#contact form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 520px;
    margin: 0 auto;
}
#contact input,
#contact textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    color: #111;
    transition: transform var(--transition), border-color var(--transition);
    outline: none;
}
#contact input:focus,
#contact textarea:focus {
    transform: scale(1.015);
    border-color: var(--accent);
}
#contact textarea { resize: vertical; min-height: 120px; }
#contact button {
    align-self: flex-start;
    background: var(--fg);
    color: var(--bg);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
}
#contact button:hover { opacity: .8; }

.form-msg {
    text-align: center;
    margin-top: 10px;
    font-size: .9rem;
    font-weight: 500;
}
.form-msg.success { color: #16a34a; }
.form-msg.error   { color: #dc2626; }

/* ── Footer ── */
footer {
    text-align: center;
    padding: 28px 16px;
    font-size: .8rem;
    opacity: .55;
}

/* ── Fade-in on scroll ── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── SVG icon polyfill (inline) ── */
.icon { width: 1.4rem; height: 1.4rem; fill: currentColor; }