:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --text-dim: #8b949e;
    --accent-color: #58a6ff;
    --card-bg: #161b22;
    --nav-bg: rgba(13, 17, 23, 0.95);
    --border-color: #30363d;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 { color: #ffffff; }
h1 { font-size: 3rem; margin-bottom: 0.5rem; }
h2 { font-size: 2.2rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-top: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-dim); }

.highlight { color: var(--accent-color); }

/* Navigation Tabs */
header {
    background-color: var(--nav-bg);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    background-color: transparent;
}

.nav-link:hover {
    background-color: rgba(88, 166, 255, 0.1);
    color: var(--accent-color);
}

.nav-link.active {
    background-color: var(--accent-color);
    color: #0d1117;
    font-weight: 600;
}

/* Main Content Area */
main {
    flex: 1;
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 2rem;
    width: 100%;
}

/* Tab Logic */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Base Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: #8b949e;
    transform: translateY(-2px);
}

.card h3, .card h4 { color: var(--accent-color); }
    
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
}

.skills-list li {
    background-color: rgba(88, 166, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(88, 166, 255, 0.2);
    color: var(--accent-color);
    font-size: 0.95rem;
}

.btn-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.btn-link:hover { text-decoration: underline; }
    
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn:hover { background-color: rgba(88, 166, 255, 0.1); }

/* --- RESUME SECTION --- */
.resume-section {
    margin-top: 1.5rem;
}
.resume-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.resume-item:last-child {
    border-bottom: none;
}
.resume-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2rem;
}
.resume-meta h4 {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin: 0;
}
.resume-date {
    color: var(--text-dim);
    font-family: monospace;
    font-size: 0.9rem;
}
.resume-item h5 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.8rem;
    font-weight: 500;
}
.resume-item ul {
    list-style-position: outside;
    margin-left: 1.2rem;
    color: var(--text-color);
}
.resume-item li {
    margin-bottom: 0.4rem;
}

/* --- FANTASY BOOKS SECTION --- */
#books {
    max-width: 100%;
}

.fantasy-hero {
    /* Beautiful Sunset Ocean Gradient */
    background: 
        /* Overlay to blend with the page */
        linear-gradient(to bottom, rgba(13, 17, 23, 0.1) 0%, rgba(13, 17, 23, 1) 100%),
        /* The Sunset Sky */
        linear-gradient(to bottom, #2b1055 0%, #75225b 35%, #eb6b56 60%, 
        /* The Horizon / Ocean */
        #001f3f 60%, #001021 100%);
    height: 400px;
    margin: -4rem -2rem 2rem -2rem; /* Pull out to edges of container */
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: inset 0 -40px 40px var(--bg-color);
}

.fantasy-overlay {
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.fantasy-title {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    color: #ffda73;
    text-shadow: 0 4px 15px rgba(0,0,0,0.9), 0 0 30px rgba(255, 170, 0, 0.6);
    margin-bottom: 0.5rem;
    border-bottom: none;
    letter-spacing: 2px;
}

.fantasy-subtitle {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: #f0e6d2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.fantasy-container {
    font-family: 'Lora', serif;
}

.fantasy-heading {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #d4af37;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.fantasy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.fantasy-card {
    background: linear-gradient(145deg, #1c1814 0%, #0a0806 100%);
    border: 1px solid #3a3022;
    padding: 2rem;
    border-radius: 6px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.fantasy-card:hover {
    transform: translateY(-5px);
    border-color: #d4af37;
}

.fantasy-card h4 {
    font-family: 'Cinzel', serif;
    color: #f4e8c1;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.fantasy-card .author {
    color: #a69b82;
    font-style: italic;
    border-bottom: 1px dashed #3a3022;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.fantasy-card .fantasy-desc {
    color: #c4baab;
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-dim);
    margin-top: 3rem;
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    main { margin: 2rem auto; }
    .fantasy-title { font-size: 2.5rem; }
}