/* Theme variables */
:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-elevated: #fafafa;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-primary: #8b1e11;
    --color-primary-600: #7a1b0f;
    --color-primary-700: #69170d;
    --color-muted: #f5f6f8;
    --color-border: #e5e7eb; 
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 16px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

.dark-theme {
    --color-bg: #0f1115;
    --color-surface: #12141a;
    --color-elevated: #161922;
    --color-text: #e5e7eb; 
    --color-text-muted: #9aa3af;
    --color-primary: #d04a36;
    --color-primary-600: #c23f2b;
    --color-primary-700: #b13527;
    --color-muted: #0f1115;
    --color-border: #262a34;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 10px 24px rgba(0,0,0,0.35);
}

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3{
    margin: 0;
    padding: 0;
}

/* Typography scale */
h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.01em; margin-bottom: 16px; }
h3 { font-size: 1.15rem; }
p { color: var(--color-text); }
small, .muted { color: var(--color-text-muted); }

a {
    text-decoration: none;
    color: inherit;
}

/* Better focus styles */
*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline: 3px solid color-mix(in srgb, var(--color-primary) 65%, white);
    outline-offset: 2px;
    border-radius: 6px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--color-primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

/* Theme toggle button */
.theme-toggle-btn {
    position: absolute;
    right: 18px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    color: #fff;
    background: color-mix(in srgb, #000 12%, var(--color-primary));
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255,255,255,0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.theme-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.theme-toggle-btn .icon-moon { display: none; }
.dark-theme .theme-toggle-btn .icon-sun { display: none; }
.dark-theme .theme-toggle-btn .icon-moon { display: inline; }

/* Header */
header {
    background: var(--color-primary);
    color: #fff;
    padding: 24px 0 28px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.4rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
    color: #fff;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 18px;
}

nav ul li a {
    color: #fff;
    font-weight: 600;
    position: relative;
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.2s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
}

/* About Section */
.about {
    padding: 64px 0;
    text-align: center;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
    border: 3px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
    box-shadow: var(--shadow-sm);
}

/* Skills Section */
.skills {
    background: var(--color-muted);
    padding: 64px 0;
    text-align: center;
}

.skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.skills-list li {
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
    color: var(--color-text);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

/* Projects Section */
.projects, .experience{
    padding: 64px 0;
    text-align: center;
}

/* .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
} */

.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.project-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    text-align: center;
    flex: 0 1 360px; /* base width 320px, can shrink but not grow */
    max-width: 360px;
    width: 100%;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card h4 {
    color: var(--color-primary);
    padding: 0;
    margin: 0;
}

.project-card img {
    width: 100%;
    border-radius: 5px;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

/* Contact Section */
.contact {
    padding: 64px 0;
    text-align: center;
}

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

.contact input, .contact textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-links a {
    color: #fff;
    font-weight: 600;
    opacity: 0.95;
}

/* Section headings styling */
section h2 {
    position: relative;
}

section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 10px auto 4px;
    background: var(--color-primary);
}