:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --accent-color: #000000;
    --secondary-text: #555555;
    --border-color: #e0e0e0;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
    --bg-color: #111111;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    --secondary-text: #aaaaaa;
    --border-color: #333333;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
    transition: background 0.3s, color 0.3s;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 3.5rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 10px; display: inline-block; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
p { margin-bottom: 1.5rem; color: var(--secondary-text); max-width: 70ch; }

/* Layout Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.btn {
    display: inline-block;
    padding: 15px 30px;
    background: var(--accent-color);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--accent-color);
    transition: all 0.3s ease;
}
.btn:hover { background: transparent; color: var(--accent-color); }

/* Header */
header { padding: 20px 0; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; background: var(--bg-color); z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 900; letter-spacing: -1px; text-decoration: none; color: var(--text-color); }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.nav-links a:hover { text-decoration: underline; }
.mobile-toggle { display: none; cursor: pointer; font-size: 1.5rem; }

/* Hero Section */
.hero { height: 80vh; display: flex; align-items: center; border-bottom: 1px solid var(--border-color); }
.hero h1 span { display: block; color: var(--secondary-text); font-size: 1.5rem; font-weight: 400; margin-top: 10px; }

/* Cards */
.card { border: 1px solid var(--border-color); padding: 30px; transition: transform 0.3s; background: var(--bg-color); }
.card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
.card-icon { font-size: 2rem; margin-bottom: 15px; display: block; }

/* Roadmap Timeline */
.timeline { position: relative; border-left: 2px solid var(--border-color); margin-left: 20px; padding-left: 40px; }
.timeline-item { margin-bottom: 50px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -49px; top: 0; width: 16px; height: 16px; background: var(--bg-color); border: 2px solid var(--accent-color); border-radius: 50%; }
.year-badge { background: var(--accent-color); color: var(--bg-color); padding: 5px 10px; font-weight: bold; display: inline-block; margin-bottom: 10px; }

/* Tree Structure (Portfolio) */
.tree ul { padding-top: 20px; position: relative; transition: all 0.5s; display: flex; justify-content: center; }
.tree li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 5px 0 5px; }
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid var(--text-color); width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 1px solid var(--text-color); }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 1px solid var(--text-color); border-radius: 0 5px 0 0; }
.tree li:first-child::after { border-radius: 5px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid var(--text-color); width: 0; height: 20px; }
.tree-node { border: 1px solid var(--text-color); padding: 10px 15px; display: inline-block; font-size: 0.8rem; font-weight: 600; background: var(--bg-color); }

/* Footer */
footer { background: #000; color: #fff; padding: 50px 0; margin-top: 50px; }
footer a { color: #999; text-decoration: none; }
footer a:hover { color: #fff; }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background: var(--bg-color); padding: 20px; border-bottom: 1px solid var(--border-color); }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .tree ul { display: block; }
    .tree li { display: block; width: 100%; padding: 0; border-left: 1px solid var(--text-color); margin-left: 20px; text-align: left; }
    .tree li::before, .tree li::after, .tree ul ul::before { display: none; }
    .tree-node { margin: 10px 0 10px 20px; border: none; font-size: 1rem; }
}