/* ================================================================== */
/* === style.css TÄIELIK JA LÕPLIK SISU (sh. Jaga nupp) === */
/* ================================================================== */

/* --- CSS Muutujad ja Põhiseadistus --- */
:root {
    /* Heleda teema värvid */
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --container-bg: rgba(255, 255, 255, 0.98);
    --text-primary: #3f3d56; /* Username, featured bold, CTA strong? */
    --text-secondary: #5a5a7a; /* Bio, footer text, CTA text */
    --text-featured: #4a4e69; /* Featured text */
    --icon-color: #764ba2;
    --icon-hover-color: #667eea; /* Taust hoveril */
    --icon-hover-text: #ffffff; /* Ikoon hoveril */
    --footer-link-color: #764ba2; /* Ka CTA lingi värv */
    --footer-link-hover: #667eea; /* Ka CTA lingi hover värv */
    --profile-border: white;
    --shadow-color-light: rgba(0, 0, 0, 0.15);
    --shadow-color-dark: rgba(0, 0, 0, 0.2);
    --featured-bg: rgba(102, 126, 234, 0.1);
    --featured-border: rgba(102, 126, 234, 0.3);
    --tooltip-bg: #333;
    --tooltip-text: #fff;
    --switch-bg: #ccc;
    --switch-slider-bg: white;
    --switch-sun-color: #f39c12;
    --switch-moon-color: #f1c40f;
    /* Värv animeeritud joone jaoks */
    --underline-color: var(--footer-link-hover);
    /* Värvid Jaga nupu jaoks */
    --share-button-bg: var(--icon-hover-color);
    --share-button-text: var(--icon-hover-text);
    --share-button-hover-bg: var(--footer-link-hover);
    /* Värvid teavituse jaoks */
    --notification-bg: var(--tooltip-bg);
    --notification-text: var(--tooltip-text);
}

body.dark-mode {
    /* Tumeda teema värvid */
    --gradient-start: #2c3e50;
    --gradient-end: #4ca1af;
    --container-bg: rgba(44, 62, 80, 0.95);
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-featured: #bdc3c7;
    --icon-color: #4ca1af;
    --icon-hover-color: #ecf0f1; /* Hele taust hoveril */
    --icon-hover-text: #2c3e50; /* Tume ikoon hoveril */
    --footer-link-color: #4ca1af;
    --footer-link-hover: #ecf0f1;
    --profile-border: #34495e;
    --shadow-color-light: rgba(0, 0, 0, 0.3);
    --shadow-color-dark: rgba(0, 0, 0, 0.5);
    --featured-bg: rgba(76, 161, 175, 0.15);
    --featured-border: rgba(76, 161, 175, 0.4);
    --tooltip-bg: #ecf0f1;
    --tooltip-text: #2c3e50;
    --switch-bg: #555;
    --switch-slider-bg: #444;
    --switch-sun-color: #f1c40f;
    --switch-moon-color: #f39c12;
    /* Värv animeeritud joone jaoks tumedas režiimis */
    --underline-color: var(--footer-link-hover);
    /* Värvid Jaga nupu jaoks tumedas režiimis */
    --share-button-bg: var(--icon-hover-color);
    --share-button-text: var(--icon-hover-text);
    --share-button-hover-bg: var(--footer-link-hover);
     /* Värvid teavituse jaoks tumedas režiimis */
    --notification-bg: var(--tooltip-bg);
    --notification-text: var(--tooltip-text);
}

/* --- Keyframes Animatsioonid --- */
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 30px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -30px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(0.6, 0.6, 0.6); } to { opacity: 1; transform: scale3d(1, 1, 1); } }
@keyframes gradientAnimation { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }


/* --- Üldised Stiilid --- */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    background-size: 400% 400%;
    animation: gradientAnimation 18s ease infinite;
    color: var(--text-secondary);
    margin: 0;
    padding-top: 60px; padding-bottom: 40px;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; box-sizing: border-box; overflow-x: hidden;
}

/* --- Konteineri Stiilid --- */
.container {
    max-width: 600px; width: 90%; margin: 20px auto; padding: 40px;
    background-color: var(--container-bg); border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color-light); text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Profiilipildi Stiilid --- */
.profile-pic {
    width: 130px; height: 130px; border-radius: 50%; margin-bottom: 25px;
    border: 6px solid var(--profile-border);
    box-shadow: 0 8px 16px var(--shadow-color-dark); object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
}
.profile-pic:hover { transform: scale(1.12) rotate(5deg); }

