:root {
    /* Light Mode (Mistral Default) */
    --bg-color: #fffaeb; /* Warm Ivory */
    --text-primary: #1f1f1f; /* Mistral Black */
    --text-secondary: hsl(0, 0%, 24%); /* Black Tint */
    --border-color: hsl(240, 5.9%, 90%);
    
    --card-bg: #fff0c2; /* Cream */
    --card-radius: 0px; /* Near-zero */
    --section-radius: 0px;
    
    --btn-bg: #1f1f1f; /* Mistral Black */
    --btn-text: #ffffff; /* Pure White */
    --btn-secondary-bg: #fff0c2; /* Cream */
    --btn-secondary-text: #1f1f1f; /* Mistral Black */
    
    /* Mistral Block Gradient Colors */
    --brand-orange: #fa520f;
    --brand-flame: #fb6424;
    --block-orange: #ff8105;
    --sunshine-900: #ff8a00;
    --sunshine-700: #ffa110;
    --sunshine-500: #ffb83e;
    --sunshine-300: #ffd06a;
    --block-gold: #ffe295;
    --bright-yellow: #ffd900;
    
    --shadow-base: rgba(127, 99, 21, 0.12) -8px 16px 39px, rgba(127, 99, 21, 0.1) -33px 64px 72px, rgba(127, 99, 21, 0.06) -73px 144px 97px;
    --shadow-hover: rgba(127, 99, 21, 0.15) -12px 24px 45px, rgba(127, 99, 21, 0.12) -40px 80px 90px, rgba(127, 99, 21, 0.08) -80px 160px 120px;
    
    --font-primary: ui-sans-serif, system-ui, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

[data-theme="dark"] {
    /* Dark Mode (Mistral Dark) */
    --bg-color: #1a1814; /* Deep Warm Black */
    --text-primary: #fffaeb; /* Warm Ivory */
    --text-secondary: #fff0c2; /* Cream */
    --border-color: #332e26;
    
    --card-bg: #24211c; /* Dark Warm Gray */
    
    --btn-bg: #fff0c2; /* Cream */
    --btn-text: #1f1f1f; /* Mistral Black */
    --btn-secondary-bg: #332e26;
    --btn-secondary-text: #fffaeb;
    
    --shadow-base: rgba(0, 0, 0, 0.4) -8px 16px 39px, rgba(0, 0, 0, 0.3) -33px 64px 72px, rgba(0, 0, 0, 0.2) -73px 144px 97px;
    --shadow-hover: rgba(0, 0, 0, 0.5) -12px 24px 45px, rgba(0, 0, 0, 0.4) -40px 80px 90px, rgba(0, 0, 0, 0.3) -80px 160px 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 400; /* Mistral rule: 400 everywhere */
    line-height: 1.50;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Hierarchy - Weight 400 everywhere */
h1 {
    font-size: 82px;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -2.05px;
    margin-bottom: 2rem;
}

h2 {
    font-size: 56px;
    font-weight: 400;
    line-height: 0.95;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.33;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Mistral Block Identity */
.brand-block {
    display: flex;
    height: 8px;
    width: 100%;
    margin-bottom: 3rem;
}
.block-1 { flex: 1; background-color: var(--bright-yellow); }
.block-2 { flex: 1; background-color: var(--sunshine-700); }
.block-3 { flex: 1; background-color: var(--block-orange); }
.block-4 { flex: 1; background-color: var(--brand-flame); }
.block-5 { flex: 1; background-color: var(--brand-orange); }

/* Layout */
.container {
    max-width: 1280px;
    width: 90%;
    padding: 6rem 1.5rem;
}

.header {
    margin-bottom: 5rem;
}

.avatar-container {
    width: 80px;
    height: 80px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--brand-orange);
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius); /* 0px */
    padding: 3rem;
    box-shadow: var(--shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 4rem;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 5rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-base);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-link {
    color: var(--brand-orange);
    text-decoration: none;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--sunshine-700);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 16px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border-radius: 0; /* Sharp corners */
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    padding: 16px 32px;
}

.btn-primary:hover {
    background-color: var(--brand-orange);
    color: #ffffff;
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    padding: 16px 32px;
}

.btn-secondary:hover {
    background-color: var(--sunshine-300);
    color: #1f1f1f;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--sunshine-700);
    color: #1f1f1f;
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-primary);
    padding: 16px 32px;
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background-color: rgba(0,0,0,0.05);
}

[data-theme="dark"] .btn-ghost:hover {
    background-color: rgba(255,255,255,0.05);
}

/* Badges */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.badge {
    background-color: transparent;
    color: var(--text-primary);
    padding: 8px 0;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 4px 8px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Skills Container */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-tag {
    font-family: var(--font-mono);
    background: transparent;
    color: var(--text-primary);
    padding: 12px 24px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.skill-tag:hover {
    border-color: var(--brand-orange);
    background-color: var(--card-bg);
}

/* Footer */
footer {
    width: 100%;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(to bottom, var(--bg-color), var(--card-bg));
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] footer {
    background: linear-gradient(to bottom, var(--sunshine-700), #1f1f1f);
    color: #1f1f1f;
    border-top: none;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--brand-orange);
}

/* Media Queries */
@media (max-width: 1024px) {
    h1 { font-size: 64px; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    h1 { font-size: 48px; letter-spacing: -1px; }
    h2 { font-size: 40px; }
    .container { padding: 4rem 1.5rem; }
    .card { padding: 2rem; }
    .btn { width: 100%; }
}
