/* 
 * Custom CSS for Matias Meier Portfolio
 * Optimized to match original WordPress site design aesthetic
 * Written from scratch - no proprietary theme code copied
 * Uses open-source libraries: Bootstrap 5, Line Awesome Icons
 */

:root {
    --primary-color: #28e98c;
    --bg-color: #1f1f1f;
    --bg-darker: #191919;
    --text-color: #999999;
    --text-white: #ffffff;
    --border-color: #575757;
    --sidebar-width: 300px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Sidebar Profile */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--bg-darker);
    padding: 60px 30px;
    text-align: center;
    overflow-y: auto;
    z-index: 100;
    border-right: 1px solid var(--border-color);
}

.profile-header {
    margin-bottom: 30px;
}

.designation {
    display: inline-block;
    background: none;
    color: var(--text-white);
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border-color);
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 30px 0;
    border: none;
}

.email {
    font-size: 14px;
    color: var(--text-color);
    margin: 15px 0;
    font-weight: 400;
}

.address {
    font-size: 13px;
    color: var(--text-color);
    margin: 10px 0;
    font-weight: 300;
}

.copyright {
    font-size: 12px;
    color: var(--text-color);
    margin: 30px 0 20px;
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

.social-links li {
    margin: 0;
    padding: 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 20px;
}

.social-links a:hover {
    color: var(--primary-color);
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 30px 10px;
    background: var(--primary-color);
    color: #000000;
    text-decoration: none;
    border-radius: 30px;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    border: 2px solid var(--primary-color);
    white-space: nowrap;
}

.btn-contact i {
    font-size: 24px;
    margin-right: 10px;
    margin-bottom: 3px;
}

.btn-contact:hover {
    background: transparent;
    color: var(--primary-color);
}

/* Side Navigation */
.side-nav {
    position: fixed;
    right: 68px;
    top: 322px;
    z-index: 90;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 24px 0;
}

.side-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.side-nav li {
    position: relative;
}

.side-nav a {
    display: block;
    width: 55px;
    text-align: center;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
}

.side-nav a span {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    background: #404042;
    color: var(--text-white);
    padding: 3px 8px;
    border-radius: 5px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-right: 10px;
}

.side-nav a span::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #404042;
    position: absolute;
    right: -3px;
    top: 50%;
    transform: translateY(-50%) rotate(54deg) skew(-8deg, -39deg);
    z-index: -1;
}

.side-nav a:hover span,
.side-nav a.active span {
    opacity: 1;
    visibility: visible;
}

.side-nav a i {
    font-size: 20px;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 60px;
    right: 68px;
    z-index: 110;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    border-color: var(--primary-color);
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-white);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover span {
    background: var(--primary-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-right: 0;
    padding: 0 8% 0 8%;
    max-width: 100%;
}

.section {
    padding: 60px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.content-width {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* Typography */
.subtitle {
    font-size: 12px;
    color: var(--text-white);
    text-transform: uppercase;
    font-weight: 300;
    margin: 0 0 53px 0;
    border: 1px solid var(--border-color);
    padding: 9px 20px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: default;
}

.subtitle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.subtitle i {
    margin-right: 10px;
    font-size: 14px;
    margin-bottom: 1px;
}

h1 {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    color: var(--text-white);
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-white);
}

p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 20px;
}

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

/* Hero Section */
.hero-section {
    position: relative;
}

.hero-content h1 {
    margin-bottom: 35px;
}

.facts {
    margin-top: 60px;
    display: flex;
    gap: 40px;
}

.fact-item {
    position: relative;
}

.fact-item h2 {
    font-size: 80px;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
    line-height: 1;
}

.fact-item p {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
}

/* About Section */
.about-section h1 {
    margin-bottom: 25px;
}

/* Timeline / Resume */
.timeline {
    margin-top: 50px;
    position: relative;
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
}

.timeline-item .date {
    display: inline-block;
    font-size: 13px;
    color: var(--text-white);
    margin-bottom: 30px;
    font-weight: 500;
}

.timeline-content {
    margin-bottom: 35px;
    position: relative;
    padding-left: 30px;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.timeline-content h2 {
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 600;
}

.timeline-content p {
    color: var(--primary-color);
    font-size: 15px;
    margin: 0;
}

/* Services Grid */
.services-grid {
    margin-top: 50px;
}

.service-card {
    padding: 0;
    background: transparent;
    height: 100%;
    margin-bottom: 30px;
}

.service-card i {
    font-size: 60px;
    color: var(--primary-color);
    margin-bottom: 30px;
    display: block;
    transition: all 0.3s ease;
}

.service-card h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.service-card p {
    font-size: 16px;
    line-height: 1.7;
}

/* Portfolio Grid */
.portfolio-grid {
    margin-top: 50px;
    display: grid;
    gap: 50px;
}

.portfolio-item {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.portfolio-item a {
    display: block;
}

.portfolio-item:hover img {
    transform: scale(1.02);
}

.portfolio-tags {
    padding: 20px 0 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.portfolio-tags span {
    background: none;
    color: var(--text-white);
    padding: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    position: relative;
}

.portfolio-tags span::after {
    content: ',';
}

.portfolio-tags span:last-child::after {
    display: none;
}

.portfolio-item h2 {
    padding: 10px 0 0;
    font-size: 24px;
    margin-bottom: 0;
}

.portfolio-item h2 a {
    color: var(--text-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.portfolio-item h2 a:hover {
    color: var(--primary-color);
}

/* Skills Grid */
.skills-grid {
    margin-top: 50px;
}

.skill-card {
    padding: 40px 20px;
    background: transparent;
    border-radius: 0;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    border: none;
}

.skill-card img {
    max-width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.skill-card:hover img {
    transform: scale(1.1);
}

.skill-card p {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    color: var(--text-white);
}

/* Contact Section */
.contact-email {
    font-size: 40px;
    color: var(--text-white);
    margin: 40px 0;
    font-weight: 400;
}

.contact-text {
    font-size: 18px;
    max-width: 600px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        margin-right: 0;
    }
    
    .side-nav {
        right: 40px;
    }
    
    h1 {
        font-size: 50px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        padding: 40px 15px;
    }
    
    h1 {
        font-size: 42px;
    }
    
    .main-content {
        padding-left: 40px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 120;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .content-width {
        margin-left: 0;
        margin-right: 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .section {
        padding: 50px 0;
        min-height: auto;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .contact-email {
        font-size: 28px;
    }
    
    .facts {
        flex-direction: column;
        gap: 30px;
    }
    
    .fact-item h2 {
        font-size: 60px;
    }
    
    .side-nav {
        display: none;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    p {
        font-size: 15px;
    }
    
    .profile-img {
        width: 120px;
        height: 120px;
    }
    
    .subtitle {
        font-size: 11px;
        padding: 8px 16px;
    }
}

/* Scroll Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-animation {
    animation: fadeInUp 0.8s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