/* --- Tekstide Stiilid --- */
.username {
    font-family: 'Poppins', sans-serif; font-size: 2.8em; font-weight: 700;
    margin-top: 0; margin-bottom: 10px; color: var(--text-primary);
    text-shadow: 1px 1px 3px var(--shadow-color-light); transition: color 0.3s ease;
}
.bio {
    font-size: 1.15em; color: var(--text-secondary); margin-top: 0; margin-bottom: 35px;
    line-height: 1.7; transition: color 0.3s ease;
}

/* --- Sotsiaalmeedia Ikoonide Stiilid --- */
.social-icons { margin-top: -15px; padding-bottom: 20px; }
.social-icons a {
    display: inline-flex; justify-content: center; align-items: center;
    margin: 5px 10px; width: 2.5em; height: 2.5em; font-size: 1.6em;
    color: var(--icon-color); background-color: transparent; border-radius: 50%;
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    position: relative; text-decoration: none;
}
.social-icons a:hover { color: var(--icon-hover-text); background-color: var(--icon-hover-color); transform: scale(1.1); }

/* ============================================ */
/* === ESITLETUD PROJEKTIDE SEKTSIOONI STIILID === */
/* ============================================ */
.projects-section {
    background-color: var(--featured-bg);
    padding: 25px 30px;
    margin-top: 30px;
    border-radius: 10px;
    border: 1px solid var(--featured-border);
    text-align: left;
}

