/* ===== ROOT VARIABLES - DARK MODE ===== */
:root[data-theme="dark"] {
--bg-primary: #0a0a0a;
--bg-secondary: #1a1a1a;
--text-primary: #f5f5f5;
--text-secondary: #b0b0b0;
--accent: #d4af37;
--accent-light: #e6c547;
--border: #333333;
--shadow: rgba(0, 0, 0, 0.5);
}

/* ===== ROOT VARIABLES - LIGHT MODE ===== */
:root[data-theme="light"] {
--bg-primary: #f9f9f9;
--bg-secondary: #ffffff;
--text-primary: #1a1a1a;
--text-secondary: #666666;
--accent: #c9a961;
--accent-light: #dab857;
--border: #e0e0e0;
--shadow: rgba(0, 0, 0, 0.1);
}

/* ===== GLOBAL STYLES ===== */

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

html, body {
height: 100%;
width: 100%;
scroll-behavior: smooth;
}

body {
background-color: var(--bg-primary);
color: var(--text-primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
line-height: 1.8;
font-size: 16px;
transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== HEADER ===== */
.header {
position: sticky;
top: 0;
z-index: 1000;
background-color: var(--bg-primary);
border-bottom: 1px solid var(--border);
padding: 20px 0;
transition: all 0.3s ease;
box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
display: flex;
justify-content: space-between;
align-items: center;
}

.header-title {
font-size: 20px;
font-weight: 600;
letter-spacing: 1px;
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle {
background: none;
border: 2px solid var(--border);
color: var(--text-primary);
font-size: 24px;
cursor: pointer;
padding: 8px 12px;
border-radius: 8px;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}

.theme-toggle:hover {
border-color: var(--accent);
color: var(--accent);
transform: scale(1.1);
box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.theme-icon {
display: inline-block;
transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
transform: rotate(20deg);
}

/* ===== MAIN CONTAINER ===== */
.container {
max-width: 1000px;
margin: 0 auto;
padding: 0 20px;
}

/* ===== HERO SECTION ===== */
.hero {
padding: 100px 0 60px;
text-align: center;
animation: fadeInDown 1s ease-out;
}

.project-title {
font-size: clamp(32px, 8vw, 64px);
font-weight: 700;
letter-spacing: -1px;
line-height: 1.2;
margin-bottom: 20px;
background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: fadeInUp 1.2s ease-out;
}

.author-name {
font-size: 18px;
color: var(--text-secondary);
font-weight: 300;
letter-spacing: 2px;
text-transform: uppercase;
animation: fadeInUp 1.4s ease-out;
margin-bottom: 40px;
}

/* ===== DIVIDER ===== */
.divider {
height: 1px;
background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
margin: 60px 0;
animation: expandWidth 1.5s ease-out;
}

@keyframes expandWidth {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}

/* ===== VIDEO SECTION ===== */
.video-section {
padding: 60px 0;
animation: fadeIn 1.6s ease-out;
}

.video-container {
position: relative;
width: 100%;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
height: 0;
border: 2px solid var(--accent);
border-radius: 12px;
overflow: hidden;
background-color: var(--bg-secondary);
box-shadow: 0 10px 40px var(--shadow);
transition: all 0.3s ease;
}

.video-container:hover {
border-color: var(--accent-light);
box-shadow: 0 15px 50px rgba(212, 175, 55, 0.2);
transform: translateY(-5px);
}

.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}

.video-caption {
text-align: center;
color: var(--text-secondary);
font-size: 14px;
margin-top: 20px;
font-style: italic;
}

/* ===== ESSAY SECTION ===== */
.essay-section {
padding: 60px 0;
}

.essay {
animation: fadeIn 1.8s ease-out;
}

.essay h2 {
font-size: 36px;
font-weight: 700;
color: var(--accent);
margin-bottom: 40px;
line-height: 1.3;
position: relative;
padding-bottom: 20px;
}

.essay h2::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 80px;
height: 3px;
background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
animation: expandWidth 1.5s ease-out;
}

.essay p {
font-size: 18px;
color: var(--text-primary);
margin-bottom: 24px;
line-height: 1.9;
transition: all 0.3s ease;
}

.essay p:hover {
color: var(--accent-light);
}

.essay em {
color: var(--accent);
font-style: italic;
font-weight: 500;
}

/* ===== DOCUMENTATION SECTION ===== */
.documentation-section {
padding: 60px 0;
animation: fadeIn 2s ease-out;
}

.documentation-section h2 {
font-size: 32px;
font-weight: 700;
color: var(--accent);
margin-bottom: 40px;
text-align: center;
}

.tools-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
margin-bottom: 60px;
}

.tool-card {
background-color: var(--bg-secondary);
padding: 30px;
border-radius: 12px;
border: 1px solid var(--border);
transition: all 0.3s ease;
box-shadow: 0 5px 20px var(--shadow);
}

.tool-card:hover {
border-color: var(--accent);
box-shadow: 0 10px 40px rgba(212, 175, 55, 0.15);
transform: translateY(-5px);
}

.tool-card h3 {
font-size: 20px;
font-weight: 600;
color: var(--accent);
margin-bottom: 20px;
}

.tool-list,
.chat-list {
list-style: none;
}

.tool-list li,
.chat-list li {
font-size: 16px;
color: var(--text-primary);
margin-bottom: 12px;
padding-left: 20px;
position: relative;
}

.tool-list li::before,
.chat-list li::before {
content: '▪';
position: absolute;
left: 0;
color: var(--accent);
font-weight: bold;
}

.chat-link {
color: var(--accent);
text-decoration: none;
transition: all 0.3s ease;
font-weight: 500;
border-bottom: 2px solid transparent;
padding-bottom: 2px;
}

.chat-link:hover {
color: var(--accent-light);
border-bottom-color: var(--accent-light);
text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* ===== FOOTER ===== */
.footer {
background-color: var(--bg-secondary);
color: var(--text-secondary);
text-align: center;
padding: 40px 20px;
margin-top: 100px;
border-top: 1px solid var(--border);
font-size: 14px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

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

@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
.project-title {
font-size: 36px;
}

.essay h2 {
font-size: 24px;
}

.tools-grid {
grid-template-columns: 1fr;
}

.header-content {
flex-direction: column;
gap: 15px;
}

.header-title {
font-size: 16px;
}

.essay p {
font-size: 16px;
}

.tool-card {
padding: 20px;
}

.hero {
padding: 60px 0 40px;
}
}

@media (max-width: 480px) {
.project-title {
font-size: 24px;
}

.author-name {
font-size: 14px;
}

.essay h2 {
font-size: 20px;
}

.tool-card h3 {
font-size: 18px;
}

body {
font-size: 15px;
}
}