* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

:root {
    --bg: #ffffff;
    --text: #000000;
    --text-light: #333333;
    --text-muted: #666666;
    --border: #f0f0f0;
    --button-bg: #000000;
    --button-hover: #333333;
}

[data-theme="dark"] {
    --bg: #000000;
    --text: #ffffff;
    --text-light: #cccccc;
    --text-muted: #999999;
    --border: #333333;
    --button-bg: #ffffff;
    --button-hover: #cccccc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.8;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-y pinch-zoom;
    -ms-touch-action: pan-y pinch-zoom;
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input,
textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.footer {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 5rem 2rem;
    padding-top: 6rem;
    position: relative;
    z-index: 1;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--bg);
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

[data-theme="dark"] .header {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.05);
}


.header-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.header-photo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.logo-cloud {
    position: relative;
    padding: 0.75rem 1.25rem;
    background-color: var(--bg);
    border: 2px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-cloud::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid var(--border);
}

.logo-cloud::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 10px solid var(--bg);
}

.logo-slogan {
    font-size: 0.75rem;
    color: var(--text);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.header-photo-link {
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.header-photo-link:hover {
    transform: scale(1.05);
}

.contact-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
}

.theme-toggle-wrapper {
    position: relative;
}

.theme-toggle {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
    cursor: pointer;
}

.theme-toggle input {
    display: none;
}

.toggle-slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: 0.4s;
    width: 26px;
    border-radius: 50%;
}

.theme-toggle input:checked + .toggle-slider {
    background-color: #999999;
}

[data-theme="dark"] .theme-toggle input:checked + .toggle-slider {
    background-color: #cccccc;
}

.theme-toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.main {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.profile {
    text-align: center;
}

.photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border: 2px solid var(--border);
}

.about {
    max-width: 100%;
}

.title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.about-preview {
    margin-bottom: 1rem;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, margin-bottom 0.5s ease;
    margin-bottom: 0;
}

.accordion-content.active {
    max-height: 2000px;
    margin-bottom: 1.5rem;
    transition: max-height 0.7s ease-in, margin-bottom 0.7s ease;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    margin-top: 1rem;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s ease;
    font-family: inherit;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.read-more-btn:hover {
    opacity: 0.7;
}

.read-more-btn.hidden {
    display: none;
}

.text {
    font-size: 1.125rem;
    line-height: 1.9;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

@media (max-width: 768px) {
    .text {
        font-size: 1.25rem;
    }
}

.social {
    max-width: 100%;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: block;
    padding: 1rem 1.5rem;
    background-color: var(--button-bg);
    color: var(--bg);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.social-link:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.social-link:active {
    transform: translateY(0);
}

.social-name {
    display: block;
}

.contact {
    max-width: 100%;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-error {
    font-size: 0.875rem;
    color: #e74c3c;
    display: none;
    margin-top: -0.5rem;
    padding-left: 0.5rem;
}

.field-error.show {
    display: block;
}

.input.error,
.textarea.error {
    border-color: #e74c3c;
}

.input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background-color: var(--bg);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.input:focus {
    border-color: var(--text);
    outline: none;
}

.input::placeholder {
    color: var(--text-muted);
}

.textarea {
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

.button {
    padding: 1rem 2rem;
    background-color: var(--button-bg);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    align-self: flex-start;
}

.button:hover {
    background-color: var(--button-hover);
    transform: translateY(-2px);
}

.footer {
    margin-top: 6rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 400;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.button:active {
    transform: translateY(0);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    display: none;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #4caf50;
    display: block;
    animation: fadeIn 0.3s ease;
}

.message.success.fade-out {
    animation: fadeOut 1s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 2px solid #ef5350;
    display: block;
}

@media (max-width: 768px) {
    html {
        font-size: 18px;
    }

    .container {
        padding: 3rem 1.5rem;
        padding-top: 5.5rem;
    }

    .header {
        padding: 0.75rem 1.5rem;
    }

    .header-logo {
        gap: 0.75rem;
    }

    .header-photo {
        width: 60px;
        height: 60px;
    }

    .logo-cloud {
        padding: 0.5rem 1rem;
    }

    .logo-slogan {
        font-size: 0.75rem;
    }

    .main {
        gap: 4rem;
    }

    .photo {
        width: 250px;
        height: 250px;
    }

    .title {
        font-size: 1.5rem;
    }

    .text {
        font-size: 1.25rem;
    }
    
    .footer-title {
        font-size: 0.9rem;
    }
    
    .footer-desc {
        font-size: 0.85rem;
    }
    
    .footer-links li {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }

    .social-link {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
    }

    .input {
        font-size: 0.95rem;
        padding: 0.875rem;
    }

    .button {
        font-size: 0.95rem;
        padding: 0.875rem 1.75rem;
        align-self: stretch;
    }

    .footer {
        margin-top: 4rem;
        padding-top: 2rem;
    }

    .footer-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 17px;
    }

    .container {
        padding: 2rem 1rem;
        padding-top: 5rem;
    }

    .header {
        padding: 0.625rem 1rem;
    }

    .header-photo {
        width: 55px;
        height: 55px;
    }

    .logo-cloud {
        padding: 0.5rem 0.875rem;
    }

    .logo-slogan {
        font-size: 0.7rem;
    }

    .photo {
        width: 200px;
        height: 200px;
    }

    .title {
        font-size: 1.25rem;
    }

    .text {
        font-size: 1.15rem;
    }
    
    .footer-title {
        font-size: 0.85rem;
    }
    
    .footer-desc {
        font-size: 0.8rem;
    }
    
    .footer-links li {
        font-size: 0.8rem;
    }
    
    .footer-copyright {
        font-size: 0.75rem;
    }
}