.projects-section h2 {
    text-align: center;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.project-item {
    background-color: var(--container-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:last-child {
    margin-bottom: 0;
}

.project-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 12px var(--shadow-color-light);
}

.project-item h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.35em;
}

.project-item p {
    color: var(--text-secondary);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-item .project-link {
    color: var(--footer-link-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative; 
    padding-bottom: 4px; 
    font-size: 0.9em;
}

.project-item .project-link:hover {
    color: var(--footer-link-hover);
}

.project-item .project-link i {
    margin-left: 7px;
    font-size: 0.9em;
}

/* ============================================ */
/* === INSTAGRAMI VOO SEKTSIOONI STIILID (UUS) === */
/* ============================================ */
.instagram-feed-section {
    background-color: var(--featured-bg); /* Sarnane taust teiste esiletõstetud osadega */
    padding: 25px 30px;
    margin-top: 30px;
    border-radius: 10px;
    border: 1px solid var(--featured-border);
    text-align: center; /* Pealkiri keskele */
}

.instagram-feed-section h2 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 20px; /* Vahe pealkirja ja voo vahel */
    font-size: 1.8em;
}

.instagram-feed-section .widget-placeholder-info {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(0,0,0,0.03); /* Kerge taust infotekstile */
    border-radius: 5px;
    display: inline-block; /* Et taust ei võtaks tervet laiust */
}

/* --- Esiletõstetud Sisu Stiilid --- */
.featured-content {
    background-color: var(--featured-bg); padding: 15px 20px; margin-top: 30px; /* Kohandatud margin-top */
    border-radius: 10px; border: 1px dashed var(--featured-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.featured-content p { margin: 0; color: var(--text-featured); font-size: 0.95em; line-height: 1.5; transition: color 0.3s ease; }
.featured-content p strong { color: var(--text-primary); transition: color 0.3s ease; }


/* --- CTA Sektsiooni Stiilid --- */
.cta-section {
    background-color: var(--featured-bg); padding: 20px 25px; margin-top: 30px;
    border-radius: 10px; border: 1px solid var(--featured-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.cta-section p { margin: 0; color: var(--text-secondary); font-size: 1em; line-height: 1.6; text-align: center; transition: color 0.3s ease; }
.cta-section a {
    color: var(--footer-link-color); font-weight: 600; text-decoration: none;
    position: relative; transition: color 0.3s ease; padding-bottom: 3px;
}
.cta-section a:hover { color: var(--footer-link-hover); }

/* --- CSS Tooltip Stiilid --- */
[data-tooltip] { cursor: pointer; }
[data-tooltip]::before, [data-tooltip]::after { position: absolute; left: 50%; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity 0.2s ease-out, transform 0.2s ease-out .1s, background-color 0.3s ease, color 0.3s ease, border-top-color 0.3s ease; }
[data-tooltip]::before { content: attr(data-tooltip); bottom: calc(100% + 10px); min-width: max-content; padding: 6px 10px; border-radius: 5px; background-color: var(--tooltip-bg); color: var(--tooltip-text); font-size: 0.8em; font-weight: 500; text-align: center; white-space: nowrap; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
[data-tooltip]::after { content: ''; bottom: calc(100% + 5px); border: 5px solid transparent; border-top-color: var(--tooltip-bg); }
[data-tooltip]:hover::before, [data-tooltip]:hover::after { opacity: 1; transform: translateX(-50%) translateY(-5px); }

/* --- Jaluse Stiilid --- */
.footer {
    margin-top: 40px; padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9em; color: var(--text-secondary);
    text-align: center; transition: color 0.3s ease, border-top-color 0.3s ease;
}
.footer p { margin-bottom: 15px; } 
.footer a.footer-link {
    display: inline-flex; align-items: center; color: var(--footer-link-color);
    text-decoration: none; vertical-align: middle; transition: color 0.3s ease;
    position: relative; padding-bottom: 3px;
}
.footer a.footer-link:hover { color: var(--footer-link-hover); }
.footer-logo { height: 22px; width: auto; margin-right: 8px; }

/* --- Animeeritud Allajoon Lingidele --- */
.animated-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    background: var(--underline-color);
    transition: width .3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

.footer a.footer-link.animated-underline::after,
.cta-section a.animated-underline::after {
    bottom: 0;
    left: 0; 
}

.project-item .project-link.animated-underline::after {
    bottom: 0; 
    left: 0;  
}

/* ================================ */
/* === JAGA NUPU STIILID === */
/* ================================ */
.share-button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 15px; margin-top: 10px; 
    font-size: 0.9em; font-weight: 600;
    color: var(--share-button-text); background-color: var(--share-button-bg);
    border: none; border-radius: 20px; cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px var(--shadow-color-light);
}
.share-button i { margin-right: 6px; }
.share-button:hover {
    background-color: var(--share-button-hover-bg);
    transform: scale(1.05);
    box-shadow: 0 4px 8px var(--shadow-color-light);
}
.share-button:active { transform: scale(1.02); }

/* Kopeerimise teavituse stiil */
.copy-notification {
    display: block; position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--notification-bg); color: var(--notification-text);
    padding: 10px 18px; border-radius: 6px; font-size: 0.9em;
    z-index: 101; opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.copy-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --- Tume Režiimi Lüliti Stiilid --- */
.theme-switch-wrapper { position: fixed; top: 15px; right: 15px; z-index: 100; }
.theme-switch { position: relative; display: inline-block; width: 50px; height: 24px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--switch-bg); transition: .4s; border-radius: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 5px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.2); }
.slider svg { height: 16px; width: 16px; transition: .4s; pointer-events: none; }
.slider .feather-sun { color: var(--switch-sun-color); }
.slider .feather-moon { color: var(--switch-moon-color); }
.slider::before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--switch-slider-bg); transition: .4s; border-radius: 50%; box-shadow: 0 0 2px rgba(0,0,0,0.3); }
input:checked + .slider::before { transform: translateX(26px); }


/* --- Lehe Laadimise Animatsioonid --- */
.animated { animation-duration: 0.7s; animation-fill-mode: backwards; animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.animated.fadeInUp { animation-name: fadeInUp; }
.animated.fadeInDown { animation-name: fadeInDown; }
.animated.fadeIn { animation-name: fadeIn; }
.animated.zoomIn { animation-name: zoomIn; }

/* Erinevad viivitused elementidele (UUENDATUD) */
.container.animated.fadeInUp { animation-delay: 0.1s; }
.profile-pic.animated.zoomIn { animation-delay: 0.25s; }
.username.animated.fadeInDown { animation-delay: 0.4s; }
.bio.animated.fadeIn { animation-delay: 0.55s; }
.social-icons.animated.fadeIn { animation-delay: 0.7s; }
.projects-section.animated.fadeIn { animation-delay: 0.85s; }
/* UUS INSTAGRAMI SEKTSIOONI VIIVITUS */
.instagram-feed-section.animated.fadeIn { animation-delay: 1.0s; }
/* JÄRGNEVATE ELEMENTIDE VIIVITUSED NIHUTATUD */
.featured-content.animated.fadeIn { animation-delay: 1.15s; }
.cta-section.animated.fadeIn { animation-delay: 1.3s; }
.footer.animated.fadeInUp { animation-delay: 1.45s; }
.share-button.animated.fadeIn { animation-delay: 1.6s; }

/* ======================================== */
/* === style.css KOGU SISU LÕPP === */
/* ======================================== */