:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --primary-color: #00aaff;
    --border-color: #333;
    --font-main: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

body {
    font-family: var(--font-main);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero { max-width: 900px; margin: 40px auto; padding: 30px; text-align: center; }
.hero h1 { margin-bottom: 0; font-size: 2.8em; text-transform: uppercase; letter-spacing: 2px;}
.subtitle { font-size: 1.3em; color: #aaa; margin-top: 5px; font-family: var(--font-mono); }
.tagline { font-style: normal; max-width: 650px; margin: 20px auto 30px; font-size: 1.1em;}
.contacts a { margin: 0 15px; font-weight: bold; }

main { max-width: 1100px; margin: 40px auto; padding: 0 20px;}
.main-projects-header { text-align: center; margin-bottom: 50px; }
.main-projects-header h2 { font-size: 2.2em; text-transform: uppercase; letter-spacing: 1px;}
.main-projects-header p { color: #aaa; }

.project-case {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 40px;
    margin-bottom: 50px;
}

.project-header { margin-bottom: 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 20px;}
.project-title { display: flex; align-items: center; gap: 15px; }
.project-icon { font-size: 2.2em; }
.project-title h3 { margin: 0; font-size: 1.8em; }
.project-summary { margin-top: 10px; font-size: 1.1em; color: #bbb; border-left: 3px solid var(--primary-color); padding-left: 15px;}

.carousel-container { display: flex; overflow-x: auto; padding-bottom: 15px; gap: 15px; border-radius: 8px; }
.carousel-img { height: 300px; width: auto; border-radius: 8px; cursor: pointer; transition: transform 0.2s; border: 1px solid #444; }
.carousel-img:hover { transform: scale(1.02); }
.carousel-hint { font-size: 0.9em; color: #888; text-align: center; margin-top: -5px; }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.9); }
.modal-content { margin: auto; display: block; max-width: 90%; max-height: 90%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.close-button { position: absolute; top: 15px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; }
.close-button:hover, .close-button:focus { color: #bbb; }

.project-details { margin-top: 30px; }
.project-details h4 { font-size: 1.3em; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px; font-family: var(--font-mono);}
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 25px; }
.detail-card { background: #1a1a1a; padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); }
.detail-card h5 { margin-top: 0; color: var(--primary-color); font-size: 1.1em; }
.detail-card ul { padding-left: 20px; margin: 0; }
.detail-card li { margin-bottom: 10px; font-size: 0.95em; color: #ccc; }

pre[class*="language-"] {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.85em;
    padding: 1em;
    margin: .5em 0;
    overflow: auto;
}

.project-links { margin-top: 30px; }
.button, .button-secondary { display: inline-block; padding: 12px 25px; border-radius: 8px; text-decoration: none; font-weight: bold; margin-right: 10px; font-family: var(--font-main); transition: all 0.2s;}
.button { background-color: var(--primary-color); color: #111; }
.button:hover { background-color: #fff; text-decoration: none; transform: translateY(-2px);}
.button-secondary { background-color: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); }
.button-secondary:hover { background-color: var(--primary-color); color: #111; text-decoration: none; transform: translateY(-2px);}

.other-projects { padding: 20px; text-align: center; }
.other-projects h2 { font-size: 1.8em; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 1px;}
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; text-align: left; }
.project-card-small { background: var(--card-bg); padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s;}
.project-card-small:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.2);}
.project-card-small h4 { margin: 0 0 10px 0; font-size: 1.1em; color: var(--primary-color); }
.project-card-small p { font-size: 0.9em; color: #bbb; flex-grow: 1; margin-bottom: 15px;}
.project-card-small a { font-weight: bold; }

footer { max-width: 900px; margin: 40px auto; padding: 30px; text-align: center; border-top: 1px solid var(--border-color); }