:root {
  --primary-color: #1a73e8;
  --secondary-color: #f2994a;
  --bg-color: #f8f9fa;
  --surface-color: #ffffff;
  --text-color: #202124;
  --text-light: #5f6368;
  --border-color: #dadce0;
  --shadow: 0 4px 12px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.1);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.06);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --section-bg: #eef2f6;
}

[data-theme="dark"] {
  --primary-color: #8ab4f8;
  --secondary-color: #fcd181;
  --bg-color: #121212;
  --surface-color: #1e1e1e;
  --text-color: #e8eaed;
  --text-light: #9aa0a6;
  --border-color: #3c4043;
  --shadow: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.6);
  --glass-bg: rgba(30, 30, 30, 0.85);
  --section-bg: #1a1a1a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6; 
    transition: background-color 0.3s, color 0.3s; 
    overflow-x: hidden;
}
a { text-decoration: none; color: var(--primary-color); transition: 0.3s; }

/* Layout & Utils */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; font-size: 2.2rem; font-weight: 800; margin-bottom: 2.5rem; position: relative; padding-bottom: 15px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background-color: var(--secondary-color); border-radius: 2px; }
section { padding: 80px 0; }
.section-bg { background-color: var(--section-bg); }

/* Navbar */
.navbar { position: fixed; top: 0; width: 100%; background: var(--glass-bg); backdrop-filter: blur(12px); z-index: 1000; border-bottom: 1px solid var(--border-color); transition: 0.3s; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary-color); display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 25px; align-items: center; }
.nav-links a { color: var(--text-color); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary-color); }
.theme-toggle { background: none; border: none; cursor: pointer; color: var(--text-color); font-size: 1.2rem; transition: transform 0.3s; }
.theme-toggle:hover { transform: scale(1.1); color: var(--secondary-color); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-color); cursor: pointer; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 70px; }
.hero-bg { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.8;
    background-image: radial-gradient(circle at center, var(--primary-color) 0%, transparent 10%), radial-gradient(circle at center, var(--secondary-color) 0%, transparent 10%);
    background-size: 100px 100px; background-position: 0 0, 50px 50px; opacity: 0.05;
}
.hero-content { text-align: center; max-width: 800px; margin: 0 auto; z-index: 1; background: var(--glass-bg); backdrop-filter: blur(8px); padding: 50px 30px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--border-color); }
.badge-pulse { display: inline-block; padding: 6px 16px; background: rgba(26,115,232,0.1); color: var(--primary-color); border-radius: 20px; font-size: 0.9rem; font-weight: bold; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(26,115,232,0.4); } 70% { box-shadow: 0 0 0 10px rgba(26,115,232,0); } 100% { box-shadow: 0 0 0 0 rgba(26,115,232,0); } }
.hero-title { font-size: 3.2rem; font-weight: 900; margin-bottom: 20px; line-height: 1.2; color: var(--text-color); }
.hero-subtitle { font-size: 1.4rem; color: var(--primary-color); margin-bottom: 25px; font-weight: 600; }
.hero-desc { font-size: 1.1rem; margin-bottom: 40px; color: var(--text-light); }
.hero-btns { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 30px; font-weight: 600; cursor: pointer; transition: all 0.3s; border: 2px solid transparent; }
.btn-primary { background: var(--primary-color); color: #fff !important; box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5); background: #1557b0; }
.btn-outline { border-color: var(--border-color); color: var(--text-color) !important; background: var(--surface-color); }
.btn-outline:hover { border-color: var(--primary-color); color: var(--primary-color) !important; transform: translateY(-3px); }

/* Timeline */
.filters { display: flex; justify-content: center; gap: 12px; margin-bottom: 50px; flex-wrap: wrap; }
.filter-btn { padding: 8px 18px; border-radius: 20px; border: 1px solid var(--border-color); background: var(--surface-color); color: var(--text-color); cursor: pointer; font-weight: 600; transition: 0.3s; }
.filter-btn.active, .filter-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 4px; background-color: var(--border-color); top: 0; bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 2px; }
.timeline-item { padding: 10px 40px; position: relative; width: 50%; transition: opacity 0.4s ease, transform 0.4s ease; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot { position: absolute; width: 24px; height: 24px; background-color: var(--surface-color); border: 5px solid var(--secondary-color); top: 20px; border-radius: 50%; z-index: 1; box-shadow: 0 0 0 4px var(--bg-color); }
.timeline-item:nth-child(odd) .timeline-dot { right: -12px; }
.timeline-item:nth-child(even) .timeline-dot { left: -12px; }
.timeline-content { padding: 25px; background: var(--surface-color); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border-color); display: inline-block; width: 100%; text-align: left; }
.timeline-date { color: var(--secondary-color); font-weight: 800; margin-bottom: 10px; display: inline-block; font-size: 0.95rem; }
.timeline-content h3 { margin-bottom: 12px; color: var(--text-color); font-size: 1.3rem; }
.timeline-list { padding-left: 20px; margin-bottom: 15px; color: var(--text-light); font-size: 0.95rem; }
.timeline-list li { margin-bottom: 5px; }
.timeline-link { display: inline-block; padding: 8px 14px; background: rgba(26,115,232,0.1); color: var(--primary-color); border-radius: 8px; font-size: 0.85rem; font-weight: 600; }
.timeline-link:hover { background: var(--primary-color); color: #fff; }

/* Assignments */
.search-bar { width: 100%; max-width: 500px; margin: 0 auto 40px; display: flex; box-shadow: var(--shadow); border-radius: 30px; }
.search-bar input { flex: 1; padding: 15px 25px; border: 1px solid var(--border-color); border-radius: 30px 0 0 30px; background: var(--surface-color); color: var(--text-color); outline: none; font-size: 1rem; }
.search-bar button { padding: 15px 25px; background: var(--primary-color); color: #fff; border: none; border-radius: 0 30px 30px 0; cursor: pointer; transition: 0.3s; }
.search-bar button:hover { background: #1557b0; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.card { background: var(--surface-color); border-radius: 16px; padding: 25px; box-shadow: var(--shadow); border: 1px solid var(--border-color); display: flex; flex-direction: column; transition: 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: rgba(26,115,232,0.3); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; gap: 10px; }
.badge { background: var(--secondary-color); color: #fff; padding: 5px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; }
.card h3 { color: var(--text-color); margin-bottom: 10px; font-size: 1.25rem; }
.card p { color: var(--text-light); flex: 1; margin-bottom: 20px; font-size: 0.95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { background: rgba(0,0,0,0.05); color: var(--text-color); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.tag-tool { background: rgba(26,115,232,0.1); color: var(--primary-color); }
.card-action { text-align: center; width: 100%; border-radius: 10px; }

/* Visits */
.visit-card { padding: 0; overflow: hidden; }
.visit-img { width: 100%; height: 220px; object-fit: cover; border-bottom: 1px solid var(--border-color); transition: 0.5s; }
.visit-card:hover .visit-img { transform: scale(1.05); }
.visit-content { padding: 25px; position: relative; background: var(--surface-color); z-index: 1; }
.visit-date { color: var(--secondary-color); font-size: 0.85rem; font-weight: 800; text-transform: uppercase; display: block; margin-bottom: 5px; }

/* Tools */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.tool-card { text-align: center; padding: 30px 20px; background: var(--surface-color); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border-color); transition: 0.3s; }
.tool-card:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.tool-icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }
.tool-card h4 { margin-bottom: 10px; color: var(--text-color); }
.tool-card p { font-size: 0.85rem; color: var(--text-light); }

/* Interactive */
.interactive-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; }
.interactive-box { background: var(--surface-color); padding: 35px; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--border-color); }
.interactive-box h3 { margin-bottom: 10px; font-size: 1.4rem; color: var(--primary-color); }
.iframe-container { position: relative; width: 100%; height: 450px; border: 2px dashed var(--border-color); border-radius: 12px; display: flex; justify-content: center; align-items: center; background: var(--bg-color); margin-top: 20px; }
.iframe-container iframe { width: 100%; height: 100%; border: none; position: absolute; top:0; left:0; border-radius: 12px; }
.copy-btn { margin-top: 20px; width: 100%; padding: 12px; background: var(--bg-color); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); transition: 0.3s; }
.copy-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.quiz-container { background: var(--bg-color); padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); margin-top: 15px; }
.quiz-question { font-size: 1.1rem; margin-bottom: 15px; color: var(--text-color); }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option { padding: 12px 15px; background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 8px; cursor: pointer; transition: 0.2s; font-weight: 500; }
.quiz-option:hover { border-color: var(--primary-color); box-shadow: 0 2px 8px rgba(26,115,232,0.1); }
.quiz-option.correct { background: #d4edda; border-color: #28a745; color: #155724; }
.quiz-option.wrong { background: #f8d7da; border-color: #dc3545; color: #721c24; }

.random-harvest { margin-top: 20px; }
#harvest-text { min-height: 80px; display: flex; align-items: center; justify-content: center; margin-top: 20px; padding: 20px; background: var(--bg-color); border-radius: 12px; border-left: 5px solid var(--secondary-color); font-size: 1.1rem; font-style: italic; color: var(--text-color); transition: opacity 0.3s; }

/* Reflection */
.reflection-content { max-width: 850px; margin: 0 auto; background: var(--surface-color); padding: 50px; border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--border-color); font-size: 1.15rem; position: relative; }
.reflection-content::before { content: '\201C'; position: absolute; top: 10px; left: 30px; font-size: 6rem; color: rgba(242,153,74,0.15); font-family: Georgia, serif; line-height: 1; }
.reflection-content p { margin-bottom: 25px; text-indent: 2em; text-align: justify; }

/* Footer */
footer { background: var(--surface-color); padding: 60px 0 30px; border-top: 1px solid var(--border-color); text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.back-to-top { width: 50px; height: 50px; background: var(--primary-color); color: #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.3s; font-size: 1.2rem; opacity: 0; pointer-events: none; transform: translateY(20px); }
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--secondary-color); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(242,153,74,0.4); }

/* Responsive */
@media screen and (max-width: 992px) {
  .interactive-layout { grid-template-columns: 1fr; }
  .timeline::after { left: 40px; }
  .timeline-item { width: 100%; padding-left: 80px; padding-right: 20px; text-align: left; }
  .timeline-item:nth-child(even) { left: 0%; }
  .timeline-item:nth-child(odd) .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 28px; right: auto; }
}

@media screen and (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links { position: absolute; top: 70px; left: -100%; width: 100%; background: var(--surface-color); flex-direction: column; padding: 30px 0; border-bottom: 1px solid var(--border-color); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
  .nav-links.active { left: 0; }
  .hero-title { font-size: 2.2rem; }
  .reflection-content { padding: 30px 20px; font-size: 1rem; }
}
